Resolves tdf#156685 - "Object without fill" style for tables
The "Default Drawing Style" uses Tango Sky Blue for the background,
which is treated as dark since commit
Ia5e405fc05613726b5011174c8d00ca204eb31b2. This ends up in unreadable
white font color on white backgrounds for tables. The new style
"Object without fill" has a clear background.
Change-Id: I6b2f701e4a8cce6200fd2a5e86037e9a36b32833
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157568
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 67196e8..b28f89c 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -44,6 +44,8 @@
#include <Window.hxx>
#include <drawview.hxx>
#include <sdmod.hxx>
#include <strings.hrc>
#include <sdresid.hxx>
#include <memory>
@@ -147,7 +149,11 @@ static void InsertTableImpl(const DrawViewShell* pShell,
aRect,
nColumns,
nRows);
pObj->NbcSetStyleSheet( pShell->GetDoc()->GetDefaultStyleSheet(), true );
//tables must not use default background tango sky blue tdf#156685
SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
pShell->GetDoc()->GetStyleSheetPool()->Find(
SdResId(STR_POOLSHEET_OBJWITHOUTFILL), SfxStyleFamily::Para));
pObj->NbcSetStyleSheet( pStyleSheet, true );
apply_table_style( pObj.get(), pShell->GetDoc(), sTableStyle );
SdrPageView* pPV = pView->GetSdrPageView();