diff --git a/xmloff/inc/SchXMLImport.hxx b/xmloff/inc/SchXMLImport.hxx index 6604bbb92405..36a9b3ce1a25 100644 --- a/xmloff/inc/SchXMLImport.hxx +++ b/xmloff/inc/SchXMLImport.hxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLImport.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:24:15 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -148,7 +148,8 @@ enum SchXMLPlotAreaAttrTokenMap XML_TOK_PA_HEIGHT, XML_TOK_PA_STYLE_NAME, XML_TOK_PA_TRANSFORM, - XML_TOK_PA_CHART_ADDRESS + XML_TOK_PA_CHART_ADDRESS, + XML_TOK_PA_TABLE_NUMBER_LIST }; enum SchXMLAxisAttrTokenMap diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index e98d1ab89a86..16fa8bd6b770 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLChartContext.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:25:49 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -530,6 +530,12 @@ void SchXMLChartContext::EndElement() { aAny <<= msChartAddress; xProp->setPropertyValue( ::rtl::OUString::createFromAscii( "ChartRangeAddress" ), aAny ); + + if( msTableNumberList.getLength()) + { + aAny <<= msTableNumberList; + xProp->setPropertyValue( ::rtl::OUString::createFromAscii( "TableNumberList" ), aAny ); + } } else { @@ -584,7 +590,7 @@ SvXMLImportContext* SchXMLChartContext::CreateChildContext( case XML_TOK_CHART_PLOT_AREA: pContext = new SchXMLPlotAreaContext( mrImportHelper, GetImport(), rLocalName, maSeriesAddresses, msCategoriesAddress, - msChartAddress ); + msChartAddress, msTableNumberList ); break; case XML_TOK_CHART_TITLE: diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx index 5d897ddae98e..d6c349d7587c 100644 --- a/xmloff/source/chart/SchXMLChartContext.hxx +++ b/xmloff/source/chart/SchXMLChartContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLChartContext.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:26:21 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,7 @@ private: com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress > maSeriesAddresses; ::rtl::OUString msCategoriesAddress; ::rtl::OUString msChartAddress; + ::rtl::OUString msTableNumberList; public: SchXMLChartContext( SchXMLImportHelper& rImpHelper, diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index bab9d5684c95..037ac7f9d7d7 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLExport.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:24:59 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -797,6 +797,13 @@ void SchXMLExportHelper::exportPlotArea( uno::Reference< chart::XDiagram > xDiag if( msChartAddress.getLength()) mrExport.AddAttribute( XML_NAMESPACE_TABLE, sXML_cell_range_address, msChartAddress ); + if( msTableNumberList.getLength()) + { + // this attribute is for charts embedded in calc documents only. + // With this you are able to store a file again in 5.0 binary format + mrExport.AddAttribute( XML_NAMESPACE_CHART, sXML_table_number_list, msTableNumberList ); + } + // attributes uno::Reference< drawing::XShape > xShape ( xDiagram, uno::UNO_QUERY ); if( xShape.is()) @@ -1914,10 +1921,16 @@ void SchXMLExport::_ExportContent() { ::rtl::OUString sChartAddress; aAny = xProp->getPropertyValue( - rtl::OUString::createFromAscii( "ChartRangeAddress" )); + ::rtl::OUString::createFromAscii( "ChartRangeAddress" )); aAny >>= sChartAddress; maExportHelper.SetChartRangeAddress( sChartAddress ); + ::rtl::OUString sTableNumberList; + aAny = xProp->getPropertyValue( + ::rtl::OUString::createFromAscii( "TableNumberList" )); + aAny >>= sTableNumberList; + maExportHelper.SetTableNumberList( sTableNumberList ); + // do not include own table if there are external addresses bIncludeTable = (sChartAddress.getLength() == 0); } diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index a0f45ba0bc7a..06066aee5da1 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLImport.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:25:18 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -179,13 +179,14 @@ static __FAR_DATA SvXMLTokenMapEntry aChartAttrTokenMap[] = static __FAR_DATA SvXMLTokenMapEntry aPlotAreaAttrTokenMap[] = { - { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PA_X }, - { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PA_Y }, - { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PA_WIDTH }, - { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PA_HEIGHT }, - { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_PA_STYLE_NAME }, - { XML_NAMESPACE_DR3D, sXML_transform, XML_TOK_PA_TRANSFORM }, - { XML_NAMESPACE_TABLE, sXML_cell_range_address, XML_TOK_PA_CHART_ADDRESS}, + { XML_NAMESPACE_SVG, sXML_x, XML_TOK_PA_X }, + { XML_NAMESPACE_SVG, sXML_y, XML_TOK_PA_Y }, + { XML_NAMESPACE_SVG, sXML_width, XML_TOK_PA_WIDTH }, + { XML_NAMESPACE_SVG, sXML_height, XML_TOK_PA_HEIGHT }, + { XML_NAMESPACE_CHART, sXML_style_name, XML_TOK_PA_STYLE_NAME }, + { XML_NAMESPACE_DR3D, sXML_transform, XML_TOK_PA_TRANSFORM }, + { XML_NAMESPACE_TABLE, sXML_cell_range_address, XML_TOK_PA_CHART_ADDRESS }, + { XML_NAMESPACE_CHART, sXML_table_number_list, XML_TOK_PA_TABLE_NUMBER_LIST }, XML_TOKEN_MAP_END }; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index b436ca880e7c..974830149ca2 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLPlotAreaContext.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:26:53 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -142,12 +142,14 @@ SchXMLPlotAreaContext::SchXMLPlotAreaContext( SchXMLImportHelper& rImpHelper, SvXMLImport& rImport, const rtl::OUString& rLocalName, uno::Sequence< chart::ChartSeriesAddress >& rSeriesAddresses, ::rtl::OUString& rCategoriesAddress, - ::rtl::OUString& rChartAddress ) : + ::rtl::OUString& rChartAddress, + ::rtl::OUString& rTableNumberList) : SvXMLImportContext( rImport, XML_NAMESPACE_CHART, rLocalName ), mrImportHelper( rImpHelper ), mrSeriesAddresses( rSeriesAddresses ), mrCategoriesAddress( rCategoriesAddress ), mrChartAddress( rChartAddress ), + mrTableNumberList( rTableNumberList ), mnDomainOffset( 0 ), mnSeries( 0 ), mnMaxSeriesLength( 0 ), @@ -323,6 +325,9 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri case XML_TOK_PA_CHART_ADDRESS: mrChartAddress = aValue; break; + case XML_TOK_PA_TABLE_NUMBER_LIST: + mrTableNumberList = aValue; + break; default: maSceneImportHelper.processSceneAttribute( nPrefix, aLocalName, aValue ); break; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index ae2883641628..6c93fa89cef7 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: SchXMLPlotAreaContext.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: bm $ $Date: 2001-05-15 12:27:08 $ + * last change: $Author: bm $ $Date: 2001-05-17 15:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -135,6 +135,7 @@ private: com::sun::star::awt::Point maPosition; ::rtl::OUString msAutoStyleName; ::rtl::OUString& mrChartAddress; + ::rtl::OUString& mrTableNumberList; public: SchXMLPlotAreaContext( SchXMLImportHelper& rImpHelper, @@ -142,7 +143,8 @@ public: com::sun::star::uno::Sequence< com::sun::star::chart::ChartSeriesAddress >& rSeriesAddresses, ::rtl::OUString& rCategoriesAddress, - ::rtl::OUString& rChartAddress ); + ::rtl::OUString& rChartAddress, + ::rtl::OUString& rTableNumberList ); virtual ~SchXMLPlotAreaContext(); virtual void StartElement( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );