LibreOffice Module chart2 (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
chart::XMLFilter Class Reference

#include <XMLFilter.hxx>

Inheritance diagram for chart::XMLFilter:
[legend]
Collaboration diagram for chart::XMLFilter:
[legend]

Public Member Functions

 XMLFilter (css::uno::Reference< css::uno::XComponentContext > const &xContext)
 
virtual ~XMLFilter () override
 
virtual OUString SAL_CALL getImplementationName () override
 XServiceInfo declarations. More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 

Protected Member Functions

virtual sal_Bool SAL_CALL filter (const css::uno::Sequence< css::beans::PropertyValue > &aDescriptor) override
 
virtual void SAL_CALL cancel () override
 
virtual void SAL_CALL setTargetDocument (const css::uno::Reference< css::lang::XComponent > &Document) override
 
virtual void SAL_CALL setSourceDocument (const css::uno::Reference< css::lang::XComponent > &Document) override
 
void setDocumentHandler (const OUString &_sDocumentHandler)
 
virtual OUString getMediaType (bool _bOasis)
 
virtual void isOasisFormat (const css::uno::Sequence< css::beans::PropertyValue > &_rMediaDescriptor, bool &_rOutOASIS)
 fills the oasis flag only when a filtername was set More...
 

Private Member Functions

ErrCode impl_Import (const css::uno::Reference< css::lang::XComponent > &xDocumentComp, const css::uno::Sequence< css::beans::PropertyValue > &aMediaDescriptor)
 
ErrCode impl_ImportStream (const OUString &rStreamName, const OUString &rServiceName, const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Reference< css::lang::XMultiComponentFactory > &xFactory, const css::uno::Reference< css::document::XGraphicStorageHandler > &xGraphicStorageHandler, css::uno::Reference< css::beans::XPropertySet > const &xPropSet)
 
ErrCode impl_Export (const css::uno::Reference< css::lang::XComponent > &xDocumentComp, const css::uno::Sequence< css::beans::PropertyValue > &aMediaDescriptor)
 
ErrCode impl_ExportStream (const OUString &rStreamName, const OUString &rServiceName, const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Reference< css::xml::sax::XWriter > &xActiveDataSource, const css::uno::Reference< css::lang::XMultiServiceFactory > &xFactory, const css::uno::Sequence< css::uno::Any > &rFilterProperties)
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::lang::XComponent > m_xTargetDoc
 
css::uno::Reference< css::lang::XComponent > m_xSourceDoc
 
css::uno::Sequence< css::beans::PropertyValue > m_aMediaDescriptor
 
OUString m_sDocumentHandler
 
volatile bool m_bCancelOperation
 
::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 50 of file XMLFilter.hxx.

Constructor & Destructor Documentation

◆ XMLFilter()

chart::XMLFilter::XMLFilter ( css::uno::Reference< css::uno::XComponentContext > const &  xContext)
explicit

Definition at line 188 of file XMLFilter.cxx.

◆ ~XMLFilter()

chart::XMLFilter::~XMLFilter ( )
overridevirtual

Definition at line 193 of file XMLFilter.cxx.

Member Function Documentation

◆ cancel()

void SAL_CALL chart::XMLFilter::cancel ( )
overrideprotectedvirtual

Definition at line 236 of file XMLFilter.cxx.

References m_aMutex, and m_bCancelOperation.

◆ filter()

sal_Bool SAL_CALL chart::XMLFilter::filter ( const css::uno::Sequence< css::beans::PropertyValue > &  aDescriptor)
overrideprotectedvirtual

◆ getImplementationName()

OUString SAL_CALL chart::XMLFilter::getImplementationName ( )
overridevirtual

XServiceInfo declarations.

Reimplemented in chart::XMLReportFilterHelper.

Definition at line 726 of file XMLFilter.cxx.

◆ getMediaType()

OUString chart::XMLFilter::getMediaType ( bool  _bOasis)
protectedvirtual

◆ getSupportedServiceNames()

css::uno::Sequence< OUString > SAL_CALL chart::XMLFilter::getSupportedServiceNames ( )
overridevirtual

Definition at line 736 of file XMLFilter.cxx.

◆ impl_Export()

ErrCode chart::XMLFilter::impl_Export ( const css::uno::Reference< css::lang::XComponent > &  xDocumentComp,
const css::uno::Sequence< css::beans::PropertyValue > &  aMediaDescriptor 
)
private

◆ impl_ExportStream()

ErrCode chart::XMLFilter::impl_ExportStream ( const OUString &  rStreamName,
const OUString &  rServiceName,
const css::uno::Reference< css::embed::XStorage > &  xStorage,
const css::uno::Reference< css::xml::sax::XWriter > &  xActiveDataSource,
const css::uno::Reference< css::lang::XMultiServiceFactory > &  xFactory,
const css::uno::Sequence< css::uno::Any > &  rFilterProperties 
)
private
Returns
a warning code, or 0 for successful operation

Definition at line 646 of file XMLFilter.cxx.

References DBG_UNHANDLED_EXCEPTION, ERRCODE_NONE, ERRCODE_SFX_GENERAL, m_aMediaDescriptor, m_xSourceDoc, and xStream.

Referenced by impl_Export().

◆ impl_Import()

ErrCode chart::XMLFilter::impl_Import ( const css::uno::Reference< css::lang::XComponent > &  xDocumentComp,
const css::uno::Sequence< css::beans::PropertyValue > &  aMediaDescriptor 
)
private
Returns
a warning code, or 0 for successful operation

property map for import info set

Definition at line 266 of file XMLFilter.cxx.

References DBG_UNHANDLED_EXCEPTION, ERRCODE_NONE, ERRCODE_SFX_GENERAL, comphelper::GenericPropertySet_CreateInstance(), cppu::UnoType< typename T >::get(), impl_ImportStream(), isOasisFormat(), m_xContext, m_xTargetDoc, SAL_INFO_IF, xFactory, and xModel.

Referenced by filter().

◆ impl_ImportStream()

ErrCode chart::XMLFilter::impl_ImportStream ( const OUString &  rStreamName,
const OUString &  rServiceName,
const css::uno::Reference< css::embed::XStorage > &  xStorage,
const css::uno::Reference< css::lang::XMultiComponentFactory > &  xFactory,
const css::uno::Reference< css::document::XGraphicStorageHandler > &  xGraphicStorageHandler,
css::uno::Reference< css::beans::XPropertySet > const &  xPropSet 
)
private
Returns
a warning code, or 0 for successful operation

Definition at line 392 of file XMLFilter.cxx.

References DBG_UNHANDLED_EXCEPTION, ERRCODE_IO_BROKENPACKAGE, ERRCODE_NONE, ERRCODE_SFX_GENERAL, m_sDocumentHandler, m_xContext, m_xTargetDoc, TOOLS_WARN_EXCEPTION, and xFactory.

Referenced by impl_Import().

◆ isOasisFormat()

void chart::XMLFilter::isOasisFormat ( const css::uno::Sequence< css::beans::PropertyValue > &  _rMediaDescriptor,
bool &  _rOutOASIS 
)
protectedvirtual

fills the oasis flag only when a filtername was set

Parameters
_rMediaDescriptor
_rOutOASIS

Reimplemented in chart::XMLReportFilterHelper.

Definition at line 715 of file XMLFilter.cxx.

References apphelper::MediaDescriptorHelper::FilterName, and apphelper::MediaDescriptorHelper::ISSET_FilterName.

Referenced by impl_Export(), and impl_Import().

◆ setDocumentHandler()

void chart::XMLFilter::setDocumentHandler ( const OUString &  _sDocumentHandler)
inlineprotected

◆ setSourceDocument()

void SAL_CALL chart::XMLFilter::setSourceDocument ( const css::uno::Reference< css::lang::XComponent > &  Document)
overrideprotectedvirtual

Reimplemented in chart::XMLReportFilterHelper.

Definition at line 257 of file XMLFilter.cxx.

References Document, m_aMutex, m_xSourceDoc, and m_xTargetDoc.

Referenced by chart::XMLReportFilterHelper::setSourceDocument().

◆ setTargetDocument()

void SAL_CALL chart::XMLFilter::setTargetDocument ( const css::uno::Reference< css::lang::XComponent > &  Document)
overrideprotectedvirtual

Reimplemented in chart::XMLReportFilterHelper.

Definition at line 247 of file XMLFilter.cxx.

References Document, m_aMutex, m_xSourceDoc, and m_xTargetDoc.

Referenced by chart::XMLReportFilterHelper::setTargetDocument().

◆ supportsService()

sal_Bool SAL_CALL chart::XMLFilter::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 731 of file XMLFilter.cxx.

References cppu::supportsService().

Member Data Documentation

◆ m_aMediaDescriptor

css::uno::Sequence<css::beans::PropertyValue> chart::XMLFilter::m_aMediaDescriptor
private

Definition at line 123 of file XMLFilter.hxx.

Referenced by impl_Export(), and impl_ExportStream().

◆ m_aMutex

::osl::Mutex chart::XMLFilter::m_aMutex
private

Definition at line 128 of file XMLFilter.hxx.

Referenced by cancel(), filter(), setSourceDocument(), and setTargetDocument().

◆ m_bCancelOperation

volatile bool chart::XMLFilter::m_bCancelOperation
private

Definition at line 127 of file XMLFilter.hxx.

Referenced by cancel(), and filter().

◆ m_sDocumentHandler

OUString chart::XMLFilter::m_sDocumentHandler
private

Definition at line 125 of file XMLFilter.hxx.

Referenced by impl_Export(), impl_ImportStream(), and setDocumentHandler().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > chart::XMLFilter::m_xContext
private

Definition at line 119 of file XMLFilter.hxx.

Referenced by impl_Export(), impl_Import(), and impl_ImportStream().

◆ m_xSourceDoc

css::uno::Reference< css::lang::XComponent > chart::XMLFilter::m_xSourceDoc
private

Definition at line 121 of file XMLFilter.hxx.

Referenced by filter(), impl_ExportStream(), setSourceDocument(), and setTargetDocument().

◆ m_xTargetDoc

css::uno::Reference< css::lang::XComponent > chart::XMLFilter::m_xTargetDoc
private

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