sd/qa/unit/uiimpress.cxx |5 -
sd/source/ui/func/fuconstr.cxx | 36
sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx |binary
sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx | 43
++
4 files changed, 46 insertions(+), 38 deletions(-)
New commits:
commit 2afff27c5327bcb30f894d9a507131f2ad8f1dc6
Author: Tomaž Vajngerl
AuthorDate: Mon Jun 19 15:28:40 2023 +0900
Commit: Tomaž Vajngerl
CommitDate: Mon Jun 19 13:36: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
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 0x04:
createSdImpressDoc();
@@ -1188,7 +1189,7 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest,
testThemeShapeInsert)
// - Expected: 0 / 0x04 (~black)
// - Actual : 7512015 / 0x729fcf (~blue)
CPPUNIT_ASSERT_EQUAL(static_cast(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);
-}
-}
}
}
commit 703c28d76924bcbda3f492de8a14cc9c30ee1dfb
Author: Tomaž Vajngerl
AuthorDate: Mon Jun 19 15:48:56 2023 +0900
Commit: Tomaž Vajngerl
CommitDate: Mon Jun 19 13:36:28 2023 +0200
sw: Test paragraph level text background
Change-Id: Icea365ae036cae49749dd24bb8412775fafbd6c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153247
Tested-by: Tomaž Vajngerl
Reviewed-by: Tomaž Vajngerl
diff --git
a/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx
b/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx
new file mode 100644
index ..5b012f01333b
Binary files /dev/null and
b/sw/qa/extras/ooxmlexport/data/Test_ThemeTextParaBackgroundColor.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
index f9e7155859ea..45bd8014f1d3 100644
--- a/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxml_ThemeExport.cxx
@@ -97,6 +97,49 @@ DECLARE_SW_ROUNDTRIP_TEST(testCharUnderlineTheme_DOCX,
"Test_CharUnderlineThemeC
CPPUNIT_ASSERT_EQUAL(sal_Int16(2509), rTransforms[0].mnValue);
}
+DECLARE_SW_ROUNDTRIP_TEST(testP