summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-09-19 13:24:05 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-09-20 17:31:26 +0200
commit088cd9dc35b01dc5e8a7a7eedf5f52bcfc4c8001 (patch)
treef2a646611fa938bcacbc66c4a8d1eb2d308f068a
parentdbd89ccc4fd989f12d42ebcb68aa56ab969e84bd (diff)
tdf#150650 Fix changing fill style to None via Sidebar
Regression from 5491a82854e3e6dd2dbb4b0012cb4bbeb4ee22e0 Change-Id: I17cfb037f2064a508317090e6b66f20e253a9436 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140150 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit 6238758d80e170cdb586df2b34d479499574cb72) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140161 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 1bcbdac19e1e..fa634ee4499b 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -90,9 +90,19 @@ void AreaPropertyPanel::setFillTransparence(const XFillTransparenceItem& rItem)
void AreaPropertyPanel::setFillUseBackground(const XFillStyleItem* pStyleItem,
const XFillUseSlideBackgroundItem& rItem)
{
- GetBindings()->GetDispatcher()->ExecuteList(
- SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SfxCallMode::RECORD,
- std::initializer_list<SfxPoolItem const*>{ &rItem, pStyleItem });
+ const SfxPoolItem* pItem = nullptr;
+ auto pDispatcher = GetBindings()->GetDispatcher();
+ auto state = pDispatcher->QueryState(SID_ATTR_FILL_USE_SLIDE_BACKGROUND, pItem);
+ // FillUseSlideBackground is only available in Impress
+ if (state == SfxItemState::DISABLED)
+ {
+ setFillStyle(*pStyleItem);
+ }
+ else
+ {
+ pDispatcher->ExecuteList(SID_ATTR_FILL_USE_SLIDE_BACKGROUND, SfxCallMode::RECORD,
+ std::initializer_list<SfxPoolItem const*>{ &rItem, pStyleItem });
+ }
}
void AreaPropertyPanel::setFillFloatTransparence(const XFillFloatTransparenceItem& rItem)