diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-11 15:16:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-12 08:26:40 +0100 |
commit | a62c2a5fa5d5be465b0edab6adeb1fd16ace462f (patch) | |
tree | 47cf29b4b7a0ba3ce321ce628a6b0a6175d978d7 /dbaccess | |
parent | cff72ec4bf87c6484be97d954966309ba7a5eb8a (diff) |
Don't hold css::uno::Type instances by pointer
...in comphelper::PropertyMapEntry and SfxItemPropertyMapEntry. And as the
arrays of such need to be initialized dynamically anyway, also change their name
members to proper OUStrings while at it. Plus some const clean-up.
Change-Id: I67d4d7b5773fb020605f369daf39528bec930606
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 38c1ff4ab164..21f16e8259dd 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -89,7 +89,6 @@ #include <list> #include <svtools/grfmgr.hxx> -#define MAP_LEN(x) x, sizeof(x) - 1 using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; @@ -493,11 +492,11 @@ void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentCont lcl_extractAndStartStatusIndicator( _rResource, xStatusIndicator, aFilterCreationArgs ); /** property map for import info set */ - comphelper::PropertyMapEntry aExportInfoMap[] = + comphelper::PropertyMapEntry const aExportInfoMap[] = { - { MAP_LEN( "BaseURI"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "StreamName"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); xInfoSet->setPropertyValue("BaseURI", uno::makeAny(_rResource.getOrDefault("URL",OUString()))); @@ -1613,10 +1612,10 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r /** property map for export info set */ comphelper::PropertyMapEntry aExportInfoMap[] = { - { MAP_LEN( "BaseURI"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "StreamName"), 0,&::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("UsePrettyPrinting"), 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); |