LibreOffice Module xmloff (master) 1
Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
xmloff::OFormLayerXMLImport_Impl Class Reference

#include <layerimport.hxx>

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

Public Member Functions

void registerControlId (const css::uno::Reference< css::beans::XPropertySet > &_rxControl, const OUString &_rId)
 
void registerControlReferences (const css::uno::Reference< css::beans::XPropertySet > &_rxControl, const OUString &_rReferringControls)
 
OAttribute2PropertygetAttributeMap ()
 
SvXMLImport & getGlobalContext ()
 
const SvXMLStyleContextgetStyleElement (const OUString &_rStyleName) const
 
void enterEventContext ()
 
void leaveEventContext ()
 
void applyControlNumberStyle (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rControlNumberStyleName)
 
void registerCellValueBinding (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rCellAddress)
 
void registerCellRangeListSource (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rCellRangeAddress)
 
void registerXFormsValueBinding (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rBindingID)
 
void registerXFormsListBinding (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rBindingID)
 
void registerXFormsSubmission (const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const OUString &_rSubmissionID)
 
 ~OFormLayerXMLImport_Impl () override
 
- Public Member Functions inherited from xmloff::ODefaultEventAttacherManager
virtual void registerEvents (const css::uno::Reference< css::beans::XPropertySet > &_rxElement, const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) override
 
virtual void registerEvents (const css::uno::Reference< css::beans::XPropertySet > &_rxElement, const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents)=0
 

Private Types

typedef std::map< OUString, css::uno::Reference< css::beans::XPropertySet > > MapString2PropertySet
 
typedef std::unordered_map< css::uno::Reference< css::drawing::XDrawPage >, MapString2PropertySetMapDrawPage2Map
 
typedef ::std::pair< css::uno::Reference< css::beans::XPropertySet >, OUString > ModelStringPair
 

Private Member Functions

 OFormLayerXMLImport_Impl (SvXMLImport &_rImporter)
 
void startPage (const css::uno::Reference< css::drawing::XDrawPage > &_rxDrawPage)
 start importing the forms of the given page More...
 
void endPage ()
 end importing the forms of the current page More...
 
SvXMLImportContextcreateContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttribs)
 create an <type>SvXMLImportContext</type> instance which is able to import the <form:form> element. More...
 
css::uno::Reference< css::beans::XPropertySetlookupControlId (const OUString &_rControlId)
 get the control with the given id More...
 
void setAutoStyleContext (SvXMLStylesContext *_pNewContext)
 announces the auto-style context to the form importer More...
 
void documentDone ()
 to be called when the document has been completely imported More...
 

Static Private Member Functions

static SvXMLImportContextcreateOfficeFormsContext (SvXMLImport &_rImport)
 creates an import context for the office:forms element More...
 

Private Attributes

SvXMLImport & m_rImporter
 
OAttribute2Property m_aAttributeMetaData
 
css::uno::Reference< css::form::XFormsSupplier2 > m_xCurrentPageFormsSupp
 the supplier for the forms of the currently imported page More...
 
rtl::Reference< SvXMLStylesContextm_xAutoStyles
 
MapDrawPage2Map m_aControlIds
 
MapDrawPage2Map::iterator m_aCurrentPageIds
 
::std::vector< ModelStringPairm_aControlReferences
 
::std::vector< ModelStringPairm_aCellValueBindings
 
::std::vector< ModelStringPairm_aCellRangeListSources
 
::std::vector< ModelStringPairm_aXFormsValueBindings
 
::std::vector< ModelStringPairm_aXFormsListBindings
 
::std::vector< ModelStringPairm_aXFormsSubmissions
 

Friends

class OFormLayerXMLImport
 

Additional Inherited Members

- Protected Member Functions inherited from xmloff::ODefaultEventAttacherManager
void setEvents (const css::uno::Reference< css::container::XIndexAccess > &_rxContainer)
 
virtual ~ODefaultEventAttacherManager ()
 
- Protected Member Functions inherited from xmloff::IEventAttacherManager
 ~IEventAttacherManager ()
 

Detailed Description

Definition at line 48 of file layerimport.hxx.

Member Typedef Documentation

◆ MapDrawPage2Map

typedef std::unordered_map<css::uno::Reference<css::drawing::XDrawPage>, MapString2PropertySet> xmloff::OFormLayerXMLImport_Impl::MapDrawPage2Map
private

Definition at line 62 of file layerimport.hxx.

◆ MapString2PropertySet

Definition at line 61 of file layerimport.hxx.

◆ ModelStringPair

typedef ::std::pair< css::uno::Reference< css::beans::XPropertySet >, OUString > xmloff::OFormLayerXMLImport_Impl::ModelStringPair
private

Definition at line 68 of file layerimport.hxx.

Constructor & Destructor Documentation

◆ ~OFormLayerXMLImport_Impl()

xmloff::OFormLayerXMLImport_Impl::~OFormLayerXMLImport_Impl ( )
override

Definition at line 218 of file layerimport.cxx.

◆ OFormLayerXMLImport_Impl()

xmloff::OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl ( SvXMLImport &  _rImporter)
explicitprivate

Definition at line 64 of file layerimport.cxx.

References xmloff::aCheckStateMap, xmloff::aCommandTypeMap, xmloff::OAttribute2Property::addBooleanProperty(), xmloff::OAttribute2Property::addEnumProperty(), xmloff::OAttribute2Property::addInt16Property(), xmloff::OAttribute2Property::addInt32Property(), xmloff::OAttribute2Property::addStringProperty(), xmloff::aFormButtonTypeMap, xmloff::aListSourceTypeMap, xmloff::aNavigationTypeMap, xmloff::aOrientationMap, xmloff::aSubmitEncodingMap, xmloff::aSubmitMethodMap, xmloff::aTabulatorCycleMap, AutoCompletion, xmloff::aVisualEffectMap, BoundColumn, ButtonType, ConvertEmpty, CurrentSelected, CurrentState, DataField, DefaultButton, Disabled, Dropdown, xmloff::faAction, xmloff::faAllowDeletes, xmloff::faAllowInserts, xmloff::faAllowUpdates, xmloff::faApplyFilter, xmloff::faCommand, xmloff::faCommandType, xmloff::faDatasource, xmloff::faEnctype, xmloff::faEscapeProcessing, xmloff::faFilter, xmloff::faIgnoreResult, xmloff::faMethod, xmloff::faName, xmloff::faNavigationMode, xmloff::faOrder, xmloff::faTabbingCycle, FocusOnClick, xmloff::OAttributeMetaData::getCommonControlAttributeName(), xmloff::OAttributeMetaData::getCommonControlAttributeToken(), xmloff::OAttributeMetaData::getDatabaseAttributeToken(), xmloff::OAttributeMetaData::getFormAttributeName(), xmloff::OAttributeMetaData::getFormAttributeToken(), xmloff::OAttributeMetaData::getSpecialAttributeToken(), GroupName, InputRequired, IsTristate, Label, ListSource_TYPE, m_aAttributeMetaData, m_aControlIds, m_aCurrentPageIds, MaxLength, MultiLine, Multiple, Name, Orientation, PageStepSize, Printable, xmloff::PROPERTY_ALLOWDELETES, xmloff::PROPERTY_ALLOWINSERTS, xmloff::PROPERTY_ALLOWUPDATES, xmloff::PROPERTY_APPLYFILTER, xmloff::PROPERTY_AUTOCOMPLETE, xmloff::PROPERTY_BLOCK_INCREMENT, xmloff::PROPERTY_BOUNDCOLUMN, xmloff::PROPERTY_BUTTONTYPE, xmloff::PROPERTY_COMMAND, xmloff::PROPERTY_COMMAND_TYPE, xmloff::PROPERTY_CYCLE, xmloff::PROPERTY_DATAFIELD, xmloff::PROPERTY_DATASOURCENAME, xmloff::PROPERTY_DEFAULT_STATE, xmloff::PROPERTY_DEFAULTBUTTON, xmloff::PROPERTY_DROPDOWN, xmloff::PROPERTY_EMPTY_IS_NULL, xmloff::PROPERTY_ENABLED, xmloff::PROPERTY_ESCAPEPROCESSING, xmloff::PROPERTY_FILTER, xmloff::PROPERTY_FOCUS_ON_CLICK, xmloff::PROPERTY_GROUP_NAME, xmloff::PROPERTY_IGNORERESULT, xmloff::PROPERTY_INPUT_REQUIRED, xmloff::PROPERTY_LABEL, xmloff::PROPERTY_LINECOUNT, xmloff::PROPERTY_LISTSOURCETYPE, xmloff::PROPERTY_MAXTEXTLENGTH, xmloff::PROPERTY_MULTILINE, xmloff::PROPERTY_MULTISELECTION, xmloff::PROPERTY_NAME, xmloff::PROPERTY_NAVIGATION, xmloff::PROPERTY_ORDER, xmloff::PROPERTY_ORIENTATION, xmloff::PROPERTY_PRINTABLE, xmloff::PROPERTY_READONLY, xmloff::PROPERTY_STATE, xmloff::PROPERTY_STRICTFORMAT, xmloff::PROPERTY_SUBMIT_ENCODING, xmloff::PROPERTY_SUBMIT_METHOD, xmloff::PROPERTY_TABINDEX, xmloff::PROPERTY_TABSTOP, xmloff::PROPERTY_TARGETFRAME, xmloff::PROPERTY_TARGETURL, xmloff::PROPERTY_TITLE, xmloff::PROPERTY_TOGGLE, xmloff::PROPERTY_TRISTATE, xmloff::PROPERTY_VISUAL_EFFECT, ReadOnly, Selected, Size, State, TabIndex, TabStop, TargetFrame, TargetLocation, Title, Toggle, Validation, and VisualEffect.

Member Function Documentation

◆ applyControlNumberStyle()

void xmloff::OFormLayerXMLImport_Impl::applyControlNumberStyle ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rControlNumberStyleName 
)

◆ createContext()

SvXMLImportContext * xmloff::OFormLayerXMLImport_Impl::createContext ( sal_Int32  nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  _rxAttribs 
)
private

create an <type>SvXMLImportContext</type> instance which is able to import the <form:form> element.

Definition at line 452 of file layerimport.cxx.

References createXFormsModelContext(), m_rImporter, m_xCurrentPageFormsSupp, SAL_WARN, TOKEN_MASK, XFORMS, XML_ELEMENT, xmloff::token::XML_FORM, and xmloff::token::XML_MODEL.

◆ createOfficeFormsContext()

SvXMLImportContext * xmloff::OFormLayerXMLImport_Impl::createOfficeFormsContext ( SvXMLImport &  _rImport)
staticprivate

creates an import context for the office:forms element

Definition at line 446 of file layerimport.cxx.

Referenced by xmloff::OFormLayerXMLImport::createOfficeFormsContext().

◆ documentDone()

void xmloff::OFormLayerXMLImport_Impl::documentDone ( )
private

to be called when the document has been completely imported

For some documents (currently: only some spreadsheet documents) it's necessary do to a post processing, since not all information from the file can be processed if the document is not completed, yet.

Definition at line 472 of file layerimport.cxx.

References aHelper, bindXFormsListBinding(), bindXFormsSubmission(), bindXFormsValueBinding(), CONTENT, Exception, getGlobalContext(), xmloff::FormCellBindingHelper::isCellBindingAllowed(), xmloff::FormCellBindingHelper::isListCellRangeAllowed(), m_aCellRangeListSources, m_aCellValueBindings, m_aXFormsListBindings, m_aXFormsSubmissions, m_aXFormsValueBindings, and TOOLS_WARN_EXCEPTION.

◆ endPage()

void xmloff::OFormLayerXMLImport_Impl::endPage ( )
private

◆ enterEventContext()

void xmloff::OFormLayerXMLImport_Impl::enterEventContext ( )

◆ getAttributeMap()

OAttribute2Property & xmloff::OFormLayerXMLImport_Impl::getAttributeMap ( )
inline

◆ getGlobalContext()

SvXMLImport & xmloff::OFormLayerXMLImport_Impl::getGlobalContext ( )
inline

◆ getStyleElement()

const SvXMLStyleContext * xmloff::OFormLayerXMLImport_Impl::getStyleElement ( const OUString &  _rStyleName) const

Definition at line 319 of file layerimport.cxx.

References m_xAutoStyles, OUStringToOString(), and TEXT_PARAGRAPH.

◆ leaveEventContext()

void xmloff::OFormLayerXMLImport_Impl::leaveEventContext ( )

Definition at line 340 of file layerimport.cxx.

References m_rImporter.

Referenced by xmloff::OFormImport::endFastElement().

◆ lookupControlId()

Reference< XPropertySet > xmloff::OFormLayerXMLImport_Impl::lookupControlId ( const OUString &  _rControlId)
private

get the control with the given id

Definition at line 431 of file layerimport.cxx.

References m_aControlIds, m_aCurrentPageIds, and SAL_WARN.

Referenced by endPage().

◆ registerCellRangeListSource()

void xmloff::OFormLayerXMLImport_Impl::registerCellRangeListSource ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rCellRangeAddress 
)

Definition at line 313 of file layerimport.cxx.

References m_aCellRangeListSources.

Referenced by xmloff::OListAndComboImport::endFastElement().

◆ registerCellValueBinding()

void xmloff::OFormLayerXMLImport_Impl::registerCellValueBinding ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rCellAddress 
)

Definition at line 276 of file layerimport.cxx.

References m_aCellValueBindings.

Referenced by xmloff::OControlImport::doRegisterCellValueBinding().

◆ registerControlId()

void xmloff::OFormLayerXMLImport_Impl::registerControlId ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControl,
const OUString &  _rId 
)

Definition at line 346 of file layerimport.cxx.

References m_aControlIds, and m_aCurrentPageIds.

Referenced by xmloff::OControlImport::endFastElement().

◆ registerControlReferences()

void xmloff::OFormLayerXMLImport_Impl::registerControlReferences ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControl,
const OUString &  _rReferringControls 
)

Definition at line 355 of file layerimport.cxx.

References m_aControlReferences.

Referenced by xmloff::OReferredControlImport::startFastElement().

◆ registerXFormsListBinding()

void xmloff::OFormLayerXMLImport_Impl::registerXFormsListBinding ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rBindingID 
)

◆ registerXFormsSubmission()

void xmloff::OFormLayerXMLImport_Impl::registerXFormsSubmission ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rSubmissionID 
)

Definition at line 303 of file layerimport.cxx.

References m_aXFormsSubmissions.

Referenced by xmloff::OControlImport::doRegisterXFormsSubmission().

◆ registerXFormsValueBinding()

void xmloff::OFormLayerXMLImport_Impl::registerXFormsValueBinding ( const css::uno::Reference< css::beans::XPropertySet > &  _rxControlModel,
const OUString &  _rBindingID 
)

◆ setAutoStyleContext()

void xmloff::OFormLayerXMLImport_Impl::setAutoStyleContext ( SvXMLStylesContext _pNewContext)
private

announces the auto-style context to the form importer

Definition at line 221 of file layerimport.cxx.

References m_xAutoStyles.

◆ startPage()

void xmloff::OFormLayerXMLImport_Impl::startPage ( const css::uno::Reference< css::drawing::XDrawPage > &  _rxDrawPage)
private

start importing the forms of the given page

Definition at line 362 of file layerimport.cxx.

References m_aControlIds, m_aCurrentPageIds, and m_xCurrentPageFormsSupp.

Friends And Related Function Documentation

◆ OFormLayerXMLImport

friend class OFormLayerXMLImport
friend

Definition at line 51 of file layerimport.hxx.

Member Data Documentation

◆ m_aAttributeMetaData

OAttribute2Property xmloff::OFormLayerXMLImport_Impl::m_aAttributeMetaData
private

Definition at line 54 of file layerimport.hxx.

Referenced by getAttributeMap(), and OFormLayerXMLImport_Impl().

◆ m_aCellRangeListSources

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aCellRangeListSources
private

Definition at line 74 of file layerimport.hxx.

Referenced by documentDone(), and registerCellRangeListSource().

◆ m_aCellValueBindings

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aCellValueBindings
private

Definition at line 72 of file layerimport.hxx.

Referenced by documentDone(), and registerCellValueBinding().

◆ m_aControlIds

MapDrawPage2Map xmloff::OFormLayerXMLImport_Impl::m_aControlIds
private

◆ m_aControlReferences

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aControlReferences
private

Definition at line 70 of file layerimport.hxx.

Referenced by endPage(), and registerControlReferences().

◆ m_aCurrentPageIds

MapDrawPage2Map::iterator xmloff::OFormLayerXMLImport_Impl::m_aCurrentPageIds
private

◆ m_aXFormsListBindings

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aXFormsListBindings
private

Definition at line 80 of file layerimport.hxx.

Referenced by documentDone(), and registerXFormsListBinding().

◆ m_aXFormsSubmissions

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aXFormsSubmissions
private

Definition at line 83 of file layerimport.hxx.

Referenced by documentDone(), and registerXFormsSubmission().

◆ m_aXFormsValueBindings

::std::vector< ModelStringPair > xmloff::OFormLayerXMLImport_Impl::m_aXFormsValueBindings
private

Definition at line 77 of file layerimport.hxx.

Referenced by documentDone(), and registerXFormsValueBinding().

◆ m_rImporter

SvXMLImport& xmloff::OFormLayerXMLImport_Impl::m_rImporter
private

◆ m_xAutoStyles

rtl::Reference<SvXMLStylesContext> xmloff::OFormLayerXMLImport_Impl::m_xAutoStyles
private

Definition at line 59 of file layerimport.hxx.

Referenced by applyControlNumberStyle(), getStyleElement(), and setAutoStyleContext().

◆ m_xCurrentPageFormsSupp

css::uno::Reference< css::form::XFormsSupplier2 > xmloff::OFormLayerXMLImport_Impl::m_xCurrentPageFormsSupp
private

the supplier for the forms of the currently imported page

Definition at line 58 of file layerimport.hxx.

Referenced by createContext(), endPage(), and startPage().


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