From a62c2a5fa5d5be465b0edab6adeb1fd16ace462f Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 11 Dec 2013 15:16:51 +0100 Subject: 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 --- filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'filter/source/xmlfilteradaptor') diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx index 5ad8a22040cb..539f7462bcff 100644 --- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx +++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx @@ -63,9 +63,6 @@ using namespace com::sun::star::xml::sax; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::task; - -#define MAP_LEN(x) x, sizeof(x) - 1 - sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star::beans::PropertyValue >& aDescriptor ) throw (RuntimeException) { @@ -98,8 +95,8 @@ sal_Bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< ::com::sun::star // create an XProperty set to configure the exporter for pretty printing PropertyMapEntry aImportInfoMap[] = { - { MAP_LEN( "BaseURI" ), 0, &::getCppuType((const OUString*)0), PropertyAttribute::MAYBEVOID, 0}, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("BaseURI"), 0, ::getCppuType((const OUString*)0), PropertyAttribute::MAYBEVOID, 0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; Reference< XPropertySet > xInfoSet( @@ -256,10 +253,10 @@ sal_Bool SAL_CALL XmlFilterAdaptor::exportImpl( const Sequence< ::com::sun::star // create an XProperty set to configure the exporter for pretty printing PropertyMapEntry aImportInfoMap[] = { - { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, - { MAP_LEN( "ExportTextNumberElement" ), 0, &::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, - { MAP_LEN( "BaseURI" ), 0, &::getCppuType((const OUString*)0), PropertyAttribute::MAYBEVOID, 0}, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("UsePrettyPrinting"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, + { OUString("ExportTextNumberElement"), 0, ::getCppuType((const sal_Bool*)0), PropertyAttribute::MAYBEVOID, 0}, + { OUString("BaseURI"), 0, ::getCppuType((const OUString*)0), PropertyAttribute::MAYBEVOID, 0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; Reference< XPropertySet > xInfoSet( -- cgit