LibreOffice Module oox (master) 1
|
#include <filterbase.hxx>
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::SequenceAsHashMap & | getFilterData () const |
Returns the FilterData. More... | |
utl::MediaDescriptor & | getMediaDescriptor () 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... | |
GraphicHelper & | getGraphicHelper () const |
Returns a helper for the handling of graphics and graphic objects. More... | |
ModelObjectHelper & | getModelObjectHelper () const |
Returns a helper with containers for various named drawing objects for the imported document. More... | |
ModelObjectHelper & | getModelObjectHelperForModel (const css::uno::Reference< css::lang::XMultiServiceFactory > &xFactory) const |
::oox::ole::OleObjectHelper & | getOleObjectHelper () const |
Returns a helper for the handling of OLE objects. More... | |
::oox::ole::VbaProject & | getVbaProject () 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 GraphicHelper * | implCreateGraphicHelper () const |
Derived classes may create a specialized graphic helper, e.g. More... | |
virtual ::oox::ole::VbaProject * | implCreateVbaProject () 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< FilterBaseImpl > | mxImpl |
Definition at line 96 of file filterbase.hxx.
|
explicit |
css::uno::RuntimeException |
Definition at line 191 of file filterbase.cxx.
|
overridevirtual |
Definition at line 196 of file filterbase.cxx.
|
overridevirtual |
Definition at line 503 of file filterbase.cxx.
void oox::core::FilterBase::commitStorage | ( | ) | const |
Commits changes to base storage (and substorages)
Definition at line 339 of file filterbase.cxx.
References mxImpl.
Referenced by oox::core::XmlFilterBase::implFinalizeExport().
|
pure virtual |
Derived classes implement export of the entire document.
Implemented in oox::ppt::PowerPointImport, oox::drawingml::ThemeFilterBase, and oox::shape::ShapeFilterBase.
References getComponentContext(), getSupportedServiceNames(), and supportsService().
Referenced by filter().
bool oox::core::FilterBase::exportVBA | ( | ) | const |
Definition at line 584 of file filterbase.cxx.
References mxImpl.
Referenced by oox::ppt::PowerPointImport::filter().
|
overridevirtual |
Reimplemented in oox::ppt::PowerPointImport.
Definition at line 464 of file filterbase.cxx.
References exportDocument(), getMediaDescriptor(), implCreateStorage(), implFinalizeExport(), importDocument(), mxImpl, and setMediaDescriptor().
OUString oox::core::FilterBase::getAbsoluteUrl | ( | const OUString & | rUrl | ) | const |
Returns an absolute URL for the passed relative or absolute URL.
Definition at line 268 of file filterbase.cxx.
Referenced by oox::drawingml::BlipContext::BlipContext(), oox::drawingml::HyperLinkContext::HyperLinkContext(), oox::drawingml::GraphicShapeContext::onCreateContext(), and oox::drawingml::OleObjectGraphicDataContext::onCreateContext().
const Reference< XComponentContext > & oox::core::FilterBase::getComponentContext | ( | ) | const |
Returns the component context passed in the filter constructor (always existing).
Definition at line 215 of file filterbase.cxx.
References mxImpl.
Referenced by oox::ppt::PowerPointImport::filter(), oox::drawingml::chart::DoubleSequenceContext::getNumberFormatter(), oox::shape::ShapeFilterBase::implCreateVbaProject(), oox::core::XmlFilterBase::implFinalizeExport(), oox::core::XmlFilterBase::implGetInputStream(), oox::core::XmlFilterBase::implGetOutputStream(), oox::core::XmlFilterBase::importCustomFragments(), oox::core::XmlFilterBase::importDocumentProperties(), oox::core::XmlFilterBase::importFragment(), oox::drawingml::Shape::renderDiagramToGraphic(), setMediaDescriptor(), and oox::drawingml::ShapeExport::WriteOLE2Shape().
const OUString & oox::core::FilterBase::getFileUrl | ( | ) | const |
Returns the URL of the imported or exported file.
Definition at line 250 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 245 of file filterbase.cxx.
References mxImpl.
Referenced by oox::ppt::PresentationFragmentHandler::finalizeImport().
GraphicHelper & oox::core::FilterBase::getGraphicHelper | ( | ) | const |
Returns a helper for the handling of graphics and graphic objects.
Definition at line 346 of file filterbase.cxx.
References implCreateGraphicHelper(), and mxImpl.
Referenced by oox::drawingml::BlipContext::BlipContext(), oox::vml::ShapeBase::convertShapeProperties(), oox::drawingml::Shape::createAndInsert(), oox::vml::SimpleShape::createEmbeddedPictureObject(), oox::vml::SimpleShape::createPictureObject(), oox::vml::SimpleShape::finalImplConvertAndInsert(), oox::drawingml::Shape::finalizeServiceName(), oox::vml::ShapeType::getAbsRectangle(), oox::vml::LineShape::getAbsRectangle(), oox::vml::Drawing::getControlForm(), oox::vml::SimpleShape::implConvertAndInsert(), oox::vml::BezierShape::implConvertAndInsert(), oox::vml::ComplexShape::implConvertAndInsert(), oox::vml::GroupShape::implConvertAndInsert(), oox::vml::ShapeContext::onCreateContext(), oox::drawingml::TextCharacterProperties::pushToPropMap(), and oox::vml::ShapeContext::setPoints().
|
protected |
Definition at line 524 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 240 of file filterbase.cxx.
References mxImpl.
Referenced by oox::drawingml::Shape::createAndInsert(), filter(), and oox::core::XmlFilterBase::importDocumentProperties().
const Reference< XModel > & oox::core::FilterBase::getModel | ( | ) | const |
Returns the document model (always existing).
Definition at line 220 of file filterbase.cxx.
References mxImpl.
Referenced by oox::ppt::PPTShape::addShape(), oox::drawingml::chart::ChartConverter::convertFromModel(), oox::drawingml::Shape::createAndInsert(), oox::core::XmlFilterBase::exportCustomFragments(), oox::ppt::PowerPointImport::filter(), oox::vml::Drawing::getControlForm(), oox::shape::ShapeFilterBase::implCreateVbaProject(), oox::core::XmlFilterBase::importCustomFragments(), oox::ppt::PresentationFragmentHandler::importCustomSlideShow(), oox::ppt::PowerPointImport::importDocument(), oox::core::XmlFilterBase::importDocumentProperties(), oox::ppt::PresentationFragmentHandler::importSlide(), and oox::drawingml::Shape::renderDiagramToGraphic().
const Reference< XMultiServiceFactory > & oox::core::FilterBase::getModelFactory | ( | ) | const |
Returns the service factory provided by the document model (always existing).
Definition at line 225 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 353 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 |
Definition at line 360 of file filterbase.cxx.
References mxImpl, and xFactory.
Referenced by oox::drawingml::chart::DataLabelConverter::convertFromModel(), and oox::drawingml::chart::DataLabelsConverter::convertFromModel().
OleObjectHelper & oox::core::FilterBase::getOleObjectHelper | ( | ) | const |
Returns a helper for the handling of OLE objects.
Definition at line 368 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 235 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 322 of file filterbase.cxx.
References mxImpl.
Referenced by oox::core::XmlFilterBase::addRelation().
|
overridevirtual |
Definition at line 406 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 230 of file filterbase.cxx.
References mxImpl.
VbaProject & oox::core::FilterBase::getVbaProject | ( | ) | const |
Returns the VBA project manager.
Definition at line 375 of file filterbase.cxx.
References implCreateVbaProject(), and mxImpl.
OoxmlVersion oox::core::FilterBase::getVersion | ( | ) | const |
Definition at line 210 of file filterbase.cxx.
References mxImpl.
Referenced by oox::core::writeCoreProperties(), and oox::drawingml::ShapeExport::WriteOLE2Shape().
|
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 578 of file filterbase.cxx.
References mxImpl.
Referenced by getGraphicHelper().
|
privatepure virtual |
Implemented in oox::core::XmlFilterBase.
Referenced by filter().
|
privatepure virtual |
Implemented in oox::core::XmlFilterBase.
|
privatepure virtual |
Derived classes create a VBA project manager object.
Implemented in oox::drawingml::ThemeFilterBase, oox::ppt::PowerPointImport, and oox::shape::ShapeFilterBase.
Referenced by getVbaProject().
|
protectedvirtual |
Reimplemented in oox::core::XmlFilterBase.
Definition at line 519 of file filterbase.cxx.
Referenced by filter().
|
protectedvirtual |
Reimplemented in oox::core::XmlFilterBase.
Definition at line 509 of file filterbase.cxx.
References utl::MediaDescriptor::PROP_INPUTSTREAM.
Referenced by setMediaDescriptor().
|
protectedvirtual |
Reimplemented in oox::core::XmlFilterBase.
Definition at line 514 of file filterbase.cxx.
References utl::MediaDescriptor::PROP_STREAMFOROUTPUT.
Referenced by oox::core::XmlFilterBase::implFinalizeExport(), oox::core::XmlFilterBase::implGetOutputStream(), and setMediaDescriptor().
bool oox::core::FilterBase::importBinaryData | ( | StreamDataSequence & | orDataSeq, |
const OUString & | rStreamName | ||
) |
Imports the raw binary data from the specified stream.
Definition at line 382 of file filterbase.cxx.
References oox::BinaryInputStream::copyToStream(), oox::BinaryStreamBase::isEof(), and openInputStream().
Referenced by oox::core::XmlFilterBase::importCustomFragments(), oox::drawingml::OleObjectGraphicDataContext::onCreateContext(), oox::drawingml::ArtisticEffectContext::onCreateContext(), and oox::drawingml::Shape::resolveRelationshipsOfTypeFromOfficeDoc().
|
pure virtual |
Derived classes implement import of the entire document.
Implemented in oox::drawingml::ThemeFilterBase, oox::ppt::PowerPointImport, and oox::shape::ShapeFilterBase.
Referenced by filter().
|
overridevirtual |
Receives user defined arguments.
rArgs | the 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 413 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 205 of file filterbase.cxx.
References mxImpl.
Referenced by oox::ppt::PowerPointImport::filter().
bool oox::core::FilterBase::isExportTemplate | ( | ) | const |
Definition at line 589 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 200 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.
rStreamName | The 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 327 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.
rStreamName | The 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 334 of file filterbase.cxx.
References mxImpl.
Referenced by oox::core::XmlFilterBase::exportCustomFragments(), and oox::core::XmlFilterBase::openFragmentStream().
|
private |
Definition at line 531 of file filterbase.cxx.
References Any, Exception, getComponentContext(), implGetInputStream(), implGetOutputStream(), mxImpl, nVersion, utl::MediaDescriptor::PROP_FRAME, utl::MediaDescriptor::PROP_INTERACTIONHANDLER, utl::MediaDescriptor::PROP_STATUSINDICATOR, utl::MediaDescriptor::PROP_URL, and xFactory.
Referenced by filter().
|
overridevirtual |
Definition at line 456 of file filterbase.cxx.
References mxImpl.
|
overridevirtual |
Definition at line 448 of file filterbase.cxx.
References mxImpl.
|
overridevirtual |
Definition at line 401 of file filterbase.cxx.
References cppu::supportsService().
|
private |
Definition at line 273 of file filterbase.hxx.
Referenced by commitStorage(), exportVBA(), filter(), getAbsoluteUrl(), getComponentContext(), getFileUrl(), getFilterData(), getGraphicHelper(), getMainDocumentStream(), getMediaDescriptor(), getModel(), getModelFactory(), getModelObjectHelper(), getModelObjectHelperForModel(), getOleObjectHelper(), getStatusIndicator(), getStorage(), getTargetFrame(), getVbaProject(), getVersion(), implCreateGraphicHelper(), initialize(), isExportFilter(), isExportTemplate(), isImportFilter(), openInputStream(), openOutputStream(), setMediaDescriptor(), setSourceDocument(), and setTargetDocument().