summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-11 22:55:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-12 10:47:10 +0000
commit5d53969bbbe74e15fc991f63e0795938ff219815 (patch)
treeec73c8b8697e8e7c27d01566f51f846a1fdb27dd /svtools
parentvalgrind: ditch some unused code (diff)
downloadcore-5d53969bbbe74e15fc991f63e0795938ff219815.tar.gz
core-5d53969bbbe74e15fc991f63e0795938ff219815.zip
ditch a tools/string.hxx
Diffstat (limited to 'svtools')
-rw-r--r--svtools/inc/svtools/collatorres.hxx9
-rw-r--r--svtools/source/control/collatorres.cxx26
2 files changed, 17 insertions, 18 deletions
diff --git a/svtools/inc/svtools/collatorres.hxx b/svtools/inc/svtools/collatorres.hxx
index 467e8b7103f1..c91197e37105 100644
--- a/svtools/inc/svtools/collatorres.hxx
+++ b/svtools/inc/svtools/collatorres.hxx
@@ -4,7 +4,7 @@
#define SVTOOLS_COLLATORRESSOURCE_HXX
#include "svtools/svtdllapi.h"
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
class CollatorRessourceData;
@@ -15,12 +15,11 @@ class SVT_DLLPUBLIC CollatorRessource
CollatorRessourceData *mp_Data;
public:
- CollatorRessource ();
- ~CollatorRessource ();
- const String& GetTranslation (const String& r_Algorithm);
+ CollatorRessource();
+ ~CollatorRessource();
+ const rtl::OUString& GetTranslation (const rtl::OUString& r_Algorithm);
};
#endif /* SVTOOLS_COLLATORRESSOURCE_HXX */
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx
index 7ad862a24a3d..2dc30a5e9f85 100644
--- a/svtools/source/control/collatorres.cxx
+++ b/svtools/source/control/collatorres.cxx
@@ -41,17 +41,17 @@ class CollatorRessourceData
{
friend class CollatorRessource;
private: /* data */
- String ma_Name;
- String ma_Translation;
+ rtl::OUString ma_Name;
+ rtl::OUString ma_Translation;
private: /* member functions */
CollatorRessourceData () {}
public:
- CollatorRessourceData ( const String &r_Algorithm, const String &r_Translation)
+ CollatorRessourceData ( 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; }
~CollatorRessourceData () {}
@@ -75,8 +75,8 @@ CollatorRessource::CollatorRessource()
{
mp_Data = new CollatorRessourceData[COLLATOR_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[0] = CollatorRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_COLLATE_ALPHANUMERIC));
@@ -98,20 +98,20 @@ CollatorRessource::~CollatorRessource()
delete[] mp_Data;
}
-const String&
-CollatorRessource::GetTranslation (const String &r_Algorithm)
+const rtl::OUString&
+CollatorRessource::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 < COLLATOR_RESSOURCE_COUNT; i++)