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

provides functionality for exporting a complete form layer. More...

#include <formlayerexport.hxx>

Inheritance diagram for xmloff::OFormLayerXMLExport:
[legend]
Collaboration diagram for xmloff::OFormLayerXMLExport:
[legend]

Public Member Functions

SAL_DLLPRIVATE OFormLayerXMLExport (SvXMLExport &_rContext)
 
bool seekPage (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
 initializes some internal structures for fast access to the given page More...
 
SAL_DLLPRIVATE OUString getControlId (const css::uno::Reference< css::beans::XPropertySet > &_rxControl)
 get the id for the given control More...
 
SAL_DLLPRIVATE OUString getControlNumberStyle (const css::uno::Reference< css::beans::XPropertySet > &_rxControl)
 retrieves the style name for the control's number style. More...
 
void examineForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
 examines the forms collection given. More...
 
void exportForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
 exports the structure of a form layer More...
 
void exportXForms () const
 exports the XForms model data More...
 
bool documentContainsXForms () const
 determines whether the given page contains XForm instances More...
 
SAL_DLLPRIVATE void exportAutoControlNumberStyles ()
 exports the automatic controls number styles More...
 
void exportAutoStyles ()
 exports the auto-styles collected during the examineForms calls More...
 
SAL_DLLPRIVATE void excludeFromExport (const css::uno::Reference< css::awt::XControlModel > &_rxControl)
 exclude the given control (model) from export. More...
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static bool pageContainsForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
 determines whether the given page contains logical forms More...
 
- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 

Private Member Functions

virtual SAL_DLLPRIVATE ~OFormLayerXMLExport () override
 

Private Attributes

std::unique_ptr< OFormLayerXMLExport_Implm_pImpl
 

Additional Inherited Members

- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

provides functionality for exporting a complete form layer.

Definition at line 51 of file formlayerexport.hxx.

Constructor & Destructor Documentation

◆ ~OFormLayerXMLExport()

xmloff::OFormLayerXMLExport::~OFormLayerXMLExport ( )
overrideprivatevirtual

Definition at line 43 of file formlayerexport.cxx.

◆ OFormLayerXMLExport()

xmloff::OFormLayerXMLExport::OFormLayerXMLExport ( SvXMLExport _rContext)

Definition at line 38 of file formlayerexport.cxx.

References m_pImpl.

Member Function Documentation

◆ documentContainsXForms()

bool xmloff::OFormLayerXMLExport::documentContainsXForms ( ) const

determines whether the given page contains XForm instances

Definition at line 89 of file formlayerexport.cxx.

References m_pImpl.

◆ examineForms()

void xmloff::OFormLayerXMLExport::examineForms ( const css::uno::Reference< css::drawing::XDrawPage > &  _rxDrawPage)

examines the forms collection given.

This method will collect all form layer related data of the given draw page

Parameters
_rxDrawPagethe draw page to examine. The object will be queried for a com.sun.star.form::XFormsSupplier interface to obtain the forms container.

Definition at line 62 of file formlayerexport.cxx.

References Exception, and m_pImpl.

◆ excludeFromExport()

void xmloff::OFormLayerXMLExport::excludeFromExport ( const css::uno::Reference< css::awt::XControlModel > &  _rxControl)

exclude the given control (model) from export.

If your document contains form controls which are not to be exported for whatever reason, you need to announce the models of these controls (can be retrieved from XControlShape::getControl) to the form layer exporter.
Of course you have to do this before calling <member>exportForms</member>

Definition at line 104 of file formlayerexport.cxx.

References m_pImpl.

◆ exportAutoControlNumberStyles()

void xmloff::OFormLayerXMLExport::exportAutoControlNumberStyles ( )

exports the automatic controls number styles

Definition at line 94 of file formlayerexport.cxx.

References m_pImpl.

◆ exportAutoStyles()

void xmloff::OFormLayerXMLExport::exportAutoStyles ( )

exports the auto-styles collected during the examineForms calls

Definition at line 99 of file formlayerexport.cxx.

References m_pImpl.

◆ exportForms()

void xmloff::OFormLayerXMLExport::exportForms ( const css::uno::Reference< css::drawing::XDrawPage > &  _rxDrawPage)

exports the structure of a form layer

This method does not export styles (e.g. font properties of the controls), or any references external instances may have to the control models contained in the form layer (e.g. uno control shapes in the drawing layer may have such references)

No top level element describing the whole collection is inserted. I.e. if within your document, you expect the forms collection to be stored like <listing> <Forms> ... // all the forms stuff here </Forms> </listing> you have to start the Forms element yourself.

Parameters
_rxDrawPagethe draw page to examine. The object will be queried for a com.sun.star.form::XFormsSupplier interface to obtain the forms container.

Definition at line 74 of file formlayerexport.cxx.

References m_pImpl.

◆ exportXForms()

void xmloff::OFormLayerXMLExport::exportXForms ( ) const

exports the XForms model data

Definition at line 79 of file formlayerexport.cxx.

References m_pImpl.

◆ getControlId()

OUString xmloff::OFormLayerXMLExport::getControlId ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControl)

get the id for the given control

The page the control belongs to must have been examined and sought to.

Parameters
_rxControlthe control which's id should be retrieved. Must not be <NULL>.
See also
examineForms
seekPage

Definition at line 52 of file formlayerexport.cxx.

References m_pImpl.

◆ getControlNumberStyle()

OUString xmloff::OFormLayerXMLExport::getControlNumberStyle ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControl)

retrieves the style name for the control's number style.

For performance reasons, this method is allowed to be called for any controls, even those which do not have a number style. In this case, an empty string is returned.

Parameters
_rxControlthe control which's id should be retrieved. Must not be <NULL>.
See also
examineForms
seekPage

Definition at line 57 of file formlayerexport.cxx.

References m_pImpl.

◆ pageContainsForms()

bool xmloff::OFormLayerXMLExport::pageContainsForms ( const css::uno::Reference< css::drawing::XDrawPage > &  _rxDrawPage)
static

determines whether the given page contains logical forms

Definition at line 84 of file formlayerexport.cxx.

References xmloff::OFormLayerXMLExport_Impl::pageContainsForms().

◆ seekPage()

bool xmloff::OFormLayerXMLExport::seekPage ( const css::uno::Reference< css::drawing::XDrawPage > &  _rxDrawPage)

initializes some internal structures for fast access to the given page

This method has to be called before you use getControlId for controls on the given page. This way a performance optimization can be done for faster access to the control ids

Returns
<TRUE> if the page has been examined before. If <FALSE> is returned, this is a serious error.
See also
getControlId
examineForms

Definition at line 47 of file formlayerexport.cxx.

References m_pImpl.

Member Data Documentation

◆ m_pImpl

std::unique_ptr<OFormLayerXMLExport_Impl> xmloff::OFormLayerXMLExport::m_pImpl
private

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