LibreOffice Module oox (master) 1
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
oox::ppt::PowerPointImport Class Referencefinal

#include <pptimport.hxx>

Inheritance diagram for oox::ppt::PowerPointImport:
[legend]
Collaboration diagram for oox::ppt::PowerPointImport:
[legend]

Public Member Functions

 PowerPointImport (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~PowerPointImport () override
 
virtual bool importDocument () override
 Derived classes implement import of the entire document. More...
 
virtual bool exportDocument () noexcept override
 Derived classes implement export of the entire document. More...
 
virtual const ::oox::drawingml::ThemegetCurrentTheme () const override
 Has to be implemented by each filter, returns the current theme. More...
 
virtual ::oox::vml::DrawinggetVmlDrawing () override
 Has to be implemented by each filter to return the collection of VML shapes. More...
 
virtual oox::drawingml::table::TableStyleListPtr getTableStyles () override
 Has to be implemented by each filter to return the table style list. More...
 
virtual ::oox::drawingml::chart::ChartConvertergetChartConverter () override
 Has to be implemented by each filter, returns a filter-specific chart converter object, that should be global per imported document. More...
 
const SlidePersistPtrgetActualSlidePersist () const
 
void setActualSlidePersist (SlidePersistPtr pActualSlidePersist)
 
std::map< OUString, oox::drawingml::ThemePtr > & getThemes ()
 
std::vector< SlidePersistPtr > & getDrawPages ()
 
std::vector< SlidePersistPtr > & getMasterPages ()
 
std::vector< SlidePersistPtr > & getNotesPages ()
 
virtual sal_Bool SAL_CALL filter (const css::uno::Sequence< css::beans::PropertyValue > &rDescriptor) override
 
::Color getSchemeColor (sal_Int32 nToken) const
 
virtual std::shared_ptr<::oox::drawingml::ThemegetCurrentThemePtr () const override
 May be implemented by filters which handle Diagrams, default returns empty ptr. More...
 
- Public Member Functions inherited from oox::core::XmlFilterBase
 XmlFilterBase (const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 
virtual ~XmlFilterBase () override
 
virtual const ::oox::drawingml::ThemegetCurrentTheme () const =0
 Has to be implemented by each filter, returns the current theme. More...
 
virtual std::shared_ptr<::oox::drawingml::ThemegetCurrentThemePtr () const
 May be implemented by filters which handle Diagrams, default returns empty ptr. More...
 
virtual ::oox::vml::DrawinggetVmlDrawing ()=0
 Has to be implemented by each filter to return the collection of VML shapes. More...
 
virtual ::oox::drawingml::chart::ChartConvertergetChartConverter ()=0
 Has to be implemented by each filter, returns a filter-specific chart converter object, that should be global per imported document. More...
 
virtual void useInternalChartDataTable (bool)
 Helper to switch chart data table - specifically for xlsx imports. More...
 
virtual ::oox::drawingml::table::TableStyleListPtr getTableStyles ()=0
 Has to be implemented by each filter to return the table style list. More...
 
OUString getFragmentPathFromFirstTypeFromOfficeDoc (std::u16string_view rPart)
 
bool importFragment (const rtl::Reference< FragmentHandler > &rxHandler)
 Imports a fragment using the passed fragment handler, which contains the full path to the fragment stream. More...
 
bool importFragment (const rtl::Reference< FragmentHandler > &rxHandler, FastParser &rParser)
 
css::uno::Reference< css::xml::dom::XDocument > importFragment (const OUString &rFragmentPath)
 Imports a fragment into an xml::dom::XDocument. More...
 
bool importFragment (const ::rtl::Reference< FragmentHandler > &rxHandler, const css::uno::Reference< css::xml::sax::XFastSAXSerializable > &rxSerializer)
 Imports a fragment from an xml::dom::XDocument using the passed fragment handler. More...
 
RelationsRef importRelations (const OUString &rFragmentPath)
 Imports the relations fragment associated with the specified fragment. More...
 
OUString addRelation (const OUString &rType, std::u16string_view rTarget)
 Adds new relation. More...
 
OUString addRelation (const css::uno::Reference< css::io::XOutputStream > &rOutputStream, const OUString &rType, std::u16string_view rTarget, bool bExternal=false)
 Adds new relation to part's relations. More...
 
css::uno::Reference< css::io::XOutputStream > openFragmentStream (const OUString &rStreamName, const OUString &rMediaType)
 Opens and returns the specified output stream from the base storage with specified media type. More...
 
::sax_fastparser::FSHelperPtr openFragmentStreamWithSerializer (const OUString &rStreamName, const OUString &rMediaType)
 Opens specified output stream from the base storage with specified media type and returns new fast serializer for that stream. More...
 
sal_Int32 GetUniqueId ()
 Returns new unique ID for exported document. More...
 
sal_Int32 GetMaxDocId ()
 
void SetMaxDocId (sal_Int32 maxDocId)
 
void exportDocumentProperties (const css::uno::Reference< css::document::XDocumentProperties > &xProperties, bool bSecurityOptOpenReadOnly)
 Write the document properties into into the current OPC package. More...
 
void exportCustomFragments ()
 Write the customXml entries we are preserving (xlsx and pptx only). More...
 
void importDocumentProperties ()
 Read the document properties and also the customXml entries (xlsx and pptx only). More...
 
bool isMSO2007Document () const
 
bool isMSODocument () const
 
void setMissingExtDrawing ()
 Signal that an MSO 2007-created SmartArt was found, need to warn the user about it. More...
 
void setDiagramFontHeights (NamedShapePairs *pDiagramFontHeights)
 
NamedShapePairsgetDiagramFontHeights ()
 
void checkDocumentProperties (const css::uno::Reference< css::document::XDocumentProperties > &xDocProps)
 
OUString getNamespaceURL (sal_Int32 nNSID) const
 
- Public Member Functions inherited from oox::core::FilterBase
 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
 

Static Public Attributes

static XmlFilterBasempDebugFilterBase = nullptr
 

Private Member Functions

virtual GraphicHelperimplCreateGraphicHelper () const override
 Derived classes may create a specialized graphic helper, e.g. More...
 
virtual ::oox::ole::VbaProjectimplCreateVbaProject () const override
 Derived classes create a VBA project manager object. More...
 
virtual OUString SAL_CALL getImplementationName () override
 

Private Attributes

OUString maTableStyleListPath
 
oox::drawingml::table::TableStyleListPtr mpTableStyleList
 
SlidePersistPtr mpActualSlidePersist
 
std::map< OUString, oox::drawingml::ThemePtrmaThemes
 
std::vector< SlidePersistPtrmaDrawPages
 
std::vector< SlidePersistPtrmaMasterPages
 
std::vector< SlidePersistPtrmaNotesPages
 
std::shared_ptr< ::oox::drawingml::chart::ChartConvertermxChartConv
 

Additional Inherited Members

- Static Public Member Functions inherited from oox::core::XmlFilterBase
static void putPropertiesToDocumentGrabBag (const css::uno::Reference< css::lang::XComponent > &xDstDoc, const comphelper::SequenceAsHashMap &rProperties)
 
static FastParsercreateParser ()
 
- Protected Member Functions inherited from oox::core::XmlFilterBase
virtual css::uno::Reference< css::io::XInputStream > implGetInputStream (utl::MediaDescriptor &rMediaDesc) const override
 
virtual css::uno::Reference< css::io::XStream > implGetOutputStream (utl::MediaDescriptor &rMediaDesc) const override
 
virtual bool implFinalizeExport (utl::MediaDescriptor &rMediaDescriptor) override
 
- Protected Member Functions inherited from oox::core::FilterBase
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
 
- Protected Attributes inherited from oox::core::XmlFilterBase
bool mbMissingExtDrawing
 

Detailed Description

Definition at line 52 of file pptimport.hxx.

Constructor & Destructor Documentation

◆ PowerPointImport()

oox::ppt::PowerPointImport::PowerPointImport ( const css::uno::Reference< css::uno::XComponentContext > &  rxContext)
Exceptions
css::uno::RuntimeException

Definition at line 63 of file pptimport.cxx.

References if(), make_shared(), and mpDebugFilterBase.

◆ ~PowerPointImport()

oox::ppt::PowerPointImport::~PowerPointImport ( )
overridevirtual

Definition at line 77 of file pptimport.cxx.

Member Function Documentation

◆ exportDocument()

bool oox::ppt::PowerPointImport::exportDocument ( )
overridevirtualnoexcept

Derived classes implement export of the entire document.

Implements oox::core::FilterBase.

Definition at line 141 of file pptimport.cxx.

◆ filter()

sal_Bool SAL_CALL oox::ppt::PowerPointImport::filter ( const css::uno::Sequence< css::beans::PropertyValue > &  rDescriptor)
overridevirtual

◆ getActualSlidePersist()

const SlidePersistPtr & oox::ppt::PowerPointImport::getActualSlidePersist ( ) const
inline

Definition at line 68 of file pptimport.hxx.

References mpActualSlidePersist.

◆ getChartConverter()

oox::drawingml::chart::ChartConverter * oox::ppt::PowerPointImport::getChartConverter ( )
overridevirtual

Has to be implemented by each filter, returns a filter-specific chart converter object, that should be global per imported document.

Implements oox::core::XmlFilterBase.

Definition at line 250 of file pptimport.cxx.

References mxChartConv.

◆ getCurrentTheme()

const ::oox::drawingml::Theme * oox::ppt::PowerPointImport::getCurrentTheme ( ) const
overridevirtual

Has to be implemented by each filter, returns the current theme.

Implements oox::core::XmlFilterBase.

Definition at line 180 of file pptimport.cxx.

References mpActualSlidePersist.

◆ getCurrentThemePtr()

std::shared_ptr<::oox::drawingml::Theme > oox::ppt::PowerPointImport::getCurrentThemePtr ( ) const
overridevirtual

May be implemented by filters which handle Diagrams, default returns empty ptr.

Reimplemented from oox::core::XmlFilterBase.

Definition at line 185 of file pptimport.cxx.

References mpActualSlidePersist.

◆ getDrawPages()

std::vector< SlidePersistPtr > & oox::ppt::PowerPointImport::getDrawPages ( )
inline

◆ getImplementationName()

OUString oox::ppt::PowerPointImport::getImplementationName ( )
overrideprivatevirtual

Definition at line 295 of file pptimport.cxx.

◆ getMasterPages()

std::vector< SlidePersistPtr > & oox::ppt::PowerPointImport::getMasterPages ( )
inline

◆ getNotesPages()

std::vector< SlidePersistPtr > & oox::ppt::PowerPointImport::getNotesPages ( )
inline

Definition at line 73 of file pptimport.hxx.

References maNotesPages.

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

◆ getSchemeColor()

Color oox::ppt::PowerPointImport::getSchemeColor ( sal_Int32  nToken) const

Definition at line 146 of file pptimport.cxx.

References mpActualSlidePersist, nToken, and SAL_WARN.

◆ getTableStyles()

oox::drawingml::table::TableStyleListPtr oox::ppt::PowerPointImport::getTableStyles ( )
overridevirtual

Has to be implemented by each filter to return the table style list.

Implements oox::core::XmlFilterBase.

Definition at line 239 of file pptimport.cxx.

References oox::core::XmlFilterBase::importFragment(), maTableStyleListPath, and mpTableStyleList.

◆ getThemes()

std::map< OUString, oox::drawingml::ThemePtr > & oox::ppt::PowerPointImport::getThemes ( )
inline

Definition at line 70 of file pptimport.hxx.

References maThemes.

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

◆ getVmlDrawing()

oox::vml::Drawing * oox::ppt::PowerPointImport::getVmlDrawing ( )
overridevirtual

Has to be implemented by each filter to return the collection of VML shapes.

Implements oox::core::XmlFilterBase.

Definition at line 234 of file pptimport.cxx.

References mpActualSlidePersist.

◆ implCreateGraphicHelper()

GraphicHelper * oox::ppt::PowerPointImport::implCreateGraphicHelper ( ) const
overrideprivatevirtual

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

for resolving palette colors.

Reimplemented from oox::core::FilterBase.

Definition at line 285 of file pptimport.cxx.

◆ implCreateVbaProject()

oox::ole::VbaProject * oox::ppt::PowerPointImport::implCreateVbaProject ( ) const
overrideprivatevirtual

Derived classes create a VBA project manager object.

Implements oox::core::FilterBase.

Definition at line 290 of file pptimport.cxx.

References getComponentContext(), and u.

◆ importDocument()

bool oox::ppt::PowerPointImport::importDocument ( )
overridevirtual

◆ setActualSlidePersist()

void oox::ppt::PowerPointImport::setActualSlidePersist ( SlidePersistPtr  pActualSlidePersist)
inline

Definition at line 69 of file pptimport.hxx.

References mpActualSlidePersist.

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

Member Data Documentation

◆ maDrawPages

std::vector< SlidePersistPtr > oox::ppt::PowerPointImport::maDrawPages
private

Definition at line 96 of file pptimport.hxx.

Referenced by getDrawPages().

◆ maMasterPages

std::vector< SlidePersistPtr > oox::ppt::PowerPointImport::maMasterPages
private

Definition at line 97 of file pptimport.hxx.

Referenced by getMasterPages().

◆ maNotesPages

std::vector< SlidePersistPtr > oox::ppt::PowerPointImport::maNotesPages
private

Definition at line 98 of file pptimport.hxx.

Referenced by getNotesPages().

◆ maTableStyleListPath

OUString oox::ppt::PowerPointImport::maTableStyleListPath
private

Definition at line 90 of file pptimport.hxx.

Referenced by getTableStyles(), and importDocument().

◆ maThemes

std::map< OUString, oox::drawingml::ThemePtr > oox::ppt::PowerPointImport::maThemes
private

Definition at line 94 of file pptimport.hxx.

Referenced by getThemes().

◆ mpActualSlidePersist

SlidePersistPtr oox::ppt::PowerPointImport::mpActualSlidePersist
private

◆ mpDebugFilterBase

XmlFilterBase * oox::ppt::PowerPointImport::mpDebugFilterBase = nullptr
static

◆ mpTableStyleList

oox::drawingml::table::TableStyleListPtr oox::ppt::PowerPointImport::mpTableStyleList
private

Definition at line 91 of file pptimport.hxx.

Referenced by getTableStyles().

◆ mxChartConv

std::shared_ptr< ::oox::drawingml::chart::ChartConverter > oox::ppt::PowerPointImport::mxChartConv
private

Definition at line 100 of file pptimport.hxx.

Referenced by getChartConverter().


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