LibreOffice Module xmloff (master) 1
|
A specialized version of the <type>OControlImport</type> class, which handles attributes / sub elements which are special to list and combo boxes. More...
#include <elementimport.hxx>
Public Member Functions | |
OListAndComboImport (OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType) | |
<TRUE> if and only if we should use a cell value binding which exchanges the selection index (instead of the selection text More... | |
virtual void SAL_CALL | startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &) override |
virtual void SAL_CALL | endFastElement (sal_Int32 nElement) override |
endFastElement is called before a context will be destructed, but after an elements context has been parsed. More... | |
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL | createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override |
virtual bool | handleAttribute (sal_Int32 nElement, const OUString &_rValue) override |
handle one single attribute. More... | |
virtual void | doRegisterCellValueBinding (const OUString &_rBoundCellAddress) override |
registers the given cell address as value binding address for our element More... | |
Public Member Functions inherited from xmloff::OControlImport | |
OControlImport (OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer, OControlElement::ElementType _eType) | |
virtual void SAL_CALL | startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override |
virtual void SAL_CALL | endFastElement (sal_Int32 nElement) override |
endFastElement is called before a context will be destructed, but after an elements context has been parsed. More... | |
virtual bool | handleAttribute (sal_Int32 nElement, const OUString &_rValue) override |
handle one single attribute. More... | |
void | addOuterAttributes (const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxOuterAttribs) |
Public Member Functions inherited from xmloff::OElementImport | |
OElementImport (OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer) | |
ctor More... | |
virtual | ~OElementImport () override |
Public Member Functions inherited from xmloff::OPropertyImport | |
OPropertyImport (OFormLayerXMLImport_Impl &_rImport) | |
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL | createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override |
virtual void SAL_CALL | startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &_rxAttrList) override |
virtual void SAL_CALL | characters (const OUString &_rChars) override |
This method is called for all characters that are contained in the current element. More... | |
Public Member Functions inherited from SvXMLImportContext | |
SvXMLImportContext (SvXMLImport &rImport) | |
A contexts constructor does anything that is required if an element starts. More... | |
virtual | ~SvXMLImportContext () |
A contexts destructor does anything that is required if an element ends. More... | |
virtual void SAL_CALL | startFastElement (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override |
virtual void SAL_CALL | startUnknownElement (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override |
virtual void SAL_CALL | endFastElement (sal_Int32 Element) override |
endFastElement is called before a context will be destructed, but after an elements context has been parsed. More... | |
virtual void SAL_CALL | endUnknownElement (const OUString &Namespace, const OUString &Name) override |
virtual css::uno::Reference< XFastContextHandler > SAL_CALL | createFastChildContext (sal_Int32 Element, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override |
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL | createUnknownChildContext (const OUString &Namespace, const OUString &Name, const css::uno::Reference< css::xml::sax::XFastAttributeList > &Attribs) override |
virtual void SAL_CALL | characters (const OUString &aChars) override |
This method is called for all characters that are contained in the current element. More... | |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &aType) final override |
virtual void SAL_CALL | acquire () noexcept final override |
virtual void SAL_CALL | release () noexcept final override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () final override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () final override |
virtual void | registerEvents (const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents)=0 |
Protected Member Functions | |
void | implPushBackLabel (const OUString &_rLabel) |
void | implPushBackValue (const OUString &_rValue) |
void | implEmptyLabelFound () |
void | implEmptyValueFound () |
void | implSelectCurrentItem () |
void | implDefaultSelectCurrentItem () |
Protected Member Functions inherited from xmloff::OControlImport | |
OControlImport (OFormLayerXMLImport_Impl &_rImport, IEventAttacherManager &_rEventManager, const css::uno::Reference< css::container::XNameContainer > &_rxParentContainer) | |
void | setElementType (OControlElement::ElementType _eType) |
virtual OUString | determineDefaultServiceName () const override |
virtual void | doRegisterCellValueBinding (const OUString &_rBoundCellAddress) |
registers the given cell address as value binding address for our element More... | |
void | doRegisterXFormsValueBinding (const OUString &) |
register the given XForms binding More... | |
void | doRegisterXFormsListBinding (const OUString &) |
register the given XForms list binding More... | |
void | doRegisterXFormsSubmission (const OUString &) |
register the given XForms submission More... | |
virtual css::uno::Reference< css::beans::XPropertySet > | createElement () override |
create the (uninitialized) element which is to represent the read data More... | |
Protected Member Functions inherited from xmloff::OElementImport | |
virtual void SAL_CALL | startFastElement (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override |
virtual void SAL_CALL | endFastElement (sal_Int32 nElement) override |
endFastElement is called before a context will be destructed, but after an elements context has been parsed. More... | |
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL | createFastChildContext (sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override |
virtual bool | handleAttribute (sal_Int32 nElement, const OUString &_rValue) override |
handle one single attribute. More... | |
virtual void | registerEvents (const css::uno::Sequence< css::script::ScriptEventDescriptor > &_rEvents) override |
virtual css::uno::Reference< css::beans::XPropertySet > | createElement () |
create the (uninitialized) element which is to represent the read data More... | |
void | simulateDefaultedAttribute (sal_Int32 nElement, const OUString &_rPropertyName, const char *_pAttributeDefault) |
can be used to handle properties where the attribute default and the property default differ. More... | |
bool | tryGenericAttribute (sal_Int32 nElement, const OUString &_rValue) |
to be called from within handleAttribute, checks whether the given attribute is covered by our generic attribute handler mechanisms More... | |
void | disableImplicitGenericAttributeHandling () |
controls whether |handleAttribute| implicitly calls |tryGenericAttribute|, or whether the derived class must do this explicitly at a suitable place in its own |handleAttribute| More... | |
Protected Member Functions inherited from xmloff::OPropertyImport | |
virtual bool | handleAttribute (sal_Int32 nElement, const OUString &_rValue) |
handle one single attribute. More... | |
bool | encounteredAttribute (sal_Int32 nElement) const |
determine if the element imported by the object had a given attribute. More... | |
void | enableTrackAttributes () |
enables the tracking of the encountered attributes More... | |
void | implPushBackPropertyValue (const css::beans::PropertyValue &_rProp) |
void | implPushBackPropertyValue (const OUString &_rName, const css::uno::Any &_rValue) |
void | implPushBackGenericPropertyValue (const css::beans::PropertyValue &_rProp) |
Protected Member Functions inherited from SvXMLImportContext | |
SvXMLImport & | GetImport () |
const SvXMLImport & | GetImport () const |
Protected Member Functions inherited from xmloff::IEventAttacher | |
~IEventAttacher () | |
Protected Member Functions inherited from xmloff::OValuePropertiesMetaData | |
OValuePropertiesMetaData () | |
Private Attributes | |
std::vector< OUString > | m_aListSource |
std::vector< OUString > | m_aValueList |
std::vector< sal_Int16 > | m_aSelectedSeq |
std::vector< sal_Int16 > | m_aDefaultSelectedSeq |
OUString | m_sCellListSource |
sal_Int32 | m_nEmptyListItems |
the cell range which acts as list source for the control More... | |
sal_Int32 | m_nEmptyValueItems |
number of empty list items encountered during reading More... | |
bool | m_bEncounteredLSAttrib |
number of empty value items encountered during reading More... | |
bool | m_bLinkWithIndexes |
Friends | |
class | OListOptionImport |
class | OComboItemImport |
Additional Inherited Members | |
Static Public Member Functions inherited from xmloff::OValuePropertiesMetaData | |
static void | getValuePropertyNames (OControlElement::ElementType _eType, sal_Int16 _nFormComponentType, OUString &_rpCurrentValuePropertyName, OUString &_rpValuePropertyName) |
calculate the property names for the current-value and the value attribute. More... | |
static void | getValueLimitPropertyNames (sal_Int16 _nFormComponentType, OUString &_rpMinValuePropertyName, OUString &_rpMaxValuePropertyName) |
calculate the property names for the min-value and the max-value attribute. More... | |
static void | getRuntimeValuePropertyNames (OControlElement::ElementType _eType, sal_Int16 _nFormComponentType, OUString &_rpValuePropertyName, OUString &_rpDefaultValuePropertyName) |
calculate the names of the properties which, at runtime, are used for value and default value. More... | |
Protected Types inherited from xmloff::OPropertyImport | |
typedef ::std::vector< css::beans::PropertyValue > | PropertyValueArray |
Static Protected Member Functions inherited from xmloff::OControlImport | |
static void | implTranslateValueProperty (const css::uno::Reference< css::beans::XPropertySetInfo > &_rxPropInfo, css::beans::PropertyValue &_rPropValue) |
Protected Attributes inherited from xmloff::OControlImport | |
OUString | m_sControlId |
OControlElement::ElementType | m_eElementType |
PropertyValueArray | m_aValueProperties |
css::uno::Reference< css::xml::sax::XFastAttributeList > | m_xOuterAttributes |
OUString | m_sBoundCellAddress |
the address of the calc cell which the control model should be bound to, if applicable More... | |
OUString | m_sBindingID |
name of a value binding (xforms:bind attribute) More... | |
OUString | m_sListBindingID |
name of a list binding (form:xforms-list-source attribute) More... | |
OUString | m_sSubmissionID |
name of a submission (xforms:submission attribute) More... | |
Protected Attributes inherited from xmloff::OElementImport | |
OUString | m_sServiceName |
OUString | m_sName |
OFormLayerXMLImport_Impl & | m_rFormImport |
IEventAttacherManager & | m_rEventManager |
const XMLTextStyleContext * | m_pStyleElement |
css::uno::Reference< css::container::XNameContainer > | m_xParentContainer |
the parent container to insert the new element into More... | |
css::uno::Reference< css::beans::XPropertySet > | m_xElement |
the element we're creating. Valid after StartElement More... | |
css::uno::Reference< css::beans::XPropertySetInfo > | m_xInfo |
bool | m_bImplicitGenericAttributeHandling |
Protected Attributes inherited from xmloff::OPropertyImport | |
PropertyValueArray | m_aValues |
PropertyValueArray | m_aGenericValues |
o3tl::sorted_vector< sal_Int32 > | m_aEncounteredAttributes |
OFormLayerXMLImport_Impl & | m_rContext |
bool | m_bTrackAttributes |
A specialized version of the <type>OControlImport</type> class, which handles attributes / sub elements which are special to list and combo boxes.
Definition at line 435 of file elementimport.hxx.
xmloff::OListAndComboImport::OListAndComboImport | ( | OFormLayerXMLImport_Impl & | _rImport, |
IEventAttacherManager & | _rEventManager, | ||
const css::uno::Reference< css::container::XNameContainer > & | _rxParentContainer, | ||
OControlElement::ElementType | _eType | ||
) |
<TRUE> if and only if we should use a cell value binding which exchanges the selection index (instead of the selection text
Definition at line 1477 of file elementimport.cxx.
References xmloff::OControlElement::COMBOBOX, xmloff::OPropertyImport::enableTrackAttributes(), and xmloff::OControlImport::m_eElementType.
|
overridevirtual |
Reimplemented from xmloff::OElementImport.
Definition at line 1490 of file elementimport.cxx.
References xmloff::OElementImport::createFastChildContext(), SvXMLImportContext::GetImport(), OComboItemImport, OListOptionImport, TOKEN_MASK, xmloff::token::XML_ITEM, and xmloff::token::XML_OPTION.
|
overridevirtual |
registers the given cell address as value binding address for our element
The default implementation simply calls registerCellValueBinding at our import context, but you may want to override this behaviour.
_rBoundCellAddress | the cell address to register for our element. Must not be <NULL>. @precond we have a valid element (m_xElement) |
Reimplemented from xmloff::OControlImport.
Definition at line 1567 of file elementimport.cxx.
References xmloff::OControlImport::doRegisterCellValueBinding(), and m_bLinkWithIndexes.
|
overridevirtual |
endFastElement is called before a context will be destructed, but after an elements context has been parsed.
It may be used for actions that require virtual methods. The default is to do nothing.
Reimplemented from xmloff::OControlImport.
Definition at line 1524 of file elementimport.cxx.
References comphelper::containerToSequence(), xmloff::OControlImport::endFastElement(), xmloff::OPropertyImport::implPushBackPropertyValue(), xmloff::OControlElement::LISTBOX, m_aDefaultSelectedSeq, m_aListSource, m_aSelectedSeq, m_aValueList, m_bEncounteredLSAttrib, xmloff::OControlImport::m_eElementType, m_nEmptyListItems, m_nEmptyValueItems, xmloff::OPropertyImport::m_rContext, m_sCellListSource, xmloff::OElementImport::m_xElement, xmloff::PROPERTY_DEFAULT_SELECT_SEQ, xmloff::PROPERTY_LISTSOURCE, xmloff::PROPERTY_SELECT_SEQ, xmloff::PROPERTY_STRING_ITEM_LIST, and xmloff::OFormLayerXMLImport_Impl::registerCellRangeListSource().
|
overridevirtual |
handle one single attribute.
This is called for every attribute of the element. This class' implementation checks if the attribute describes a property, if so, it is added to <member>m_aValues</member>.
All non-property attributes should be handled in derived classes.
_nNamespaceKey | key of the namespace used in the attribute |
_rLocalName | local (relative to the namespace) attribute name |
_rValue | attribute value |
Reimplemented from xmloff::OControlImport.
Definition at line 1582 of file elementimport.cxx.
References xmloff::aListLinkageMap, xmloff::OControlElement::COMBOBOX, xmloff::PropertyConversion::convertString(), xmloff::OAttributeMetaData::getBindingAttributeToken(), xmloff::OAttributeMetaData::getDatabaseAttributeToken(), xmloff::OControlImport::handleAttribute(), xmloff::OPropertyImport::implPushBackPropertyValue(), ListCellRange, ListLinkingType, ListSource, m_bEncounteredLSAttrib, m_bLinkWithIndexes, xmloff::OControlImport::m_eElementType, m_sCellListSource, xmloff::PROPERTY_LISTSOURCE, and TOKEN_MASK.
|
protected |
Definition at line 1672 of file elementimport.cxx.
References m_aDefaultSelectedSeq, m_aListSource, m_aValueList, m_nEmptyListItems, and m_nEmptyValueItems.
|
protected |
Definition at line 1653 of file elementimport.cxx.
References m_nEmptyListItems.
|
protected |
Definition at line 1658 of file elementimport.cxx.
References m_nEmptyValueItems.
|
protected |
Definition at line 1631 of file elementimport.cxx.
References m_aListSource, and m_nEmptyListItems.
|
protected |
Definition at line 1638 of file elementimport.cxx.
References m_aValueList, m_bEncounteredLSAttrib, and m_nEmptyValueItems.
|
protected |
Definition at line 1663 of file elementimport.cxx.
References m_aListSource, m_aSelectedSeq, m_aValueList, m_nEmptyListItems, and m_nEmptyValueItems.
|
overridevirtual |
Reimplemented from xmloff::OControlImport.
Definition at line 1506 of file elementimport.cxx.
References AutoCompletion, xmloff::OControlElement::COMBOBOX, ConvertEmpty, xmloff::OAttributeMetaData::getDatabaseAttributeToken(), xmloff::OAttributeMetaData::getSpecialAttributeToken(), m_bLinkWithIndexes, xmloff::OControlImport::m_eElementType, xmloff::PROPERTY_AUTOCOMPLETE, xmloff::PROPERTY_EMPTY_IS_NULL, xmloff::OElementImport::simulateDefaultedAttribute(), and xmloff::OControlImport::startFastElement().
|
friend |
Definition at line 438 of file elementimport.hxx.
Referenced by createFastChildContext().
|
friend |
Definition at line 437 of file elementimport.hxx.
Referenced by createFastChildContext().
|
private |
Definition at line 448 of file elementimport.hxx.
Referenced by endFastElement(), and implDefaultSelectCurrentItem().
|
private |
Definition at line 441 of file elementimport.hxx.
Referenced by endFastElement(), implDefaultSelectCurrentItem(), implPushBackLabel(), and implSelectCurrentItem().
|
private |
Definition at line 446 of file elementimport.hxx.
Referenced by endFastElement(), and implSelectCurrentItem().
|
private |
Definition at line 443 of file elementimport.hxx.
Referenced by endFastElement(), implDefaultSelectCurrentItem(), implPushBackValue(), and implSelectCurrentItem().
|
private |
number of empty value items encountered during reading
Definition at line 455 of file elementimport.hxx.
Referenced by endFastElement(), handleAttribute(), and implPushBackValue().
|
private |
Definition at line 456 of file elementimport.hxx.
Referenced by doRegisterCellValueBinding(), handleAttribute(), and startFastElement().
|
private |
the cell range which acts as list source for the control
Definition at line 452 of file elementimport.hxx.
Referenced by endFastElement(), implDefaultSelectCurrentItem(), implEmptyLabelFound(), implPushBackLabel(), and implSelectCurrentItem().
|
private |
number of empty list items encountered during reading
Definition at line 453 of file elementimport.hxx.
Referenced by endFastElement(), implDefaultSelectCurrentItem(), implEmptyValueFound(), implPushBackValue(), and implSelectCurrentItem().
|
private |
Definition at line 450 of file elementimport.hxx.
Referenced by endFastElement(), and handleAttribute().