diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-11 15:16:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-11 15:16:51 +0100 |
commit | 90f91088d238469b4a2262c91de3117ba40f5bde (patch) | |
tree | bad912690be028b4242744eed6755b36bb1bcefa /dbaccess | |
parent | 2fa2d39bf3eb2f216e13f6dd2c6c5c35fd19627c (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..650a5ddd9111 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 } + { "BaseURI", 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { "StreamName", 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 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 } + { "BaseURI", 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { "StreamName", 0, ::getCppuType( (OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, + { "UsePrettyPrinting", 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, + {} }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); |