diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 13:43:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-09 14:24:00 +0200 |
commit | 027b25ecd54ac97ea2471ca73e3ba89ce052fe76 (patch) | |
tree | fe8923a13998a96a865027c897273d0edb4d7c62 /svx | |
parent | f59e802478e35e7b6f561f24806bca47b604529b (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 'svx')
-rw-r--r-- | svx/source/svdraw/svdobj.cxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index d48f8de48a4b..bcbeb9f2e2ce 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -787,10 +787,8 @@ void SdrObject::GetGrabBagItem(css::uno::Any& rVal) const { if (pGrabBagItem != nullptr) pGrabBagItem->QueryValue(rVal); - else { - uno::Sequence<beans::PropertyValue> aValue(0); - rVal <<= aValue; - } + else + rVal <<= uno::Sequence<beans::PropertyValue>(); } void SdrObject::SetGrabBagItem(const css::uno::Any& rVal) diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 59f39cbbb702..541b340dc26d 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -29,6 +29,7 @@ #include <svx/svdomedia.hxx> #include <svx/svdpool.hxx> #include <comphelper/classids.hxx> +#include <comphelper/propertysequence.hxx> #include <sfx2/frmdescr.hxx> #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -395,9 +396,9 @@ bool SvxOle2Shape::createObject( const SvGlobalName &aClassName ) if( SvxShape::getPropertyValue( UNO_NAME_OLE2_PERSISTNAME ) >>= aTmpStr ) aPersistName = aTmpStr; - uno::Sequence<beans::PropertyValue> objArgs(1); - objArgs[0].Name = "DefaultParentBaseURL"; - objArgs[0].Value <<= pPersist->getDocumentBaseURL(); + uno::Sequence<beans::PropertyValue> objArgs( comphelper::InitPropertySequence({ + { "DefaultParentBaseURL", Any(pPersist->getDocumentBaseURL()) } + })); //TODO/LATER: how to cope with creation failure?! uno::Reference<embed::XEmbeddedObject> xObj( pPersist->getEmbeddedObjectContainer().CreateEmbeddedObject( |