LibreOffice Module xmloff (master) 1
|
the implementation class for OFormLayerXMLExport More...
#include <layerexport.hxx>
Public Member Functions | |
OFormLayerXMLExport_Impl (SvXMLExport &_rContext) | |
virtual | ~OFormLayerXMLExport_Impl () |
virtual SvXMLExport & | getGlobalContext ()=0 |
virtual ::rtl::Reference< SvXMLExportPropertyMapper > | getStylePropertyMapper ()=0 |
virtual void | exportCollectionElements (const css::uno::Reference< css::container::XIndexAccess > &_rxCollection)=0 |
steps through a collection and exports all children of this collection More... | |
virtual OUString | getObjectStyleName (const css::uno::Reference< css::beans::XPropertySet > &_rxObject)=0 |
Private Types | |
typedef std::unordered_map< css::uno::Reference< css::beans::XPropertySet >, sal_Int32 > | MapPropertySet2Int |
Private Member Functions | |
void | exportGridColumn (const css::uno::Reference< css::beans::XPropertySet > &_rxColumn, const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) |
exports one single grid column More... | |
void | exportControl (const css::uno::Reference< css::beans::XPropertySet > &_rxControl, const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) |
exports one single control More... | |
void | exportForm (const css::uno::Reference< css::beans::XPropertySet > &_rxProps, const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) |
exports one single form More... | |
bool | seekPage (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage) |
seek to the page given. More... | |
OUString | getControlId (const css::uno::Reference< css::beans::XPropertySet > &_rxControl) |
get the id of the given control. More... | |
OUString | getControlNumberStyle (const css::uno::Reference< css::beans::XPropertySet > &_rxControl) |
retrieves the style name for the control's number style. More... | |
virtual void | exportCollectionElements (const css::uno::Reference< css::container::XIndexAccess > &_rxCollection) override |
steps through a collection and exports all children of this collection More... | |
virtual SvXMLExport & | getGlobalContext () override |
virtual OUString | getObjectStyleName (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) override |
virtual ::rtl::Reference< SvXMLExportPropertyMapper > | getStylePropertyMapper () override |
void | clear () |
clear any structures which have been build in the recent <method>examine</method> calls. More... | |
void | examineForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage) |
examine a forms collection. More... | |
void | exportForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage) |
export a forms collection of a draw page More... | |
void | exportXForms () const |
exports the XForms model data More... | |
bool | documentContainsXForms () const |
determines whether the given page contains XForm instances More... | |
void | exportAutoControlNumberStyles () |
exports the automatic control number styles More... | |
void | exportAutoStyles () |
exports the auto-styles collected during the examineForms calls More... | |
bool | implMoveIterators (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage, bool _bClear) |
moves the m_aCurrentPage* members to the positions specifying the given page. More... | |
bool | checkExamineControl (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) |
check the object given if it's a control, if so, examine it. More... | |
void | examineControlNumberFormat (const css::uno::Reference< css::beans::XPropertySet > &_rxControl) |
examines the control's number format, so later the format style can be referred More... | |
sal_Int32 | implExamineControlNumberFormat (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) |
examines the control's number format, so later the format style can be referred More... | |
void | collectGridColumnStylesAndIds (const css::uno::Reference< css::beans::XPropertySet > &_rxControl) |
collects AutoStyles for grid columns More... | |
sal_Int32 | ensureTranslateFormat (const css::uno::Reference< css::beans::XPropertySet > &_rxFormattedControl) |
ensures that the number format of the given control exist in our own formats supplier. More... | |
SvXMLNumFmtExport * | getControlNumberStyleExport () |
returns the instance exporting our control's number styles More... | |
void | ensureControlNumberStyleExport () |
ensures that the instance exporting our control's number styles exists More... | |
OUString | getImmediateNumberStyle (const css::uno::Reference< css::beans::XPropertySet > &_rxObject) |
determines the number format style for the given object without remembering it More... | |
void | excludeFromExport (const css::uno::Reference< css::awt::XControlModel > &_rxControl) |
exclude the given control (model) from export. More... | |
Static Private Member Functions | |
static bool | pageContainsForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage) |
determines whether the given page contains logical forms More... | |
static bool | impl_isFormPageContainingForms (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage, css::uno::Reference< css::container::XIndexAccess > &_rxForms) |
static const OUString & | getControlNumberStyleNamePrefix () |
returns the prefix to be used for control number styles More... | |
Private Attributes | |
SvXMLExport & | m_rContext |
SvXMLNumFmtExport * | m_pControlNumberStyles |
PropertySetBag | m_aIgnoreList |
::rtl::Reference< XMLPropertyHandlerFactory > | m_xPropertyHandlerFactory |
::rtl::Reference< SvXMLExportPropertyMapper > | m_xStyleExportMapper |
css::uno::Reference< css::util::XNumberFormats > | m_xControlNumberFormats |
MapPropertySet2Map | m_aControlIds |
MapPropertySet2Map | m_aReferringControls |
MapPropertySet2Map::iterator | m_aCurrentPageIds |
MapPropertySet2Map::iterator | m_aCurrentPageReferring |
MapPropertySet2Int | m_aControlNumberFormats |
MapPropertySet2String | m_aGridColumnStyles |
Friends | |
class | OFormLayerXMLExport |
Additional Inherited Members | |
Protected Member Functions inherited from xmloff::IFormsExportContext | |
~IFormsExportContext () | |
the implementation class for OFormLayerXMLExport
Definition at line 58 of file layerexport.hxx.
|
private |
Definition at line 109 of file layerexport.hxx.
|
explicit |
Definition at line 72 of file layerexport.cxx.
References XMLEventExport::AddTranslationTable(), clear(), CONTROL_ID, xmloff::g_pFormsEventTranslation, SvXMLExport::GetAutoStylePool(), xmloff::getControlStylePropertyMap(), SvXMLExport::GetEventExport(), xmloff::token::GetXMLToken(), xmloff::initializePropertyMaps(), m_rContext, m_rContext, m_xPropertyHandlerFactory, m_xStyleExportMapper, xmloff::token::XML_PARAGRAPH, and XML_STYLE_FAMILY_CONTROL_PREFIX.
|
virtual |
Definition at line 96 of file layerexport.cxx.
|
private |
check the object given if it's a control, if so, examine it.
Definition at line 487 of file layerexport.cxx.
References collectGridColumnStylesAndIds(), examineControlNumberFormat(), SvXMLExport::GetTextParagraphExport(), m_aControlIds, m_aCurrentPageIds, m_aCurrentPageReferring, m_rContext, xmloff::PROPERTY_CLASSID, xmloff::PROPERTY_CONTROLLABEL, and xmloff::PROPERTY_FORMATKEY.
Referenced by examineForms().
|
private |
clear any structures which have been build in the recent <method>examine</method> calls.
Definition at line 234 of file layerexport.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::clear(), m_aControlIds, m_aControlNumberFormats, m_aCurrentPageIds, m_aCurrentPageReferring, m_aGridColumnStyles, m_aIgnoreList, and m_aReferringControls.
Referenced by OFormLayerXMLExport_Impl().
|
private |
collects AutoStyles for grid columns
Definition at line 542 of file layerexport.cxx.
References Any, CONTROL_ID, CTF_FORMS_DATA_STYLE, DBG_UNHANDLED_EXCEPTION, Exception, SvXMLExport::GetAutoStylePool(), getImmediateNumberStyle(), i, m_aControlIds, m_aCurrentPageIds, m_aGridColumnStyles, m_rContext, m_xStyleExportMapper, nCount, and xmloff::PROPERTY_FORMATKEY.
Referenced by checkExamineControl().
|
private |
determines whether the given page contains XForm instances
Definition at line 287 of file layerexport.cxx.
References SvXMLExport::GetModel(), and m_rContext.
|
private |
ensures that the instance exporting our control's number styles exists
Definition at line 681 of file layerexport.cxx.
References Exception, SvXMLExport::getComponentContext(), getControlNumberStyleNamePrefix(), Locale, m_pControlNumberStyles, m_rContext, and m_xControlNumberFormats.
Referenced by ensureTranslateFormat(), and getControlNumberStyleExport().
|
private |
ensures that the number format of the given control exist in our own formats supplier.
The given control is examined for its format (i.e. it's FormatKey/FormatsSupplier properties), and the format is added (if necessary) to m_xControlNumberFormats
.
Definition at line 634 of file layerexport.cxx.
References Any, ensureControlNumberStyleExport(), Locale, m_xControlNumberFormats, xmloff::PROPERTY_FORMATKEY, xmloff::PROPERTY_FORMATSSUPPLIER, xmloff::PROPERTY_FORMATSTRING, and xmloff::PROPERTY_LOCALE.
Referenced by implExamineControlNumberFormat().
|
private |
examines the control's number format, so later the format style can be referred
remembers the format key for the control, so it can later be asked for in getControlNumberStyle
Definition at line 620 of file layerexport.cxx.
References implExamineControlNumberFormat(), and m_aControlNumberFormats.
Referenced by checkExamineControl().
|
private |
examine a forms collection.
The method will collect control ids and add styles to the export context as necessary.
Every control in the object hierarchy given will be assigned to a unique id, which is stored for later use.
In addition, any references the controls may have between each other, are collected and stored for later use.
Upon calling this method, the id map will be cleared before collecting the new ids, so any ids you collected previously will be lost
_rxDrawPage | the draw page which's forms collection should be examined |
Definition at line 393 of file layerexport.cxx.
References checkExamineControl(), impl_isFormPageContainingForms(), and implMoveIterators().
|
private |
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 716 of file layerexport.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::insert(), and m_aIgnoreList.
|
private |
exports the automatic control number styles
Definition at line 247 of file layerexport.cxx.
References SvXMLNumFmtExport::Export(), and m_pControlNumberStyles.
|
private |
exports the auto-styles collected during the examineForms calls
Definition at line 253 of file layerexport.cxx.
References CONTROL_ID, SvXMLExport::GetAutoStylePool(), and m_rContext.
|
overrideprivatevirtual |
steps through a collection and exports all children of this collection
Implements xmloff::IFormsExportContext.
Definition at line 169 of file layerexport.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::end(), Exception, exportControl(), exportForm(), exportGridColumn(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), i, m_aIgnoreList, nElements, xmloff::PROPERTY_CLASSID, xmloff::PROPERTY_COLUMNSERVICENAME, and TOOLS_WARN_EXCEPTION.
Referenced by exportForms().
|
private |
exports one single control
Definition at line 134 of file layerexport.cxx.
References xmloff::OElementExport::doExport(), getControlId(), and m_aCurrentPageReferring.
Referenced by exportCollectionElements().
|
private |
exports one single form
Definition at line 151 of file layerexport.cxx.
References xmloff::OElementExport::doExport().
Referenced by exportCollectionElements().
|
private |
export a forms collection of a draw page
The method will obtain the forms collection of the page and call <method>exportCollectionElements</method>.
Definition at line 258 of file layerexport.cxx.
References exportCollectionElements(), impl_isFormPageContainingForms(), and implMoveIterators().
|
private |
exports one single grid column
Definition at line 126 of file layerexport.cxx.
References xmloff::OElementExport::doExport(), and getControlId().
Referenced by exportCollectionElements().
|
private |
exports the XForms model data
Definition at line 274 of file layerexport.cxx.
References exportXForms(), and m_rContext.
Referenced by exportXForms().
|
private |
get the id of the given control.
You must have sought to the page of the control before calling this.
Definition at line 356 of file layerexport.cxx.
References m_aControlIds, and m_aCurrentPageIds.
Referenced by exportControl(), and exportGridColumn().
|
private |
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.
Definition at line 377 of file layerexport.cxx.
References getControlNumberStyleExport(), SvXMLNumFmtExport::GetStyleName(), m_aControlNumberFormats, and m_pControlNumberStyles.
|
private |
returns the instance exporting our control's number styles
Definition at line 710 of file layerexport.cxx.
References ensureControlNumberStyleExport(), and m_pControlNumberStyles.
Referenced by getControlNumberStyle(), getImmediateNumberStyle(), and implExamineControlNumberFormat().
|
staticprivate |
returns the prefix to be used for control number styles
Definition at line 66 of file layerexport.cxx.
Referenced by ensureControlNumberStyleExport().
|
overrideprivatevirtual |
Implements xmloff::IFormsExportContext.
Definition at line 164 of file layerexport.cxx.
References m_rContext.
|
private |
determines the number format style for the given object without remembering it
Definition at line 366 of file layerexport.cxx.
References getControlNumberStyleExport(), SvXMLNumFmtExport::GetStyleName(), and implExamineControlNumberFormat().
Referenced by collectGridColumnStylesAndIds().
|
overrideprivatevirtual |
Implements xmloff::IFormsExportContext.
Definition at line 224 of file layerexport.cxx.
References m_aGridColumnStyles.
|
overrideprivatevirtual |
Implements xmloff::IFormsExportContext.
Definition at line 159 of file layerexport.cxx.
References m_xStyleExportMapper.
|
staticprivate |
Definition at line 100 of file layerexport.cxx.
Referenced by examineForms(), and exportForms().
|
private |
examines the control's number format, so later the format style can be referred
does not remember the information returned in any way
Definition at line 608 of file layerexport.cxx.
References ensureTranslateFormat(), getControlNumberStyleExport(), and SvXMLNumFmtExport::SetUsed().
Referenced by examineControlNumberFormat(), and getImmediateNumberStyle().
|
private |
moves the m_aCurrentPage* members to the positions specifying the given page.
Definition at line 296 of file layerexport.cxx.
References m_aControlIds, m_aCurrentPageIds, m_aCurrentPageReferring, and m_aReferringControls.
Referenced by examineForms(), exportForms(), and seekPage().
|
staticprivate |
determines whether the given page contains logical forms
Definition at line 280 of file layerexport.cxx.
References SAL_WARN_IF.
Referenced by xmloff::OFormLayerXMLExport::pageContainsForms().
|
private |
seek to the page given.
This must be called before you can retrieve any ids for controls on the page.
Definition at line 333 of file layerexport.cxx.
References implMoveIterators().
|
friend |
Definition at line 61 of file layerexport.hxx.
|
private |
Definition at line 92 of file layerexport.hxx.
Referenced by checkExamineControl(), clear(), collectGridColumnStylesAndIds(), getControlId(), and implMoveIterators().
|
private |
Definition at line 110 of file layerexport.hxx.
Referenced by clear(), examineControlNumberFormat(), and getControlNumberStyle().
|
private |
Definition at line 100 of file layerexport.hxx.
Referenced by checkExamineControl(), clear(), collectGridColumnStylesAndIds(), getControlId(), and implMoveIterators().
|
private |
Definition at line 103 of file layerexport.hxx.
Referenced by checkExamineControl(), clear(), exportControl(), and implMoveIterators().
|
private |
Definition at line 113 of file layerexport.hxx.
Referenced by clear(), collectGridColumnStylesAndIds(), and getObjectStyleName().
|
private |
Definition at line 67 of file layerexport.hxx.
Referenced by clear(), excludeFromExport(), and exportCollectionElements().
|
private |
Definition at line 95 of file layerexport.hxx.
Referenced by clear(), and implMoveIterators().
|
private |
Definition at line 64 of file layerexport.hxx.
Referenced by ensureControlNumberStyleExport(), exportAutoControlNumberStyles(), getControlNumberStyle(), and getControlNumberStyleExport().
|
private |
Definition at line 63 of file layerexport.hxx.
Referenced by checkExamineControl(), collectGridColumnStylesAndIds(), documentContainsXForms(), ensureControlNumberStyleExport(), exportAutoStyles(), exportXForms(), getGlobalContext(), and OFormLayerXMLExport_Impl().
|
private |
Definition at line 90 of file layerexport.hxx.
Referenced by ensureControlNumberStyleExport(), and ensureTranslateFormat().
|
private |
Definition at line 70 of file layerexport.hxx.
Referenced by OFormLayerXMLExport_Impl().
|
private |
Definition at line 71 of file layerexport.hxx.
Referenced by collectGridColumnStylesAndIds(), getStylePropertyMapper(), and OFormLayerXMLExport_Impl().