// any other attributes, which are special to some control types enumclass SCAFlags {
NONE = 0x000000,
EchoChar = 0x000001,
MaxValue = 0x000002,
MinValue = 0x000004,
Validation = 0x000008,
GroupName = 0x000010,
MultiLine = 0x000020,
AutoCompletion = 0x000080,
Multiple = 0x000100,
DefaultButton = 0x000200,
CurrentState = 0x000400,
IsTristate = 0x000800,
State = 0x001000,
ColumnStyleName = 0x002000,
StepSize = 0x004000,
PageStepSize = 0x008000,
RepeatDelay = 0x010000,
Toggle = 0x020000,
FocusOnClick = 0x040000,
ImagePosition = 0x080000
}; namespace o3tl { template<> struct typed_flags<SCAFlags> : is_typed_flags<SCAFlags, 0x0fffbf> {};
}
namespace xmloff
{
/// attributes in the xml tag representing a form enum FormAttributes
{
faName,
faAction,
faEnctype,
faMethod,
faAllowDeletes,
faAllowInserts,
faAllowUpdates,
faApplyFilter,
faCommand,
faCommandType,
faEscapeProcessing,
faDatasource,
faDetailFields,
faFilter,
faIgnoreResult,
faMasterFields,
faNavigationMode,
faOrder,
faTabbingCycle
};
// attributes of the office:forms element enum OfficeFormsAttributes
{
ofaAutomaticFocus,
ofaApplyDesignMode
};
//= OAttributeMetaData /** allows the translation of attribute ids into strings.
<p>Thisclassdoesnotallowtoconnectxmlattributestopropertynamesor somethinglikethat,itonlydealswiththexmlside</p>
*/ class OAttributeMetaData
{ public: /** calculates the xml attribute representation of a common control attribute. @param_nId theidoftheattribute.HastobeoneoftheCCA_*constants.
*/ static OUString getCommonControlAttributeName(CCAFlags _nId);
/** calculates the xml attribute representation of a common control attribute. @param_nId theidoftheattribute.HastobeoneoftheCCA_*constants.
*/ static sal_Int32 getCommonControlAttributeToken(CCAFlags _nId);
/** calculates the xml namespace key to use for a common control attribute @param_nId theidoftheattribute.HastobeoneoftheCCA_*constants.
*/ static sal_uInt16 getCommonControlAttributeNamespace(CCAFlags _nId);
/** retrieves the name of an attribute of a form xml representation @param_eAttrib enumvaluespecifyingtheattribute
*/ static OUString getFormAttributeName(FormAttributes _eAttrib);
/** retrieves the name of an attribute of a form xml representation @param_eAttrib enumvaluespecifyingtheattribute
*/ static sal_Int32 getFormAttributeToken(FormAttributes _eAttrib);
/** calculates the xml namespace key to use for an attribute of a form xml representation @param_eAttrib enumvaluespecifyingtheattribute
*/ static sal_uInt16 getFormAttributeNamespace(FormAttributes _eAttrib);
/** calculates the xml attribute representation of a database attribute. @param_nId theidoftheattribute.HastobeoneoftheDA_*constants.
*/ static OUString getDatabaseAttributeName(DAFlags _nId);
/** calculates the xml attribute representation of a database attribute. @param_nId theidoftheattribute.HastobeoneoftheDA_*constants.
*/ static sal_Int32 getDatabaseAttributeToken(DAFlags _nId);
/** calculates the xml namespace key to use for a database attribute. @param_nId theidoftheattribute.HastobeoneoftheDA_*constants.
*/ static sal_uInt16 getDatabaseAttributeNamespace()
{ // nothing special here return XML_NAMESPACE_FORM;
}
/** calculates the xml attribute representation of a special attribute. @param_nId theidoftheattribute.HastobeoneoftheSCA_*constants.
*/ static OUString getSpecialAttributeName(SCAFlags _nId);
/** calculates the xml attribute representation of a special attribute. @param_nId theidoftheattribute.HastobeoneoftheSCA_*constants.
*/ static sal_Int32 getSpecialAttributeToken(SCAFlags _nId);
/** calculates the xml attribute representation of a binding attribute. @param_nId theidoftheattribute.HastobeoneoftheBA_*constants.
*/ static OUString getBindingAttributeName(BAFlags _nId);
/** calculates the xml attribute representation of a binding attribute. @param_nId theidoftheattribute.HastobeoneoftheBA_*constants.
*/ static sal_Int32 getBindingAttributeToken(BAFlags _nId);
/** calculates the xml namespace key to use for a binding attribute. @param_nId theidoftheattribute.HastobeoneoftheBA_*constants.
*/ static sal_uInt16 getBindingAttributeNamespace()
{ // nothing special here return XML_NAMESPACE_FORM;
}
/** calculates the xml namespace key to use for a special attribute. @param_nId theidoftheattribute.HastobeoneoftheSCA_*constants.
*/ static sal_uInt16 getSpecialAttributeNamespace(SCAFlags _nId);
/** calculates the xml attribute representation of an attribute of the office:forms element @param_nId theidoftheattribute
*/ static OUString getOfficeFormsAttributeName(OfficeFormsAttributes _eAttrib); static xmloff::token::XMLTokenEnum getOfficeFormsAttributeToken(OfficeFormsAttributes _eAttrib);
/** calculates the xml namedspace key of an attribute of the office:forms element @param_nId theidoftheattribute
*/ static sal_uInt16 getOfficeFormsAttributeNamespace()
{ // nothing special here return XML_NAMESPACE_FORM;
}
};
//= OAttribute2Property /** some kind of opposite to the OAttributeMetaData class. Able to translate attributesintopropertynames/types
<p>Theconstructionofthisclassisratherexpensive(oratleastit'sinitializationfromoutside), soitshouldbeshared</p>
*/ class OAttribute2Property final
{ public: // TODO: maybe the following struct should be used for exports, too. In this case we would not need to // store it's instances in a map, but in a vector for faster access. struct AttributeAssignment
{
OUString sPropertyName; // the property name
css::uno::Type aPropertyType; // the property type
// entries which are special to some value types const SvXMLEnumMapEntry<sal_uInt16>*
pEnumMap; // the enum map, if applicable bool bInverseSemantics; // for booleans: attribute and property value have the same or an inverse semantics?
/** add an attribute assignment referring to a string property to the map @param_pAttributeName thenameoftheattribute @param_rPropertyName thenameofthepropertyassignedtotheattribute
*/ void addStringProperty(
sal_Int32 nAttributeToken, const OUString& _rPropertyName);
/** add an attribute assignment referring to a boolean property to the map
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.8Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.