summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-04-13 14:04:18 +0200
committerMichael Stahl <mstahl@redhat.com>2016-04-13 14:34:45 +0200
commita7df6b4964e4c9af33e1d030042b6c0a5e59dd55 (patch)
treefd3d229bf0a8463ffeb3049f645ba549465230c4
parentebe94af4eca68360c99f3421f1298f94747de003 (diff)
tdf#99264 svx: don't pass null pointers to SfxDispatcher
(regression from 51d7f466df85f679f54e4e690f8b5e602192eb7b) Change-Id: I79863f8e5767acc90dc3c6ef5e94d2d90a03dd0e
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanel.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 0d61d41e0593..c0092c2a3fd8 100644
--- a/svx/source/sidebar/area/AreaPropertyPanel.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx
@@ -122,31 +122,39 @@ void AreaPropertyPanel::setFillStyle(const XFillStyleItem& rItem)
}
void AreaPropertyPanel::setFillStyleAndColor(const XFillStyleItem* pStyleItem,
- const XFillColorItem& aColorItem)
+ const XFillColorItem& rColorItem)
{
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_COLOR,
- SfxCallMode::RECORD, { &aColorItem, pStyleItem });
+ SfxCallMode::RECORD, (pStyleItem)
+ ? std::initializer_list<SfxPoolItem const*>({ &rColorItem, pStyleItem })
+ : std::initializer_list<SfxPoolItem const*>({ &rColorItem }));
}
void AreaPropertyPanel::setFillStyleAndGradient(const XFillStyleItem* pStyleItem,
const XFillGradientItem& rGradientItem)
{
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_GRADIENT,
- SfxCallMode::RECORD, { &rGradientItem, pStyleItem });
+ SfxCallMode::RECORD, (pStyleItem)
+ ? std::initializer_list<SfxPoolItem const*>({ &rGradientItem, pStyleItem })
+ : std::initializer_list<SfxPoolItem const*>({ &rGradientItem }));
}
void AreaPropertyPanel::setFillStyleAndHatch(const XFillStyleItem* pStyleItem,
const XFillHatchItem& rHatchItem)
{
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_HATCH,
- SfxCallMode::RECORD, { &rHatchItem, pStyleItem });
+ SfxCallMode::RECORD, (pStyleItem)
+ ? std::initializer_list<SfxPoolItem const*>({ &rHatchItem, pStyleItem })
+ : std::initializer_list<SfxPoolItem const*>({ &rHatchItem }));
}
void AreaPropertyPanel::setFillStyleAndBitmap(const XFillStyleItem* pStyleItem,
const XFillBitmapItem& rBitmapItem)
{
GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_BITMAP,
- SfxCallMode::RECORD, { &rBitmapItem, pStyleItem });
+ SfxCallMode::RECORD, (pStyleItem)
+ ? std::initializer_list<SfxPoolItem const*>({ &rBitmapItem, pStyleItem })
+ : std::initializer_list<SfxPoolItem const*>({ &rBitmapItem }));
}
} } // end of namespace svx::sidebar