LibreOffice Module oox (master)  1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
oox::core::FilterBase Class Referenceabstract

#include <filterbase.hxx>

Inheritance diagram for oox::core::FilterBase:
[legend]
Collaboration diagram for oox::core::FilterBase:
[legend]

Public Member Functions

 FilterBase (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~FilterBase () override
 
bool isImportFilter () const
 Returns true, if filter is an import filter. More...
 
bool isExportFilter () const
 Returns true, if filter is an export filter. More...
 
OoxmlVersion getVersion () const
 
virtual bool importDocument ()=0
 Derived classes implement import of the entire document. More...
 
virtual bool exportDocument ()=0
 Derived classes implement export of the entire document. More...
 
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext () const
 Returns the component context passed in the filter constructor (always existing). More...
 
const css::uno::Reference< css::frame::XModel > & getModel () const
 Returns the document model (always existing). More...
 
const css::uno::Reference< css::lang::XMultiServiceFactory > & getModelFactory () const
 Returns the service factory provided by the document model (always existing). More...
 
const css::uno::Reference< css::frame::XFrame > & getTargetFrame () const
 Returns the frame that will contain the document model (may be null). More...
 
const css::uno::Reference< css::task::XStatusIndicator > & getStatusIndicator () const
 Returns the status indicator (may be null). More...
 
::comphelper::SequenceAsHashMapgetFilterData () const
 Returns the FilterData. More...
 
utl::MediaDescriptorgetMediaDescriptor () const
 Returns the media descriptor. More...
 
const OUString & getFileUrl () const
 Returns the URL of the imported or exported file. More...
 
OUString getAbsoluteUrl (const OUString &rUrl) const
 Returns an absolute URL for the passed relative or absolute URL. More...
 
StorageRef const & getStorage () const
 Returns the base storage of the imported/exported file. More...
 
css::uno::Reference< css::io::XInputStream > openInputStream (const OUString &rStreamName) const
 Opens and returns the specified input stream from the base storage. More...
 
css::uno::Reference< css::io::XOutputStream > openOutputStream (const OUString &rStreamName) const
 Opens and returns the specified output stream from the base storage. More...
 
void commitStorage () const
 Commits changes to base storage (and substorages) More...
 
GraphicHelpergetGraphicHelper () const
 Returns a helper for the handling of graphics and graphic objects. More...
 
ModelObjectHelpergetModelObjectHelper () const
 Returns a helper with containers for various named drawing objects for the imported document. More...
 
ModelObjectHelpergetModelObjectHelperForModel (const css::uno::Reference< css::lang::XMultiServiceFactory > &xFactory) const
 
::oox::ole::OleObjectHelpergetOleObjectHelper () const
 Returns a helper for the handling of OLE objects. More...
 
::oox::ole::VbaProjectgetVbaProject () const
 Returns the VBA project manager. More...
 
bool importBinaryData (StreamDataSequence &orDataSeq, const OUString &rStreamName)
 Imports the raw binary data from the specified stream. More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &rServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &rArgs) override
 Receives user defined arguments. More...
 
virtual void SAL_CALL setTargetDocument (const css::uno::Reference< css::lang::XComponent > &rxDocument) override
 
virtual void SAL_CALL setSourceDocument (const css::uno::Reference< css::lang::XComponent > &rxDocument) override
 
virtual sal_Bool SAL_CALL filter (const css::uno::Sequence< css::beans::PropertyValue > &rMediaDescSeq) override
 
virtual void SAL_CALL cancel () override
 
bool exportVBA () const
 
bool isExportTemplate () const
 

Protected Member Functions

virtual css::uno::Reference< css::io::XInputStream > implGetInputStream (utl::MediaDescriptor &rMediaDesc) const
 
virtual css::uno::Reference< css::io::XStream > implGetOutputStream (utl::MediaDescriptor &rMediaDesc) const
 
virtual bool implFinalizeExport (utl::MediaDescriptor &rMediaDescriptor)
 
css::uno::Reference< css::io::XStream > const & getMainDocumentStream () const
 

Private Member Functions

void setMediaDescriptor (const css::uno::Sequence< css::beans::PropertyValue > &rMediaDescSeq)
 
virtual GraphicHelperimplCreateGraphicHelper () const
 Derived classes may create a specialized graphic helper, e.g. More...
 
virtual ::oox::ole::VbaProjectimplCreateVbaProject () const =0
 Derived classes create a VBA project manager object. More...
 
virtual StorageRef implCreateStorage (const css::uno::Reference< css::io::XInputStream > &rxInStream) const =0
 
virtual StorageRef implCreateStorage (const css::uno::Reference< css::io::XStream > &rxOutStream) const =0
 

Private Attributes

std::unique_ptr< FilterBaseImplmxImpl
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 90 of file filterbase.hxx.

Constructor & Destructor Documentation

oox::core::FilterBase::FilterBase ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
explicit
Exceptions
css::uno::RuntimeException

Definition at line 188 of file filterbase.cxx.

oox::core::FilterBase::~FilterBase ( )
overridevirtual

Definition at line 193 of file filterbase.cxx.

Member Function Documentation

void SAL_CALL oox::core::FilterBase::cancel ( )
overridevirtual

Definition at line 500 of file filterbase.cxx.

void oox::core::FilterBase::commitStorage ( ) const

Commits changes to base storage (and substorages)

Definition at line 336 of file filterbase.cxx.

References mxImpl.

Referenced by oox::core::XmlFilterBase::implFinalizeExport().

virtual bool oox::core::FilterBase::exportDocument ( )
pure virtual

Derived classes implement export of the entire document.

Implemented in oox::shape::ShapeFilterBase, and oox::ppt::PowerPointImport.

Referenced by filter().

bool oox::core::FilterBase::exportVBA ( ) const

Definition at line 581 of file filterbase.cxx.

References mxImpl.

Referenced by oox::ppt::PowerPointImport::filter().

sal_Bool SAL_CALL oox::core::FilterBase::filter ( const css::uno::Sequence< css::beans::PropertyValue > &  rMediaDescSeq)
overridevirtual
OUString oox::core::FilterBase::getAbsoluteUrl ( const OUString &  rUrl) const

Returns an absolute URL for the passed relative or absolute URL.

Definition at line 265 of file filterbase.cxx.

References mxImpl, and u.

Referenced by oox::drawingml::BlipContext::BlipContext(), oox::drawingml::HyperLinkContext::HyperLinkContext(), and oox::drawingml::OleObjectGraphicDataContext::onCreateContext().

const Reference< XComponentContext > & oox::core::FilterBase::getComponentContext ( ) const
const OUString & oox::core::FilterBase::getFileUrl ( ) const

Returns the URL of the imported or exported file.

Definition at line 247 of file filterbase.cxx.

References mxImpl.

Referenced by oox::vml::ComplexShape::implConvertAndInsert(), and oox::ppt::PowerPointImport::importDocument().

SequenceAsHashMap & oox::core::FilterBase::getFilterData ( ) const

Returns the FilterData.

Definition at line 242 of file filterbase.cxx.

References mxImpl.

Referenced by oox::ppt::PresentationFragmentHandler::finalizeImport().

GraphicHelper & oox::core::FilterBase::getGraphicHelper ( ) const
Reference< XStream > const & oox::core::FilterBase::getMainDocumentStream ( ) const
protected

Definition at line 521 of file filterbase.cxx.

References mxImpl.

Referenced by oox::core::XmlFilterBase::implFinalizeExport().

MediaDescriptor & oox::core::FilterBase::getMediaDescriptor ( ) const

Returns the media descriptor.

Definition at line 237 of file filterbase.cxx.

References mxImpl.

Referenced by filter(), and oox::core::XmlFilterBase::importDocumentProperties().

const Reference< XModel > & oox::core::FilterBase::getModel ( ) const
const Reference< XMultiServiceFactory > & oox::core::FilterBase::getModelFactory ( ) const

Returns the service factory provided by the document model (always existing).

Definition at line 222 of file filterbase.cxx.

References mxImpl.

Referenced by oox::vml::Drawing::createAndInsertXShape(), and oox::drawingml::ChartExport::parseFormula().

ModelObjectHelper & oox::core::FilterBase::getModelObjectHelper ( ) const

Returns a helper with containers for various named drawing objects for the imported document.

Definition at line 350 of file filterbase.cxx.

References mxImpl.

Referenced by oox::vml::ShapeBase::convertShapeProperties(), oox::drawingml::Shape::createAndInsert(), and oox::vml::ComplexShape::implConvertAndInsert().

ModelObjectHelper & oox::core::FilterBase::getModelObjectHelperForModel ( const css::uno::Reference< css::lang::XMultiServiceFactory > &  xFactory) const
OleObjectHelper & oox::core::FilterBase::getOleObjectHelper ( ) const

Returns a helper for the handling of OLE objects.

Definition at line 365 of file filterbase.cxx.

References mxImpl.

Referenced by oox::drawingml::Shape::finalizeServiceName().

const Reference< XStatusIndicator > & oox::core::FilterBase::getStatusIndicator ( ) const

Returns the status indicator (may be null).

Definition at line 232 of file filterbase.cxx.

References mxImpl.

StorageRef const & oox::core::FilterBase::getStorage ( ) const

Returns the base storage of the imported/exported file.

Definition at line 319 of file filterbase.cxx.

References mxImpl.

Referenced by oox::core::XmlFilterBase::addRelation().

Sequence< OUString > SAL_CALL oox::core::FilterBase::getSupportedServiceNames ( )
overridevirtual

Definition at line 403 of file filterbase.cxx.

const Reference< XFrame > & oox::core::FilterBase::getTargetFrame ( ) const

Returns the frame that will contain the document model (may be null).

Definition at line 227 of file filterbase.cxx.

References mxImpl.

VbaProject & oox::core::FilterBase::getVbaProject ( ) const

Returns the VBA project manager.

Definition at line 372 of file filterbase.cxx.

References implCreateVbaProject(), and mxImpl.

OoxmlVersion oox::core::FilterBase::getVersion ( ) const
GraphicHelper * oox::core::FilterBase::implCreateGraphicHelper ( ) const
privatevirtual

Derived classes may create a specialized graphic helper, e.g.

for resolving palette colors.

Reimplemented in oox::ppt::PowerPointImport, and oox::shape::ShapeFilterBase.

Definition at line 575 of file filterbase.cxx.

References mxImpl.

Referenced by getGraphicHelper().

virtual StorageRef oox::core::FilterBase::implCreateStorage ( const css::uno::Reference< css::io::XInputStream > &  rxInStream) const
privatepure virtual

Implemented in oox::core::XmlFilterBase.

Referenced by filter().

virtual StorageRef oox::core::FilterBase::implCreateStorage ( const css::uno::Reference< css::io::XStream > &  rxOutStream) const
privatepure virtual

Implemented in oox::core::XmlFilterBase.

virtual ::oox::ole::VbaProject* oox::core::FilterBase::implCreateVbaProject ( ) const
privatepure virtual

Derived classes create a VBA project manager object.

Implemented in oox::ppt::PowerPointImport, and oox::shape::ShapeFilterBase.

Referenced by getVbaProject().

bool oox::core::FilterBase::implFinalizeExport ( utl::MediaDescriptor rMediaDescriptor)
protectedvirtual

Reimplemented in oox::core::XmlFilterBase.

Definition at line 516 of file filterbase.cxx.

Referenced by filter().

Reference< XInputStream > oox::core::FilterBase::implGetInputStream ( utl::MediaDescriptor rMediaDesc) const
protectedvirtual

Reimplemented in oox::core::XmlFilterBase.

Definition at line 506 of file filterbase.cxx.

References utl::MediaDescriptor::PROP_INPUTSTREAM().

Referenced by setMediaDescriptor().

Reference< XStream > oox::core::FilterBase::implGetOutputStream ( utl::MediaDescriptor rMediaDesc) const
protectedvirtual
bool oox::core::FilterBase::importBinaryData ( StreamDataSequence orDataSeq,
const OUString &  rStreamName 
)
virtual bool oox::core::FilterBase::importDocument ( )
pure virtual

Derived classes implement import of the entire document.

Implemented in oox::shape::ShapeFilterBase, and oox::ppt::PowerPointImport.

Referenced by filter().

void SAL_CALL oox::core::FilterBase::initialize ( const css::uno::Sequence< css::uno::Any > &  rArgs)
overridevirtual

Receives user defined arguments.

Parameters
rArgsthe sequence of arguments passed to the filter. The implementation expects one or two arguments. The first argument shall be the com.sun.star.lang.XMultiServiceFactory interface of the global service factory. The optional second argument may contain a sequence of com.sun.star.beans.NamedValue objects. The different filter implementations may support different arguments.

Definition at line 410 of file filterbase.cxx.

References aSeq, Exception, comphelper::findValue(), and mxImpl.

bool oox::core::FilterBase::isExportFilter ( ) const

Returns true, if filter is an export filter.

Definition at line 202 of file filterbase.cxx.

References mxImpl.

Referenced by oox::ppt::PowerPointImport::filter().

bool oox::core::FilterBase::isExportTemplate ( ) const

Definition at line 586 of file filterbase.cxx.

References mxImpl.

Referenced by oox::ppt::PowerPointImport::filter().

bool oox::core::FilterBase::isImportFilter ( ) const

Returns true, if filter is an import filter.

Definition at line 197 of file filterbase.cxx.

References mxImpl.

Reference< XInputStream > oox::core::FilterBase::openInputStream ( const OUString &  rStreamName) const

Opens and returns the specified input stream from the base storage.

Parameters
rStreamNameThe name of the embedded storage stream. The name may contain slashes to open streams from embedded substorages. If base stream access has been enabled in the storage, the base stream can be accessed by passing an empty string as stream name.

Definition at line 324 of file filterbase.cxx.

References mxImpl.

Referenced by oox::vml::SimpleShape::implConvertAndInsert(), importBinaryData(), oox::core::XmlFilterBase::importCustomFragments(), oox::core::XmlFilterBase::importFragment(), lcl_GetMediaStream(), and oox::drawingml::Shape::resolveRelationshipsOfTypeFromOfficeDoc().

Reference< XOutputStream > oox::core::FilterBase::openOutputStream ( const OUString &  rStreamName) const

Opens and returns the specified output stream from the base storage.

Parameters
rStreamNameThe name of the embedded storage stream. The name may contain slashes to open streams from embedded substorages. If base stream access has been enabled in the storage, the base stream can be accessed by passing an empty string as stream name.

Definition at line 331 of file filterbase.cxx.

References mxImpl.

Referenced by oox::core::XmlFilterBase::exportCustomFragments(), and oox::core::XmlFilterBase::openFragmentStream().

void oox::core::FilterBase::setMediaDescriptor ( const css::uno::Sequence< css::beans::PropertyValue > &  rMediaDescSeq)
private
void SAL_CALL oox::core::FilterBase::setSourceDocument ( const css::uno::Reference< css::lang::XComponent > &  rxDocument)
overridevirtual

Definition at line 453 of file filterbase.cxx.

References mxImpl.

void SAL_CALL oox::core::FilterBase::setTargetDocument ( const css::uno::Reference< css::lang::XComponent > &  rxDocument)
overridevirtual

Definition at line 445 of file filterbase.cxx.

References mxImpl.

sal_Bool SAL_CALL oox::core::FilterBase::supportsService ( const OUString &  rServiceName)
overridevirtual

Definition at line 398 of file filterbase.cxx.

References cppu::supportsService().

Member Data Documentation

std::unique_ptr< FilterBaseImpl > oox::core::FilterBase::mxImpl
private

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