summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 13:43:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-09 14:24:00 +0200
commit027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (patch)
treefe8923a13998a96a865027c897273d0edb4d7c62 /reportdesign
parentf59e802478e35e7b6f561f24806bca47b604529b (diff)
use comphelper::InitPropertySequence in more places
Change-Id: I72d7b13a23ce306b752b39187a0e9fbb7028643a Reviewed-on: https://gerrit.libreoffice.org/38606 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/ui/dlg/PageNumber.cxx16
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx10
-rw-r--r--reportdesign/source/ui/report/dlgedfunc.cxx7
3 files changed, 15 insertions, 18 deletions
diff --git a/reportdesign/source/ui/dlg/PageNumber.cxx b/reportdesign/source/ui/dlg/PageNumber.cxx
index 2e28a3a2a479..cbe3fe9a7ef6 100644
--- a/reportdesign/source/ui/dlg/PageNumber.cxx
+++ b/reportdesign/source/ui/dlg/PageNumber.cxx
@@ -29,6 +29,7 @@
#include "UITools.hxx"
#include "uistrings.hrc"
#include "ReportController.hxx"
+#include <comphelper/propertysequence.hxx>
#include <algorithm>
namespace rptui
@@ -108,16 +109,11 @@ short OPageNumberDialog::Execute()
if ( m_pAlignmentLst->GetSelectEntryPos() > 2 )
nPosX = nPos2X;
- sal_Int32 nLength = 0;
- uno::Sequence<beans::PropertyValue> aValues( 3 );
- aValues[nLength].Name = PROPERTY_POSITION;
- aValues[nLength++].Value <<= awt::Point(nPosX,0);
-
- aValues[nLength].Name = PROPERTY_PAGEHEADERON;
- aValues[nLength++].Value <<= m_pTopPage->IsChecked();
-
- aValues[nLength].Name = PROPERTY_STATE;
- aValues[nLength++].Value <<= m_pPageNofM->IsChecked();
+ uno::Sequence<beans::PropertyValue> aValues( comphelper::InitPropertySequence({
+ { PROPERTY_POSITION, uno::Any(awt::Point(nPosX,0)) },
+ { PROPERTY_PAGEHEADERON, uno::Any(m_pTopPage->IsChecked()) },
+ { PROPERTY_STATE, uno::Any(m_pPageNofM->IsChecked()) }
+ }));
m_pController->executeChecked(SID_INSERT_FLD_PGNUMBER,aValues);
}
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 1568e477967f..355b6de39105 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -34,6 +34,7 @@
#include <unotools/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
+#include <comphelper/propertysequence.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <connectivity/dbtools.hxx>
@@ -3004,11 +3005,10 @@ void OReportController::insertGraphic()
{
bool bLink = true;
xController->getValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0) >>= bLink;
- uno::Sequence<beans::PropertyValue> aArgs(2);
- aArgs[0].Name = PROPERTY_IMAGEURL;
- aArgs[0].Value <<= aDialog.GetPath();
- aArgs[1].Name = PROPERTY_PRESERVEIRI;
- aArgs[1].Value <<= bLink;
+ uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({
+ { PROPERTY_IMAGEURL, Any(aDialog.GetPath()) },
+ { PROPERTY_PRESERVEIRI, Any(bLink) }
+ }));
createControl(aArgs,xSection,OUString(),OBJ_DLG_IMAGECONTROL);
}
}
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx
index a3bc7e3c3a3a..a513fab6efe1 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -51,6 +51,7 @@
#include <uistrings.hrc>
#include "UndoEnv.hxx"
#include <RptModel.hxx>
+#include <comphelper/propertysequence.hxx>
#include <tools/diagnose_ex.h>
#define DEFAUL_MOVE_SIZE 100
@@ -169,9 +170,9 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt )
if ( rMEvt.GetClicks() > 1 )
{
// show property browser
- uno::Sequence<beans::PropertyValue> aArgs(1);
- aArgs[0].Name = "ShowProperties";
- aArgs[0].Value <<= true;
+ uno::Sequence<beans::PropertyValue> aArgs( comphelper::InitPropertySequence({
+ { "ShowProperties", uno::Any(true) }
+ }));
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController().executeUnChecked(SID_SHOW_PROPERTYBROWSER,aArgs);
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->UpdatePropertyBrowserDelayed(m_rView);
// TODO character in shapes