LibreOffice Module xmloff (master)  1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvXMLMetaExport Class Referencefinal

export meta data from an XDocumentProperties instance. More...

#include <xmlmetae.hxx>

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

Public Member Functions

 SvXMLMetaExport (SvXMLExport &i_rExport, const css::uno::Reference< css::document::XDocumentProperties > &i_rDocProps)
 
virtual ~SvXMLMetaExport () override
 
void Export ()
 export via XSAXWriter interface, with fallback to _MExport More...
 
virtual void SAL_CALL startDocument () override
 
virtual void SAL_CALL endDocument () override
 
virtual void SAL_CALL startElement (const OUString &i_rName, const css::uno::Reference< css::xml::sax::XAttributeList > &i_xAttribs) override
 
virtual void SAL_CALL endElement (const OUString &i_rName) override
 
virtual void SAL_CALL characters (const OUString &i_rChars) override
 
virtual void SAL_CALL ignorableWhitespace (const OUString &i_rWhitespaces) override
 
virtual void SAL_CALL processingInstruction (const OUString &i_rTarget, const OUString &i_rData) override
 
virtual void SAL_CALL setDocumentLocator (const css::uno::Reference< css::xml::sax::XLocator > &i_xLocator) override
 

Static Public Member Functions

static OUString GetISODateTimeString (const css::util::DateTime &rDateTime)
 

Private Member Functions

void SimpleStringElement (const OUString &rText, sal_uInt16 nNamespace, enum::xmloff::token::XMLTokenEnum eElementName)
 
void SimpleDateTimeElement (const css::util::DateTime &rDate, sal_uInt16 nNamespace, enum::xmloff::token::XMLTokenEnum eElementName)
 
void MExport_ ()
 currently unused; for exporting via the XDocumentProperties interface More...
 

Private Attributes

SvXMLExportmrExport
 
css::uno::Reference< css::document::XDocumentProperties > mxDocProps
 
int m_level
 counts levels of the xml document. necessary for special handling. More...
 
std::vector< css::beans::StringPair > m_preservedNSs
 preserved namespaces. necessary because we do not write the root node. More...
 

Detailed Description

export meta data from an XDocumentProperties instance.

This class will start the export at the office:meta element, not at the root element. This means that when <method>Export</method> is called here, the document root element must already be written, but office:meta must not be written.

Definition at line 49 of file xmlmetae.hxx.

Constructor & Destructor Documentation

SvXMLMetaExport::SvXMLMetaExport ( SvXMLExport i_rExport,
const css::uno::Reference< css::document::XDocumentProperties > &  i_rDocProps 
)

Definition at line 302 of file xmlmetae.cxx.

References assert(), and mxDocProps.

SvXMLMetaExport::~SvXMLMetaExport ( )
overridevirtual

Definition at line 313 of file xmlmetae.cxx.

Member Function Documentation

void SAL_CALL SvXMLMetaExport::characters ( const OUString &  i_rChars)
overridevirtual

Definition at line 456 of file xmlmetae.cxx.

References SvXMLExport::Characters(), and mrExport.

void SAL_CALL SvXMLMetaExport::endDocument ( )
overridevirtual

Definition at line 355 of file xmlmetae.cxx.

References assert(), and m_level.

void SAL_CALL SvXMLMetaExport::endElement ( const OUString &  i_rName)
overridevirtual

Definition at line 444 of file xmlmetae.cxx.

References assert(), SvXMLExport::EndElement(), m_level, and mrExport.

void SvXMLMetaExport::Export ( )

export via XSAXWriter interface, with fallback to _MExport

Definition at line 317 of file xmlmetae.cxx.

References assert(), comphelper::containerToSequence(), SvXMLExport::GetNamespaceMap(), MExport_(), mrExport, mxDocProps, ns, s_xmlns, s_xmlns2, USHRT_MAX, xmloff::token::XML_META, and XML_NAMESPACE_OFFICE.

OUString SvXMLMetaExport::GetISODateTimeString ( const css::util::DateTime &  rDateTime)
static

Definition at line 52 of file xmlmetae.cxx.

References lcl_AddTwoDigits().

Referenced by XMLVersionListExport::exportDoc().

void SAL_CALL SvXMLMetaExport::ignorableWhitespace ( const OUString &  i_rWhitespaces)
overridevirtual

Definition at line 462 of file xmlmetae.cxx.

References SvXMLExport::IgnorableWhitespace(), and mrExport.

void SvXMLMetaExport::MExport_ ( )
private

currently unused; for exporting via the XDocumentProperties interface

define strings for xlink:show values

Definition at line 95 of file xmlmetae.cxx.

References sax::Converter::convertAny(), sax::Converter::convertDuration(), utl::DocInfoHelper::GetGeneratorString(), nValue, props, SAL_WARN, sType, xmloff::token::XML_ACTUATE, xmloff::token::XML_AUTO_RELOAD, xmloff::token::XML_CELL_COUNT, xmloff::token::XML_CHARACTER_COUNT, xmloff::token::XML_CREATION_DATE, xmloff::token::XML_CREATOR, xmloff::token::XML_DATE, xmloff::token::XML_DELAY, xmloff::token::XML_DESCRIPTION, xmloff::token::XML_DOCUMENT_STATISTIC, xmloff::token::XML_EDITING_CYCLES, xmloff::token::XML_EDITING_DURATION, xmloff::token::XML_GENERATOR, xmloff::token::XML_HREF, xmloff::token::XML_HYPERLINK_BEHAVIOUR, xmloff::token::XML_IMAGE_COUNT, xmloff::token::XML_INITIAL_CREATOR, xmloff::token::XML_KEYWORD, xmloff::token::XML_LANGUAGE, xmloff::token::XML_NAME, XML_NAMESPACE_DC, XML_NAMESPACE_META, XML_NAMESPACE_OFFICE, XML_NAMESPACE_XLINK, xmloff::token::XML_NEW, xmloff::token::XML_OBJECT_COUNT, xmloff::token::XML_ONREQUEST, xmloff::token::XML_PAGE_COUNT, xmloff::token::XML_PARAGRAPH_COUNT, xmloff::token::XML_PRINT_DATE, xmloff::token::XML_PRINTED_BY, xmloff::token::XML_REPLACE, xmloff::token::XML_SHOW, xmloff::token::XML_SIMPLE, xmloff::token::XML_SUBJECT, xmloff::token::XML_TABLE_COUNT, xmloff::token::XML_TARGET_FRAME_NAME, xmloff::token::XML_TEMPLATE, xmloff::token::XML_TITLE, xmloff::token::XML_TYPE, xmloff::token::XML_USER_DEFINED, xmloff::token::XML_VALUE_TYPE, and xmloff::token::XML_WORD_COUNT.

Referenced by Export().

void SAL_CALL SvXMLMetaExport::processingInstruction ( const OUString &  i_rTarget,
const OUString &  i_rData 
)
overridevirtual

Definition at line 468 of file xmlmetae.cxx.

void SAL_CALL SvXMLMetaExport::setDocumentLocator ( const css::uno::Reference< css::xml::sax::XLocator > &  i_xLocator)
overridevirtual

Definition at line 475 of file xmlmetae.cxx.

void SvXMLMetaExport::SimpleDateTimeElement ( const css::util::DateTime &  rDate,
sal_uInt16  nNamespace,
enum::xmloff::token::XMLTokenEnum  eElementName 
)
private

Definition at line 82 of file xmlmetae.cxx.

void SvXMLMetaExport::SimpleStringElement ( const OUString &  rText,
sal_uInt16  nNamespace,
enum::xmloff::token::XMLTokenEnum  eElementName 
)
private

Definition at line 72 of file xmlmetae.cxx.

void SAL_CALL SvXMLMetaExport::startDocument ( )
overridevirtual

Definition at line 348 of file xmlmetae.cxx.

References assert(), and m_level.

void SAL_CALL SvXMLMetaExport::startElement ( const OUString &  i_rName,
const css::uno::Reference< css::xml::sax::XAttributeList > &  i_xAttribs 
)
overridevirtual

Member Data Documentation

int SvXMLMetaExport::m_level
private

counts levels of the xml document. necessary for special handling.

Definition at line 56 of file xmlmetae.hxx.

Referenced by endDocument(), endElement(), startDocument(), and startElement().

std::vector< css::beans::StringPair > SvXMLMetaExport::m_preservedNSs
private

preserved namespaces. necessary because we do not write the root node.

Definition at line 58 of file xmlmetae.hxx.

Referenced by startElement().

SvXMLExport& SvXMLMetaExport::mrExport
private

Definition at line 53 of file xmlmetae.hxx.

Referenced by characters(), endElement(), Export(), ignorableWhitespace(), and startElement().

css::uno::Reference< css::document::XDocumentProperties> SvXMLMetaExport::mxDocProps
private

Definition at line 54 of file xmlmetae.hxx.

Referenced by Export(), and SvXMLMetaExport().


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