diff options
Diffstat (limited to 'dbaccess/source/ui/misc/UITools.cxx')
-rw-r--r-- | dbaccess/source/ui/misc/UITools.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index 10b7f2a07b36..1458bb93a853 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -70,6 +70,7 @@ #include "FieldDescriptions.hxx" #include <comphelper/processfactory.hxx> #include <comphelper/stl_types.hxx> +#include <comphelper/propertysequence.hxx> #include <svx/svxids.hrc> @@ -1378,21 +1379,12 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo try { Reference<XMultiServiceFactory> xORB( xNameAccess, UNO_QUERY_THROW ); - Sequence< Any > aArguments(3); - PropertyValue aValue; - // set as folder - aValue.Name = "Name"; - aValue.Value <<= sNewName; - aArguments[0] <<= aValue; - //parent - aValue.Name = "Parent"; - aValue.Value <<= xNameAccess; - aArguments[1] <<= aValue; - - aValue.Name = PROPERTY_EMBEDDEDOBJECT; - aValue.Value <<= _xContent; - aArguments[2] <<= aValue; - + uno::Sequence<uno::Any> aArguments(comphelper::InitAnyPropertySequence( + { + {"Name", uno::Any(sNewName)}, // set as folder + {"Parent", uno::Any(xNameAccess)}, + {PROPERTY_EMBEDDEDOBJECT, uno::Any(_xContent)}, + })); OUString sServiceName(_bCollection ? ((_bForm) ? OUString(SERVICE_NAME_FORM_COLLECTION) : OUString(SERVICE_NAME_REPORT_COLLECTION)) : OUString(SERVICE_SDB_DOCUMENTDEFINITION)); Reference<XContent > xNew( xORB->createInstanceWithArguments( sServiceName, aArguments ), UNO_QUERY_THROW ); |