summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sd/qa/unit/uiimpress.cxx16
-rw-r--r--sd/source/ui/view/drviews2.cxx10
-rw-r--r--svx/sdi/svx.sdi2
3 files changed, 26 insertions, 2 deletions
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index f035c1f68fac..f67d8fa32e4e 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -973,10 +973,12 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
uno::UNO_QUERY);
xController->select(uno::Any(xShape));
- // When setting the fill color of that shape, with theme metadata:
+ // When setting the fill color of that shape, with theme metadata & effects:
uno::Sequence<beans::PropertyValue> aColorArgs = {
comphelper::makePropertyValue("FillColor", static_cast<sal_Int32>(0xed7d31)), // orange
comphelper::makePropertyValue("ColorThemeIndex", static_cast<sal_Int16>(4)), // accent 1
+ comphelper::makePropertyValue("ColorLumMod", static_cast<sal_Int16>(4000)),
+ comphelper::makePropertyValue("ColorLumOff", static_cast<sal_Int16>(6000)),
};
dispatchCommand(mxComponent, ".uno:FillColor", aColorArgs);
Scheduler::ProcessEventsToIdle();
@@ -989,6 +991,18 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testFillColorTheme)
// - Actual : -1
// i.e. the theme index was lost during the dispatch of the command.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(4), nFillColorTheme);
+
+ // Then also verify the effects:
+ sal_Int16 nFillColorLumMod = 10000;
+ xShape->getPropertyValue("FillColorLumMod") >>= nFillColorLumMod;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4000
+ // - Actual : 10000
+ // i.e. the theme index was set, but not the effects.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(4000), nFillColorLumMod);
+ sal_Int16 nFillColorLumOff = 0;
+ xShape->getPropertyValue("FillColorLumOff") >>= nFillColorLumOff;
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(6000), nFillColorLumOff);
}
CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf127696)
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 591b90afc3f4..a8906acfc40c 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -606,6 +606,16 @@ public:
auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
aColorItem.GetThemeColor().SetThemeIndex(pIntItem->GetValue());
}
+ if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_MOD, false, &pItem) == SfxItemState::SET)
+ {
+ auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
+ aColorItem.GetThemeColor().SetLumMod(pIntItem->GetValue());
+ }
+ if (pArgs->GetItemState(SID_ATTR_COLOR_LUM_OFF, false, &pItem) == SfxItemState::SET)
+ {
+ auto pIntItem = static_cast<const SfxInt16Item*>(pItem);
+ aColorItem.GetThemeColor().SetLumOff(pIntItem->GetValue());
+ }
pArgs->Put(aColorItem);
}
}
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index b29647e07141..3c8a3642c04a 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -2781,7 +2781,7 @@ XFillBitmapItem FillPageBitmap SID_ATTR_PAGE_BITMAP
]
XFillColorItem FillColor SID_ATTR_FILL_COLOR
-(SfxStringItem Color SID_ATTR_COLOR_STR, XFillColorItem FillColor SID_ATTR_FILL_COLOR, SfxInt16Item ColorThemeIndex SID_ATTR_COLOR_THEME_INDEX)
+(SfxStringItem Color SID_ATTR_COLOR_STR, XFillColorItem FillColor SID_ATTR_FILL_COLOR, SfxInt16Item ColorThemeIndex SID_ATTR_COLOR_THEME_INDEX, SfxInt16Item ColorLumMod SID_ATTR_COLOR_LUM_MOD, SfxInt16Item ColorLumOff SID_ATTR_COLOR_LUM_OFF)
[
AutoUpdate = TRUE,
FastCall = FALSE,