Tag: cws_src680_reportdesign01 User: oj Date: 2007-09-21 12:09:29+0000 Modified: dba/reportdesign/source/filter/xml/xmlExport.cxx dba/reportdesign/source/filter/xml/xmlExport.hxx
Log: #i80885# export sub report File Changes: Directory: /dba/reportdesign/source/filter/xml/ =============================================== File [changed]: xmlExport.cxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExport.cxx?r1=1.5.20.2&r2=1.5.20.3 Delta lines: +22 -11 --------------------- --- xmlExport.cxx 2007-09-21 07:20:47+0000 1.5.20.2 +++ xmlExport.cxx 2007-09-21 12:09:26+0000 1.5.20.3 @@ -4,9 +4,9 @@ * * $RCSfile: xmlExport.cxx,v $ * - * $Revision: 1.5.20.2 $ + * $Revision: 1.5.20.3 $ * - * last change: $Author: oj $ $Date: 2007/09/21 07:20:47 $ + * last change: $Author: oj $ $Date: 2007/09/21 12:09:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1096,6 +1096,12 @@ else if ( eToken == XML_SUB_DOCUMENT ) { exportMasterDetailFields(xReportDefinition); + SvXMLElementExport aOfficeElement( *this, XML_NAMESPACE_OFFICE, XML_BODY,sal_True, sal_True ); + SvXMLElementExport aElem( *this, sal_True, + XML_NAMESPACE_OFFICE, XML_REPORT, + sal_True, sal_True ); + + exportReportAttributes(xReportDefinition); exportReport(xReportDefinition); } else if ( xSection.is() ) @@ -1437,31 +1443,36 @@ void ORptExport::SetBodyAttributes() { Reference<XReportDefinition> xProp(getReportDefinition()); - if ( xProp.is() ) + exportReportAttributes(xProp); +} +// ----------------------------------------------------------------------------- +void ORptExport::exportReportAttributes(const Reference<XReportDefinition>& _xReport) +{ + if ( _xReport.is() ) { ::rtl::OUStringBuffer sValue; const SvXMLEnumMapEntry* aXML_CommnadTypeEnumMap = OXMLHelper::GetCommandTypeOptions(); - if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(xProp->getCommandType()),aXML_CommnadTypeEnumMap ) ) + if ( SvXMLUnitConverter::convertEnum( sValue, static_cast<sal_uInt16>(_xReport->getCommandType()),aXML_CommnadTypeEnumMap ) ) AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND_TYPE,sValue.makeStringAndClear()); - ::rtl::OUString sComamnd = xProp->getCommand(); + ::rtl::OUString sComamnd = _xReport->getCommand(); if ( sComamnd.getLength() ) AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND, sComamnd); - ::rtl::OUString sFilter( xProp->getFilter() ); + ::rtl::OUString sFilter( _xReport->getFilter() ); if ( sFilter.getLength() ) AddAttribute( XML_NAMESPACE_REPORT, XML_FILTER, sFilter ); - AddAttribute(XML_NAMESPACE_OFFICE, XML_MIMETYPE,xProp->getMimeType()); + AddAttribute(XML_NAMESPACE_OFFICE, XML_MIMETYPE,_xReport->getMimeType()); - sal_Bool bEscapeProcessing( xProp->getEscapeProcessing() ); + sal_Bool bEscapeProcessing( _xReport->getEscapeProcessing() ); if ( !bEscapeProcessing ) AddAttribute( XML_NAMESPACE_REPORT, XML_ESCAPE_PROCESSING, ::xmloff::token::GetXMLToken( XML_FALSE ) ); - ::rtl::OUString sName = xProp->getCaption(); + ::rtl::OUString sName = _xReport->getCaption(); if ( sName.getLength() ) AddAttribute(XML_NAMESPACE_OFFICE, XML_CAPTION,sName); - sName = xProp->getName(); + sName = _xReport->getName(); if ( sName.getLength() ) AddAttribute(XML_NAMESPACE_DRAW, XML_NAME,sName); } File [changed]: xmlExport.hxx Url: http://dba.openoffice.org/source/browse/dba/reportdesign/source/filter/xml/xmlExport.hxx?r1=1.4&r2=1.4.18.1 Delta lines: +4 -3 ------------------- --- xmlExport.hxx 2007-08-03 09:56:41+0000 1.4 +++ xmlExport.hxx 2007-09-21 12:09:26+0000 1.4.18.1 @@ -6,9 +6,9 @@ * * $RCSfile: xmlExport.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.4.18.1 $ * - * last change: $Author: hr $ $Date: 2007/08/03 09:56:41 $ + * last change: $Author: oj $ $Date: 2007/09/21 12:09:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -207,6 +207,7 @@ sal_Bool m_bAllreadyFilled; void exportReport(const Reference<XReportDefinition>& _xReportDefinition); /// <element name="office:report"> + void exportReportAttributes(const Reference<XReportDefinition>& _xReport); void exportFunctions(const Reference<XIndexAccess>& _xFunctions); /// <ref name="rpt-function"/> void exportFunction(const Reference< XFunction>& _xFunction); void exportMasterDetailFields(const Reference<XReportDefinition>& _xReportDefinition); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
