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 (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, std::u16string_view 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 157 of file SchXMLExport.cxx.

Member Typedef Documentation

◆ tDataSequenceCont

Definition at line 163 of file SchXMLExport.cxx.

◆ tLabelValuesDataPair

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

Definition at line 162 of file SchXMLExport.cxx.

Constructor & Destructor Documentation

◆ SchXMLExportHelper_Impl() [1/2]

SchXMLExportHelper_Impl::SchXMLExportHelper_Impl ( SvXMLExport rExport,
SvXMLAutoStylePoolP rASPool 
)

◆ SchXMLExportHelper_Impl() [2/2]

SchXMLExportHelper_Impl::SchXMLExportHelper_Impl ( const SchXMLExportHelper_Impl )
delete

Member Function Documentation

◆ AddAutoStyleAttribute()

void SchXMLExportHelper_Impl::AddAutoStyleAttribute ( const std::vector< XMLPropertyState > &  aStates)

◆ addPosition() [1/2]

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().

◆ addPosition() [2/2]

void SchXMLExportHelper_Impl::addPosition ( const css::uno::Reference< css::drawing::XShape > &  xShape)

◆ addSize() [1/2]

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().

◆ addSize() [2/2]

void SchXMLExportHelper_Impl::addSize ( const css::uno::Reference< css::drawing::XShape > &  xShape)

◆ CollectAutoStyle()

void SchXMLExportHelper_Impl::CollectAutoStyle ( std::vector< XMLPropertyState > &&  aStates)

◆ collectAutoStyles()

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 1107 of file SchXMLExport.cxx.

References parseDocument().

◆ exportAutoStyles()

void SchXMLExportHelper_Impl::exportAutoStyles ( )

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

Definition at line 1049 of file SchXMLExport.cxx.

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

◆ exportAxes()

void SchXMLExportHelper_Impl::exportAxes ( const css::uno::Reference< css::chart::XDiagram > &  xDiagram,
const css::uno::Reference< css::chart2::XDiagram > &  xNewDiagram,
bool  bExportContent 
)

◆ exportAxis()

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,
std::u16string_view  sChartType 
)

◆ exportAxisTitle()

void SchXMLExportHelper_Impl::exportAxisTitle ( const Reference< beans::XPropertySet > &  rTitleProps,
bool  bExportContent 
)

◆ exportCandleStickSeries()

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 
)

◆ exportChart()

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 1112 of file SchXMLExport.cxx.

References maAutoStyleNameQueue, parseDocument(), and SAL_WARN_IF.

◆ exportCoordinateRegion()

void SchXMLExportHelper_Impl::exportCoordinateRegion ( const css::uno::Reference< css::chart::XDiagram > &  xDiagram)

◆ exportCustomLabel()

void SchXMLExportHelper_Impl::exportCustomLabel ( const SchXMLDataPointStruct &  rPoint)

◆ exportCustomLabelPosition()

void SchXMLExportHelper_Impl::exportCustomLabelPosition ( const chart2::RelativePosition &  xCustomLabelPosition)

◆ exportDataPoints()

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 
)

◆ exportDateScale()

void SchXMLExportHelper_Impl::exportDateScale ( const Reference< beans::XPropertySet > &  rAxisProps)

◆ exportErrorBar()

void SchXMLExportHelper_Impl::exportErrorBar ( const css::uno::Reference< beans::XPropertySet > &  xSeriesProp,
bool  bYError,
bool  bExportContent 
)

◆ exportGrid()

void SchXMLExportHelper_Impl::exportGrid ( const Reference< beans::XPropertySet > &  rGridProperties,
bool  bMajor,
bool  bExportContent 
)

◆ exportPlotArea()

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 
)

◆ exportPropertyMapping()

void SchXMLExportHelper_Impl::exportPropertyMapping ( const css::uno::Reference< css::chart2::data::XDataSource > &  xSource,
const Sequence< OUString > &  rSupportedMappings 
)

◆ exportRegressionCurve()

void SchXMLExportHelper_Impl::exportRegressionCurve ( const css::uno::Reference< css::chart2::XDataSeries > &  xSeries,
const css::awt::Size &  rPageSize,
bool  bExportContent 
)

◆ exportSeries()

void SchXMLExportHelper_Impl::exportSeries ( const css::uno::Reference< css::chart2::XDiagram > &  xNewDiagram,
const css::awt::Size &  rPageSize,
bool  bExportContent,
bool  bHasTwoYAxes 
)

◆ exportTable()

void SchXMLExportHelper_Impl::exportTable ( )

◆ exportText()

void SchXMLExportHelper_Impl::exportText ( const OUString &  rText)

exports a string as a paragraph element

Definition at line 3831 of file SchXMLExport.cxx.

References SchXMLTools::exportText(), and mrExport.

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

◆ getPageSize()

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

Definition at line 3803 of file SchXMLExport.cxx.

References SAL_WARN_IF.

Referenced by parseDocument().

◆ GetPropertySetMapper()

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

Definition at line 1044 of file SchXMLExport.cxx.

References mxPropertySetMapper.

Referenced by exportRegressionCurve().

◆ InitRangeSegmentationProperties()

void SchXMLExportHelper_Impl::InitRangeSegmentationProperties ( const css::uno::Reference< css::chart2::XChartDocument > &  xChartDoc)

◆ operator=()

SchXMLExportHelper_Impl & SchXMLExportHelper_Impl::operator= ( const SchXMLExportHelper_Impl )
delete

◆ parseDocument()

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 1139 of file SchXMLExport.cxx.

References SvXMLExport::AddAttribute(), AddAutoStyleAttribute(), addPosition(), addSize(), Any, CollectAutoStyle(), sax::Converter::convertDateTime(), sax::Converter::convertDouble(), exportPlotArea(), exportTable(), exportText(), XMLEnumPropertyHdl::exportXML(), XMLImageStyle::exportXML(), SchXMLEnumConverter::getLegendExpansionConverter(), SchXMLEnumConverter::getLegendPositionConverter(), SvXMLExport::GetMM100UnitConverter(), SvXMLExport::GetNamespaceMap(), getPageSize(), SvXMLAutoStylePoolP::GetPropertyNames(), SvXMLNamespaceMap::GetQNameByKey(), SvXMLExport::getSaneDefaultVersion(), SvXMLExport::GetShapeExport(), SchXMLTools::getTokenByChartType(), xmloff::token::GetXMLToken(), lcl_GetStringFromNumberSequence(), maSequenceMapping, mbHasCategoryLabels, mbRowSourceColumns, mrAutoStylePool, 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_DATA_TABLE, 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().

◆ SetChartRangeAddress()

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

Definition at line 195 of file SchXMLExport.cxx.

References msChartAddress.

Member Data Documentation

◆ gsTableName

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

Definition at line 285 of file SchXMLExport.cxx.

Referenced by exportTable().

◆ m_aDataSequencesToExport

tDataSequenceCont SchXMLExportHelper_Impl::m_aDataSequencesToExport

◆ maAutoStyleNameQueue

::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 207 of file SchXMLExport.cxx.

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

◆ maCategoriesRange

OUString SchXMLExportHelper_Impl::maCategoriesRange

Definition at line 303 of file SchXMLExport.cxx.

Referenced by exportAxes(), and exportTable().

◆ maDestShellID

OUString SchXMLExportHelper_Impl::maDestShellID

Definition at line 298 of file SchXMLExport.cxx.

Referenced by exportAxis().

◆ maSequenceMapping

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

Definition at line 293 of file SchXMLExport.cxx.

Referenced by InitRangeSegmentationProperties(), and parseDocument().

◆ maSrcShellID

OUString SchXMLExportHelper_Impl::maSrcShellID

Definition at line 297 of file SchXMLExport.cxx.

Referenced by exportAxis().

◆ mbHasCategoryLabels

bool SchXMLExportHelper_Impl::mbHasCategoryLabels

Definition at line 290 of file SchXMLExport.cxx.

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

◆ mbRowSourceColumns

bool SchXMLExportHelper_Impl::mbRowSourceColumns

Definition at line 291 of file SchXMLExport.cxx.

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

◆ mrAutoStylePool

SvXMLAutoStylePoolP& SchXMLExportHelper_Impl::mrAutoStylePool

◆ mrExport

SvXMLExport& SchXMLExportHelper_Impl::mrExport

◆ msChartAddress

OUString SchXMLExportHelper_Impl::msChartAddress

◆ msCLSID

OUString SchXMLExportHelper_Impl::msCLSID

Definition at line 295 of file SchXMLExport.cxx.

◆ msString

OUString SchXMLExportHelper_Impl::msString

Definition at line 287 of file SchXMLExport.cxx.

Referenced by exportTable(), and parseDocument().

◆ msStringBuffer

OUStringBuffer SchXMLExportHelper_Impl::msStringBuffer

Definition at line 286 of file SchXMLExport.cxx.

Referenced by exportPlotArea(), and exportTable().

◆ mxAdditionalShapes

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

Definition at line 300 of file SchXMLExport.cxx.

Referenced by parseDocument().

◆ mxExpPropMapper

rtl::Reference< XMLChartExportPropertyMapper > SchXMLExportHelper_Impl::mxExpPropMapper

◆ mxPropertySetMapper

rtl::Reference< XMLPropertySetMapper > SchXMLExportHelper_Impl::mxPropertySetMapper

Definition at line 282 of file SchXMLExport.cxx.

Referenced by GetPropertySetMapper().


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