LibreOffice Module xmloff (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
XMLAutoTextEventExport Class Reference

Component for the export of events attached to autotext blocks. More...

#include <XMLAutoTextEventExport.hxx>

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

Public Member Functions

 XMLAutoTextEventExport (const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString const &implementationName, SvXMLExportFlags nFlags)
 
virtual ~XMLAutoTextEventExport () override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &rArguments) override
 
- Public Member Functions inherited from SvXMLExport
 SvXMLExport (const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString implementationName, sal_Int16 const eDefaultMeasureUnit, const enum ::xmloff::token::XMLTokenEnum eClass, SvXMLExportFlags nExportFlag)
 
 SvXMLExport (const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString implementationName, OUString fileName, sal_Int16 const eDefaultMeasureUnit, const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler)
 
 SvXMLExport (const css::uno::Reference< css::uno::XComponentContext > &xContext, OUString implementationName, OUString fileName, const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler, const css::uno::Reference< css::frame::XModel > &, FieldUnit const eDefaultFieldUnit, SvXMLExportFlags nExportFlag)
 
virtual ~SvXMLExport () override
 
virtual void collectAutoStyles ()
 
virtual void SAL_CALL setSourceDocument (const css::uno::Reference< css::lang::XComponent > &xDoc) override
 
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 initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual OUString SAL_CALL getName () override
 
virtual void SAL_CALL setName (const OUString &aName) override
 
virtual OUString SAL_CALL getImplementationName () final override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) final override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () final override
 
OUString EnsureNamespace (OUString const &i_rNamespace)
 ensures that the given namespace is in scope at the next started element. More...
 
void CheckAttrList ()
 
void ClearAttrList ()
 
void AddAttribute (sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
 
void AddAttribute (sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, const OUString &rValue)
 
void AddAttribute (sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, enum ::xmloff::token::XMLTokenEnum eValue)
 
void AddAttribute (const OUString &rQName, const OUString &rValue)
 
void AddAttribute (const OUString &rQName, enum ::xmloff::token::XMLTokenEnum eValue)
 
void AddLanguageTagAttributes (sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, const css::lang::Locale &rLocale, bool bWriteEmpty)
 Add language tag attributes, deciding which are necessary. More...
 
void AddLanguageTagAttributes (sal_uInt16 nPrefix, sal_uInt16 nPrefixRfc, const LanguageTag &rLanguageTag, bool bWriteEmpty)
 Same as AddLanguageTagAttributes() but with LanguageTag parameter instead of Locale. More...
 
void AddAttributeList (const css::uno::Reference< css::xml::sax::XAttributeList > &xAttrList)
 
comphelper::AttributeListGetAttrList ()
 
css::uno::Reference< css::xml::sax::XAttributeList > GetXAttrList () const
 
const css::uno::Reference< css::xml::sax::XDocumentHandler > & GetDocHandler () const
 
const OUString & GetOrigFileName () const
 
const SvXMLNamespaceMapGetNamespaceMap () const
 
size_t GetInfoID (const OUString sPersonalInfo) const
 
const SvXMLUnitConverterGetMM100UnitConverter () const
 
SvXMLUnitConverterGetMM100UnitConverter ()
 
void addChaffWhenEncryptedStorage ()
 
virtual ErrCode exportDoc (enum ::xmloff::token::XMLTokenEnum eClass=::xmloff::token::XML_TOKEN_INVALID)
 
void collectDataStyles (bool bFromUsedStyles)
 
virtual void addDataStyle (const sal_Int32 nNumberFormat, bool bTimeFormat=false)
 
virtual void exportDataStyles ()
 
virtual void exportAutoDataStyles ()
 
virtual OUString getDataStyleName (const sal_Int32 nNumberFormat, bool bTimeFormat=false) const
 
sal_Int32 dataStyleForceSystemLanguage (sal_Int32 nFormat) const
 
virtual void exportAnnotationMeta (const css::uno::Reference< css::drawing::XShape > &xShape)
 
const css::uno::Reference< css::frame::XModel > & GetModel () const
 
css::uno::Reference< css::util::XNumberFormatsSupplier > & GetNumberFormatsSupplier ()
 
void SetNumberFormatsSupplier (const css::uno::Reference< css::util::XNumberFormatsSupplier > &_xNumberFormatSupplier)
 
rtl::Reference< XMLTextParagraphExport > const & GetTextParagraphExport ()
 
rtl::Reference< XMLShapeExport > const & GetShapeExport ()
 
rtl::Reference< SvXMLAutoStylePoolP > const & GetAutoStylePool ()
 
rtl::Reference< XMLPageExport > const & GetPageExport ()
 
rtl::Reference< SchXMLExportHelper > const & GetChartExport ()
 
rtl::Reference< XMLFontAutoStylePool > const & GetFontAutoStylePool ()
 
ProgressBarHelperGetProgressBarHelper ()
 
rtl::Reference< xmloff::OFormLayerXMLExport > const & GetFormExport ()
 
bool HasFormExport () const
 
const css::uno::Reference< css::beans::XPropertySet > & getExportInfo () const
 
const css::uno::Reference< css::task::XStatusIndicator > & GetStatusIndicator () const
 
XMLEventExportGetEventExport ()
 get Event export, with handlers for script types "None" and "StarBasic" already registered; other handlers may be registered, too. More...
 
XMLImageMapExportGetImageMapExport ()
 get the export for image maps More...
 
OUString AddEmbeddedXGraphic (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType, OUString const &rRequestedName=OUString())
 
bool AddEmbeddedXGraphicAsBase64 (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic)
 
bool GetGraphicMimeTypeFromStream (css::uno::Reference< css::graphic::XGraphic > const &rxGraphic, OUString &rOutMimeType)
 
OUString AddEmbeddedObject (const OUString &rEmbeddedObjectURL)
 
bool AddEmbeddedObjectAsBase64 (const OUString &rEmbeddedObjectURL)
 
OUString EncodeStyleName (const OUString &rName, bool *pEncoded=nullptr) const
 
bool IsSaveLinkedSections () const
 
SvXMLExportFlags getExportFlags () const
 
void ExportEmbeddedOwnObject (css::uno::Reference< css::lang::XComponent > const &rComp)
 
OUString GetRelativeReference (const OUString &rValue)
 
void StartElement (sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSOutside)
 
void StartElement (const OUString &rName, bool bIgnWSOutside)
 
void Characters (const OUString &rChars)
 
void EndElement (sal_uInt16 nPrefix, enum ::xmloff::token::XMLTokenEnum eName, bool bIgnWSInside)
 
void EndElement (const OUString &rName, bool bIgnWSInside)
 
void IgnorableWhitespace ()
 
void SetError (sal_Int32 nId, const css::uno::Sequence< OUString > &rMsgParams, const OUString &rExceptionMessage, const css::uno::Reference< css::xml::sax::XLocator > &rLocator)
 Record an error condition that occurred during export. More...
 
void SetError (sal_Int32 nId, const css::uno::Sequence< OUString > &rMsgParams)
 
virtual void DisposingModel ()
 
::comphelper::UnoInterfaceToUniqueIdentifierMappergetInterfaceToIdentifierMapper ()
 
const css::uno::Reference< css::uno::XComponentContext > & getComponentContext () const
 
SvtModuleOptions::EFactory GetModelType () const
 
bool writeOutlineStyleAsNormalListStyle () const
 
css::uno::Reference< css::embed::XStorage > const & GetTargetStorage () const
 
char const * GetODFVersionAttributeValue () const
 returns value of ODF version attribute More...
 
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion () const
 returns the deterministic version for odf export More...
 
void SAL_DLLPRIVATE AddAttributeIdLegacy (sal_uInt16 const nLegacyPrefix, OUString const &rValue)
 add xml:id and legacy namespace id More...
 
void AddAttributeXmlId (css::uno::Reference< css::uno::XInterface > const &i_xIfc)
 add xml:id attribute (for RDF metadata) More...
 
void AddAttributesRDFa (css::uno::Reference< css::text::XTextContent > const &i_xTextContent)
 add RDFa attributes for a metadatable text content More...
 
bool exportTextNumberElement () const
 
bool SetNullDateOnUnitConverter ()
 set null date from model to unit converter, if not already done More...
 
OUString const & GetImageFilterName () const
 Get clamped mimetype for image export (empty if none) More...
 

Private Member Functions

virtual ErrCode exportDoc (enum ::xmloff::token::XMLTokenEnum eClass=xmloff::token::XML_TOKEN_INVALID) override
 export the events off all autotexts More...
 
bool hasEvents () const
 does the document have any events ? More...
 
void exportEvents ()
 export the events element More...
 
void addNamespaces ()
 add the namespaces used by events (to be called for the document element) More...
 
virtual void ExportMeta_ () override
 Override this method to export the content of <office:meta>. More...
 
virtual void ExportScripts_ () override
 Override this method to export the content of <office:scripts>. More...
 
virtual void ExportFontDecls_ () override
 Override this method to export the font declarations The default implementation will export the contents of the XMLFontAutoStylePool if it has been created. More...
 
virtual void ExportStyles_ (bool bUsed) override
 Override this method to export the content of <style:styles>. More...
 
virtual void ExportAutoStyles_ () override
 Override this method to export the contents of <style:auto-styles>. More...
 
virtual void ExportMasterStyles_ () override
 Override this method to export the contents of <style:master-styles>. More...
 
virtual void ExportContent_ () override
 Override this method to export the content of <office:body>. More...
 

Private Attributes

css::uno::Reference< css::container::XNameAccess > xEvents
 

Additional Inherited Members

- Protected Member Functions inherited from SvXMLExport
void setExportFlags (SvXMLExportFlags nExportFlags)
 
SvXMLNamespaceMapGetNamespaceMap_ ()
 
void ResetNamespaceMap ()
 
virtual void ExportMeta_ ()
 Override this method to export the content of <office:meta>. More...
 
virtual void ExportScripts_ ()
 Override this method to export the content of <office:scripts>. More...
 
virtual void ExportFontDecls_ ()
 Override this method to export the font declarations The default implementation will export the contents of the XMLFontAutoStylePool if it has been created. More...
 
virtual void ExportStyles_ (bool bUsed)
 Override this method to export the content of <style:styles>. More...
 
virtual void ExportAutoStyles_ ()=0
 Override this method to export the contents of <style:auto-styles>. More...
 
virtual void ExportMasterStyles_ ()=0
 Override this method to export the contents of <style:master-styles>. More...
 
virtual void ExportContent_ ()=0
 Override this method to export the content of <office:body>. More...
 
OUString const & GetSourceShellID () const
 
OUString const & GetDestinationShellID () const
 
virtual XMLTextParagraphExportCreateTextParagraphExport ()
 
virtual XMLShapeExportCreateShapeExport ()
 
virtual SvXMLAutoStylePoolPCreateAutoStylePool ()
 
SchXMLExportHelperCreateChartExport ()
 
virtual XMLPageExportCreatePageExport ()
 
virtual XMLFontAutoStylePoolCreateFontAutoStylePool ()
 
xmloff::OFormLayerXMLExportCreateFormExport ()
 
virtual void GetViewSettings (css::uno::Sequence< css::beans::PropertyValue > &aProps)
 
virtual void GetConfigurationSettings (css::uno::Sequence< css::beans::PropertyValue > &aProps)
 
virtual sal_Int32 GetDocumentSpecificSettings (::std::vector< SettingsGroup > &_out_rSettings)
 returns the current document settings More...
 
const css::uno::Reference< css::document::XEmbeddedObjectResolver > & GetEmbeddedResolver () const
 
void SetEmbeddedResolver (css::uno::Reference< css::document::XEmbeddedObjectResolver > const &_xEmbeddedResolver)
 
const css::uno::Reference< css::document::XGraphicStorageHandler > & GetGraphicStorageHandler () const
 
void SetGraphicStorageHandler (css::uno::Reference< css::document::XGraphicStorageHandler > const &rxGraphicStorageHandler)
 
void SetDocHandler (const css::uno::Reference< css::xml::sax::XDocumentHandler > &rHandler)
 
- Protected Attributes inherited from SvXMLExport
bool mbSaveLinkedSections
 
bool mbAutoStylesCollected
 

Detailed Description

Component for the export of events attached to autotext blocks.

Via the XInitialization interface it expects up to two strings, the first giving the file name (URL) of the autotext group, and the second identifying the autotext. If one of the strings is not given, it will export the whole group / all groups.

Definition at line 44 of file XMLAutoTextEventExport.hxx.

Constructor & Destructor Documentation

◆ XMLAutoTextEventExport()

XMLAutoTextEventExport::XMLAutoTextEventExport ( const css::uno::Reference< css::uno::XComponentContext > &  xContext,
OUString const &  implementationName,
SvXMLExportFlags  nFlags 
)

Definition at line 53 of file XMLAutoTextEventExport.cxx.

References implementationName, and INCH.

◆ ~XMLAutoTextEventExport()

XMLAutoTextEventExport::~XMLAutoTextEventExport ( )
overridevirtual

Definition at line 61 of file XMLAutoTextEventExport.cxx.

Member Function Documentation

◆ addNamespaces()

void XMLAutoTextEventExport::addNamespaces ( )
private

◆ ExportAutoStyles_()

void XMLAutoTextEventExport::ExportAutoStyles_ ( )
overrideprivatevirtual

Override this method to export the contents of <style:auto-styles>.

Implements SvXMLExport.

Definition at line 191 of file XMLAutoTextEventExport.cxx.

◆ ExportContent_()

void XMLAutoTextEventExport::ExportContent_ ( )
overrideprivatevirtual

Override this method to export the content of <office:body>.

Implements SvXMLExport.

Definition at line 193 of file XMLAutoTextEventExport.cxx.

◆ exportDoc()

ErrCode XMLAutoTextEventExport::exportDoc ( enum ::xmloff::token::XMLTokenEnum  eClass = xmloff::token::XML_TOKEN_INVALID)
overrideprivatevirtual

◆ exportEvents()

void XMLAutoTextEventExport::exportEvents ( )
private

export the events element

Definition at line 177 of file XMLAutoTextEventExport.cxx.

References DBG_ASSERT, XMLEventExport::Export(), SvXMLExport::GetEventExport(), hasEvents(), and xEvents.

Referenced by exportDoc().

◆ ExportFontDecls_()

void XMLAutoTextEventExport::ExportFontDecls_ ( )
overrideprivatevirtual

Override this method to export the font declarations The default implementation will export the contents of the XMLFontAutoStylePool if it has been created.

Reimplemented from SvXMLExport.

Definition at line 189 of file XMLAutoTextEventExport.cxx.

◆ ExportMasterStyles_()

void XMLAutoTextEventExport::ExportMasterStyles_ ( )
overrideprivatevirtual

Override this method to export the contents of <style:master-styles>.

Implements SvXMLExport.

Definition at line 192 of file XMLAutoTextEventExport.cxx.

◆ ExportMeta_()

void XMLAutoTextEventExport::ExportMeta_ ( )
overrideprivatevirtual

Override this method to export the content of <office:meta>.

There is a default implementation.

Reimplemented from SvXMLExport.

Definition at line 187 of file XMLAutoTextEventExport.cxx.

◆ ExportScripts_()

void XMLAutoTextEventExport::ExportScripts_ ( )
overrideprivatevirtual

Override this method to export the content of <office:scripts>.

There is a default implementation.

Reimplemented from SvXMLExport.

Definition at line 188 of file XMLAutoTextEventExport.cxx.

◆ ExportStyles_()

void XMLAutoTextEventExport::ExportStyles_ ( bool  bUsed)
overrideprivatevirtual

Override this method to export the content of <style:styles>.

If bUsed is set, used styles should be exported only. Overriding Methods must call this method !

Reimplemented from SvXMLExport.

Definition at line 190 of file XMLAutoTextEventExport.cxx.

◆ hasEvents()

bool XMLAutoTextEventExport::hasEvents ( ) const
private

does the document have any events ?

Definition at line 148 of file XMLAutoTextEventExport.cxx.

References xEvents.

Referenced by exportDoc(), and exportEvents().

◆ initialize()

void XMLAutoTextEventExport::initialize ( const css::uno::Sequence< css::uno::Any > &  rArguments)
overridevirtual

Reimplemented from SvXMLExport.

Definition at line 65 of file XMLAutoTextEventExport.cxx.

References SvXMLExport::initialize(), and xEvents.

Member Data Documentation

◆ xEvents

css::uno::Reference<css::container::XNameAccess> XMLAutoTextEventExport::xEvents
private

Definition at line 46 of file XMLAutoTextEventExport.hxx.

Referenced by exportEvents(), hasEvents(), and initialize().


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