summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-23 16:03:53 +0200
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2016-12-26 18:35:59 +0000
commit833e6ca9d284bca536d09f6a30b1a8cfbb1c86d8 (patch)
treebd620398e39c9b2b84bb6127fa58575440193a80 /reportdesign
parentd6a7f7fe98af19b43d8e82555a10bf1e835d0533 (diff)
use std::vector instead of naked array in SfxItemPool
Change-Id: I2d4ac010ff5818e673567cee05700872588918e4 Reviewed-on: https://gerrit.libreoffice.org/32384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx6
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx8
2 files changed, 7 insertions, 7 deletions
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 5fcc67c828c0..3456dcad6737 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -648,7 +648,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( _rxParentWindow );
::std::unique_ptr<FontList> pFontList(new FontList( pParent ));
XColorListRef pColorList( XColorList::CreateStdColorList() );
- SfxPoolItem* pDefaults[] =
+ std::vector<SfxPoolItem*> pDefaults
{
new SvxFontItem(ITEMID_FONT),
new SvxFontHeightItem(240,100,ITEMID_FONTHEIGHT),
@@ -694,7 +694,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
};
- OSL_ASSERT( SAL_N_ELEMENTS(pDefaults) == SAL_N_ELEMENTS(aItemInfos) );
+ OSL_ASSERT( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) );
static const sal_uInt16 pRanges[] =
{
@@ -702,7 +702,7 @@ bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxRep
0
};
- SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, pDefaults) );
+ SfxItemPool* pPool( new SfxItemPool(OUString("ReportCharProperties"), ITEMID_FONT,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults) );
// not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
bool bSuccess = false;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 9eed05e7d07d..10db48c2f591 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2381,7 +2381,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
const XGradient aNullGrad(RGB_Color(COL_BLACK), RGB_Color(COL_WHITE));
const XHatch aNullHatch(aNullLineCol);
- SfxPoolItem* pDefaults[] =
+ std::vector<SfxPoolItem*> pDefaults
{
new SvxLRSpaceItem(RPTUI_ID_LRSPACE),
new SvxULSpaceItem(RPTUI_ID_ULSPACE),
@@ -2414,7 +2414,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
new SfxUInt16Item(RPTUI_ID_METRIC,static_cast<sal_uInt16>(eUserMetric))
};
- pPool->SetDefaults(pDefaults);
+ pPool->SetDefaults(&pDefaults);
pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
@@ -4197,7 +4197,7 @@ void OReportController::openZoomDialog()
{
{ SID_ATTR_ZOOM, true }
};
- SfxPoolItem* pDefaults[] =
+ std::vector<SfxPoolItem*> pDefaults
{
new SvxZoomItem()
};
@@ -4206,7 +4206,7 @@ void OReportController::openZoomDialog()
SID_ATTR_ZOOM,SID_ATTR_ZOOM,
0
};
- SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, pDefaults) );
+ SfxItemPool* pPool( new SfxItemPool(OUString("ZoomProperties"), SID_ATTR_ZOOM,SID_ATTR_ZOOM, aItemInfos, &pDefaults) );
pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
pPool->FreezeIdRanges(); // the same
try