Tag: cws_dev300_dba31b User: oj Date: 2008-08-12 10:12:34+0000 Modified: dba/reportdesign/source/core/api/ReportDefinition.cxx dba/reportdesign/source/filter/xml/xmlfilter.cxx
Log: #i91780# set StreamName File Changes: Directory: /dba/reportdesign/source/core/api/ ============================================= File [changed]: ReportDefinition.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/core/api/ReportDefinition.cxx?r1=1.11.10.1&r2=1.11.10.2 Delta lines: +6 -1 ------------------- --- ReportDefinition.cxx 2008-08-12 05:52:19+0000 1.11.10.1 +++ ReportDefinition.cxx 2008-08-12 10:12:30+0000 1.11.10.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: ReportDefinition.cxx,v $ - * $Revision: 1.11.10.1 $ + * $Revision: 1.11.10.2 $ * * This file is part of OpenOffice.org. * @@ -1389,6 +1389,7 @@ comphelper::PropertyMapEntry aExportInfoMap[] = { { MAP_LEN( "UsePrettyPrinting" ), 0, &::getCppuType((sal_Bool*)0), beans::PropertyAttribute::MAYBEVOID, 0}, + { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)0 ),beans::PropertyAttribute::MAYBEVOID, 0 }, { NULL, 0, 0, NULL, 0, 0 } }; uno::Reference< beans::XPropertySet > xInfoSet( comphelper::GenericPropertySet_CreateInstance( new comphelper::PropertySetInfo( aExportInfoMap ) ) ); @@ -1402,6 +1403,7 @@ uno::Reference<XComponent> xCom(static_cast<OWeakObject*>(this),uno::UNO_QUERY); if( !bErr ) { + xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")), uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")))); if( !WriteThroughComponent( xCom, "settings.xml", "com.sun.star.comp.report.XMLSettingsExporter", @@ -1417,6 +1419,7 @@ if( !bErr ) { + xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")), uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml")))); if( !WriteThroughComponent( xCom, "meta.xml", "com.sun.star.comp.report.XMLMetaExporter", @@ -1432,6 +1435,7 @@ if( !bErr ) { + xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")), uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("styles.xml")))); if( !WriteThroughComponent( xCom, "styles.xml", "com.sun.star.comp.report.XMLStylesExporter", @@ -1447,6 +1451,7 @@ if ( !bErr ) { + xInfoSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StreamName")), uno::makeAny(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")))); if( !WriteThroughComponent( xCom, "content.xml", "com.sun.star.comp.report.ExportFilter", 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.12.1 Delta lines: +15 -6 -------------------- --- xmlfilter.cxx 2008-07-10 15:56:51+0000 1.10 +++ xmlfilter.cxx 2008-08-12 10:12:31+0000 1.10.12.1 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: xmlfilter.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.12.1 $ * * This file is part of OpenOffice.org. * @@ -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 { @@ -565,11 +563,15 @@ static comphelper::PropertyMapEntry pMap[] = { {"OldFormat", 9, 1, &::getCppuType((const sal_Bool*)0) ,PropertyAttribute::BOUND,0}, + { MAP_LEN( "StreamName"), 0,&::getCppuType( (::rtl::OUString *)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 +583,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 +595,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 +608,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 +619,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 +634,7 @@ ,SERVICE_CONTENTIMPORTER ,xProp ); + } bRet = nRet == 0; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]