LibreOffice Module xmloff (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
SchXMLExportHelper_Impl Class Reference
Collaboration diagram for SchXMLExportHelper_Impl:
[legend]

Public Types

typedef ::std::pair< css::uno::Reference< css::chart2::data::XDataSequence >, css::uno::Reference< css::chart2::data::XDataSequence > > tLabelValuesDataPair
 
typedef ::std::vector< tLabelValuesDataPairtDataSequenceCont
 

Public Member Functions

 SchXMLExportHelper_Impl (SvXMLExport &rExport, SvXMLAutoStylePoolP &rASPool)
 
 SchXMLExportHelper_Impl (const SchXMLExportHelper_Impl &)=delete
 
SchXMLExportHelper_Imploperator= (const SchXMLExportHelper_Impl &)=delete
 
void collectAutoStyles (css::uno::Reference< css::chart::XChartDocument > const &rChartDoc)
 parse chart and collect all auto-styles used in current pool More...
 
void exportAutoStyles ()
 write the styles collected into the current pool as <style:style> elements More...
 
void exportChart (css::uno::Reference< css::chart::XChartDocument > const &rChartDoc, bool bIncludeTable)
 export the <chart:chart> element corresponding to rChartDoc if bIncludeTable is true, the chart data is exported as <table:table> element (inside the chart element). More...
 
const rtl::Reference< XMLPropertySetMapper > & GetPropertySetMapper () const
 
void SetChartRangeAddress (const OUString &rAddress)
 
void InitRangeSegmentationProperties (const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
 
void CollectAutoStyle (const std::vector< XMLPropertyState > &aStates)
 
void AddAutoStyleAttribute (const std::vector< XMLPropertyState > &aStates)
 
void parseDocument (css::uno::Reference< css::chart::XChartDocument > const &rChartDoc, bool bExportContent, bool bIncludeTable=false)
 if bExportContent is false the auto-styles are collected More...
 
void exportTable ()
 
void exportPlotArea (const css::uno::Reference< css::chart::XDiagram > &xDiagram, const css::uno::Reference< css::chart2::XDiagram > &xNewDiagram, const css::awt::Size &rPageSize, bool bExportContent, bool bIncludeTable)
 
void exportCoordinateRegion (const css::uno::Reference< css::chart::XDiagram > &xDiagram)
 
void exportAxes (const css::uno::Reference< css::chart::XDiagram > &xDiagram, const css::uno::Reference< css::chart2::XDiagram > &xNewDiagram, bool bExportContent)
 
void exportAxis (enum XMLTokenEnum eDimension, enum XMLTokenEnum eAxisName, const Reference< beans::XPropertySet > &rAxisProps, const Reference< chart2::XAxis > &rChart2Axis, const OUString &rCategoriesRanges, bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent, OUString sChartType)
 
void exportGrid (const Reference< beans::XPropertySet > &rGridProperties, bool bMajor, bool bExportContent)
 
void exportDateScale (const Reference< beans::XPropertySet > &rAxisProps)
 
void exportAxisTitle (const Reference< beans::XPropertySet > &rTitleProps, bool bExportContent)
 
void exportSeries (const css::uno::Reference< css::chart2::XDiagram > &xNewDiagram, const css::awt::Size &rPageSize, bool bExportContent, bool bHasTwoYAxes)
 
void exportPropertyMapping (const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const Sequence< OUString > &rSupportedMappings)
 
void exportCandleStickSeries (const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > &aSeriesSeq, const css::uno::Reference< css::chart2::XDiagram > &xDiagram, bool bJapaneseCandleSticks, bool bExportContent)
 
void exportDataPoints (const css::uno::Reference< css::beans::XPropertySet > &xSeriesProperties, sal_Int32 nSeriesLength, const css::uno::Reference< css::chart2::XDiagram > &xDiagram, bool bExportContent)
 
void exportCustomLabel (const SchXMLDataPointStruct &rPoint)
 
void exportCustomLabelPosition (const chart2::RelativePosition &xCustomLabelPosition)
 
void exportRegressionCurve (const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::awt::Size &rPageSize, bool bExportContent)
 
void exportErrorBar (const css::uno::Reference< beans::XPropertySet > &xSeriesProp, bool bYError, bool bExportContent)
 
void addPosition (const css::awt::Point &rPosition)
 add svg position as attribute for current element More...
 
void addPosition (const css::uno::Reference< css::drawing::XShape > &xShape)
 
void addSize (const css::awt::Size &rSize, bool bIsOOoNamespace=false)
 add svg size as attribute for current element More...
 
void addSize (const css::uno::Reference< css::drawing::XShape > &xShape)
 
void exportText (const OUString &rText)
 exports a string as a paragraph element More...
 

Static Public Member Functions

static css::awt::Size getPageSize (const css::uno::Reference< css::chart2::XChartDocument > &xChartDoc)
 

Public Attributes

::std::queue< OUString > maAutoStyleNameQueue
 first parseDocument: collect autostyles and store names in this queue second parseDocument: export content and use names from this queue More...
 
SvXMLExportmrExport
 
SvXMLAutoStylePoolPmrAutoStylePool
 
rtl::Reference< XMLPropertySetMappermxPropertySetMapper
 
rtl::Reference< XMLChartExportPropertyMappermxExpPropMapper
 
OUStringBuffer msStringBuffer
 
OUString msString
 
bool mbHasCategoryLabels
 
bool mbRowSourceColumns
 
OUString msChartAddress
 
css::uno::Sequence< sal_Int32 > maSequenceMapping
 
OUString msCLSID
 
OUString maSrcShellID
 
OUString maDestShellID
 
css::uno::Reference< css::drawing::XShapes > mxAdditionalShapes
 
tDataSequenceCont m_aDataSequencesToExport
 
OUString maCategoriesRange
 

Static Public Attributes

static constexpr OUStringLiteral gsTableName = u"local-table"
 

Detailed Description

Definition at line 133 of file SchXMLExport.cxx.

Member Typedef Documentation

Definition at line 139 of file SchXMLExport.cxx.

typedef ::std::pair< css::uno::Reference< css::chart2::data::XDataSequence >, css::uno::Reference< css::chart2::data::XDataSequence > > SchXMLExportHelper_Impl::tLabelValuesDataPair

Definition at line 138 of file SchXMLExport.cxx.

Constructor & Destructor Documentation

SchXMLExportHelper_Impl::SchXMLExportHelper_Impl ( SvXMLExport rExport,
SvXMLAutoStylePoolP rASPool 
)
SchXMLExportHelper_Impl::SchXMLExportHelper_Impl ( const SchXMLExportHelper_Impl )
delete

Member Function Documentation

void SchXMLExportHelper_Impl::AddAutoStyleAttribute ( const std::vector< XMLPropertyState > &  aStates)
void SchXMLExportHelper_Impl::addPosition ( const css::awt::Point &  rPosition)

add svg position as attribute for current element

Referenced by exportAxisTitle(), exportCoordinateRegion(), exportPlotArea(), exportRegressionCurve(), and parseDocument().

void SchXMLExportHelper_Impl::addPosition ( const css::uno::Reference< css::drawing::XShape > &  xShape)
void SchXMLExportHelper_Impl::addSize ( const css::awt::Size &  rSize,
bool  bIsOOoNamespace = false 
)

add svg size as attribute for current element

Referenced by exportCoordinateRegion(), exportPlotArea(), and parseDocument().

void SchXMLExportHelper_Impl::addSize ( const css::uno::Reference< css::drawing::XShape > &  xShape)
void SchXMLExportHelper_Impl::CollectAutoStyle ( const std::vector< XMLPropertyState > &  aStates)
void SchXMLExportHelper_Impl::collectAutoStyles ( css::uno::Reference< css::chart::XChartDocument > const &  rChartDoc)

parse chart and collect all auto-styles used in current pool

Definition at line 1062 of file SchXMLExport.cxx.

References parseDocument().

void SchXMLExportHelper_Impl::exportAutoStyles ( )

write the styles collected into the current pool as <style:style> elements

Definition at line 1004 of file SchXMLExport.cxx.

References SvXMLExport::exportAutoDataStyles(), SvXMLAutoStylePoolP::exportXML(), SvXMLExport::GetShapeExport(), SvXMLExport::GetTextParagraphExport(), mrAutoStylePool, mrExport, mxExpPropMapper, and SCH_CHART_ID.

void SchXMLExportHelper_Impl::exportAxes ( const css::uno::Reference< css::chart::XDiagram > &  xDiagram,
const css::uno::Reference< css::chart2::XDiagram > &  xNewDiagram,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportAxis ( enum XMLTokenEnum  eDimension,
enum XMLTokenEnum  eAxisName,
const Reference< beans::XPropertySet > &  rAxisProps,
const Reference< chart2::XAxis > &  rChart2Axis,
const OUString &  rCategoriesRanges,
bool  bHasTitle,
bool  bHasMajorGrid,
bool  bHasMinorGrid,
bool  bExportContent,
OUString  sChartType 
)
void SchXMLExportHelper_Impl::exportAxisTitle ( const Reference< beans::XPropertySet > &  rTitleProps,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportCandleStickSeries ( const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > &  aSeriesSeq,
const css::uno::Reference< css::chart2::XDiagram > &  xDiagram,
bool  bJapaneseCandleSticks,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportChart ( css::uno::Reference< css::chart::XChartDocument > const &  rChartDoc,
bool  bIncludeTable 
)

export the <chart:chart> element corresponding to rChartDoc if bIncludeTable is true, the chart data is exported as <table:table> element (inside the chart element).

Otherwise the external references stored in the chart document are used for writing the corresponding attributes at series

All attributes contained in xAttrList are written at the chart element, which is the outer element of a chart. So these attributes can easily be parsed again by the container

Definition at line 1067 of file SchXMLExport.cxx.

References maAutoStyleNameQueue, parseDocument(), and SAL_WARN_IF.

void SchXMLExportHelper_Impl::exportCoordinateRegion ( const css::uno::Reference< css::chart::XDiagram > &  xDiagram)
void SchXMLExportHelper_Impl::exportCustomLabel ( const SchXMLDataPointStruct &  rPoint)
void SchXMLExportHelper_Impl::exportCustomLabelPosition ( const chart2::RelativePosition &  xCustomLabelPosition)
void SchXMLExportHelper_Impl::exportDataPoints ( const css::uno::Reference< css::beans::XPropertySet > &  xSeriesProperties,
sal_Int32  nSeriesLength,
const css::uno::Reference< css::chart2::XDiagram > &  xDiagram,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportDateScale ( const Reference< beans::XPropertySet > &  rAxisProps)
void SchXMLExportHelper_Impl::exportErrorBar ( const css::uno::Reference< beans::XPropertySet > &  xSeriesProp,
bool  bYError,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportGrid ( const Reference< beans::XPropertySet > &  rGridProperties,
bool  bMajor,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportPlotArea ( const css::uno::Reference< css::chart::XDiagram > &  xDiagram,
const css::uno::Reference< css::chart2::XDiagram > &  xNewDiagram,
const css::awt::Size &  rPageSize,
bool  bExportContent,
bool  bIncludeTable 
)
void SchXMLExportHelper_Impl::exportPropertyMapping ( const css::uno::Reference< css::chart2::data::XDataSource > &  xSource,
const Sequence< OUString > &  rSupportedMappings 
)
void SchXMLExportHelper_Impl::exportRegressionCurve ( const css::uno::Reference< css::chart2::XDataSeries > &  xSeries,
const css::awt::Size &  rPageSize,
bool  bExportContent 
)
void SchXMLExportHelper_Impl::exportSeries ( const css::uno::Reference< css::chart2::XDiagram > &  xNewDiagram,
const css::awt::Size &  rPageSize,
bool  bExportContent,
bool  bHasTwoYAxes 
)
void SchXMLExportHelper_Impl::exportTable ( )
void SchXMLExportHelper_Impl::exportText ( const OUString &  rText)

exports a string as a paragraph element

Definition at line 3730 of file SchXMLExport.cxx.

References SchXMLTools::exportText(), and mrExport.

Referenced by exportAxisTitle(), exportTable(), and parseDocument().

awt::Size SchXMLExportHelper_Impl::getPageSize ( const css::uno::Reference< css::chart2::XChartDocument > &  xChartDoc)
static

Definition at line 3702 of file SchXMLExport.cxx.

References SAL_WARN_IF.

Referenced by parseDocument().

const rtl::Reference< XMLPropertySetMapper > & SchXMLExportHelper_Impl::GetPropertySetMapper ( ) const

Definition at line 999 of file SchXMLExport.cxx.

References mxPropertySetMapper.

Referenced by exportRegressionCurve().

void SchXMLExportHelper_Impl::InitRangeSegmentationProperties ( const css::uno::Reference< css::chart2::XChartDocument > &  xChartDoc)
SchXMLExportHelper_Impl& SchXMLExportHelper_Impl::operator= ( const SchXMLExportHelper_Impl )
delete
void SchXMLExportHelper_Impl::parseDocument ( css::uno::Reference< css::chart::XChartDocument > const &  rChartDoc,
bool  bExportContent,
bool  bIncludeTable = false 
)

if bExportContent is false the auto-styles are collected

Definition at line 1094 of file SchXMLExport.cxx.

References SvXMLExport::AddAttribute(), AddAutoStyleAttribute(), addPosition(), addSize(), Any, CollectAutoStyle(), sax::Converter::convertDateTime(), sax::Converter::convertDouble(), exportPlotArea(), exportTable(), exportText(), XMLEnumPropertyHdl::exportXML(), SchXMLEnumConverter::getLegendExpansionConverter(), SchXMLEnumConverter::getLegendPositionConverter(), SvXMLExport::GetMM100UnitConverter(), SvXMLExport::GetNamespaceMap(), getPageSize(), SvXMLNamespaceMap::GetQNameByKey(), SvXMLExport::GetShapeExport(), SchXMLTools::getTokenByChartType(), xmloff::token::GetXMLToken(), lcl_GetStringFromNumberSequence(), maSequenceMapping, mbHasCategoryLabels, mbRowSourceColumns, mrExport, msString, mxAdditionalShapes, mxExpPropMapper, SvtSaveOptions::ODFSVER_012, SvtSaveOptions::ODFSVER_013, SvtSaveOptions::ODFSVER_EXTENDED, SAL_WARN, SAL_WARN_IF, TOOLS_INFO_EXCEPTION, xmloff::token::XML_ADD_IN, xmloff::token::XML_BAR, xmloff::token::XML_CALCULATION_SETTINGS, xmloff::token::XML_CHART, xmloff::token::XML_CLASS, xmloff::token::XML_COLUMN_MAPPING, xmloff::token::XML_DATA_PILOT_SOURCE, xmloff::token::XML_DATE_VALUE, xmloff::token::XML_HREF, xmloff::token::XML_LEGEND, xmloff::token::XML_LEGEND_EXPANSION, xmloff::token::XML_LEGEND_EXPANSION_ASPECT_RATIO, xmloff::token::XML_LEGEND_POSITION, XML_NAMESPACE_CHART, XML_NAMESPACE_LO_EXT, XML_NAMESPACE_OOO, XML_NAMESPACE_STYLE, XML_NAMESPACE_TABLE, XML_NAMESPACE_XLINK, xmloff::token::XML_NULL_DATE, xmloff::token::XML_OVERLAY, xmloff::token::XML_ROW_MAPPING, xmloff::token::XML_SIMPLE, xmloff::token::XML_SUBTITLE, xmloff::token::XML_TITLE, xmloff::token::XML_TOKEN_INVALID, and xmloff::token::XML_TYPE.

Referenced by collectAutoStyles(), and exportChart().

void SchXMLExportHelper_Impl::SetChartRangeAddress ( const OUString &  rAddress)
inline

Definition at line 171 of file SchXMLExport.cxx.

Member Data Documentation

constexpr OUStringLiteral SchXMLExportHelper_Impl::gsTableName = u"local-table"
static

Definition at line 261 of file SchXMLExport.cxx.

Referenced by exportTable().

tDataSequenceCont SchXMLExportHelper_Impl::m_aDataSequencesToExport
::std::queue< OUString > SchXMLExportHelper_Impl::maAutoStyleNameQueue

first parseDocument: collect autostyles and store names in this queue second parseDocument: export content and use names from this queue

Definition at line 183 of file SchXMLExport.cxx.

Referenced by AddAutoStyleAttribute(), CollectAutoStyle(), exportChart(), and exportDataPoints().

OUString SchXMLExportHelper_Impl::maCategoriesRange

Definition at line 279 of file SchXMLExport.cxx.

Referenced by exportAxes(), and exportTable().

OUString SchXMLExportHelper_Impl::maDestShellID

Definition at line 274 of file SchXMLExport.cxx.

Referenced by exportAxis().

css::uno::Sequence< sal_Int32 > SchXMLExportHelper_Impl::maSequenceMapping

Definition at line 269 of file SchXMLExport.cxx.

Referenced by InitRangeSegmentationProperties(), and parseDocument().

OUString SchXMLExportHelper_Impl::maSrcShellID

Definition at line 273 of file SchXMLExport.cxx.

Referenced by exportAxis().

bool SchXMLExportHelper_Impl::mbHasCategoryLabels

Definition at line 266 of file SchXMLExport.cxx.

Referenced by exportAxes(), InitRangeSegmentationProperties(), and parseDocument().

bool SchXMLExportHelper_Impl::mbRowSourceColumns

Definition at line 267 of file SchXMLExport.cxx.

Referenced by exportTable(), InitRangeSegmentationProperties(), and parseDocument().

SvXMLAutoStylePoolP& SchXMLExportHelper_Impl::mrAutoStylePool

Definition at line 257 of file SchXMLExport.cxx.

Referenced by CollectAutoStyle(), exportAutoStyles(), and SchXMLExportHelper_Impl().

SvXMLExport& SchXMLExportHelper_Impl::mrExport
OUString SchXMLExportHelper_Impl::msChartAddress

Definition at line 268 of file SchXMLExport.cxx.

Referenced by exportPlotArea(), and InitRangeSegmentationProperties().

OUString SchXMLExportHelper_Impl::msCLSID

Definition at line 271 of file SchXMLExport.cxx.

OUString SchXMLExportHelper_Impl::msString

Definition at line 263 of file SchXMLExport.cxx.

Referenced by exportTable(), and parseDocument().

OUStringBuffer SchXMLExportHelper_Impl::msStringBuffer

Definition at line 262 of file SchXMLExport.cxx.

Referenced by exportPlotArea(), and exportTable().

css::uno::Reference< css::drawing::XShapes > SchXMLExportHelper_Impl::mxAdditionalShapes

Definition at line 276 of file SchXMLExport.cxx.

Referenced by parseDocument().

rtl::Reference< XMLChartExportPropertyMapper > SchXMLExportHelper_Impl::mxExpPropMapper
rtl::Reference< XMLPropertySetMapper > SchXMLExportHelper_Impl::mxPropertySetMapper

Definition at line 258 of file SchXMLExport.cxx.

Referenced by GetPropertySetMapper().


The documentation for this class was generated from the following file: