Kaydet (Commit) 02944a63 authored tarafından Miklos Vajna's avatar Miklos Vajna

xmloff: remove no longer needed XMLFORM_CONSTASCII_STRING macro

Change-Id: I92a341ccafb018b10e884bbaec07574b706a02b4
üst 8fad9220
...@@ -36,8 +36,8 @@ namespace xmloff ...@@ -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_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( 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.ascii, name.length, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, 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 } #define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
XMLPropertyMapEntry* getControlStylePropertyMap_Access( ) XMLPropertyMapEntry* getControlStylePropertyMap_Access( )
......
...@@ -181,7 +181,7 @@ namespace xmloff ...@@ -181,7 +181,7 @@ namespace xmloff
::rtl::OUString sToWriteServiceName = sServiceName; ::rtl::OUString sToWriteServiceName = sServiceName;
#define CHECK_N_TRANSLATE( name ) \ #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 sToWriteServiceName = SERVICE_##name
if (sal_False) if (sal_False)
...@@ -206,7 +206,7 @@ namespace xmloff ...@@ -206,7 +206,7 @@ namespace xmloff
CHECK_N_TRANSLATE( HIDDENCONTROL ); CHECK_N_TRANSLATE( HIDDENCONTROL );
CHECK_N_TRANSLATE( IMAGECONTROL ); CHECK_N_TRANSLATE( IMAGECONTROL );
CHECK_N_TRANSLATE( FORMATTEDFIELD ); 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 // special handling for the edit field: we have two controls using this as persistence service name
sToWriteServiceName = SERVICE_EDIT; sToWriteServiceName = SERVICE_EDIT;
...@@ -573,7 +573,7 @@ namespace xmloff ...@@ -573,7 +573,7 @@ namespace xmloff
// the names of all properties which are expected to be of type string // the names of all properties which are expected to be of type string
static ::rtl::OUString aStringPropertyNames[] = static ::rtl::OUString aStringPropertyNames[] =
{ {
PROPERTY_LABEL, PROPERTY_TITLE OUString(PROPERTY_LABEL), OUString(PROPERTY_TITLE)
}; };
OSL_ENSURE( sizeof(aStringPropertyNames)/sizeof(aStringPropertyNames[0]) == OSL_ENSURE( sizeof(aStringPropertyNames)/sizeof(aStringPropertyNames[0]) ==
sizeof(nStringPropertyAttributeIds)/sizeof(nStringPropertyAttributeIds[0]), sizeof(nStringPropertyAttributeIds)/sizeof(nStringPropertyAttributeIds[0]),
...@@ -601,9 +601,12 @@ namespace xmloff ...@@ -601,9 +601,12 @@ namespace xmloff
{ // attribute flags { // attribute flags
CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP, CCA_ENABLEVISIBLE 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 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[] = static sal_Bool nBooleanPropertyAttrFlags[] =
{ // attribute defaults { // attribute defaults
...@@ -640,9 +643,9 @@ namespace xmloff ...@@ -640,9 +643,9 @@ namespace xmloff
{ // attribute flags { // attribute flags
CCA_SIZE, CCA_TAB_INDEX CCA_SIZE, CCA_TAB_INDEX
}; };
static const ConstAsciiString pIntegerPropertyNames[] = static const OUString pIntegerPropertyNames[] =
{ // property names { // property names
PROPERTY_LINECOUNT, PROPERTY_TABINDEX OUString(PROPERTY_LINECOUNT), OUString(PROPERTY_TABINDEX)
}; };
static const sal_Int16 nIntegerPropertyAttrDefaults[] = static const sal_Int16 nIntegerPropertyAttrDefaults[] =
{ // attribute defaults { // attribute defaults
...@@ -990,12 +993,10 @@ namespace xmloff ...@@ -990,12 +993,10 @@ namespace xmloff
// be 0 now ... // be 0 now ...
} }
//---------------------------------------------------------------------
void OControlExport::exportSpecialAttributes() void OControlExport::exportSpecialAttributes()
{ {
sal_Int32 i=0; sal_Int32 i=0;
// ----------------------
// the boolean properties // the boolean properties
{ {
static const sal_Int32 nBooleanPropertyAttributeIds[] = static const sal_Int32 nBooleanPropertyAttributeIds[] =
...@@ -1003,10 +1004,13 @@ namespace xmloff ...@@ -1003,10 +1004,13 @@ namespace xmloff
SCA_VALIDATION, SCA_MULTI_LINE, SCA_AUTOMATIC_COMPLETION, SCA_MULTIPLE, SCA_DEFAULT_BUTTON, SCA_IS_TRISTATE, SCA_VALIDATION, SCA_MULTI_LINE, SCA_AUTOMATIC_COMPLETION, SCA_MULTIPLE, SCA_DEFAULT_BUTTON, SCA_IS_TRISTATE,
SCA_TOGGLE, SCA_FOCUS_ON_CLICK SCA_TOGGLE, SCA_FOCUS_ON_CLICK
}; };
static const ConstAsciiString pBooleanPropertyNames[] = static const OUString pBooleanPropertyNames[] =
{ // property names { // property names
PROPERTY_STRICTFORMAT, PROPERTY_MULTILINE, PROPERTY_AUTOCOMPLETE, PROPERTY_MULTISELECTION, PROPERTY_DEFAULTBUTTON, PROPERTY_TRISTATE, OUString(PROPERTY_STRICTFORMAT), OUString(PROPERTY_MULTILINE),
PROPERTY_TOGGLE, PROPERTY_FOCUS_ON_CLICK 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]); sal_Int32 nIdCount = sizeof(nBooleanPropertyAttributeIds) / sizeof(nBooleanPropertyAttributeIds[0]);
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
...@@ -1033,16 +1037,15 @@ namespace xmloff ...@@ -1033,16 +1037,15 @@ namespace xmloff
} }
} }
// ----------------------
// the integer properties // the integer properties
{ {
static sal_Int32 nIntegerPropertyAttributeIds[] = static sal_Int32 nIntegerPropertyAttributeIds[] =
{ // attribute flags { // attribute flags
SCA_PAGE_STEP_SIZE SCA_PAGE_STEP_SIZE
}; };
static const ConstAsciiString pIntegerPropertyNames[] = static const OUString pIntegerPropertyNames[] =
{ // property names { // property names
PROPERTY_BLOCK_INCREMENT OUString(PROPERTY_BLOCK_INCREMENT)
}; };
static const sal_Int32 nIntegerPropertyAttrDefaults[] = static const sal_Int32 nIntegerPropertyAttrDefaults[] =
{ // attribute defaults (XML defaults, not runtime defaults!) { // attribute defaults (XML defaults, not runtime defaults!)
...@@ -1195,9 +1198,9 @@ namespace xmloff ...@@ -1195,9 +1198,9 @@ namespace xmloff
{ // attribute flags { // attribute flags
SCA_GROUP_NAME SCA_GROUP_NAME
}; };
static const ConstAsciiString pStringPropertyNames[] = static const OUString pStringPropertyNames[] =
{ // property names { // property names
PROPERTY_GROUP_NAME OUString(PROPERTY_GROUP_NAME)
}; };
sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] ); sal_Int32 nIdCount = sizeof( nStringPropertyAttributeIds ) / sizeof( nStringPropertyAttributeIds[0] );
...@@ -2162,7 +2165,7 @@ namespace xmloff ...@@ -2162,7 +2165,7 @@ namespace xmloff
}; };
static ::rtl::OUString aStringPropertyNames[] = 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]); sal_Int32 nIdCount = sizeof(eStringPropertyIds) / sizeof(eStringPropertyIds[0]);
#if OSL_DEBUG_LEVEL > 0 #if OSL_DEBUG_LEVEL > 0
...@@ -2198,16 +2201,20 @@ namespace xmloff ...@@ -2198,16 +2201,20 @@ namespace xmloff
exportedProperty(PROPERTY_DATASOURCENAME); exportedProperty(PROPERTY_DATASOURCENAME);
} }
// ----------------------
// the boolean properties // the boolean properties
{ {
static FormAttributes eBooleanPropertyIds[] = static FormAttributes eBooleanPropertyIds[] =
{ {
faAllowDeletes, faAllowInserts, faAllowUpdates, faApplyFilter, faEscapeProcessing, faIgnoreResult 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[] = static sal_Int8 nBooleanPropertyAttrFlags[] =
{ {
...@@ -2229,16 +2236,15 @@ namespace xmloff ...@@ -2229,16 +2236,15 @@ namespace xmloff
); );
} }
// -------------------
// the enum properties // the enum properties
{ {
static FormAttributes eEnumPropertyIds[] = static FormAttributes eEnumPropertyIds[] =
{ {
faEnctype, faMethod, faCommandType, faNavigationMode, faTabbingCycle 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[] = static OEnumMapper::EnumProperties eEnumPropertyMaps[] =
{ {
......
...@@ -983,8 +983,8 @@ namespace xmloff ...@@ -983,8 +983,8 @@ namespace xmloff
{ {
// we have exactly 2 properties where this type class is allowed: // we have exactly 2 properties where this type class is allowed:
OSL_ENSURE( OSL_ENSURE(
(0 == _rPropValue.Name.equalsAsciiL(PROPERTY_EFFECTIVE_VALUE.ascii, PROPERTY_EFFECTIVE_VALUE.length)) (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_VALUE))
|| (0 == _rPropValue.Name.equalsAsciiL(PROPERTY_EFFECTIVE_DEFAULT.ascii, PROPERTY_EFFECTIVE_DEFAULT.length)), || (0 == _rPropValue.Name.equals(PROPERTY_EFFECTIVE_DEFAULT)),
"OControlImport::implTranslateValueProperty: invalid property type/name combination!"); "OControlImport::implTranslateValueProperty: invalid property type/name combination!");
// Both properties are allowed to have a double or a string value, // Both properties are allowed to have a double or a string value,
......
...@@ -56,7 +56,7 @@ namespace xmloff ...@@ -56,7 +56,7 @@ namespace xmloff
sLocalMacroName = pEvents->ScriptCode; sLocalMacroName = pEvents->ScriptCode;
sLibrary = ::rtl::OUString(); 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 { // for StarBasic, the library name is part of the ScriptCode
sal_Int32 nPrefixLen = sLocalMacroName.indexOf( ':' ); sal_Int32 nPrefixLen = sLocalMacroName.indexOf( ':' );
DBG_ASSERT( 0 <= nPrefixLen, "OEventDescriptorMapper::OEventDescriptorMapper: invalid script code prefix!" ); DBG_ASSERT( 0 <= nPrefixLen, "OEventDescriptorMapper::OEventDescriptorMapper: invalid script code prefix!" );
...@@ -64,7 +64,7 @@ namespace xmloff ...@@ -64,7 +64,7 @@ namespace xmloff
{ {
// the export handler for StarBasic expects "StarOffice", not "application" for application modules ... // the export handler for StarBasic expects "StarOffice", not "application" for application modules ...
sLibrary = sLocalMacroName.copy( 0, nPrefixLen ); sLibrary = sLocalMacroName.copy( 0, nPrefixLen );
if (sLibrary.equalsAsciiL(EVENT_APPLICATION.ascii, EVENT_APPLICATION.length)) if (sLibrary.equals(EVENT_APPLICATION))
sLibrary = EVENT_STAROFFICE; sLibrary = EVENT_STAROFFICE;
sLocalMacroName = sLocalMacroName.copy( nPrefixLen + 1 ); sLocalMacroName = sLocalMacroName.copy( nPrefixLen + 1 );
......
...@@ -62,7 +62,7 @@ namespace xmloff ...@@ -62,7 +62,7 @@ namespace xmloff
nSeparatorPos = aEvent->first.indexOf(EVENT_NAME_SEPARATOR); nSeparatorPos = aEvent->first.indexOf(EVENT_NAME_SEPARATOR);
OSL_ENSURE(-1 != nSeparatorPos, "OFormEventsImportContext::EndElement: invalid (unrecognized) event name!"); OSL_ENSURE(-1 != nSeparatorPos, "OFormEventsImportContext::EndElement: invalid (unrecognized) event name!");
pTranslated->ListenerType = aEvent->first.copy(0, nSeparatorPos); 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; ::rtl::OUString sLibrary;
...@@ -71,18 +71,18 @@ namespace xmloff ...@@ -71,18 +71,18 @@ namespace xmloff
pEventDescriptionEnd = pEventDescription + aEvent->second.getLength(); pEventDescriptionEnd = pEventDescription + aEvent->second.getLength();
for (;pEventDescription != pEventDescriptionEnd; ++pEventDescription) for (;pEventDescription != pEventDescriptionEnd; ++pEventDescription)
{ {
if ((pEventDescription->Name.equalsAsciiL(EVENT_LOCALMACRONAME.ascii, EVENT_LOCALMACRONAME.length)) || if ((pEventDescription->Name.equals(EVENT_LOCALMACRONAME)) ||
(pEventDescription->Name.equalsAsciiL(EVENT_SCRIPTURL.ascii, EVENT_SCRIPTURL.length))) (pEventDescription->Name.equals(EVENT_SCRIPTURL)))
pEventDescription->Value >>= pTranslated->ScriptCode; 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; 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; 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; sLibrary = EVENT_APPLICATION;
if ( !sLibrary.isEmpty() ) if ( !sLibrary.isEmpty() )
......
...@@ -166,7 +166,7 @@ Reference< XValueBinding > FormCellBindingHelper::createCellBindingFromStringAdd ...@@ -166,7 +166,7 @@ Reference< XValueBinding > FormCellBindingHelper::createCellBindingFromStringAdd
return xBinding; return xBinding;
xBinding = xBinding.query( createDocumentDependentInstance( xBinding = xBinding.query( createDocumentDependentInstance(
_bUseIntegerBinding ? SERVICE_LISTINDEXCELLBINDING : SERVICE_CELLVALUEBINDING, _bUseIntegerBinding ? OUString(SERVICE_LISTINDEXCELLBINDING) : OUString(SERVICE_CELLVALUEBINDING),
PROPERTY_BOUND_CELL, PROPERTY_BOUND_CELL,
makeAny( aAddress ) makeAny( aAddress )
) ); ) );
...@@ -451,7 +451,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri ...@@ -451,7 +451,7 @@ bool FormCellBindingHelper::doConvertAddressRepresentations( const ::rtl::OUStri
Reference< XPropertySet > xConverter( Reference< XPropertySet > xConverter(
createDocumentDependentInstance( createDocumentDependentInstance(
_bIsRange ? SERVICE_RANGEADDRESS_CONVERSION : SERVICE_ADDRESS_CONVERSION, _bIsRange ? OUString(SERVICE_RANGEADDRESS_CONVERSION) : OUString(SERVICE_ADDRESS_CONVERSION),
::rtl::OUString(), ::rtl::OUString(),
Any() Any()
), ),
......
...@@ -417,7 +417,7 @@ namespace xmloff ...@@ -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 ); DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString );
......
...@@ -62,7 +62,7 @@ namespace xmloff ...@@ -62,7 +62,7 @@ namespace xmloff
StringSet m_aRemainingProps; StringSet m_aRemainingProps;
// see examinePersistence // see examinePersistence
void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); void exportRelativeTargetLocation(const OUString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType);
protected: protected:
IFormsExportContext& m_rContext; IFormsExportContext& m_rContext;
......
This diff is collapsed.
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "valueproperties.hxx" #include "valueproperties.hxx"
#include "strings.hxx" #include "strings.hxx"
#include <com/sun/star/form/FormComponentType.hpp> #include <com/sun/star/form/FormComponentType.hpp>
#include <sal/log.hxx>
//......................................................................... //.........................................................................
namespace xmloff namespace xmloff
...@@ -43,54 +44,54 @@ namespace xmloff ...@@ -43,54 +44,54 @@ namespace xmloff
case FormComponentType::TEXTFIELD: case FormComponentType::TEXTFIELD:
if (OControlElement::FORMATTED_TEXT == _eType) if (OControlElement::FORMATTED_TEXT == _eType)
{ {
_rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; _rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE;
_rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; _rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT;
} }
else else
{ {
if (OControlElement::PASSWORD != _eType) if (OControlElement::PASSWORD != _eType)
// no CurrentValue" for passwords // no CurrentValue" for passwords
_rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; _rpCurrentValuePropertyName = PROPERTY_TEXT;
_rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; _rpValuePropertyName = PROPERTY_DEFAULT_TEXT;
} }
break; break;
case FormComponentType::NUMERICFIELD: case FormComponentType::NUMERICFIELD:
case FormComponentType::CURRENCYFIELD: case FormComponentType::CURRENCYFIELD:
_rpCurrentValuePropertyName = PROPERTY_VALUE.ascii; _rpCurrentValuePropertyName = PROPERTY_VALUE;
_rpValuePropertyName = PROPERTY_DEFAULT_VALUE.ascii; _rpValuePropertyName = PROPERTY_DEFAULT_VALUE;
break; break;
case FormComponentType::PATTERNFIELD: case FormComponentType::PATTERNFIELD:
case FormComponentType::FILECONTROL: case FormComponentType::FILECONTROL:
case FormComponentType::COMBOBOX: case FormComponentType::COMBOBOX:
_rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; _rpValuePropertyName = PROPERTY_DEFAULT_TEXT;
// NO BREAK!! // NO BREAK!!
case FormComponentType::COMMANDBUTTON: case FormComponentType::COMMANDBUTTON:
_rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; _rpCurrentValuePropertyName = PROPERTY_TEXT;
break; break;
case FormComponentType::CHECKBOX: case FormComponentType::CHECKBOX:
case FormComponentType::RADIOBUTTON: case FormComponentType::RADIOBUTTON:
_rpValuePropertyName = PROPERTY_REFVALUE.ascii; _rpValuePropertyName = PROPERTY_REFVALUE;
break; break;
case FormComponentType::HIDDENCONTROL: case FormComponentType::HIDDENCONTROL:
_rpValuePropertyName = PROPERTY_HIDDEN_VALUE.ascii; _rpValuePropertyName = PROPERTY_HIDDEN_VALUE;
break; break;
case FormComponentType::SCROLLBAR: case FormComponentType::SCROLLBAR:
_rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE.ascii; _rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE;
_rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT.ascii; _rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT;
break; break;
case FormComponentType::SPINBUTTON: case FormComponentType::SPINBUTTON:
_rpCurrentValuePropertyName = PROPERTY_SPINVALUE.ascii; _rpCurrentValuePropertyName = PROPERTY_SPINVALUE;
_rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE.ascii; _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE;
break; break;
default: default:
OSL_ENSURE( false, "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" ); SAL_WARN( "xmloff", "OValuePropertiesMetaData::getValuePropertyNames: unsupported component type!" );
break; break;
} }
} }
...@@ -105,27 +106,27 @@ namespace xmloff ...@@ -105,27 +106,27 @@ namespace xmloff
{ {
case FormComponentType::NUMERICFIELD: case FormComponentType::NUMERICFIELD:
case FormComponentType::CURRENCYFIELD: case FormComponentType::CURRENCYFIELD:
_rpMinValuePropertyName = PROPERTY_VALUE_MIN.ascii; _rpMinValuePropertyName = PROPERTY_VALUE_MIN;
_rpMaxValuePropertyName = PROPERTY_VALUE_MAX.ascii; _rpMaxValuePropertyName = PROPERTY_VALUE_MAX;
break; break;
case FormComponentType::TEXTFIELD: case FormComponentType::TEXTFIELD:
_rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN.ascii; _rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN;
_rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX.ascii; _rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX;
break; break;
case FormComponentType::SCROLLBAR: case FormComponentType::SCROLLBAR:
_rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN.ascii; _rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN;
_rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX.ascii; _rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX;
break; break;
case FormComponentType::SPINBUTTON: case FormComponentType::SPINBUTTON:
_rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN.ascii; _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN;
_rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX.ascii; _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX;
break; break;
default: default:
OSL_ENSURE( false, "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" ); SAL_WARN("xmloff", "OValuePropertiesMetaData::getValueLimitPropertyNames: unsupported component type!" );
break; break;
} }
} }
...@@ -142,24 +143,24 @@ namespace xmloff ...@@ -142,24 +143,24 @@ namespace xmloff
case FormComponentType::TEXTFIELD: case FormComponentType::TEXTFIELD:
if (OControlElement::FORMATTED_TEXT == _eType) if (OControlElement::FORMATTED_TEXT == _eType)
{ {
_rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; _rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE;
_rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; _rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT;
} }
else else
{ {
_rpValuePropertyName = PROPERTY_TEXT.ascii; _rpValuePropertyName = PROPERTY_TEXT;
_rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT;
} }
break; break;
case FormComponentType::DATEFIELD: case FormComponentType::DATEFIELD:
_rpValuePropertyName = PROPERTY_DATE.ascii; _rpValuePropertyName = PROPERTY_DATE;
_rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE.ascii; _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE;
break; break;
case FormComponentType::TIMEFIELD: case FormComponentType::TIMEFIELD:
_rpValuePropertyName = PROPERTY_TIME.ascii; _rpValuePropertyName = PROPERTY_TIME;
_rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME.ascii; _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME;
break; break;
case FormComponentType::NUMERICFIELD: case FormComponentType::NUMERICFIELD:
...@@ -176,8 +177,8 @@ namespace xmloff ...@@ -176,8 +177,8 @@ namespace xmloff
case FormComponentType::CHECKBOX: case FormComponentType::CHECKBOX:
case FormComponentType::RADIOBUTTON: case FormComponentType::RADIOBUTTON:
_rpValuePropertyName = PROPERTY_STATE.ascii; _rpValuePropertyName = PROPERTY_STATE;
_rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE.ascii; _rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE;
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment