Tag: cws_dev300_dba31c User: oj Date: 2008-10-07 11:24:25+0000 Modified: dba/reportdesign/source/filter/xml/xmlfilter.cxx
Log: #i88727# use privatedata property File Changes: Directory: /dba/reportdesign/source/filter/xml/ =============================================== File [changed]: xmlfilter.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlfilter.cxx?r1=1.10&r2=1.10.22.1 Delta lines: +15 -5 -------------------- --- xmlfilter.cxx 2008-07-10 15:56:51+0000 1.10 +++ xmlfilter.cxx 2008-10-07 11:24:22+0000 1.10.22.1 @@ -64,15 +64,13 @@ #include <svtools/sfxecode.hxx> #include "xmlEnums.hxx" #include "xmlStyleImport.hxx" -#ifndef REPORTDESIGN_SHARED_XMLSTRINGS_HRC #include "xmlstrings.hrc" -#endif #include "xmlPropertyHandler.hxx" #include <xmloff/txtprmap.hxx> #include "ReportDefinition.hxx" - +#define MAP_LEN(x) x, sizeof(x) - 1 //-------------------------------------------------------------------------- namespace rptxml { @@ -564,12 +562,17 @@ static const ::rtl::OUString s_sOld(RTL_CONSTASCII_USTRINGPARAM("OldFormat")); static comphelper::PropertyMapEntry pMap[] = { - {"OldFormat", 9, 1, &::getCppuType((const sal_Bool*)0) ,PropertyAttribute::BOUND,0}, + { MAP_LEN( "OldFormat" ), 1, &::getCppuType((const sal_Bool*)0), beans::PropertyAttribute::BOUND, 0 }, + { MAP_LEN( "StreamName"), 0, &::getCppuType( (::rtl::OUString *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN("PrivateData"), 0, &::getCppuType( (uno::Reference<XInterface> *)0 ), beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; uno::Reference<beans::XPropertySet> xProp = comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(pMap)); uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY); + static const ::rtl::OUString s_sMeta(RTL_CONSTASCII_USTRINGPARAM("meta.xml")); + static const rtl::OUString s_sStreamName(RTL_CONSTASCII_USTRINGPARAM("StreamName")); + xProp->setPropertyValue(s_sStreamName, uno::makeAny(s_sMeta)); sal_Int32 nRet = ReadThroughComponent( xStorage ,xModel ,"meta.xml" @@ -581,7 +584,7 @@ ,xProp ); - static const ::rtl::OUString s_sMeta(RTL_CONSTASCII_USTRINGPARAM("meta.xml")); + try { xProp->setPropertyValue(s_sOld,uno::makeAny(!(xStorage->hasByName(s_sMeta) || xStorage->isStreamElement( s_sMeta )))); @@ -593,6 +596,7 @@ if ( nRet == 0 ) { + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")))); nRet = ReadThroughComponent( xStorage ,xModel ,"settings.xml" @@ -605,6 +609,8 @@ ); } if ( nRet == 0 ) + { + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("styles.xml")))); nRet = ReadThroughComponent(xStorage ,xModel ,"styles.xml" @@ -614,8 +620,11 @@ ,xEmbeddedObjectResolver ,SERVICE_STYLESIMPORTER ,xProp); + } if ( nRet == 0 ) + { + xProp->setPropertyValue(s_sStreamName, uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")))); nRet = ReadThroughComponent( xStorage ,xModel ,"content.xml" @@ -626,6 +635,7 @@ ,SERVICE_CONTENTIMPORTER ,xProp ); + } bRet = nRet == 0; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]