diff options
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 13 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlColumn.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlHelper.cxx | 48 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlfilter.cxx | 17 |
4 files changed, 41 insertions, 45 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 1afdeb6b805d..659a0b7f8b9f 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -122,7 +122,6 @@ #include <boost/mem_fn.hpp> #include <boost/utility.hpp> -#define MAP_LEN(x) x, sizeof(x) - 1 // page styles #define SC_UNO_PAGE_LEFTBORDER "LeftBorder" #define SC_UNO_PAGE_RIGHTBORDER "RightBorder" @@ -1464,13 +1463,13 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS } /** property map for export info set */ - comphelper::PropertyMapEntry aExportInfoMap[] = + comphelper::PropertyMapEntry const aExportInfoMap[] = { - { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "StreamName") , 0,&::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "StreamRelPath") , 0,&::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN( "BaseURI") , 0,&::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("UsePrettyPrinting") , 0, ::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamName") , 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamRelPath") , 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("BaseURI") , 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 ) ) ); diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx index c2ca586864e1..a50e2b6322a6 100644 --- a/reportdesign/source/filter/xml/xmlColumn.cxx +++ b/reportdesign/source/filter/xml/xmlColumn.cxx @@ -131,11 +131,11 @@ void OXMLRowColumn::fillStyle(const OUString& _sStyleName) if ( pAutoStyles ) { PropertySetInfo* pInfo = new PropertySetInfo(); - static PropertyMapEntry pMap[] = + static PropertyMapEntry const pMap[] = { - {PROPERTY_WIDTH, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_WIDTH)-1), PROPERTY_ID_WIDTH, &::getCppuType(static_cast< sal_Int32* >( NULL )) ,PropertyAttribute::BOUND,0}, - {PROPERTY_HEIGHT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_HEIGHT)-1), PROPERTY_ID_HEIGHT, &::getCppuType(static_cast< sal_Int32* >( NULL )) ,PropertyAttribute::BOUND,0}, - { NULL, 0, 0, NULL, 0, 0 } + {OUString(PROPERTY_WIDTH), PROPERTY_ID_WIDTH, ::getCppuType(static_cast< sal_Int32* >( NULL )) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_HEIGHT), PROPERTY_ID_HEIGHT, ::getCppuType(static_cast< sal_Int32* >( NULL )) ,PropertyAttribute::BOUND,0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; pInfo->add(pMap); Reference<XPropertySet> xProp = GenericPropertySet_CreateInstance(pInfo); diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index b11bd0f85fc6..0f152808107b 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -257,25 +257,25 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName, if ( pAutoStyle ) { ::com::sun::star::awt::FontDescriptor aFont; - static comphelper::PropertyMapEntry pMap[] = + static comphelper::PropertyMapEntry const pMap[] = { - {PROPERTY_FONTNAME, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTNAME)-1), PROPERTY_ID_FONTNAME, &::getCppuType(&aFont.Name) ,PropertyAttribute::BOUND,0}, - {PROPERTY_CHARFONTHEIGHT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_CHARFONTHEIGHT)-1), PROPERTY_ID_FONTHEIGHT, &::getCppuType(&aFont.Height) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTWIDTH, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTWIDTH)-1), PROPERTY_ID_FONTWIDTH, &::getCppuType(&aFont.Width) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTSTYLENAME, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTSTYLENAME)-1), PROPERTY_ID_FONTSTYLENAME, &::getCppuType(&aFont.StyleName) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTFAMILY, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTFAMILY)-1), PROPERTY_ID_FONTFAMILY, &::getCppuType(&aFont.Family) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTCHARSET, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTCHARSET)-1), PROPERTY_ID_FONTCHARSET, &::getCppuType(&aFont.CharSet) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTPITCH, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTPITCH)-1), PROPERTY_ID_FONTPITCH, &::getCppuType(&aFont.Pitch) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTCHARWIDTH, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTCHARWIDTH)-1), PROPERTY_ID_FONTCHARWIDTH, &::getCppuType(&aFont.CharacterWidth),PropertyAttribute::BOUND,0}, - {PROPERTY_FONTWEIGHT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTWEIGHT)-1), PROPERTY_ID_FONTWEIGHT, &::getCppuType(&aFont.Weight) ,PropertyAttribute::BOUND,0}, - {PROPERTY_CHARPOSTURE, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_CHARPOSTURE)-1), PROPERTY_ID_FONTSLANT, &::getCppuType(&aFont.Slant) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTUNDERLINE, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTUNDERLINE)-1), PROPERTY_ID_FONTUNDERLINE, &::getCppuType(&aFont.Underline) ,PropertyAttribute::BOUND,0}, - {PROPERTY_CHARSTRIKEOUT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_CHARSTRIKEOUT)-1), PROPERTY_ID_FONTSTRIKEOUT, &::getCppuType(&aFont.Strikeout) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTORIENTATION, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTORIENTATION)-1), PROPERTY_ID_FONTORIENTATION, &::getCppuType(&aFont.Orientation) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTKERNING, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTKERNING)-1), PROPERTY_ID_FONTKERNING, &::getCppuType(&aFont.Kerning) ,PropertyAttribute::BOUND,0}, - {PROPERTY_CHARWORDMODE, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_CHARWORDMODE)-1), PROPERTY_ID_FONTWORDLINEMODE, &::getCppuType(&aFont.WordLineMode) ,PropertyAttribute::BOUND,0}, - {PROPERTY_FONTTYPE, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_FONTTYPE)-1), PROPERTY_ID_FONTTYPE, &::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0}, - { NULL, 0, 0, NULL, 0, 0 } + {OUString(PROPERTY_FONTNAME), PROPERTY_ID_FONTNAME, ::getCppuType(&aFont.Name) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_CHARFONTHEIGHT), PROPERTY_ID_FONTHEIGHT, ::getCppuType(&aFont.Height) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTWIDTH), PROPERTY_ID_FONTWIDTH, ::getCppuType(&aFont.Width) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTSTYLENAME), PROPERTY_ID_FONTSTYLENAME, ::getCppuType(&aFont.StyleName) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTFAMILY), PROPERTY_ID_FONTFAMILY, ::getCppuType(&aFont.Family) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTCHARSET), PROPERTY_ID_FONTCHARSET, ::getCppuType(&aFont.CharSet) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTPITCH), PROPERTY_ID_FONTPITCH, ::getCppuType(&aFont.Pitch) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTCHARWIDTH), PROPERTY_ID_FONTCHARWIDTH, ::getCppuType(&aFont.CharacterWidth),PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTWEIGHT), PROPERTY_ID_FONTWEIGHT, ::getCppuType(&aFont.Weight) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_CHARPOSTURE), PROPERTY_ID_FONTSLANT, ::getCppuType(&aFont.Slant) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTUNDERLINE), PROPERTY_ID_FONTUNDERLINE, ::getCppuType(&aFont.Underline) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_CHARSTRIKEOUT), PROPERTY_ID_FONTSTRIKEOUT, ::getCppuType(&aFont.Strikeout) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTORIENTATION), PROPERTY_ID_FONTORIENTATION, ::getCppuType(&aFont.Orientation) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTKERNING), PROPERTY_ID_FONTKERNING, ::getCppuType(&aFont.Kerning) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_CHARWORDMODE), PROPERTY_ID_FONTWORDLINEMODE, ::getCppuType(&aFont.WordLineMode) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_FONTTYPE), PROPERTY_ID_FONTTYPE, ::getCppuType(&aFont.Type) ,PropertyAttribute::BOUND,0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; try { @@ -320,13 +320,13 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName, // ----------------------------------------------------------------------------- uno::Reference<beans::XPropertySet> OXMLHelper::createBorderPropertySet() { - static comphelper::PropertyMapEntry pMap[] = + static comphelper::PropertyMapEntry const pMap[] = { - {PROPERTY_BORDERLEFT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_BORDERLEFT)-1), 0, &::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {PROPERTY_BORDERRIGHT, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_BORDERRIGHT)-1), 1, &::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {PROPERTY_BORDERTOP, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_BORDERTOP)-1), 2, &::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - {PROPERTY_BORDERBOTTOM, static_cast<sal_uInt16>(SAL_N_ELEMENTS(PROPERTY_BORDERBOTTOM)-1), 3, &::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, - { NULL, 0, 0, NULL, 0, 0 } + {OUString(PROPERTY_BORDERLEFT), 0, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERRIGHT), 1, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERTOP), 2, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, + {OUString(PROPERTY_BORDERBOTTOM), 3, ::getCppuType((const table::BorderLine2*)0) ,PropertyAttribute::BOUND,0}, + { OUString(), 0, css::uno::Type(), 0, 0 } }; return comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); } diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx index a35b4d764871..863cc177ccdc 100644 --- a/reportdesign/source/filter/xml/xmlfilter.cxx +++ b/reportdesign/source/filter/xml/xmlfilter.cxx @@ -59,9 +59,6 @@ #include <xmloff/txtprmap.hxx> #include "ReportDefinition.hxx" - -#define MAP_LEN(x) x, sizeof(x) - 1 -//-------------------------------------------------------------------------- namespace rptxml { using namespace ::com::sun::star::uno; @@ -528,14 +525,14 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor ) xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments(OUString("com.sun.star.document.ImportEmbeddedObjectResolver"),aArgs) , uno::UNO_QUERY); static const OUString s_sOld("OldFormat"); - static comphelper::PropertyMapEntry pMap[] = + static comphelper::PropertyMapEntry const pMap[] = { - { MAP_LEN( "OldFormat" ), 1, &::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 }, - { MAP_LEN( "StreamName"), 0, &::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, - { MAP_LEN("PrivateData"), 0, &::getCppuType( (uno::Reference<XInterface> *)0 ), 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 }, - { NULL, 0, 0, NULL, 0, 0 } + { OUString("OldFormat") , 1, ::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 }, + { OUString("StreamName"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("PrivateData"),0, ::getCppuType( (uno::Reference<XInterface> *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("BaseURI"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString("StreamRelPath"), 0, ::getCppuType( (OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { OUString(), 0, css::uno::Type(), 0, 0 } }; utl::MediaDescriptor aDescriptor(rDescriptor); uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); |