#86215# Include Table Number List
This commit is contained in:
parent
412eec32a4
commit
9fcb172e74
7 changed files with 55 additions and 26 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in a new issue