[Libreoffice-commits] core.git: svx/source
Michael Stahl
mstahl at redhat.com
Wed Apr 13 12:37:12 UTC 2016
svx/source/sidebar/area/AreaPropertyPanel.cxx | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
New commits:
commit a7df6b4964e4c9af33e1d030042b6c0a5e59dd55
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Apr 13 14:04:18 2016 +0200
tdf#99264 svx: don't pass null pointers to SfxDispatcher
(regression from 51d7f466df85f679f54e4e690f8b5e602192eb7b)
Change-Id: I79863f8e5767acc90dc3c6ef5e94d2d90a03dd0e
diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx
index 0d61d41..c0092c2 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
More information about the Libreoffice-commits
mailing list