summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorSwachhand Lokhande <swachhandl95@gmail.com>2015-03-07 18:58:49 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-10 10:26:59 +0000
commitb1534edf523a405b91ad04c5351735e745ceb7ee (patch)
tree936b938dab11100b532f3b9204891d162c334bef /basctl
parentbb2728fd246716588d135c9e159135b1c5a7d3e1 (diff)
tdf#89592 Using initializer_lists to populate Sequence<PropertyValue>
Change-Id: Idef9dd55eb1719eaf592bc4a86440cbd5aa4fb32 Reviewed-on: https://gerrit.libreoffice.org/14781 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basicrenderable.cxx8
-rw-r--r--basctl/source/basicide/moduldl2.cxx11
-rw-r--r--basctl/source/basicide/scriptdocument.cxx7
3 files changed, 14 insertions, 12 deletions
diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx
index 013807e202b3..ee5ed4bef958 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -25,6 +25,8 @@
#include <tools/multisel.hxx>
#include <tools/resary.hxx>
+#include <comphelper/propertysequence.hxx>
+
namespace basctl
{
@@ -136,12 +138,12 @@ Sequence<beans::PropertyValue> SAL_CALL Renderable::getRenderer (
{
Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
- aVals.realloc( 1 );
- aVals[0].Name = "PageSize" ;
awt::Size aSize;
aSize.Width = aPageSize.Width();
aSize.Height = aPageSize.Height();
- aVals[0].Value <<= aSize;
+ aVals = ::comphelper::InitPropertySequence({
+ { "PageSize", makeAny(aSize) }
+ });
}
appendPrintUIOptions( aVals );
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 812c9ec1fa03..786574e8365c 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -52,6 +52,7 @@
#include <com/sun/star/util/VetoException.hpp>
#include <com/sun/star/script/ModuleSizeExceededRequest.hpp>
+#include <comphelper/propertysequence.hxx>
namespace basctl
@@ -1220,14 +1221,12 @@ void LibPage::ExportAsPackage( const OUString& aLibName )
const OUString strFullPath = "FullPath" ;
const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
- Sequence<beans::PropertyValue> attribs( 2 );
- beans::PropertyValue * pattribs = attribs.getArray();
- pattribs[ 0 ].Name = strFullPath;
OUString fullPath = aLibName;
fullPath += "/" ;
- pattribs[ 0 ].Value <<= fullPath;
- pattribs[ 1 ].Name = strMediaType;
- pattribs[ 1 ].Value <<= strBasicMediaType;
+ auto attribs(::comphelper::InitPropertySequence({
+ { strFullPath, makeAny(fullPath) },
+ { strMediaType, makeAny(strBasicMediaType) }
+ }));
manifest.push_back( attribs );
// write into pipe:
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 4a96cc7e23ee..f137d7acdd2d 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -54,6 +54,7 @@
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <osl/file.hxx>
#include <rtl/uri.hxx>
@@ -815,9 +816,9 @@ namespace basctl
Sequence< PropertyValue > aArgs;
if ( _rxStatusIndicator.is() )
{
- aArgs.realloc(1);
- aArgs[0].Name = "StatusIndicator" ;
- aArgs[0].Value <<= _rxStatusIndicator;
+ aArgs = ::comphelper::InitPropertySequence({
+ { "StatusIndicator", makeAny(_rxStatusIndicator) }
+ });
}
try