sd/qa/unit/uiimpress.cxx | 5 +++-- sd/source/ui/func/fuconstr.cxx | 36 ------------------------------------ 2 files changed, 3 insertions(+), 38 deletions(-)
New commits: commit cd1385378cb56396f0b2145c446c97ae01fc8069 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon Jun 19 15:28:40 2023 +0900 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Aug 11 09:08:02 2023 +0200 tdf#155086 remove code that sets theme color to shapes as DF Remove this functionallity for now until we support theme colors in shape styles. Then we can do it for the default style, and not as a direct format for each inserted shape. Change-Id: Ib042072954a79cadc750372333c40269fbe4ca40 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153244 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> (cherry picked from commit 2afff27c5327bcb30f894d9a507131f2ad8f1dc6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155541 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx index c1a53d493797..b4a7890123d7 100644 --- a/sd/qa/unit/uiimpress.cxx +++ b/sd/qa/unit/uiimpress.cxx @@ -1137,7 +1137,8 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696) CPPUNIT_ASSERT(bContoured); } -CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testThemeShapeInsert) +// TODO - Readd when we implement style level fill color and set that for default style +/*CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testThemeShapeInsert) { // Given a document with a theme, accent1 color is set to 0x000004: createSdImpressDoc(); @@ -1181,7 +1182,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testThemeShapeInsert) // - Expected: 0 / 0x000004 (~black) // - Actual : 7512015 / 0x729fcf (~blue) CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0x4), nFillColor); -} +}*/ CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx index 4db1f4042dc9..fd93a3ce7c94 100644 --- a/sd/source/ui/func/fuconstr.cxx +++ b/sd/source/ui/func/fuconstr.cxx @@ -371,42 +371,6 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj, pObj->SetMergedItemSet(aAttr); } } - else - { - // Creating an object with fill. - SdrPage* pThemePage = pPage; - if (pThemePage->TRG_HasMasterPage()) - { - pThemePage = &pThemePage->TRG_GetMasterPage(); - } - - auto const& pTheme = pThemePage->getSdrPageProperties().GetTheme(); - if (pTheme) - { - // We construct an object on a page where the master page has a theme. Take the - // accent1 color from that theme, make sure it has priority over the shape's - // document-global style. - SfxItemSet aAttr(mpView->GetDefaultAttr()); - - aAttr.Put(XFillStyleItem(css::drawing::FillStyle_SOLID)); - - model::ThemeColorType eColorType = model::ThemeColorType::Accent1; - Color aColor = pTheme->GetColor(eColorType); - XFillColorItem aFillColorItem("", aColor); - aFillColorItem.getComplexColor().setSchemeColor(eColorType); - aAttr.Put(aFillColorItem); - - aAttr.Put(XLineStyleItem(css::drawing::LineStyle_SOLID)); - - // Line color is 50% darker than the fill color. - aColor.ApplyTintOrShade(-5000); - XLineColorItem aLineColorItem("", aColor); - // TODO no theme or theme effect for line colors yet. - aAttr.Put(aLineColorItem); - - pObj->SetMergedItemSet(aAttr); - } - } } }