summaryrefslogtreecommitdiff
path: root/linguistic/source/spelldsp.cxx
diff options
context:
space:
mode:
authorQuentin Pradet <quentin.pradet@gmail.com>2012-12-21 16:32:54 +0100
committerEike Rathke <erack@redhat.com>2012-12-21 15:49:05 +0000
commit4ef5ed9d21de767ce1b4c70d73cf15994b38dcdb (patch)
treea76799e2f68d6ecc5bac604ccd6d1d71f5b125bf /linguistic/source/spelldsp.cxx
parentbcd97c4adc2daa64cc2f9f074ac9726925ca93ea (diff)
fdo#57545 remove redundant capitalType functions
capitalType functions from the hyphenator, thesaurus and spellchecker dispatcher have been replaced by a unique function in linguistic/misc.cxx. The capital type is now represented as an enum. Change-Id: I0c2768b06f995cf34c105de117c7bab138c727a9 Reviewed-on: https://gerrit.libreoffice.org/1460 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'linguistic/source/spelldsp.cxx')
-rw-r--r--linguistic/source/spelldsp.cxx39
1 files changed, 0 insertions, 39 deletions
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 5c3c9742c274..6472626aa760 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -37,13 +37,6 @@
#include "lngsvcmgr.hxx"
#include "linguistic/lngprops.hxx"
-// values asigned to capitalization types
-#define CAPTYPE_UNKNOWN 0
-#define CAPTYPE_NOCAP 1
-#define CAPTYPE_INITCAP 2
-#define CAPTYPE_ALLCAP 3
-#define CAPTYPE_MIXED 4
-
using namespace osl;
using namespace com::sun::star;
using namespace com::sun::star::beans;
@@ -837,32 +830,6 @@ void SpellCheckerDispatcher::setCharClass(const LanguageTag& rLanguageTag)
pCharClass->setLanguageTag(rLanguageTag);
}
-sal_uInt16 SAL_CALL SpellCheckerDispatcher::capitalType(const OUString& aTerm, CharClass * pCC)
-{
- sal_Int32 tlen = aTerm.getLength();
- if ((pCC) && (tlen))
- {
- String aStr(aTerm);
- sal_Int32 nc = 0;
- for (sal_uInt16 tindex = 0; tindex < tlen; tindex++)
- {
- if (pCC->getCharacterType(aStr,tindex) &
- ::com::sun::star::i18n::KCharacterType::UPPER) nc++;
- }
-
- if (nc == 0)
- return (sal_uInt16) CAPTYPE_NOCAP;
- if (nc == tlen)
- return (sal_uInt16) CAPTYPE_ALLCAP;
- if ((nc == 1) && (pCC->getCharacterType(aStr,0) &
- ::com::sun::star::i18n::KCharacterType::UPPER))
- return (sal_uInt16) CAPTYPE_INITCAP;
-
- return (sal_uInt16) CAPTYPE_MIXED;
- }
- return (sal_uInt16) CAPTYPE_UNKNOWN;
-}
-
OUString SAL_CALL SpellCheckerDispatcher::makeLowerCase(const OUString& aTerm, CharClass * pCC)
@@ -872,10 +839,4 @@ OUString SAL_CALL SpellCheckerDispatcher::makeLowerCase(const OUString& aTerm, C
return aTerm;
}
-#undef CAPTYPE_UNKNOWN
-#undef CAPTYPE_NOCAP
-#undef CAPTYPE_INITCAP
-#undef CAPTYPE_ALLCAP
-#undef CAPTYPE_MIXED
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */