diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-17 14:00:15 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-17 14:03:26 +0100 |
commit | 5dcf536b69848b56f1199b81e4b7ed87a0a3864d (patch) | |
tree | 86f28d6db1963680549b6111ca99f95ca580f763 /xmloff | |
parent | acd9cda35457f0a839bf9713c261022c39cd8269 (diff) |
merge the 5 ConstAsciiString duplicate classes together
a) merge them together and move it into comphelper
b) turn it into a POD rather than having vast amounts
of destructors registered into the cxa_atexit chain
Change-Id: I04d3b9d7804f8e233013c916df9d617a0f84f96a
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/forms/elementexport.cxx | 52 | ||||
-rw-r--r-- | xmloff/source/forms/eventexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/eventimport.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.cxx | 7 | ||||
-rw-r--r-- | xmloff/source/forms/propertyexport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/strings.hxx | 55 | ||||
-rw-r--r-- | xmloff/source/forms/valueproperties.cxx | 64 |
7 files changed, 73 insertions, 123 deletions
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 4ed795be757c..de85ccfe1e42 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -193,7 +193,7 @@ namespace xmloff ::rtl::OUString sToWriteServiceName = sServiceName; #define CHECK_N_TRANSLATE( name ) \ - else if (0 == sServiceName.compareToAscii(SERVICE_PERSISTENT_COMPONENT_##name)) \ + else if (sServiceName.equalsAsciiL(SERVICE_PERSISTENT_COMPONENT_##name.ascii, SERVICE_PERSISTENT_COMPONENT_##name.length)) \ sToWriteServiceName = SERVICE_##name if (sal_False) @@ -218,8 +218,9 @@ namespace xmloff CHECK_N_TRANSLATE( HIDDENCONTROL ); CHECK_N_TRANSLATE( IMAGECONTROL ); CHECK_N_TRANSLATE( FORMATTEDFIELD ); - else if (0 == sServiceName.compareToAscii(SERVICE_PERSISTENT_COMPONENT_EDIT)) - { // special handling for the edit field: we have two controls using this as persistence service name + else if (sServiceName.equalsAsciiL(SERVICE_PERSISTENT_COMPONENT_EDIT.ascii, SERVICE_PERSISTENT_COMPONENT_EDIT.length)) + { + // special handling for the edit field: we have two controls using this as persistence service name sToWriteServiceName = SERVICE_EDIT; Reference< XServiceInfo > xSI(m_xProps, UNO_QUERY); if (xSI.is() && xSI->supportsService(SERVICE_FORMATTEDFIELD)) @@ -611,9 +612,9 @@ namespace xmloff { // attribute flags CCA_CURRENT_SELECTED, CCA_DISABLED, CCA_DROPDOWN, CCA_PRINTABLE, CCA_READONLY, CCA_SELECTED, CCA_TAB_STOP, CCA_ENABLEVISIBLE }; - static const ::rtl::OUString* pBooleanPropertyNames[] = + static const ConstAsciiString pBooleanPropertyNames[] = { // property names - &PROPERTY_STATE, &PROPERTY_ENABLED, &PROPERTY_DROPDOWN, &PROPERTY_PRINTABLE, &PROPERTY_READONLY, &PROPERTY_DEFAULT_STATE, &PROPERTY_TABSTOP, &PROPERTY_ENABLEVISIBLE + PROPERTY_STATE, PROPERTY_ENABLED, PROPERTY_DROPDOWN, PROPERTY_PRINTABLE, PROPERTY_READONLY, PROPERTY_DEFAULT_STATE, PROPERTY_TABSTOP, PROPERTY_ENABLEVISIBLE }; static sal_Bool nBooleanPropertyAttrFlags[] = { // attribute defaults @@ -632,7 +633,7 @@ namespace xmloff exportBooleanPropertyAttribute( OAttributeMetaData::getCommonControlAttributeNamespace(nBooleanPropertyAttributeIds[i]), OAttributeMetaData::getCommonControlAttributeName(nBooleanPropertyAttributeIds[i]), - *(pBooleanPropertyNames[i]), + pBooleanPropertyNames[i], nBooleanPropertyAttrFlags[i]); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking @@ -650,9 +651,9 @@ namespace xmloff { // attribute flags CCA_SIZE, CCA_TAB_INDEX }; - static const ::rtl::OUString* pIntegerPropertyNames[] = + static const ConstAsciiString pIntegerPropertyNames[] = { // property names - &PROPERTY_LINECOUNT, &PROPERTY_TABINDEX + PROPERTY_LINECOUNT, PROPERTY_TABINDEX }; static const sal_Int16 nIntegerPropertyAttrDefaults[] = { // attribute defaults @@ -675,7 +676,7 @@ namespace xmloff exportInt16PropertyAttribute( OAttributeMetaData::getCommonControlAttributeNamespace(nIntegerPropertyAttributeIds[i]), OAttributeMetaData::getCommonControlAttributeName(nIntegerPropertyAttributeIds[i]), - *(pIntegerPropertyNames[i]), + pIntegerPropertyNames[i], nIntegerPropertyAttrDefaults[i]); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking @@ -1013,10 +1014,10 @@ 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 ::rtl::OUString* pBooleanPropertyNames[] = + static const ConstAsciiString pBooleanPropertyNames[] = { // property names - &PROPERTY_STRICTFORMAT, &PROPERTY_MULTILINE, &PROPERTY_AUTOCOMPLETE, &PROPERTY_MULTISELECTION, &PROPERTY_DEFAULTBUTTON, &PROPERTY_TRISTATE, - &PROPERTY_TOGGLE, &PROPERTY_FOCUS_ON_CLICK + PROPERTY_STRICTFORMAT, PROPERTY_MULTILINE, PROPERTY_AUTOCOMPLETE, PROPERTY_MULTISELECTION, PROPERTY_DEFAULTBUTTON, PROPERTY_TRISTATE, + PROPERTY_TOGGLE, PROPERTY_FOCUS_ON_CLICK }; sal_Int32 nIdCount = SAL_N_ELEMENTS(nBooleanPropertyAttributeIds); #if OSL_DEBUG_LEVEL > 0 @@ -1025,15 +1026,14 @@ namespace xmloff "OControlExport::exportSpecialAttributes: somebody tampered with the maps (1)!"); #endif const sal_Int32* pAttributeId = nBooleanPropertyAttributeIds; - const ::rtl::OUString** pPropertyName = pBooleanPropertyNames; - for ( i = 0; i < nIdCount; ++i, ++pAttributeId, ++pPropertyName ) + for ( i = 0; i < nIdCount; ++i, ++pAttributeId ) { - if ( *pAttributeId& m_nIncludeSpecial) + if ( *pAttributeId & m_nIncludeSpecial) { exportBooleanPropertyAttribute( OAttributeMetaData::getSpecialAttributeNamespace( *pAttributeId ), OAttributeMetaData::getSpecialAttributeName( *pAttributeId ), - *(*pPropertyName), + pBooleanPropertyNames[i], ( *pAttributeId == SCA_FOCUS_ON_CLICK ) ? BOOLATTR_DEFAULT_TRUE : BOOLATTR_DEFAULT_FALSE ); #if OSL_DEBUG_LEVEL > 0 @@ -1051,9 +1051,9 @@ namespace xmloff { // attribute flags SCA_PAGE_STEP_SIZE }; - static const ::rtl::OUString* pIntegerPropertyNames[] = + static const ConstAsciiString pIntegerPropertyNames[] = { // property names - &PROPERTY_BLOCK_INCREMENT + PROPERTY_BLOCK_INCREMENT }; static const sal_Int32 nIntegerPropertyAttrDefaults[] = { // attribute defaults (XML defaults, not runtime defaults!) @@ -1075,7 +1075,7 @@ namespace xmloff exportInt32PropertyAttribute( OAttributeMetaData::getSpecialAttributeNamespace( nIntegerPropertyAttributeIds[i] ), OAttributeMetaData::getSpecialAttributeName( nIntegerPropertyAttributeIds[i] ), - *( pIntegerPropertyNames[i] ), + pIntegerPropertyNames[i], nIntegerPropertyAttrDefaults[i] ); #if OSL_DEBUG_LEVEL > 0 @@ -1206,9 +1206,9 @@ namespace xmloff { // attribute flags SCA_GROUP_NAME }; - static const ::rtl::OUString* pStringPropertyNames[] = + static const ConstAsciiString pStringPropertyNames[] = { // property names - &PROPERTY_GROUP_NAME + PROPERTY_GROUP_NAME }; sal_Int32 nIdCount = SAL_N_ELEMENTS( nStringPropertyAttributeIds ); @@ -1223,7 +1223,7 @@ namespace xmloff exportStringPropertyAttribute( OAttributeMetaData::getSpecialAttributeNamespace( nStringPropertyAttributeIds[i] ), OAttributeMetaData::getSpecialAttributeName( nStringPropertyAttributeIds[i] ), - *( pStringPropertyNames[i] ) + pStringPropertyNames[i] ); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking @@ -2216,9 +2216,9 @@ namespace xmloff { faAllowDeletes, faAllowInserts, faAllowUpdates, faApplyFilter, faEscapeProcessing, faIgnoreResult }; - static const ::rtl::OUString* pBooleanPropertyNames[] = + static const ConstAsciiString pBooleanPropertyNames[] = { - &PROPERTY_ALLOWDELETES, &PROPERTY_ALLOWINSERTS, &PROPERTY_ALLOWUPDATES, &PROPERTY_APPLYFILTER, &PROPERTY_ESCAPEPROCESSING, &PROPERTY_IGNORERESULT + PROPERTY_ALLOWDELETES, PROPERTY_ALLOWINSERTS, PROPERTY_ALLOWUPDATES, PROPERTY_APPLYFILTER, PROPERTY_ESCAPEPROCESSING, PROPERTY_IGNORERESULT }; static sal_Int8 nBooleanPropertyAttrFlags[] = { @@ -2235,7 +2235,7 @@ namespace xmloff exportBooleanPropertyAttribute( OAttributeMetaData::getFormAttributeNamespace(eBooleanPropertyIds[i]), OAttributeMetaData::getFormAttributeName(eBooleanPropertyIds[i]), - *(pBooleanPropertyNames[i]), + pBooleanPropertyNames[i], nBooleanPropertyAttrFlags[i] ); } @@ -2247,7 +2247,7 @@ namespace xmloff { faEnctype, faMethod, faCommandType, faNavigationMode, faTabbingCycle }; - static const sal_Char* pEnumPropertyNames[] = + static const ConstAsciiString pEnumPropertyNames[] = { PROPERTY_SUBMIT_ENCODING, PROPERTY_SUBMIT_METHOD, PROPERTY_COMMAND_TYPE, PROPERTY_NAVIGATION, PROPERTY_CYCLE }; diff --git a/xmloff/source/forms/eventexport.cxx b/xmloff/source/forms/eventexport.cxx index 8a1f9e50026f..945375178c17 100644 --- a/xmloff/source/forms/eventexport.cxx +++ b/xmloff/source/forms/eventexport.cxx @@ -65,7 +65,7 @@ namespace xmloff sLocalMacroName = pEvents->ScriptCode; sLibrary = ::rtl::OUString(); - if ( 0 == pEvents->ScriptType.compareToAscii( EVENT_STARBASIC ) ) + if (pEvents->ScriptType.equalsAsciiL(EVENT_STARBASIC.ascii, EVENT_STARBASIC.length)) { // 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!" ); @@ -73,7 +73,7 @@ namespace xmloff { // the export handler for StarBasic expects "StarOffice", not "application" for application modules ... sLibrary = sLocalMacroName.copy( 0, nPrefixLen ); - if ( sLibrary.equalsAscii( EVENT_APPLICATION ) ) + if (sLibrary.equalsAsciiL(EVENT_APPLICATION.ascii, EVENT_APPLICATION.length)) sLibrary = EVENT_STAROFFICE; sLocalMacroName = sLocalMacroName.copy( nPrefixLen + 1 ); diff --git a/xmloff/source/forms/eventimport.cxx b/xmloff/source/forms/eventimport.cxx index 725d34ae12e3..748ec01b130f 100644 --- a/xmloff/source/forms/eventimport.cxx +++ b/xmloff/source/forms/eventimport.cxx @@ -80,18 +80,18 @@ namespace xmloff pEventDescriptionEnd = pEventDescription + aEvent->second.getLength(); for (;pEventDescription != pEventDescriptionEnd; ++pEventDescription) { - if ((0 == pEventDescription->Name.compareToAscii(EVENT_LOCALMACRONAME)) || - (0 == pEventDescription->Name.compareToAscii(EVENT_SCRIPTURL))) + if ((pEventDescription->Name.equalsAsciiL(EVENT_LOCALMACRONAME.ascii, EVENT_LOCALMACRONAME.length)) || + (pEventDescription->Name.equalsAsciiL(EVENT_SCRIPTURL.ascii, EVENT_SCRIPTURL.length))) pEventDescription->Value >>= pTranslated->ScriptCode; - else if (0 == pEventDescription->Name.compareToAscii(EVENT_TYPE)) + else if (pEventDescription->Name.equalsAsciiL(EVENT_TYPE.ascii, EVENT_TYPE.length)) pEventDescription->Value >>= pTranslated->ScriptType; - else if ( 0 == pEventDescription->Name.compareToAscii( EVENT_LIBRARY ) ) + else if (pEventDescription->Name.equalsAsciiL(EVENT_LIBRARY.ascii, EVENT_LIBRARY.length)) pEventDescription->Value >>= sLibrary; } - if ( 0 == pTranslated->ScriptType.compareToAscii( EVENT_STARBASIC ) ) + if (pTranslated->ScriptType.equalsAsciiL(EVENT_STARBASIC.ascii, EVENT_STARBASIC.length)) { - if ( 0 == sLibrary.compareToAscii( EVENT_STAROFFICE ) ) + if (sLibrary.equalsAsciiL(EVENT_STAROFFICE.ascii, EVENT_STAROFFICE.length)) sLibrary = EVENT_APPLICATION; if ( !sLibrary.isEmpty() ) diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index ecd9276ffc90..4cf9e772ab76 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -377,13 +377,12 @@ namespace xmloff //--------------------------------------------------------------------- void OPropertyExport::exportEnumPropertyAttribute( const sal_uInt16 _nNamespaceKey, const sal_Char* _pAttributeName, - const sal_Char* _pPropertyName, const SvXMLEnumMapEntry* _pValueMap, + const rtl::OUString &rPropertyName, const SvXMLEnumMapEntry* _pValueMap, const sal_Int32 _nDefault, const sal_Bool _bVoidDefault) { // get the value sal_Int32 nCurrentValue(_nDefault); - ::rtl::OUString sPropertyName(::rtl::OUString::createFromAscii(_pPropertyName)); - Any aValue = m_xProps->getPropertyValue(sPropertyName); + Any aValue = m_xProps->getPropertyValue(rPropertyName); if (aValue.hasValue()) { // we have a non-void current value @@ -407,7 +406,7 @@ namespace xmloff } // the property does not need to be handled anymore - exportedProperty(sPropertyName); + exportedProperty(rPropertyName); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 1e3eaab55dd3..2067de0c41ba 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -215,7 +215,7 @@ namespace xmloff void exportEnumPropertyAttribute( const sal_uInt16 _nNamespaceKey, const sal_Char* _pAttributeName, - const sal_Char* _pPropertyName, + const rtl::OUString& _rPropertyName, const SvXMLEnumMapEntry* _pValueMap, const sal_Int32 _nDefault, const sal_Bool _bVoidDefault = sal_False); diff --git a/xmloff/source/forms/strings.hxx b/xmloff/source/forms/strings.hxx index b98cd42f43c7..ea5d8951cb65 100644 --- a/xmloff/source/forms/strings.hxx +++ b/xmloff/source/forms/strings.hxx @@ -29,67 +29,18 @@ #ifndef _XMLOFF_FORMS_STRINGS_HXX_ #define _XMLOFF_FORMS_STRINGS_HXX_ -#include <sal/types.h> -#include <rtl/ustring.hxx> +#include <comphelper/string.hxx> //......................................................................... namespace xmloff { + using comphelper::string::ConstAsciiString; //......................................................................... - //============================================================ - //= a helper for static ascii pseudo-unicode strings - //============================================================ - struct ConstAsciiString - { - const sal_Char* ascii; - sal_Int32 length; - - inline operator const ConstAsciiString* () const { return this; } - inline const ::rtl::OUString* operator& () const; - inline operator const ::rtl::OUString& () const { return *(&(*this)); } - inline operator const sal_Char* () const { return ascii; } - - inline ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength); - inline ~ConstAsciiString(); - - private: - mutable ::rtl::OUString* m_pString; - - private: - ConstAsciiString(); // never implemented - }; - - //------------------------------------------------------------ - inline ConstAsciiString::ConstAsciiString(const sal_Char* _pAsciiZeroTerminated, const sal_Int32 _nLength) - :ascii( _pAsciiZeroTerminated ) - ,length( _nLength ) - ,m_pString( NULL ) - { - } - - //------------------------------------------------------------ - inline ConstAsciiString::~ConstAsciiString() - { - if ( m_pString ) - { - delete m_pString; - m_pString = NULL; - } - } - - //------------------------------------------------------------ - inline const ::rtl::OUString* ConstAsciiString::operator& () const - { - if ( !m_pString ) - m_pString = new ::rtl::OUString( ascii, length, RTL_TEXTENCODING_ASCII_US ); - return m_pString; - } - #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(string, sizeof(string)-1) + #define XMLFORM_CONSTASCII_STRING(ident, string) extern const ConstAsciiString ident = {RTL_CONSTASCII_STRINGPARAM(string)} #endif //============================================================ diff --git a/xmloff/source/forms/valueproperties.cxx b/xmloff/source/forms/valueproperties.cxx index 6b7f9c16e144..a3a95316aeb9 100644 --- a/xmloff/source/forms/valueproperties.cxx +++ b/xmloff/source/forms/valueproperties.cxx @@ -52,50 +52,50 @@ namespace xmloff case FormComponentType::TEXTFIELD: if (OControlElement::FORMATTED_TEXT == _eType) { - _rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE; - _rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT; + _rpCurrentValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; + _rpValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; } else { if (OControlElement::PASSWORD != _eType) // no CurrentValue" for passwords - _rpCurrentValuePropertyName = PROPERTY_TEXT; - _rpValuePropertyName = PROPERTY_DEFAULT_TEXT; + _rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; + _rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; } break; case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: - _rpCurrentValuePropertyName = PROPERTY_VALUE; - _rpValuePropertyName = PROPERTY_DEFAULT_VALUE; + _rpCurrentValuePropertyName = PROPERTY_VALUE.ascii; + _rpValuePropertyName = PROPERTY_DEFAULT_VALUE.ascii; break; case FormComponentType::PATTERNFIELD: case FormComponentType::FILECONTROL: case FormComponentType::COMBOBOX: - _rpValuePropertyName = PROPERTY_DEFAULT_TEXT; + _rpValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; // NO BREAK!! case FormComponentType::COMMANDBUTTON: - _rpCurrentValuePropertyName = PROPERTY_TEXT; + _rpCurrentValuePropertyName = PROPERTY_TEXT.ascii; break; case FormComponentType::CHECKBOX: case FormComponentType::RADIOBUTTON: - _rpValuePropertyName = PROPERTY_REFVALUE; + _rpValuePropertyName = PROPERTY_REFVALUE.ascii; break; case FormComponentType::HIDDENCONTROL: - _rpValuePropertyName = PROPERTY_HIDDEN_VALUE; + _rpValuePropertyName = PROPERTY_HIDDEN_VALUE.ascii; break; case FormComponentType::SCROLLBAR: - _rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE; - _rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT; + _rpCurrentValuePropertyName = PROPERTY_SCROLLVALUE.ascii; + _rpValuePropertyName = PROPERTY_SCROLLVALUE_DEFAULT.ascii; break; case FormComponentType::SPINBUTTON: - _rpCurrentValuePropertyName = PROPERTY_SPINVALUE; - _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE; + _rpCurrentValuePropertyName = PROPERTY_SPINVALUE.ascii; + _rpValuePropertyName = PROPERTY_DEFAULT_SPINVALUE.ascii; break; default: @@ -114,23 +114,23 @@ namespace xmloff { case FormComponentType::NUMERICFIELD: case FormComponentType::CURRENCYFIELD: - _rpMinValuePropertyName = PROPERTY_VALUE_MIN; - _rpMaxValuePropertyName = PROPERTY_VALUE_MAX; + _rpMinValuePropertyName = PROPERTY_VALUE_MIN.ascii; + _rpMaxValuePropertyName = PROPERTY_VALUE_MAX.ascii; break; case FormComponentType::TEXTFIELD: - _rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN; - _rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX; + _rpMinValuePropertyName = PROPERTY_EFFECTIVE_MIN.ascii; + _rpMaxValuePropertyName = PROPERTY_EFFECTIVE_MAX.ascii; break; case FormComponentType::SCROLLBAR: - _rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN; - _rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX; + _rpMinValuePropertyName = PROPERTY_SCROLLVALUE_MIN.ascii; + _rpMaxValuePropertyName = PROPERTY_SCROLLVALUE_MAX.ascii; break; case FormComponentType::SPINBUTTON: - _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN; - _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX; + _rpMinValuePropertyName = PROPERTY_SPINVALUE_MIN.ascii; + _rpMaxValuePropertyName = PROPERTY_SPINVALUE_MAX.ascii; break; default: @@ -151,24 +151,24 @@ namespace xmloff case FormComponentType::TEXTFIELD: if (OControlElement::FORMATTED_TEXT == _eType) { - _rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE; - _rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT; + _rpValuePropertyName = PROPERTY_EFFECTIVE_VALUE.ascii; + _rpDefaultValuePropertyName = PROPERTY_EFFECTIVE_DEFAULT.ascii; } else { - _rpValuePropertyName = PROPERTY_TEXT; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT; + _rpValuePropertyName = PROPERTY_TEXT.ascii; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TEXT.ascii; } break; case FormComponentType::DATEFIELD: - _rpValuePropertyName = PROPERTY_DATE; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE; + _rpValuePropertyName = PROPERTY_DATE.ascii; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_DATE.ascii; break; case FormComponentType::TIMEFIELD: - _rpValuePropertyName = PROPERTY_TIME; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME; + _rpValuePropertyName = PROPERTY_TIME.ascii; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_TIME.ascii; break; case FormComponentType::NUMERICFIELD: @@ -185,8 +185,8 @@ namespace xmloff case FormComponentType::CHECKBOX: case FormComponentType::RADIOBUTTON: - _rpValuePropertyName = PROPERTY_STATE; - _rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE; + _rpValuePropertyName = PROPERTY_STATE.ascii; + _rpDefaultValuePropertyName = PROPERTY_DEFAULT_STATE.ascii; break; } } |