diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-11 15:37:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-11 15:38:30 +0100 |
commit | 123e2c3e9350463fde38fbcbb522e3d6d8340ee6 (patch) | |
tree | c0f9350733d93f6a906cfe2f19b5dac66a655283 /chart2 | |
parent | 90f91088d238469b4a2262c91de3117ba40f5bde (diff) |
Revert "Don't hold css::uno::Type instances by pointer"
This reverts commit 90f91088d238469b4a2262c91de3117ba40f5bde for now:
Ach, old GCC doesn't like plain string literals to initialize members
of OUString type...
Change-Id: I50563a00406259bb5d41831e2a2796762450d097
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/model/filter/XMLFilter.cxx | 45 | ||||
-rw-r--r-- | chart2/source/tools/ErrorBar.cxx | 32 |
2 files changed, 39 insertions, 38 deletions
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx index 8d8e8e8a1920..8c563b1f1f0a 100644 --- a/chart2/source/model/filter/XMLFilter.cxx +++ b/chart2/source/model/filter/XMLFilter.cxx @@ -61,6 +61,7 @@ using ::osl::MutexGuard; namespace { #define LOCAL_CONST_STR(i, x) sal_Char const i[sizeof(x)] = x +#define MAP_LEN(x) x, sizeof(x) - 1 LOCAL_CONST_STR( sXML_metaStreamName, "meta.xml"); LOCAL_CONST_STR( sXML_styleStreamName, "styles.xml" ); @@ -339,28 +340,28 @@ sal_Int32 XMLFilter::impl_Import( // create XPropertySet with extra informatio for the filter /** property map for import info set */ - comphelper::PropertyMapEntry const aImportInfoMap[] = + comphelper::PropertyMapEntry aImportInfoMap[] = { // necessary properties for XML progress bar at load time - { "ProgressRange", 0, ::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, - { "ProgressMax", 0, ::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, - { "ProgressCurrent", 0, ::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, - { "PrivateData", 0, - ::getCppuType( (Reference<XInterface> *)0 ), + { MAP_LEN( "ProgressRange" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, + { MAP_LEN( "ProgressMax" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, + { MAP_LEN( "ProgressCurrent" ), 0, &::getCppuType((const sal_Int32*)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, + { MAP_LEN( "PrivateData" ), 0, + &::getCppuType( (Reference<XInterface> *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, - { "BaseURI", 0, - ::getCppuType( (OUString *)0 ), + { MAP_LEN( "BaseURI" ), 0, + &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamRelPath", 0, - ::getCppuType( (OUString *)0 ), + { MAP_LEN( "StreamRelPath" ), 0, + &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamName", 0, - ::getCppuType( (OUString *)0 ), + { MAP_LEN( "StreamName" ), 0, + &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, - { "BuildId", 0, - ::getCppuType( (OUString *)0 ), + { MAP_LEN( "BuildId" ), 0, + &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, - {} + { NULL, 0, 0, NULL, 0, 0 } }; uno::Reference< beans::XPropertySet > xImportInfo( comphelper::GenericPropertySet_CreateInstance( @@ -613,14 +614,14 @@ sal_Int32 XMLFilter::impl_Export( m_xContext, xStorage ); // property map for export info set - comphelper::PropertyMapEntry const aExportInfoMap[] = + comphelper::PropertyMapEntry aExportInfoMap[] = { - { "UsePrettyPrinting", 0, ::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0}, - { "BaseURI", 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamRelPath", 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { "StreamName", 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { "ExportTableNumberList", 0, ::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0 }, - {} + { MAP_LEN("UsePrettyPrinting"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0}, + { MAP_LEN("BaseURI"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN("StreamRelPath"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN("StreamName"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN("ExportTableNumberList"), 0, &::getBooleanCppuType(), beans::PropertyAttribute::MAYBEVOID, 0 }, + { NULL, 0, 0, NULL, 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet = diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx index 24eb6d9c78d6..3e305b94506a 100644 --- a/chart2/source/tools/ErrorBar.cxx +++ b/chart2/source/tools/ErrorBar.cxx @@ -55,22 +55,22 @@ const SfxItemPropertySet* GetErrorBarPropertySet() { static const SfxItemPropertyMapEntry aErrorBarPropertyMap_Impl[] = { - {"ShowPositiveError",0,getBooleanCppuType(), 0, 0}, - {"ShowNegativeError",1,getBooleanCppuType(), 0, 0}, - {"PositiveError",2,getCppuType((const double*)0),0,0}, - {"NegativeError",3,getCppuType((const double*)0), 0, 0}, - {"PercentageError",4,getCppuType((const double*)0), 0, 0}, - {"ErrorBarStyle",5,getCppuType((sal_Int32*)0),0,0}, - {"ErrorBarRangePositive",6,getCppuType((OUString*)0),0,0}, // read-only for export - {"ErrorBarRangeNegative",7,getCppuType((OUString*)0),0,0}, // read-only for export - {"Weight",8,getCppuType((const double*)0),0,0}, - {"LineStyle",9,getCppuType((com::sun::star::drawing::LineStyle*)0),0,0}, - {"LineDash",10,getCppuType((drawing::LineDash*)0),0,0}, - {"LineWidth",11,getCppuType((sal_Int32*)0),0,0}, - {"LineColor",12,getCppuType((com::sun::star::util::Color*)0),0,0}, - {"LineTransparence",13,getCppuType((sal_Int16*)0),0,0}, - {"LineJoint",14,getCppuType((com::sun::star::drawing::LineJoint*)0),0,0}, - {} + {MAP_CHAR_LEN("ShowPositiveError"),0,&getBooleanCppuType(), 0, 0}, + {MAP_CHAR_LEN("ShowNegativeError"),1,&getBooleanCppuType(), 0, 0}, + {MAP_CHAR_LEN("PositiveError"),2,&getCppuType((const double*)0),0,0}, + {MAP_CHAR_LEN("NegativeError"),3,&getCppuType((const double*)0), 0, 0}, + {MAP_CHAR_LEN("PercentageError"),4,&getCppuType((const double*)0), 0, 0}, + {MAP_CHAR_LEN("ErrorBarStyle"),5,&getCppuType((sal_Int32*)0),0,0}, + {MAP_CHAR_LEN("ErrorBarRangePositive"),6,&getCppuType((OUString*)0),0,0}, // read-only for export + {MAP_CHAR_LEN("ErrorBarRangeNegative"),7,&getCppuType((OUString*)0),0,0}, // read-only for export + {MAP_CHAR_LEN("Weight"),8,&getCppuType((const double*)0),0,0}, + {MAP_CHAR_LEN("LineStyle"),9,&getCppuType((com::sun::star::drawing::LineStyle*)0),0,0}, + {MAP_CHAR_LEN("LineDash"),10,&getCppuType((drawing::LineDash*)0),0,0}, + {MAP_CHAR_LEN("LineWidth"),11,&getCppuType((sal_Int32*)0),0,0}, + {MAP_CHAR_LEN("LineColor"),12,&getCppuType((com::sun::star::util::Color*)0),0,0}, + {MAP_CHAR_LEN("LineTransparence"),13,&getCppuType((sal_Int16*)0),0,0}, + {MAP_CHAR_LEN("LineJoint"),14,&getCppuType((com::sun::star::drawing::LineJoint*)0),0,0}, + {0,0,0,0,0,0} }; static SfxItemPropertySet aPropSet( aErrorBarPropertyMap_Impl ); return &aPropSet; |