sd/qa/unit/uiimpress.cxx       |    5 +++--
 sd/source/ui/func/fuconstr.cxx |   36 ------------------------------------
 2 files changed, 3 insertions(+), 38 deletions(-)

New commits:
commit cf36777e8df6ed7233e3c6c6fc0ba0a1ed505cfb
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon Jun 19 15:28:40 2023 +0900
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Jun 20 10:10:37 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/+/153286
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index e3a9c86e91d1..c4cdc0a5e338 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -1144,7 +1144,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();
@@ -1188,7 +1189,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);
-            }
-        }
     }
 }
 

Reply via email to