diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-09 01:50:21 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-09 02:01:45 +0900 |
commit | 9b979c8bf13593175391efcab461a146d6f1331e (patch) | |
tree | 84f91da7d847d5e95e502432611ced55e3cb3a29 /svl | |
parent | Create test packages even when SDK is disabled (diff) | |
download | core-9b979c8bf13593175391efcab461a146d6f1331e.tar.gz core-9b979c8bf13593175391efcab461a146d6f1331e.zip |
Replaced String by rtl::OUString in SvxMacro
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/macitem.hxx | 22 | ||||
-rw-r--r-- | svl/source/items/macitem.cxx | 17 |
2 files changed, 18 insertions, 21 deletions
diff --git a/svl/inc/svl/macitem.hxx b/svl/inc/svl/macitem.hxx index 2bc93a177539..7261316ee7dc 100644 --- a/svl/inc/svl/macitem.hxx +++ b/svl/inc/svl/macitem.hxx @@ -70,29 +70,29 @@ class SjJSbxObject; class SVL_DLLPUBLIC SvxMacro { - String aMacName; - String aLibName; + ::rtl::OUString aMacName; + ::rtl::OUString aLibName; // Fuer JavaScript muss ein Function-Objekt gehalten werden SjJSbxObjectBase* pFunctionObject; ScriptType eType; public: - SvxMacro( const String &rMacName, const String &rLanguage); + SvxMacro( const ::rtl::OUString &rMacName, const ::rtl::OUString &rLanguage); - SvxMacro( const String &rMacName, const String &rLibName, + SvxMacro( const ::rtl::OUString &rMacName, const ::rtl::OUString &rLibName, ScriptType eType); // = STARBASIC entfernt - SvxMacro( SjJSbxObjectBase* _pFunctionObject, const String &rSource ); + SvxMacro( SjJSbxObjectBase* _pFunctionObject, const ::rtl::OUString &rSource ); ~SvxMacro(); // noetig fuer pFunctionObject - const String &GetLibName() const { return aLibName; } - const String &GetMacName() const { return aMacName; } - String GetLanguage()const; + const ::rtl::OUString &GetLibName() const { return aLibName; } + const ::rtl::OUString &GetMacName() const { return aMacName; } + ::rtl::OUString GetLanguage()const; ScriptType GetScriptType() const { return eType; } - sal_Bool HasMacro() const { return aMacName.Len() ? sal_True : sal_False; } + bool HasMacro() const { return !aMacName.isEmpty(); } #ifdef SOLAR_JAVA // JavaScript-Function-Objekt holen @@ -103,12 +103,12 @@ public: SvxMacro& operator=( const SvxMacro& rBase ); }; -inline SvxMacro::SvxMacro( const String &rMacName, const String &rLibName, +inline SvxMacro::SvxMacro( const ::rtl::OUString &rMacName, const ::rtl::OUString &rLibName, ScriptType eTyp ) : aMacName( rMacName ), aLibName( rLibName ), pFunctionObject(NULL), eType( eTyp ) {} -inline SvxMacro::SvxMacro( SjJSbxObjectBase* _pFunctionObject, const String &rSource ) +inline SvxMacro::SvxMacro( SjJSbxObjectBase* _pFunctionObject, const ::rtl::OUString &rSource ) : aMacName( rSource ), pFunctionObject( _pFunctionObject ), eType( JAVASCRIPT ) {} diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index 8406ca4926b8..44abf8589217 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -50,13 +50,13 @@ SjJSbxObjectBase* SjJSbxObjectBase::Clone( void ) return NULL; } -SvxMacro::SvxMacro( const String &rMacName, const String &rLanguage) +SvxMacro::SvxMacro( const ::rtl::OUString &rMacName, const ::rtl::OUString &rLanguage) : aMacName( rMacName ), aLibName( rLanguage), pFunctionObject(NULL), eType( EXTENDED_STYPE) { - if (rLanguage.EqualsAscii(SVX_MACRO_LANGUAGE_STARBASIC)) + if (rLanguage.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_STARBASIC))) eType=STARBASIC; - else if (rLanguage.EqualsAscii(SVX_MACRO_LANGUAGE_JAVASCRIPT)) + else if (rLanguage.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT))) eType=JAVASCRIPT; } @@ -66,22 +66,19 @@ SvxMacro::~SvxMacro() delete pFunctionObject; } -String SvxMacro::GetLanguage()const +::rtl::OUString SvxMacro::GetLanguage()const { if(eType==STARBASIC) { - return UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_STARBASIC)); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_STARBASIC)); } else if(eType==JAVASCRIPT) { - return UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT)); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_JAVASCRIPT)); } else if(eType==EXTENDED_STYPE) { - return UniString::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM(SVX_MACRO_LANGUAGE_SF)); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SVX_MACRO_LANGUAGE_SF)); } return aLibName; |