LibreOffice Module xmloff (master) 1
|
provides functionality for exporting a complete form layer. More...
#include <formlayerexport.hxx>
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_Impl > | m_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 |
provides functionality for exporting a complete form layer.
Definition at line 51 of file formlayerexport.hxx.
|
overrideprivatevirtual |
Definition at line 43 of file formlayerexport.cxx.
xmloff::OFormLayerXMLExport::OFormLayerXMLExport | ( | SvXMLExport & | _rContext | ) |
Definition at line 38 of file formlayerexport.cxx.
References m_pImpl.
bool xmloff::OFormLayerXMLExport::documentContainsXForms | ( | ) | const |
determines whether the given page contains XForm instances
Definition at line 89 of file formlayerexport.cxx.
References m_pImpl.
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
_rxDrawPage | the 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.
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.
void xmloff::OFormLayerXMLExport::exportAutoControlNumberStyles | ( | ) |
exports the automatic controls number styles
Definition at line 94 of file formlayerexport.cxx.
References m_pImpl.
void xmloff::OFormLayerXMLExport::exportAutoStyles | ( | ) |
exports the auto-styles collected during the examineForms calls
Definition at line 99 of file formlayerexport.cxx.
References m_pImpl.
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.
_rxDrawPage | the 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.
void xmloff::OFormLayerXMLExport::exportXForms | ( | ) | const |
exports the XForms model data
Definition at line 79 of file formlayerexport.cxx.
References m_pImpl.
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.
_rxControl | the control which's id should be retrieved. Must not be <NULL>. |
Definition at line 52 of file formlayerexport.cxx.
References m_pImpl.
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.
_rxControl | the control which's id should be retrieved. Must not be <NULL>. |
Definition at line 57 of file formlayerexport.cxx.
References m_pImpl.
|
static |
determines whether the given page contains logical forms
Definition at line 84 of file formlayerexport.cxx.
References xmloff::OFormLayerXMLExport_Impl::pageContainsForms().
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
Definition at line 47 of file formlayerexport.cxx.
References m_pImpl.
|
private |
Definition at line 55 of file formlayerexport.hxx.
Referenced by documentContainsXForms(), examineForms(), excludeFromExport(), exportAutoControlNumberStyles(), exportAutoStyles(), exportForms(), exportXForms(), getControlId(), getControlNumberStyle(), and seekPage().