diff options
Diffstat (limited to 'xmloff/source/forms')
-rw-r--r-- | xmloff/source/forms/controlpropertymap.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 54 | ||||
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/eventexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/eventimport.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/forms/formcellbinding.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/strings.hxx | 357 | ||||
-rw-r--r-- | xmloff/source/forms/valueproperties.cxx | 69 |
10 files changed, 252 insertions, 262 deletions
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index d64b33d1178d..2f0dc041bbb2 100644 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.cxx @@ -36,8 +36,8 @@ namespace xmloff //......................................................................... #define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 } -#define MAP_CONST( name, prefix, token, type, context ) { name.ascii, name.length, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 } -#define MAP_CONST_P( name, prefix, token, type, context ) { name.ascii, name.length, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 } +#define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 } +#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 } #define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 } XMLPropertyMapEntry* getControlStylePropertyMap_Access( ) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index d2a2dea0b236..768c76a02158 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -181,7 +181,7 @@ namespace xmloff ::rtl::OUString sToWriteServiceName = sServiceName; #define CHECK_N_TRANSLATE( name ) \ - else if (sServiceName.equalsAsciiL(SERVICE_PERSISTENT_COMPONENT_##name.ascii, SERVICE_PERSISTENT_COMPONENT_##name.length)) \ + else if (sServiceName.equals(SERVICE_PERSISTENT_COMPONENT_##name)) \ sToWriteServiceName = SERVICE_##name if (sal_False) @@ -206,7 +206,7 @@ namespace xmloff CHECK_N_TRANSLATE( HIDDENCONTROL ); CHECK_N_TRANSLATE( IMAGECONTROL ); CHECK_N_TRANSLATE( FORMATTEDFIELD ); - else if (sServiceName.equalsAsciiL(SERVICE_PERSISTENT_COMPONENT_EDIT.ascii, SERVICE_PERSISTENT_COMPONENT_EDIT.length)) + else if (sServiceName.equals(SERVICE_PERSISTENT_COMPONENT_EDIT)) { // special handling for the edit field: we have two controls using this as persistence service name sToWriteServiceName = SERVICE_EDIT; @@ -573,7 +573,7 @@ namespace xmloff // the names of all properties which are expected to be of type string static ::rtl::OUString aStringPropertyNames[] = { - PROPERTY_LABEL, PROPERTY_TITLE + OUString(PROPERTY_LABEL), OUString(PROPERTY_TITLE) }; OSL_ENSURE( sizeof(aStringPropertyNames)/sizeof(aStringPropertyNames[0]) == sizeof(nStringPropertyAttributeIds)/sizeof(nStringPropertyAttributeIds[0]), @@ -601,9 +601,12 @@ namespace xmloff { // attribute flags CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP, CCA_ENABLEVISIBLE }; - static const ConstAsciiString pBooleanPropertyNames[] = + static const OUString pBooleanPropertyNames[] = { // property names - PROPERTY_STATE, PROPERTY_ENABLED, PROPERTY_DROPDOWN, PROPERTY_PRINTABLE, PROPERTY_READONLY, PROPERTY_DEFAULT_STATE, PROPERTY_TABSTOP, PROPERTY_ENABLEVISIBLE + OUString(PROPERTY_STATE), OUString(PROPERTY_ENABLED), + OUString(PROPERTY_DROPDOWN), OUString(PROPERTY_PRINTABLE), + OUString(PROPERTY_READONLY), OUString(PROPERTY_DEFAULT_STATE), + OUString(PROPERTY_TABSTOP), OUString(PROPERTY_ENABLEVISIBLE) }; static sal_Bool nBooleanPropertyAttrFlags[] = { // attribute defaults @@ -640,9 +643,9 @@ namespace xmloff { // attribute flags CCA_SIZE, CCA_TAB_INDEX }; - static const ConstAsciiString pIntegerPropertyNames[] = + static const OUString pIntegerPropertyNames[] = { // property names - PROPERTY_LINECOUNT, PROPERTY_TABINDEX + OUString(PROPERTY_LINECOUNT), OUString(PROPERTY_TABINDEX) }; static const sal_Int16 nIntegerPropertyAttrDefaults[] = { // attribute defaults @@ -990,12 +993,10 @@ namespace xmloff // be 0 now ... } - //--------------------------------------------------------------------- void OControlExport::exportSpecialAttributes() { sal_Int32 i=0; - // ---------------------- // the boolean properties { static const sal_Int32 nBooleanPropertyAttributeIds[] = @@ -1003,10 +1004,13 @@ namespace xmloff SCA_VALIDATION, SCA_MULTI_LINE, SCA_AUTOMATIC_COMPLETION, SCA_MULTIPLE, SCA_DEFAULT_BUTTON, SCA_IS_TRISTATE, SCA_TOGGLE, SCA_FOCUS_ON_CLICK }; - static const ConstAsciiString pBooleanPropertyNames[] = + static const OUString pBooleanPropertyNames[] = { // property names - PROPERTY_STRICTFORMAT, PROPERTY_MULTILINE, PROPERTY_AUTOCOMPLETE, PROPERTY_MULTISELECTION, PROPERTY_DEFAULTBUTTON, PROPERTY_TRISTATE, - PROPERTY_TOGGLE, PROPERTY_FOCUS_ON_CLICK + OUString(PROPERTY_STRICTFORMAT), OUString(PROPERTY_MULTILINE), + OUString(PROPERTY_AUTOCOMPLETE), + OUString(PROPERTY_MULTISELECTION), + OUString(PROPERTY_DEFAULTBUTTON), OUString(PROPERTY_TRISTATE), + OUString(PROPERTY_TOGGLE), OUString(PROPERTY_FOCUS_ON_CLICK) }; sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]); #if OSL_DEBUG_LEVEL > 0 @@ -1033,16 +1037,15 @@ namespace xmloff } } - // ---------------------- // the integer properties { static sal_Int32 nIntegerPropertyAttributeIds[] = { // attribute flags SCA_PAGE_STEP_SIZE }; - static const ConstAsciiString pIntegerPropertyNames[] = + static const OUString pIntegerPropertyNames[] = { // property names - PROPERTY_BLOCK_INCREMENT + OUString(PROPERTY_BLOCK_INCREMENT) }; static const sal_Int32 nIntegerPropertyAttrDefaults[] = { // attribute defaults (XML defaults, not runtime defaults!) @@ -1195,9 +1198,9 @@ namespace xmloff { // attribute flags SCA_GROUP_NAME }; - static const ConstAsciiString pStringPropertyNames[] = + static const OUString pStringPropertyNames[] = { // property names - PROPERTY_GROUP_NAME + OUString(PROPERTY_GROUP_NAME) }; sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] ); @@ -2162,7 +2165,7 @@ namespace xmloff }; static ::rtl::OUString aStringPropertyNames[] = { - PROPERTY_NAME, /*PROPERTY_TARGETURL,*/ PROPERTY_COMMAND, PROPERTY_FILTER, PROPERTY_ORDER + OUString(PROPERTY_NAME), /*OUString(PROPERTY_TARGETURL),*/ OUString(PROPERTY_COMMAND), OUString(PROPERTY_FILTER), OUString(PROPERTY_ORDER) }; sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]); #if OSL_DEBUG_LEVEL > 0 @@ -2198,16 +2201,20 @@ namespace xmloff exportedProperty(PROPERTY_DATASOURCENAME); } - // ---------------------- // the boolean properties { static FormAttributes eBooleanPropertyIds[] = { faAllowDeletes, faAllowInserts, faAllowUpdates, faApplyFilter, faEscapeProcessing, faIgnoreResult }; - static const ConstAsciiString pBooleanPropertyNames[] = + static const OUString pBooleanPropertyNames[] = { - PROPERTY_ALLOWDELETES, PROPERTY_ALLOWINSERTS, PROPERTY_ALLOWUPDATES, PROPERTY_APPLYFILTER, PROPERTY_ESCAPEPROCESSING, PROPERTY_IGNORERESULT + OUString(PROPERTY_ALLOWDELETES), + OUString(PROPERTY_ALLOWINSERTS), + OUString(PROPERTY_ALLOWUPDATES), + OUString(PROPERTY_APPLYFILTER), + OUString(PROPERTY_ESCAPEPROCESSING), + OUString(PROPERTY_IGNORERESULT) }; static sal_Int8 nBooleanPropertyAttrFlags[] = { @@ -2229,16 +2236,15 @@ namespace xmloff ); } - // ------------------- // the enum properties { static FormAttributes eEnumPropertyIds[] = { faEnctype, faMethod, faCommandType, faNavigationMode, faTabbingCycle }; - static const ConstAsciiString pEnumPropertyNames[] = + static const OUString pEnumPropertyNames[] = { - PROPERTY_SUBMIT_ENCODING, PROPERTY_SUBMIT_METHOD, PROPERTY_COMMAND_TYPE, PROPERTY_NAVIGATION, PROPERTY_CYCLE + OUString(PROPERTY_SUBMIT_ENCODING), OUString(PROPERTY_SUBMIT_METHOD), OUString(PROPERTY_COMMAND_TYPE), OUString(PROPERTY_NAVIGATION), OUString(PROPERTY_CYCLE) }; static OEnumMapper::EnumProperties eEnumPropertyMaps[] = { diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index f777cd448f79..559b42764cd0 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -983,8 +983,8 @@ namespace xmloff { // we have exactly 2 properties where this type class is allowed: OSL_ENSURE( - (0 == _rPropValue.Name.equalsAsciiL(PROPERTY_EFFECTIVE_VALUE.ascii, PROPERTY_EFFECTIVE_VALUE.length)) - || (0 == _rPropValue.Name.equalsAsciiL(PROPERTY_EFFECTIVE_DEFAULT.ascii, PROPERTY_EFFECTIVE_DEFAULT.length)), + (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_VALUE)) + || (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_DEFAULT)), "OControlImport::implTranslateValueProperty: invalid property type/name combination!"); // Both properties are allowed to have a double or a string value, diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index 4d5dcd44c441..88cf80c078bb 100644 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.cxx @@ -56,7 +56,7 @@ namespace xmloff sLocalMacroName = pEvents->ScriptCode; sLibrary = ::rtl::OUString(); - if (pEvents->ScriptType.equalsAsciiL(EVENT_STARBASIC.ascii, EVENT_STARBASIC.length)) + if (pEvents->ScriptType.equals(EVENT_STARBASIC)) { // for StarBasic, the library name is part of the ScriptCode sal_Int32 nPrefixLen = sLocalMacroName.indexOf( ':' ); DBG_ASSERT( 0 <= nPrefixLen, "OEventDescriptorMapper::OEventDescriptorMapper: invalid script code prefix!" ); @@ -64,7 +64,7 @@ namespace xmloff { // the export handler for StarBasic expects "StarOffice", not "application" for application modules ... sLibrary = sLocalMacroName.copy( 0, nPrefixLen ); - if (sLibrary.equalsAsciiL(EVENT_APPLICATION.ascii, EVENT_APPLICATION.length)) + if (sLibrary.equals(EVENT_APPLICATION)) sLibrary = EVENT_STAROFFICE; sLocalMacroName = sLocalMacroName.copy( nPrefixLen + 1 ); diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index fba056b21de3..20d184d83c68 100644 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.cxx @@ -62,7 +62,7 @@ namespace xmloff nSeparatorPos = aEvent->first.indexOf(EVENT_NAME_SEPARATOR); OSL_ENSURE(-1 != nSeparatorPos, "OFormEventsImportContext::EndElement: invalid (unrecognized) event name!"); pTranslated->ListenerType = aEvent->first.copy(0, nSeparatorPos); - pTranslated->EventMethod = aEvent->first.copy(nSeparatorPos + EVENT_NAME_SEPARATOR.length); + pTranslated->EventMethod = aEvent->first.copy(nSeparatorPos + sizeof(EVENT_NAME_SEPARATOR) - 1); ::rtl::OUString sLibrary; @@ -71,18 +71,18 @@ namespace xmloff pEventDescriptionEnd = pEventDescription + aEvent->second.getLength(); for (;pEventDescription != pEventDescriptionEnd; ++pEventDescription) { - if ((pEventDescription->Name.equalsAsciiL(EVENT_LOCALMACRONAME.ascii, EVENT_LOCALMACRONAME.length)) || - (pEventDescription->Name.equalsAsciiL(EVENT_SCRIPTURL.ascii, EVENT_SCRIPTURL.length))) + if ((pEventDescription->Name.equals(EVENT_LOCALMACRONAME)) || + (pEventDescription->Name.equals(EVENT_SCRIPTURL))) pEventDescription->Value >>= pTranslated->ScriptCode; - else if (pEventDescription->Name.equalsAsciiL(EVENT_TYPE.ascii, EVENT_TYPE.length)) + else if (pEventDescription->Name.equals(EVENT_TYPE)) pEventDescription->Value >>= pTranslated->ScriptType; - else if (pEventDescription->Name.equalsAsciiL(EVENT_LIBRARY.ascii, EVENT_LIBRARY.length)) + else if (pEventDescription->Name.equals(EVENT_LIBRARY)) pEventDescription->Value >>= sLibrary; } - if (pTranslated->ScriptType.equalsAsciiL(EVENT_STARBASIC.ascii, EVENT_STARBASIC.length)) + if (pTranslated->ScriptType.equals(EVENT_STARBASIC)) { - if (sLibrary.equalsAsciiL(EVENT_STAROFFICE.ascii, EVENT_STAROFFICE.length)) + if (sLibrary.equals(EVENT_STAROFFICE)) sLibrary = EVENT_APPLICATION; if ( !sLibrary.isEmpty() ) diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 9dad10363477..4f0c522ea0f7 100644 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx @@ -166,7 +166,7 @@ Reference< XValueBinding > FormCellBindingHelper::createCellBindingFromStringAdd return xBinding; xBinding = xBinding.query( createDocumentDependentInstance( - _bUseIntegerBinding ? SERVICE_LISTINDEXCELLBINDING : SERVICE_CELLVALUEBINDING, + _bUseIntegerBinding ? OUString(SERVICE_LISTINDEXCELLBINDING) : OUString(SERVICE_CELLVALUEBINDING), PROPERTY_BOUND_CELL, makeAny( aAddress ) ) ); @@ -451,7 +451,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri Reference< XPropertySet > xConverter( createDocumentDependentInstance( - _bIsRange ? SERVICE_RANGEADDRESS_CONVERSION : SERVICE_ADDRESS_CONVERSION, + _bIsRange ? OUString(SERVICE_RANGEADDRESS_CONVERSION) : OUString(SERVICE_ADDRESS_CONVERSION), ::rtl::OUString(), Any() ), diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index ec37ae8f2e69..070a1923db71 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -417,7 +417,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) + void OPropertyExport::exportRelativeTargetLocation(const OUString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) { DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString ); diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index cab0764430d7..315edcee9007 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -62,7 +62,7 @@ namespace xmloff StringSet m_aRemainingProps; // see examinePersistence - void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); + void exportRelativeTargetLocation(const OUString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); protected: IFormsExportContext& m_rContext; diff --git a/xmloff/source/forms/strings.hxx b/xmloff/source/forms/strings.hxx index 1480df1ee16f..3aa99906c8d5 100644 --- a/xmloff/source/forms/strings.hxx +++ b/xmloff/source/forms/strings.hxx @@ -20,208 +20,191 @@ #ifndef _XMLOFF_FORMS_STRINGS_HXX_ #define _XMLOFF_FORMS_STRINGS_HXX_ -#include <comphelper/string.hxx> - -//......................................................................... namespace xmloff { - using comphelper::string::ConstAsciiString; -//......................................................................... - -#ifndef XMLFORM_IMPLEMENT_STRINGS - #define XMLFORM_CONSTASCII_STRING(ident, string) extern const ConstAsciiString ident -#else -#define XMLFORM_CONSTASCII_STRING(ident, string) extern const ConstAsciiString ident = {RTL_CONSTASCII_STRINGPARAM(string)} -#endif - - //============================================================ - //= string constants - //============================================================ // properties - XMLFORM_CONSTASCII_STRING( PROPERTY_CLASSID, "ClassId" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ECHOCHAR, "EchoChar" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_MULTILINE, "MultiLine" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_NAME, "Name" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGEURL, "ImageURL" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_LABEL, "Label" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_TARGETFRAME, "TargetFrame" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_TARGETURL, "TargetURL" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_TITLE, "Tag" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_DROPDOWN, "Dropdown" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_PRINTABLE, "Printable" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_READONLY, "ReadOnly" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_STATE, "DefaultState" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_TABSTOP, "Tabstop" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_STATE, "State" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ENABLED, "Enabled" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ENABLEVISIBLE, "EnableVisible" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_MAXTEXTLENGTH, "MaxTextLen" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_LINECOUNT, "LineCount" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_TABINDEX, "TabIndex" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_COMMAND, "Command" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATASOURCENAME, "DataSourceName" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_FILTER, "Filter" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ORDER, "Order" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWDELETES, "AllowDeletes" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWINSERTS, "AllowInserts" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ALLOWUPDATES, "AllowUpdates" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_APPLYFILTER, "ApplyFilter" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_ESCAPEPROCESSING, "EscapeProcessing" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_IGNORERESULT, "IgnoreResult" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_SUBMIT_ENCODING, "SubmitEncoding" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_SUBMIT_METHOD, "SubmitMethod" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_COMMAND_TYPE, "CommandType" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_NAVIGATION, "NavigationBarMode" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_CYCLE, "Cycle" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_BUTTONTYPE, "ButtonType" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATAFIELD, "DataField" ); - XMLFORM_CONSTASCII_STRING( PROPERTY_BOUNDCOLUMN, "BoundColumn"); - XMLFORM_CONSTASCII_STRING( PROPERTY_EMPTY_IS_NULL, "ConvertEmptyToNull"); - XMLFORM_CONSTASCII_STRING( PROPERTY_INPUT_REQUIRED, "InputRequired"); - XMLFORM_CONSTASCII_STRING( PROPERTY_LISTSOURCE, "ListSource"); - XMLFORM_CONSTASCII_STRING( PROPERTY_LISTSOURCETYPE, "ListSourceType"); - XMLFORM_CONSTASCII_STRING( PROPERTY_ECHO_CHAR, "EchoChar"); - XMLFORM_CONSTASCII_STRING( PROPERTY_STRICTFORMAT, "StrictFormat"); - XMLFORM_CONSTASCII_STRING( PROPERTY_AUTOCOMPLETE, "Autocomplete"); - XMLFORM_CONSTASCII_STRING( PROPERTY_MULTISELECTION, "MultiSelection"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULTBUTTON, "DefaultButton"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TRISTATE, "TriState"); - XMLFORM_CONSTASCII_STRING( PROPERTY_CONTROLLABEL, "LabelControl"); - XMLFORM_CONSTASCII_STRING( PROPERTY_STRING_ITEM_LIST, "StringItemList"); - XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_SEQ, "ValueItemList"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_SELECT_SEQ, "DefaultSelection"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SELECT_SEQ, "SelectedItems"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATE_MIN, "DateMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATE_MAX, "DateMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TIME_MIN, "TimeMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TIME_MAX, "TimeMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_MIN, "ValueMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE_MAX, "ValueMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MIN, "EffectiveMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_MAX, "EffectiveMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_DATE, "DefaultDate"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATE, "Date"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_TIME, "DefaultTime"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TIME, "Time"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_VALUE, "DefaultValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_VALUE, "Value"); - XMLFORM_CONSTASCII_STRING( PROPERTY_HIDDEN_VALUE, "HiddenValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_TEXT, "DefaultText"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TEXT, "Text"); - XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_VALUE, "EffectiveValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_EFFECTIVE_DEFAULT, "EffectiveDefault"); - XMLFORM_CONSTASCII_STRING( PROPERTY_REFVALUE, "RefValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_URL, "URL"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FONT, "FontDescriptor"); - XMLFORM_CONSTASCII_STRING( PROPERTY_BACKGROUNDCOLOR, "BackgroundColor"); - XMLFORM_CONSTASCII_STRING( PROPERTY_MASTERFIELDS, "MasterFields"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DETAILFIELDS, "DetailFields"); - XMLFORM_CONSTASCII_STRING( PROPERTY_COLUMNSERVICENAME, "ColumnServiceName"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATKEY, "FormatKey"); - XMLFORM_CONSTASCII_STRING( PROPERTY_ALIGN, "Align"); - XMLFORM_CONSTASCII_STRING( PROPERTY_BORDER, "Border"); - XMLFORM_CONSTASCII_STRING( PROPERTY_AUTOCONTROLFOCUS, "AutomaticControlFocus"); - XMLFORM_CONSTASCII_STRING( PROPERTY_APPLYDESIGNMODE, "ApplyFormDesignMode"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATSSUPPLIER, "FormatsSupplier"); - XMLFORM_CONSTASCII_STRING( PROPERTY_LOCALE, "Locale"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FORMATSTRING, "FormatString"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DATEFORMAT, "DateFormat"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TIMEFORMAT, "TimeFormat"); - XMLFORM_CONSTASCII_STRING( PROPERTY_PERSISTENCE_MAXTEXTLENGTH, "PersistenceMaxTextLength"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MIN, "ScrollValueMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_MAX, "ScrollValueMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE, "ScrollValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SCROLLVALUE_DEFAULT,"DefaultScrollValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_LINE_INCREMENT, "LineIncrement"); - XMLFORM_CONSTASCII_STRING( PROPERTY_BLOCK_INCREMENT, "BlockIncrement"); - XMLFORM_CONSTASCII_STRING( PROPERTY_REPEAT_DELAY, "RepeatDelay"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE, "SpinValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE_MIN, "SpinValueMin"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SPINVALUE_MAX, "SpinValueMax"); - XMLFORM_CONSTASCII_STRING( PROPERTY_DEFAULT_SPINVALUE, "DefaultSpinValue"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SPIN_INCREMENT, "SpinIncrement"); - XMLFORM_CONSTASCII_STRING( PROPERTY_ORIENTATION, "Orientation"); - XMLFORM_CONSTASCII_STRING( PROPERTY_TOGGLE, "Toggle"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FOCUS_ON_CLICK, "FocusOnClick"); - XMLFORM_CONSTASCII_STRING( PROPERTY_VISUAL_EFFECT, "VisualEffect"); - XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_POSITION, "ImagePosition"); - XMLFORM_CONSTASCII_STRING( PROPERTY_IMAGE_ALIGN, "ImageAlign"); - XMLFORM_CONSTASCII_STRING( PROPERTY_SCALE_IMAGE, "ScaleImage"); - XMLFORM_CONSTASCII_STRING( PROPERTY_GROUP_NAME, "GroupName"); + #define PROPERTY_CLASSID "ClassId" + #define PROPERTY_ECHOCHAR "EchoChar" + #define PROPERTY_MULTILINE "MultiLine" + #define PROPERTY_NAME "Name" + #define PROPERTY_IMAGEURL "ImageURL" + #define PROPERTY_LABEL "Label" + #define PROPERTY_TARGETFRAME "TargetFrame" + #define PROPERTY_TARGETURL "TargetURL" + #define PROPERTY_TITLE "Tag" + #define PROPERTY_DROPDOWN "Dropdown" + #define PROPERTY_PRINTABLE "Printable" + #define PROPERTY_READONLY "ReadOnly" + #define PROPERTY_DEFAULT_STATE "DefaultState" + #define PROPERTY_TABSTOP "Tabstop" + #define PROPERTY_STATE "State" + #define PROPERTY_ENABLED "Enabled" + #define PROPERTY_ENABLEVISIBLE "EnableVisible" + #define PROPERTY_MAXTEXTLENGTH "MaxTextLen" + #define PROPERTY_LINECOUNT "LineCount" + #define PROPERTY_TABINDEX "TabIndex" + #define PROPERTY_COMMAND "Command" + #define PROPERTY_DATASOURCENAME "DataSourceName" + #define PROPERTY_FILTER "Filter" + #define PROPERTY_ORDER "Order" + #define PROPERTY_ALLOWDELETES "AllowDeletes" + #define PROPERTY_ALLOWINSERTS "AllowInserts" + #define PROPERTY_ALLOWUPDATES "AllowUpdates" + #define PROPERTY_APPLYFILTER "ApplyFilter" + #define PROPERTY_ESCAPEPROCESSING "EscapeProcessing" + #define PROPERTY_IGNORERESULT "IgnoreResult" + #define PROPERTY_SUBMIT_ENCODING "SubmitEncoding" + #define PROPERTY_SUBMIT_METHOD "SubmitMethod" + #define PROPERTY_COMMAND_TYPE "CommandType" + #define PROPERTY_NAVIGATION "NavigationBarMode" + #define PROPERTY_CYCLE "Cycle" + #define PROPERTY_BUTTONTYPE "ButtonType" + #define PROPERTY_DATAFIELD "DataField" + #define PROPERTY_BOUNDCOLUMN "BoundColumn" + #define PROPERTY_EMPTY_IS_NULL "ConvertEmptyToNull" + #define PROPERTY_INPUT_REQUIRED "InputRequired" + #define PROPERTY_LISTSOURCE "ListSource" + #define PROPERTY_LISTSOURCETYPE "ListSourceType" + #define PROPERTY_ECHO_CHAR "EchoChar" + #define PROPERTY_STRICTFORMAT "StrictFormat" + #define PROPERTY_AUTOCOMPLETE "Autocomplete" + #define PROPERTY_MULTISELECTION "MultiSelection" + #define PROPERTY_DEFAULTBUTTON "DefaultButton" + #define PROPERTY_TRISTATE "TriState" + #define PROPERTY_CONTROLLABEL "LabelControl" + #define PROPERTY_STRING_ITEM_LIST "StringItemList" + #define PROPERTY_VALUE_SEQ "ValueItemList" + #define PROPERTY_DEFAULT_SELECT_SEQ "DefaultSelection" + #define PROPERTY_SELECT_SEQ "SelectedItems" + #define PROPERTY_DATE_MIN "DateMin" + #define PROPERTY_DATE_MAX "DateMax" + #define PROPERTY_TIME_MIN "TimeMin" + #define PROPERTY_TIME_MAX "TimeMax" + #define PROPERTY_VALUE_MIN "ValueMin" + #define PROPERTY_VALUE_MAX "ValueMax" + #define PROPERTY_EFFECTIVE_MIN "EffectiveMin" + #define PROPERTY_EFFECTIVE_MAX "EffectiveMax" + #define PROPERTY_DEFAULT_DATE "DefaultDate" + #define PROPERTY_DATE "Date" + #define PROPERTY_DEFAULT_TIME "DefaultTime" + #define PROPERTY_TIME "Time" + #define PROPERTY_DEFAULT_VALUE "DefaultValue" + #define PROPERTY_VALUE "Value" + #define PROPERTY_HIDDEN_VALUE "HiddenValue" + #define PROPERTY_DEFAULT_TEXT "DefaultText" + #define PROPERTY_TEXT "Text" + #define PROPERTY_EFFECTIVE_VALUE "EffectiveValue" + #define PROPERTY_EFFECTIVE_DEFAULT "EffectiveDefault" + #define PROPERTY_REFVALUE "RefValue" + #define PROPERTY_URL "URL" + #define PROPERTY_FONT "FontDescriptor" + #define PROPERTY_BACKGROUNDCOLOR "BackgroundColor" + #define PROPERTY_MASTERFIELDS "MasterFields" + #define PROPERTY_DETAILFIELDS "DetailFields" + #define PROPERTY_COLUMNSERVICENAME "ColumnServiceName" + #define PROPERTY_FORMATKEY "FormatKey" + #define PROPERTY_ALIGN "Align" + #define PROPERTY_BORDER "Border" + #define PROPERTY_AUTOCONTROLFOCUS "AutomaticControlFocus" + #define PROPERTY_APPLYDESIGNMODE "ApplyFormDesignMode" + #define PROPERTY_FORMATSSUPPLIER "FormatsSupplier" + #define PROPERTY_LOCALE "Locale" + #define PROPERTY_FORMATSTRING "FormatString" + #define PROPERTY_DATEFORMAT "DateFormat" + #define PROPERTY_TIMEFORMAT "TimeFormat" + #define PROPERTY_PERSISTENCE_MAXTEXTLENGTH "PersistenceMaxTextLength" + #define PROPERTY_SCROLLVALUE_MIN "ScrollValueMin" + #define PROPERTY_SCROLLVALUE_MAX "ScrollValueMax" + #define PROPERTY_SCROLLVALUE "ScrollValue" + #define PROPERTY_SCROLLVALUE_DEFAULT "DefaultScrollValue" + #define PROPERTY_LINE_INCREMENT "LineIncrement" + #define PROPERTY_BLOCK_INCREMENT "BlockIncrement" + #define PROPERTY_REPEAT_DELAY "RepeatDelay" + #define PROPERTY_SPINVALUE "SpinValue" + #define PROPERTY_SPINVALUE_MIN "SpinValueMin" + #define PROPERTY_SPINVALUE_MAX "SpinValueMax" + #define PROPERTY_DEFAULT_SPINVALUE "DefaultSpinValue" + #define PROPERTY_SPIN_INCREMENT "SpinIncrement" + #define PROPERTY_ORIENTATION "Orientation" + #define PROPERTY_TOGGLE "Toggle" + #define PROPERTY_FOCUS_ON_CLICK "FocusOnClick" + #define PROPERTY_VISUAL_EFFECT "VisualEffect" + #define PROPERTY_IMAGE_POSITION "ImagePosition" + #define PROPERTY_IMAGE_ALIGN "ImageAlign" + #define PROPERTY_SCALE_IMAGE "ScaleImage" + #define PROPERTY_GROUP_NAME "GroupName" - XMLFORM_CONSTASCII_STRING( PROPERTY_BOUND_CELL, "BoundCell"); - XMLFORM_CONSTASCII_STRING( PROPERTY_LIST_CELL_RANGE, "CellRange"); - XMLFORM_CONSTASCII_STRING( PROPERTY_ADDRESS, "Address"); - XMLFORM_CONSTASCII_STRING( PROPERTY_FILE_REPRESENTATION,"PersistentRepresentation"); - XMLFORM_CONSTASCII_STRING( PROPERTY_RICH_TEXT, "RichText"); + #define PROPERTY_BOUND_CELL "BoundCell" + #define PROPERTY_LIST_CELL_RANGE "CellRange" + #define PROPERTY_ADDRESS "Address" + #define PROPERTY_FILE_REPRESENTATION "PersistentRepresentation" + #define PROPERTY_RICH_TEXT "RichText" // services - XMLFORM_CONSTASCII_STRING( SERVICE_FORMSCOLLECTION, "com.sun.star.form.Forms" ); - XMLFORM_CONSTASCII_STRING( SERVICE_SPREADSHEET_DOCUMENT, "com.sun.star.sheet.SpreadsheetDocument"); - XMLFORM_CONSTASCII_STRING( SERVICE_CELLVALUEBINDING, "com.sun.star.table.CellValueBinding" ); - XMLFORM_CONSTASCII_STRING( SERVICE_LISTINDEXCELLBINDING, "com.sun.star.table.ListPositionCellBinding" ); - XMLFORM_CONSTASCII_STRING( SERVICE_CELLRANGELISTSOURCE, "com.sun.star.table.CellRangeListSource" ); - XMLFORM_CONSTASCII_STRING( SERVICE_ADDRESS_CONVERSION, "com.sun.star.table.CellAddressConversion"); - XMLFORM_CONSTASCII_STRING( SERVICE_RANGEADDRESS_CONVERSION, "com.sun.star.table.CellRangeAddressConversion"); + #define SERVICE_FORMSCOLLECTION "com.sun.star.form.Forms" + #define SERVICE_SPREADSHEET_DOCUMENT "com.sun.star.sheet.SpreadsheetDocument" + #define SERVICE_CELLVALUEBINDING "com.sun.star.table.CellValueBinding" + #define SERVICE_LISTINDEXCELLBINDING "com.sun.star.table.ListPositionCellBinding" + #define SERVICE_CELLRANGELISTSOURCE "com.sun.star.table.CellRangeListSource" + #define SERVICE_ADDRESS_CONVERSION "com.sun.star.table.CellAddressConversion" + #define SERVICE_RANGEADDRESS_CONVERSION "com.sun.star.table.CellRangeAddressConversion" // old service names (compatibility) - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FORM, "stardiv.one.form.component.Form"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_EDIT, "stardiv.one.form.component.Edit"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_LISTBOX, "stardiv.one.form.component.ListBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_COMBOBOX, "stardiv.one.form.component.ComboBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_RADIOBUTTON, "stardiv.one.form.component.RadioButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_GROUPBOX, "stardiv.one.form.component.GroupBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FIXEDTEXT, "stardiv.one.form.component.FixedText"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_COMMANDBUTTON, "stardiv.one.form.component.CommandButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_CHECKBOX, "stardiv.one.form.component.CheckBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_GRID, "stardiv.one.form.component.Grid"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_IMAGEBUTTON, "stardiv.one.form.component.ImageButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FILECONTROL, "stardiv.one.form.component.FileControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_TIMEFIELD, "stardiv.one.form.component.TimeField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_DATEFIELD, "stardiv.one.form.component.DateField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_NUMERICFIELD, "stardiv.one.form.component.NumericField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_CURRENCYFIELD, "stardiv.one.form.component.CurrencyField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_PATTERNFIELD, "stardiv.one.form.component.PatternField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_HIDDENCONTROL, "stardiv.one.form.component.Hidden"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_IMAGECONTROL, "stardiv.one.form.component.ImageControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_PERSISTENT_COMPONENT_FORMATTEDFIELD, "stardiv.one.form.component.FormattedField"); + #define SERVICE_PERSISTENT_COMPONENT_FORM "stardiv.one.form.component.Form" + #define SERVICE_PERSISTENT_COMPONENT_EDIT "stardiv.one.form.component.Edit" + #define SERVICE_PERSISTENT_COMPONENT_LISTBOX "stardiv.one.form.component.ListBox" + #define SERVICE_PERSISTENT_COMPONENT_COMBOBOX "stardiv.one.form.component.ComboBox" + #define SERVICE_PERSISTENT_COMPONENT_RADIOBUTTON "stardiv.one.form.component.RadioButton" + #define SERVICE_PERSISTENT_COMPONENT_GROUPBOX "stardiv.one.form.component.GroupBox" + #define SERVICE_PERSISTENT_COMPONENT_FIXEDTEXT "stardiv.one.form.component.FixedText" + #define SERVICE_PERSISTENT_COMPONENT_COMMANDBUTTON "stardiv.one.form.component.CommandButton" + #define SERVICE_PERSISTENT_COMPONENT_CHECKBOX "stardiv.one.form.component.CheckBox" + #define SERVICE_PERSISTENT_COMPONENT_GRID "stardiv.one.form.component.Grid" + #define SERVICE_PERSISTENT_COMPONENT_IMAGEBUTTON "stardiv.one.form.component.ImageButton" + #define SERVICE_PERSISTENT_COMPONENT_FILECONTROL "stardiv.one.form.component.FileControl" + #define SERVICE_PERSISTENT_COMPONENT_TIMEFIELD "stardiv.one.form.component.TimeField" + #define SERVICE_PERSISTENT_COMPONENT_DATEFIELD "stardiv.one.form.component.DateField" + #define SERVICE_PERSISTENT_COMPONENT_NUMERICFIELD "stardiv.one.form.component.NumericField" + #define SERVICE_PERSISTENT_COMPONENT_CURRENCYFIELD "stardiv.one.form.component.CurrencyField" + #define SERVICE_PERSISTENT_COMPONENT_PATTERNFIELD "stardiv.one.form.component.PatternField" + #define SERVICE_PERSISTENT_COMPONENT_HIDDENCONTROL "stardiv.one.form.component.Hidden" + #define SERVICE_PERSISTENT_COMPONENT_IMAGECONTROL "stardiv.one.form.component.ImageControl" + #define SERVICE_PERSISTENT_COMPONENT_FORMATTEDFIELD "stardiv.one.form.component.FormattedField" // new service names, the old ones are translated into this new ones - XMLFORM_CONSTASCII_STRING( SERVICE_FORM, "com.sun.star.form.component.Form"); - XMLFORM_CONSTASCII_STRING( SERVICE_EDIT, "com.sun.star.form.component.TextField"); - XMLFORM_CONSTASCII_STRING( SERVICE_LISTBOX, "com.sun.star.form.component.ListBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_COMBOBOX, "com.sun.star.form.component.ComboBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_RADIOBUTTON, "com.sun.star.form.component.RadioButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_GROUPBOX, "com.sun.star.form.component.GroupBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_FIXEDTEXT, "com.sun.star.form.component.FixedText"); - XMLFORM_CONSTASCII_STRING( SERVICE_COMMANDBUTTON, "com.sun.star.form.component.CommandButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_CHECKBOX, "com.sun.star.form.component.CheckBox"); - XMLFORM_CONSTASCII_STRING( SERVICE_GRID, "com.sun.star.form.component.GridControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_IMAGEBUTTON, "com.sun.star.form.component.ImageButton"); - XMLFORM_CONSTASCII_STRING( SERVICE_FILECONTROL, "com.sun.star.form.component.FileControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_TIMEFIELD, "com.sun.star.form.component.TimeField"); - XMLFORM_CONSTASCII_STRING( SERVICE_DATEFIELD, "com.sun.star.form.component.DateField"); - XMLFORM_CONSTASCII_STRING( SERVICE_NUMERICFIELD, "com.sun.star.form.component.NumericField"); - XMLFORM_CONSTASCII_STRING( SERVICE_CURRENCYFIELD, "com.sun.star.form.component.CurrencyField"); - XMLFORM_CONSTASCII_STRING( SERVICE_PATTERNFIELD, "com.sun.star.form.component.PatternField"); - XMLFORM_CONSTASCII_STRING( SERVICE_HIDDENCONTROL, "com.sun.star.form.component.HiddenControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_IMAGECONTROL, "com.sun.star.form.component.DatabaseImageControl"); - XMLFORM_CONSTASCII_STRING( SERVICE_FORMATTEDFIELD, "com.sun.star.form.component.FormattedField" ); + #define SERVICE_FORM "com.sun.star.form.component.Form" + #define SERVICE_EDIT "com.sun.star.form.component.TextField" + #define SERVICE_LISTBOX "com.sun.star.form.component.ListBox" + #define SERVICE_COMBOBOX "com.sun.star.form.component.ComboBox" + #define SERVICE_RADIOBUTTON "com.sun.star.form.component.RadioButton" + #define SERVICE_GROUPBOX "com.sun.star.form.component.GroupBox" + #define SERVICE_FIXEDTEXT "com.sun.star.form.component.FixedText" + #define SERVICE_COMMANDBUTTON "com.sun.star.form.component.CommandButton" + #define SERVICE_CHECKBOX "com.sun.star.form.component.CheckBox" + #define SERVICE_GRID "com.sun.star.form.component.GridControl" + #define SERVICE_IMAGEBUTTON "com.sun.star.form.component.ImageButton" + #define SERVICE_FILECONTROL "com.sun.star.form.component.FileControl" + #define SERVICE_TIMEFIELD "com.sun.star.form.component.TimeField" + #define SERVICE_DATEFIELD "com.sun.star.form.component.DateField" + #define SERVICE_NUMERICFIELD "com.sun.star.form.component.NumericField" + #define SERVICE_CURRENCYFIELD "com.sun.star.form.component.CurrencyField" + #define SERVICE_PATTERNFIELD "com.sun.star.form.component.PatternField" + #define SERVICE_HIDDENCONTROL "com.sun.star.form.component.HiddenControl" + #define SERVICE_IMAGECONTROL "com.sun.star.form.component.DatabaseImageControl" + #define SERVICE_FORMATTEDFIELD "com.sun.star.form.component.FormattedField" // various strings - XMLFORM_CONSTASCII_STRING( EVENT_NAME_SEPARATOR, "::" ); - XMLFORM_CONSTASCII_STRING( EVENT_TYPE, "EventType" ); - XMLFORM_CONSTASCII_STRING( EVENT_LIBRARY, "Library" ); - XMLFORM_CONSTASCII_STRING( EVENT_LOCALMACRONAME, "MacroName" ); - XMLFORM_CONSTASCII_STRING( EVENT_SCRIPTURL, "Script" ); - XMLFORM_CONSTASCII_STRING( EVENT_STAROFFICE, "StarOffice" ); - XMLFORM_CONSTASCII_STRING( EVENT_STARBASIC, "StarBasic" ); - XMLFORM_CONSTASCII_STRING( EVENT_APPLICATION, "application" ); + #define EVENT_NAME_SEPARATOR "::" + #define EVENT_TYPE "EventType" + #define EVENT_LIBRARY "Library" + #define EVENT_LOCALMACRONAME "MacroName" + #define EVENT_SCRIPTURL "Script" + #define EVENT_STAROFFICE "StarOffice" + #define EVENT_STARBASIC "StarBasic" + #define EVENT_APPLICATION "application" -//......................................................................... } // namespace xmloff -//......................................................................... #endif // _XMLOFF_FORMS_STRINGS_HXX_ diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index eeb73ff784fc..1f21541a2e65 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -20,6 +20,7 @@ #include "valueproperties.hxx" #include "strings.hxx" #include <com/sun/star/form/FormComponentType.hpp> +#include <sal/log.hxx> //......................................................................... namespace xmloff @@ -43,54 +44,54 @@ namespace xmloff case FormComponentType::TEXTFIELD: if (OControlElement::FORMATTED_TEXT == _eType) { - _rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; - _rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; + _rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE; + _rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT; } else { if (OControlElement::PASSWORD != _eType) // no CurrentValue" for passwords - _rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; - _rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; + _rpCurrentValuePropertyName = PROPERTY_TEXT; + _rpValuePropertyName = PROPERTY_DEFAULT_TEXT; } break; case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: - _rpCurrentValuePropertyName = PROPERTY_VALUE.ascii; - _rpValuePropertyName = PROPERTY_DEFAULT_VALUE.ascii; + _rpCurrentValuePropertyName = PROPERTY_VALUE; + _rpValuePropertyName = PROPERTY_DEFAULT_VALUE; break; case FormComponentType::PATTERNFIELD: case FormComponentType::FILECONTROL: case FormComponentType::COMBOBOX: - _rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; + _rpValuePropertyName = PROPERTY_DEFAULT_TEXT; // NO BREAK!! case FormComponentType::COMMANDBUTTON: - _rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; + _rpCurrentValuePropertyName = PROPERTY_TEXT; break; case FormComponentType::CHECKBOX: case FormComponentType::RADIOBUTTON: - _rpValuePropertyName = PROPERTY_REFVALUE.ascii; + _rpValuePropertyName = PROPERTY_REFVALUE; break; case FormComponentType::HIDDENCONTROL: - _rpValuePropertyName = PROPERTY_HIDDEN_VALUE.ascii; + _rpValuePropertyName = PROPERTY_HIDDEN_VALUE; break; case FormComponentType::SCROLLBAR: - _rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE.ascii; - _rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT.ascii; + _rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE; + _rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT; break; case FormComponentType::SPINBUTTON: - _rpCurrentValuePropertyName = PROPERTY_SPINVALUE.ascii; - _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE.ascii; + _rpCurrentValuePropertyName = PROPERTY_SPINVALUE; + _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE; break; default: - OSL_ENSURE( false, "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" ); + SAL_WARN( "xmloff", "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" ); break; } } @@ -105,27 +106,27 @@ namespace xmloff { case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: - _rpMinValuePropertyName = PROPERTY_VALUE_MIN.ascii; - _rpMaxValuePropertyName = PROPERTY_VALUE_MAX.ascii; + _rpMinValuePropertyName = PROPERTY_VALUE_MIN; + _rpMaxValuePropertyName = PROPERTY_VALUE_MAX; break; case FormComponentType::TEXTFIELD: - _rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN.ascii; - _rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX.ascii; + _rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN; + _rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX; break; case FormComponentType::SCROLLBAR: - _rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN.ascii; - _rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX.ascii; + _rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN; + _rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX; break; case FormComponentType::SPINBUTTON: - _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN.ascii; - _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX.ascii; + _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN; + _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX; break; default: - OSL_ENSURE( false, "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" ); + SAL_WARN("xmloff", "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" ); break; } } @@ -142,24 +143,24 @@ namespace xmloff case FormComponentType::TEXTFIELD: if (OControlElement::FORMATTED_TEXT == _eType) { - _rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; - _rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; + _rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE; + _rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT; } else { - _rpValuePropertyName = PROPERTY_TEXT.ascii; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; + _rpValuePropertyName = PROPERTY_TEXT; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT; } break; case FormComponentType::DATEFIELD: - _rpValuePropertyName = PROPERTY_DATE.ascii; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE.ascii; + _rpValuePropertyName = PROPERTY_DATE; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE; break; case FormComponentType::TIMEFIELD: - _rpValuePropertyName = PROPERTY_TIME.ascii; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME.ascii; + _rpValuePropertyName = PROPERTY_TIME; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME; break; case FormComponentType::NUMERICFIELD: @@ -176,8 +177,8 @@ namespace xmloff case FormComponentType::CHECKBOX: case FormComponentType::RADIOBUTTON: - _rpValuePropertyName = PROPERTY_STATE.ascii; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE.ascii; + _rpValuePropertyName = PROPERTY_STATE; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE; break; } } |