diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-01-12 22:33:55 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-01-13 09:05:59 +0000 |
commit | 2e303c175c3969acdb1912c47c1c9d2fab30dfa2 (patch) | |
tree | 9b807421d23644ce16f1d8f3025093ee4a6f8d0c /svtools | |
parent | svxempty.* not needed anymore (diff) | |
download | core-2e303c175c3969acdb1912c47c1c9d2fab30dfa2.tar.gz core-2e303c175c3969acdb1912c47c1c9d2fab30dfa2.zip |
remove some tools/string.hxx
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/inc/svtools/indexentryres.hxx | 4 | ||||
-rw-r--r-- | svtools/source/control/indexentryres.cxx | 25 |
2 files changed, 14 insertions, 15 deletions
diff --git a/svtools/inc/svtools/indexentryres.hxx b/svtools/inc/svtools/indexentryres.hxx index 56424cc00c7e..127710777ce5 100644 --- a/svtools/inc/svtools/indexentryres.hxx +++ b/svtools/inc/svtools/indexentryres.hxx @@ -4,7 +4,7 @@ #define SVTOOLS_INDEXENTRYRESSOURCE_HXX #include "svtools/svtdllapi.h" -#include <tools/string.hxx> +#include <rtl/ustring.hxx> class IndexEntryRessourceData; @@ -16,7 +16,7 @@ class SVT_DLLPUBLIC IndexEntryRessource public: IndexEntryRessource (); ~IndexEntryRessource (); - const String& GetTranslation (const String& r_Algorithm); + const rtl::OUString& GetTranslation (const rtl::OUString& r_Algorithm); }; #endif /* SVTOOLS_INDEXENTRYRESSOURCE_HXX */ diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 857718030f44..3a85f039093f 100644 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -41,17 +41,17 @@ class IndexEntryRessourceData { friend class IndexEntryRessource; private: /* data */ - String ma_Name; - String ma_Translation; + rtl::OUString ma_Name; + rtl::OUString ma_Translation; private: /* member functions */ IndexEntryRessourceData () {} public: - IndexEntryRessourceData ( const String &r_Algorithm, const String &r_Translation) + IndexEntryRessourceData ( const rtl::OUString &r_Algorithm, const rtl::OUString &r_Translation) : ma_Name (r_Algorithm), ma_Translation (r_Translation) {} - const String& GetAlgorithm () const { return ma_Name; } + const rtl::OUString& GetAlgorithm () const { return ma_Name; } - const String& GetTranslation () const { return ma_Translation; } + const rtl::OUString& GetTranslation () const { return ma_Translation; } ~IndexEntryRessourceData () {} @@ -75,8 +75,8 @@ IndexEntryRessource::IndexEntryRessource() { mp_Data = new IndexEntryRessourceData[INDEXENTRY_RESSOURCE_COUNT]; - #define ASCSTR(str) String(RTL_CONSTASCII_USTRINGPARAM(str)) - #define RESSTR(rid) String(SvtResId(rid)) + #define ASCSTR(str) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(str)) + #define RESSTR(rid) ResId::toString(SvtResId(rid)) mp_Data[STR_SVT_INDEXENTRY_ALPHANUMERIC - STR_SVT_INDEXENTRY_START] = IndexEntryRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_INDEXENTRY_ALPHANUMERIC)); @@ -109,17 +109,16 @@ IndexEntryRessource::~IndexEntryRessource() delete[] mp_Data; } -const String& -IndexEntryRessource::GetTranslation (const String &r_Algorithm) +const rtl::OUString& IndexEntryRessource::GetTranslation(const rtl::OUString &r_Algorithm) { - xub_StrLen nIndex = r_Algorithm.Search('.'); - String aLocaleFreeAlgorithm; + sal_Int32 nIndex = r_Algorithm.indexOf('.'); + rtl::OUString aLocaleFreeAlgorithm; - if (nIndex == STRING_NOTFOUND) + if (nIndex == -1) aLocaleFreeAlgorithm = r_Algorithm; else { nIndex += 1; - aLocaleFreeAlgorithm = String(r_Algorithm, nIndex, r_Algorithm.Len() - nIndex); + aLocaleFreeAlgorithm = r_Algorithm.copy(nIndex, r_Algorithm.getLength() - nIndex); } for (sal_uInt32 i = 0; i < INDEXENTRY_RESSOURCE_COUNT; i++) |