summaryrefslogtreecommitdiff
path: root/svtools/source/control/collatorres.cxx
diff options
context:
space:
mode:
authorFrank Meies <fme@openoffice.org>2002-08-23 07:44:33 +0000
committerFrank Meies <fme@openoffice.org>2002-08-23 07:44:33 +0000
commit486ed71b82ffccf499a8aeb8d204a415687e44b5 (patch)
treee4ff1a608a7b33e9a4adfb4c0ed4872db6974f24 /svtools/source/control/collatorres.cxx
parentcb597681f21ce20eff5acda8ce27530059494356 (diff)
#99877# Index sorting should use the locales and algorithms of the IndexEntrySupplier
Diffstat (limited to 'svtools/source/control/collatorres.cxx')
-rw-r--r--svtools/source/control/collatorres.cxx77
1 files changed, 29 insertions, 48 deletions
diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx
index 4e48e9277d79..7df098ad396a 100644
--- a/svtools/source/control/collatorres.cxx
+++ b/svtools/source/control/collatorres.cxx
@@ -15,38 +15,27 @@
class CollatorRessourceData
{
friend class CollatorRessource;
-
private: /* data */
-
String ma_Name;
String ma_Translation;
-
private: /* member functions */
-
- CollatorRessourceData ()
- {}
+ CollatorRessourceData () {}
public:
- CollatorRessourceData (
- const String &r_Algorithm, const String &r_Translation)
- : ma_Name (r_Algorithm), ma_Translation (r_Translation)
- {}
-
- const String& GetAlgorithm () const
- { return ma_Name; }
-
- const String& GetTranslation () const
- { return ma_Translation; }
-
- ~CollatorRessourceData ()
- {}
-
- CollatorRessourceData&
- operator= (const CollatorRessourceData& r_From)
- {
- ma_Name = r_From.GetAlgorithm();
- ma_Translation = r_From.GetTranslation();
- return *this;
- }
+ CollatorRessourceData ( const String &r_Algorithm, const String &r_Translation)
+ : ma_Name (r_Algorithm), ma_Translation (r_Translation) {}
+
+ const String& GetAlgorithm () const { return ma_Name; }
+
+ const String& GetTranslation () const { return ma_Translation; }
+
+ ~CollatorRessourceData () {}
+
+ CollatorRessourceData& operator= (const CollatorRessourceData& r_From)
+ {
+ ma_Name = r_From.GetAlgorithm();
+ ma_Translation = r_From.GetTranslation();
+ return *this;
+ }
};
// -------------------------------------------------------------------------
@@ -55,7 +44,7 @@ class CollatorRessourceData
//
// -------------------------------------------------------------------------
-#define COLLATOR_RESSOURCE_COUNT 10
+#define COLLATOR_RESSOURCE_COUNT (STR_SVT_COLLATE_END - STR_SVT_COLLATE_START + 1)
CollatorRessource::CollatorRessource()
{
@@ -65,26 +54,18 @@ CollatorRessource::CollatorRessource()
#define RESSTR(rid) String(SvtResId(rid))
- mp_Data[0] = CollatorRessourceData (ASCSTR("alphanumeric"),
- RESSTR(STR_SVT_COLLATE_ALPHANUMERIC));
- mp_Data[1] = CollatorRessourceData (ASCSTR("charset"),
- RESSTR(STR_SVT_COLLATE_CHARSET));
- mp_Data[2] = CollatorRessourceData (ASCSTR("dict"),
- RESSTR(STR_SVT_COLLATE_DICTIONARY));
- mp_Data[3] = CollatorRessourceData (ASCSTR("normal"),
- RESSTR(STR_SVT_COLLATE_NORMAL));
- mp_Data[4] = CollatorRessourceData (ASCSTR("pinyin"),
- RESSTR(STR_SVT_COLLATE_PINYIN));
- mp_Data[5] = CollatorRessourceData (ASCSTR("radical"),
- RESSTR(STR_SVT_COLLATE_RADICAL));
- mp_Data[6] = CollatorRessourceData (ASCSTR("stroke"),
- RESSTR(STR_SVT_COLLATE_STROKE));
- mp_Data[7] = CollatorRessourceData (ASCSTR("unicode"),
- RESSTR(STR_SVT_COLLATE_UNICODE));
- mp_Data[8] = CollatorRessourceData (ASCSTR("zhuyin"),
- RESSTR(STR_SVT_COLLATE_ZHUYIN));
- mp_Data[9] = CollatorRessourceData (ASCSTR("phonebook"),
- RESSTR(STR_SVT_COLLATE_PHONEBOOK));
+ mp_Data[0] = CollatorRessourceData (ASCSTR("alphanumeric"), RESSTR(STR_SVT_COLLATE_ALPHANUMERIC));
+ mp_Data[1] = CollatorRessourceData (ASCSTR("charset"), RESSTR(STR_SVT_COLLATE_CHARSET));
+ mp_Data[2] = CollatorRessourceData (ASCSTR("dict"), RESSTR(STR_SVT_COLLATE_DICTIONARY));
+ mp_Data[3] = CollatorRessourceData (ASCSTR("normal"), RESSTR(STR_SVT_COLLATE_NORMAL));
+ mp_Data[4] = CollatorRessourceData (ASCSTR("pinyin"), RESSTR(STR_SVT_COLLATE_PINYIN));
+ mp_Data[5] = CollatorRessourceData (ASCSTR("radical"), RESSTR(STR_SVT_COLLATE_RADICAL));
+ mp_Data[6] = CollatorRessourceData (ASCSTR("stroke"), RESSTR(STR_SVT_COLLATE_STROKE));
+ mp_Data[7] = CollatorRessourceData (ASCSTR("unicode"), RESSTR(STR_SVT_COLLATE_UNICODE));
+ mp_Data[8] = CollatorRessourceData (ASCSTR("zhuyin"), RESSTR(STR_SVT_COLLATE_ZHUYIN));
+ mp_Data[9] = CollatorRessourceData (ASCSTR("phonebook"), RESSTR(STR_SVT_COLLATE_PHONEBOOK));
+ mp_Data[10] = CollatorRessourceData (ASCSTR("phonetic (alphanumeric first)"), RESSTR(STR_SVT_COLLATE_PHONETIC_F));
+ mp_Data[11] = CollatorRessourceData (ASCSTR("phonetic (alphanumeric last)"), RESSTR(STR_SVT_COLLATE_PHONETIC_L));
}
CollatorRessource::~CollatorRessource()