diff options
author | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-19 13:24:05 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-09-19 19:51:51 +0200 |
commit | 6238758d80e170cdb586df2b34d479499574cb72 (patch) | |
tree | e082b9534cd435f0801686507cf3eaf89ac435b0 /svx | |
parent | 716a81042558143b400c502d1ba3e1ff1b3672e1 (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>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/area/AreaPropertyPanel.cxx | 16 |
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) |