LibreOffice Module oox (master) 1
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
oox::core Namespace Reference

Namespaces

namespace  CodecHelper
 
namespace  PowerPointExport
 
namespace  prv
 

Classes

struct  Cond
 
class  ContextHandler
 
class  ContextHandler2
 
struct  ElementInfo
 Information about a processed element. More...
 
class  FastParser
 Wrapper for a fast SAX parser that works on automatically generated OOXML token and namespace identifiers. More...
 
class  FastTokenHandler
 Wrapper implementing the com.sun.star.xml.sax.XFastTokenHandler API interface that provides access to the tokens generated from the internal token name list. More...
 
class  FilterBase
 
struct  FilterBaseImpl
 
class  FilterDetect
 
class  FilterDetectDocHandler
 Document handler specifically designed for detecting OOXML file formats. More...
 
struct  FragmentBaseData
 Base data of a fragment. More...
 
class  FragmentHandler
 
class  FragmentHandler2
 
struct  LayoutInfo
 
class  NodeContext
 
class  PowerPointExport
 
class  PowerPointShapeExport
 
struct  RecordInfo
 Describes record identifiers used to create contexts in a binary stream. More...
 
struct  RecordInputSource
 
class  RecordParser
 
struct  Relation
 
class  Relations
 
class  RelationsFragment
 
class  XmlFilterBase
 
struct  XmlFilterBaseImpl
 

Typedefs

typedef std::unique_ptr< NodeContextNodeContextPtr
 
typedef ::rtl::Reference< ContextHandlerContextHandlerRef
 
typedef std::shared_ptr< FragmentBaseDataFragmentBaseDataRef
 
typedef ::cppu::WeakImplHelper< css::xml::sax::XFastContextHandler > ContextHandler_BASE
 
typedef ::cppu::WeakImplHelper< css::lang::XServiceInfo, css::lang::XInitialization, css::document::XImporter, css::document::XExporter, css::document::XFilter > FilterBase_BASE
 
typedef ::cppu::ImplInheritanceHelper< ContextHandler, css::xml::sax::XFastDocumentHandler > FragmentHandler_BASE
 
typedef ::rtl::Reference< FragmentHandlerFragmentHandlerRef
 
typedef ::rtl::Reference< FragmentHandler2FragmentHandler2Ref
 
typedef std::shared_ptr< RelationsRelationsRef
 
using ShapePairs = std::map< std::shared_ptr< drawingml::Shape >, css::uno::Reference< css::drawing::XShape > >
 
using NamedShapePairs = std::map< OUString, ShapePairs >
 

Enumerations

enum  PlaceholderType
 
enum  OoxmlVersion {
  ECMA_376_1ST_EDITION ,
  ISOIEC_29500_2008
}
 
enum class  OOXMLVariant {
  ECMA_Transitional ,
  ISO_Transitional ,
  ISO_Strict
}
 

Functions

void WriteAnimations (const FSHelperPtr &pFS, const Reference< XDrawPage > &rXDrawPage, PowerPointExport &rExport)
 
void WriteAnimations (const ::sax_fastparser::FSHelperPtr &pFS, const css::uno::Reference< css::drawing::XDrawPage > &rXDrawPage, PowerPointExport &rExport)
 
constexpr OUStringLiteral gaBinSuffix (u".bin")
 
static void writeElement (const FSHelperPtr &pDoc, sal_Int32 nXmlElement, std::u16string_view sValue)
 
static void writeElement (const FSHelperPtr &pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue)
 
static void writeElement (const FSHelperPtr &pDoc, sal_Int32 nXmlElement, const util::DateTime &rTime)
 
static void writeElement (const FSHelperPtr &pDoc, sal_Int32 nXmlElement, const Sequence< OUString > &aItems)
 
static void writeElement (const FSHelperPtr &pDoc, sal_Int32 nXmlElement, const LanguageTag &rLanguageTag)
 
static void writeCoreProperties (XmlFilterBase &rSelf, const Reference< XDocumentProperties > &xProperties)
 
static void writeAppProperties (XmlFilterBase &rSelf, const Reference< XDocumentProperties > &xProperties)
 
static void writeCustomProperties (XmlFilterBase &rSelf, const Reference< XDocumentProperties > &xProperties, bool bSecurityOptOpenReadOnly)
 
class OOX_DLLPUBLIC SAL_LOPLUGIN_ANNOTATE ("crosscast") ContextHandler2Helper
 Helper class that provides a context stack. More...
 

Variables

 None
 
 SlideImage
 
 Notes
 
 Header
 
 Footer
 
 SlideNumber
 
 DateAndTime
 
 Outliner
 
 Title
 
 Subtitle
 
const sal_Int32 XML_ROOT_CONTEXT = SAL_MAX_INT32
 

Typedef Documentation

◆ ContextHandler_BASE

typedef ::cppu::WeakImplHelper< css::xml::sax::XFastContextHandler > oox::core::ContextHandler_BASE

Definition at line 55 of file contexthandler.hxx.

◆ ContextHandlerRef

Definition at line 50 of file contexthandler.hxx.

◆ FilterBase_BASE

typedef ::cppu::WeakImplHelper< css::lang::XServiceInfo, css::lang::XInitialization, css::document::XImporter, css::document::XExporter, css::document::XFilter > oox::core::FilterBase_BASE

Definition at line 94 of file filterbase.hxx.

◆ FragmentBaseDataRef

Definition at line 53 of file contexthandler.hxx.

◆ FragmentHandler2Ref

Definition at line 108 of file fragmenthandler2.hxx.

◆ FragmentHandler_BASE

typedef ::cppu::ImplInheritanceHelper< ContextHandler, css::xml::sax::XFastDocumentHandler > oox::core::FragmentHandler_BASE

Definition at line 83 of file fragmenthandler.hxx.

◆ FragmentHandlerRef

Definition at line 132 of file fragmenthandler.hxx.

◆ NamedShapePairs

using oox::core::NamedShapePairs = typedef std::map<OUString, ShapePairs>

Definition at line 82 of file xmlfilterbase.hxx.

◆ RelationsRef

typedef std::shared_ptr< Relations > oox::core::RelationsRef

Definition at line 64 of file relations.hxx.

◆ ShapePairs

using oox::core::ShapePairs = typedef std::map<std::shared_ptr<drawingml::Shape>, css::uno::Reference<css::drawing::XShape> >

Definition at line 80 of file xmlfilterbase.hxx.

Enumeration Type Documentation

◆ OOXMLVariant

enum class oox::core::OOXMLVariant
strong
Enumerator
ECMA_Transitional 
ISO_Transitional 
ISO_Strict 

Definition at line 51 of file filterdetect.hxx.

◆ OoxmlVersion

Enumerator
ECMA_376_1ST_EDITION 

There are currently 5 editions of ECMA-376, latest is from 2021.

1st edition allegedly corresponds to Word 2007 2nd edition allegedly corresponds to ISO 29500:2008 it's unclear what changed in later editions; there is: Annex M. Differences Between ECMA-376:2016 and ECMA-376:2006 but that's relative to 1st edition.

ISOIEC_29500_2008 

Definition at line 73 of file filterbase.hxx.

Function Documentation

◆ gaBinSuffix()

constexpr OUStringLiteral oox::core::gaBinSuffix ( u".bin"  )
constexpr

◆ SAL_LOPLUGIN_ANNOTATE()

class OOX_DLLPUBLIC oox::core::SAL_LOPLUGIN_ANNOTATE ( "crosscast"  )

Helper class that provides a context stack.

Fragment handlers and context handlers derived from this helper class will track the identifiers of the visited elements in a stack. The idea is to use the same instance of a fragment handler or context handler to process several nested elements in an XML stream. For that, the abstract function onCreateContext() has to return 'this' for the passed element.

Derived classes have to implement the createFastChildContext(), startFastElement(), characters(), and endFastElement() functions from the com.sun.star.xml.sax.XFastContextHandler interface by simply forwarding them to the respective implCreateChildContext(), implStartElement(), implCharacters(), and implEndElement() functions of this helper. This is implemented already in the classes ContextHandler2 and FragmentHandler2. The new abstract functions have to be implemented according to the elements to be processed.

Similarly, for binary import, derived classes have to forward the createRecordContext(), startRecord(), and endRecord() functions from the ContextHandler class to the implCreateRecordContext(), implStartRecord(), and implEndRecord() functions of this helper. Again, this is implemented already in the classes ContextHandler2 and FragmentHandler2.

Will be called to create a context handler for the passed element.

Usually 'this' can be returned to improve performance by reusing the same instance to process several elements. Used by OOXML import only.

Will be called when a new element has been started.

This function is called at the context handler returned from onCreateContext(), or, for root elements of an XML stream, at the fragment handler itself.

The current element identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by OOXML import only.

Will be called before a new child element starts, or if the current element is about to be left.

This helper function collects all text fragments received by the characters() function (such as encoded characters which are passed in separate calls to the characters() function), and passes the concatenated and trimmed string.

The current element identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by OOXML import only.

Will be called when the current element is about to be left.

The current element identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by OOXML import only.

Will be called to create a context handler for the passed record.

Usually 'this' can be returned to improve performance by reusing the same instance to process several records. Used by BIFF import only.

Will be called when a new record block in a binary stream has been started.

The current record identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by BIFF import only.

Will be called when the current record block is about to be left.

The current record identifier can be accessed with getCurrentElement() or isCurrentElement(). Used by BIFF import only.

Returns the identifier of the currently processed element. Ignores MCE elements in stack

Returns the identifier of the currently processed element - Including MCE root elements

Returns true, if nElement contains the identifier of the currently processed element.

Returns true, if either nElement1 or nElement2 contain the identifier of the currently processed element.

Returns the identifier of the specified parent element.

Returns true, if nElement contains the identifier of the specified parent element.

Returns true, if the element currently processed is the root element of the context or fragment handler.

Must be called from createFastChildContext() in derived classes.

Must be called from startFastElement() in derived classes.

Must be called from characters() in derived classes.

Must be called from endFastElement() in derived classes.

Must be called from createRecordContext() in derived classes.

Must be called from startRecord() in derived classes.

Must be called from endRecord() in derived classes.

< Stack of all processed elements.

< Stack size on construction time.

< True = trim whitespace in characters().

Definition at line 72 of file contexthandler2.hxx.

References mrFilter, and rStrm.

◆ writeAppProperties()

static void oox::core::writeAppProperties ( XmlFilterBase rSelf,
const Reference< XDocumentProperties > &  xProperties 
)
static

◆ writeCoreProperties()

static void oox::core::writeCoreProperties ( XmlFilterBase rSelf,
const Reference< XDocumentProperties > &  xProperties 
)
static

◆ writeCustomProperties()

static void oox::core::writeCustomProperties ( XmlFilterBase rSelf,
const Reference< XDocumentProperties > &  xProperties,
bool  bSecurityOptOpenReadOnly 
)
static

◆ writeElement() [1/5]

static void oox::core::writeElement ( const FSHelperPtr pDoc,
sal_Int32  nXmlElement,
const LanguageTag rLanguageTag 
)
static

Definition at line 612 of file xmlfilterbase.cxx.

References LanguageTag::getBcp47MS(), and writeElement().

◆ writeElement() [2/5]

static void oox::core::writeElement ( const FSHelperPtr pDoc,
sal_Int32  nXmlElement,
const sal_Int32  nValue 
)
static

Definition at line 569 of file xmlfilterbase.cxx.

References nValue.

◆ writeElement() [3/5]

static void oox::core::writeElement ( const FSHelperPtr pDoc,
sal_Int32  nXmlElement,
const Sequence< OUString > &  aItems 
)
static

Definition at line 598 of file xmlfilterbase.cxx.

References writeElement().

◆ writeElement() [4/5]

static void oox::core::writeElement ( const FSHelperPtr pDoc,
sal_Int32  nXmlElement,
const util::DateTime &  rTime 
)
static

Definition at line 577 of file xmlfilterbase.cxx.

References FSNS(), and XML_type.

◆ writeElement() [5/5]

static void oox::core::writeElement ( const FSHelperPtr pDoc,
sal_Int32  nXmlElement,
std::u16string_view  sValue 
)
static

Variable Documentation

◆ XML_ROOT_CONTEXT

const sal_Int32 oox::core::XML_ROOT_CONTEXT = SAL_MAX_INT32