LibreOffice Module xmloff (master) 1
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
SchXMLImportHelper Class Referencefinal

With this class you can import a <chart:chart> element containing its data as <table:table> element or without internal table. More...

#include <SchXMLImportHelper.hxx>

Inheritance diagram for SchXMLImportHelper:
[legend]
Collaboration diagram for SchXMLImportHelper:
[legend]

Public Member Functions

 SchXMLImportHelper ()
 
SvXMLImportContextCreateChartContext (SvXMLImport &rImport, const css::uno::Reference< css::frame::XModel > &rChartModel)
 get the context for reading the <chart:chart> element with subelements. More...
 
void SetAutoStylesContext (SvXMLStylesContext *pAutoStyles)
 set the auto-style context that will be used to retrieve auto-styles used inside the following <chart:chart> element to parse More...
 
SvXMLStylesContextGetAutoStylesContext () const
 
void FillAutoStyle (const OUString &rAutoStyleName, const css::uno::Reference< css::beans::XPropertySet > &rProp)
 Fill in the autostyle. More...
 
const css::uno::Reference< css::chart::XChartDocument > & GetChartDocument () const
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static XmlStyleFamily GetChartFamilyID ()
 
static css::uno::Reference< css::chart2::XDataSeries > GetNewDataSeries (const css::uno::Reference< css::chart2::XChartDocument > &xDoc, sal_Int32 nCoordinateSystemIndex, const OUString &rChartTypeName, bool bPushLastChartType)
 
static void DeleteDataSeries (const css::uno::Reference< css::chart2::XDataSeries > &xSeries, const css::uno::Reference< css::chart2::XChartDocument > &xDoc)
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Private Attributes

css::uno::Reference< css::chart::XChartDocument > mxChartDoc
 
SvXMLStylesContextmpAutoStyles
 

Additional Inherited Members

- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

With this class you can import a <chart:chart> element containing its data as <table:table> element or without internal table.

In the latter case you have to provide a table address mapper that converts table addresses in XML format to the appropriate application format.

Definition at line 56 of file SchXMLImportHelper.hxx.

Constructor & Destructor Documentation

◆ SchXMLImportHelper()

SchXMLImportHelper::SchXMLImportHelper ( )

Definition at line 82 of file SchXMLImport.cxx.

Member Function Documentation

◆ CreateChartContext()

SvXMLImportContext * SchXMLImportHelper::CreateChartContext ( SvXMLImport &  rImport,
const css::uno::Reference< css::frame::XModel > &  rChartModel 
)

get the context for reading the <chart:chart> element with subelements.

The result is stored in the XModel given if it also implements XChartDocument

Definition at line 87 of file SchXMLImport.cxx.

References mxChartDoc, and SAL_WARN.

Referenced by SchXMLBodyContext::createFastChildContext().

◆ DeleteDataSeries()

void SchXMLImportHelper::DeleteDataSeries ( const css::uno::Reference< css::chart2::XDataSeries > &  xSeries,
const css::uno::Reference< css::chart2::XChartDocument > &  xDoc 
)
static

Definition at line 126 of file SchXMLImport.cxx.

References DBG_UNHANDLED_EXCEPTION.

Referenced by SchXMLSeries2Context::endFastElement().

◆ FillAutoStyle()

void SchXMLImportHelper::FillAutoStyle ( const OUString &  rAutoStyleName,
const css::uno::Reference< css::beans::XPropertySet > &  rProp 
)

◆ GetAutoStylesContext()

SvXMLStylesContext * SchXMLImportHelper::GetAutoStylesContext ( ) const
inline

◆ GetChartDocument()

const css::uno::Reference< css::chart::XChartDocument > & SchXMLImportHelper::GetChartDocument ( ) const
inline

◆ GetChartFamilyID()

static XmlStyleFamily SchXMLImportHelper::GetChartFamilyID ( )
inlinestatic

◆ GetNewDataSeries()

Reference< chart2::XDataSeries > SchXMLImportHelper::GetNewDataSeries ( const css::uno::Reference< css::chart2::XChartDocument > &  xDoc,
sal_Int32  nCoordinateSystemIndex,
const OUString &  rChartTypeName,
bool  bPushLastChartType 
)
static
Parameters
bPushLastChartTypeIf </sal_False>, in case a new chart type has to be added (because it does not exist yet), it is appended at the end of the chart-type container. When </sal_True>, a new chart type is added at one position before the last one, i.e. the formerly last chart type is pushed back, so that it remains the last one.

This is needed when the global chart type is set to type A, but the first series has type B. Then B should appear before A (done by passing true). Once a series of type A has been read, following new chart types are again be added at the end (by passing false).

Definition at line 164 of file SchXMLImport.cxx.

References DBG_UNHANDLED_EXCEPTION, comphelper::getProcessComponentContext(), and nIndex.

Referenced by SchXMLSeries2Context::startFastElement().

◆ SetAutoStylesContext()

void SchXMLImportHelper::SetAutoStylesContext ( SvXMLStylesContext pAutoStyles)
inline

set the auto-style context that will be used to retrieve auto-styles used inside the following <chart:chart> element to parse

Definition at line 77 of file SchXMLImportHelper.hxx.

References mpAutoStyles.

Member Data Documentation

◆ mpAutoStyles

SvXMLStylesContext* SchXMLImportHelper::mpAutoStyles
private

Definition at line 60 of file SchXMLImportHelper.hxx.

Referenced by GetAutoStylesContext(), and SetAutoStylesContext().

◆ mxChartDoc

css::uno::Reference< css::chart::XChartDocument > SchXMLImportHelper::mxChartDoc
private

Definition at line 59 of file SchXMLImportHelper.hxx.

Referenced by CreateChartContext(), and GetChartDocument().


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