summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2020-06-11 14:02:57 +0300
committerTor Lillqvist <tml@collabora.com>2020-06-11 16:23:52 +0200
commitc392ecfa734731194c366e869a3c2475c53dc867 (patch)
tree852813ca2e485335b53ff3f1ca3bf3202de8496d /lingucomponent
parentf62f200f31ac20c4e28a1e6fbead512d55bdf04f (diff)
Drop configurability of libnumbertext use
It was fairly pointless to be able to --disable-libnumbertext. Besides, disabling it broke the ordinal page (etc) numbering feature: "1st", "2nd", "3rd", etc showed up as "Ordinal-number 1", "Ordinal-number 2", "Ordinal-number 3" etc. Change-Id: I645169054a8fdc8dac89cd48b6c369fd61749467 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96119 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'lingucomponent')
-rw-r--r--lingucomponent/source/numbertext/numbertext.cxx18
1 files changed, 1 insertions, 17 deletions
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx
index bc13530d5250..70324c7027b2 100644
--- a/lingucomponent/source/numbertext/numbertext.cxx
+++ b/lingucomponent/source/numbertext/numbertext.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <config_libnumbertext.h>
#include <iostream>
#include <osl/file.hxx>
@@ -38,9 +37,7 @@
#include <sal/macros.h>
-#if ENABLE_LIBNUMBERTEXT
#include <Numbertext.hxx>
-#endif
using namespace ::osl;
using namespace ::cppu;
@@ -70,9 +67,7 @@ namespace
{
class NumberText_Impl : public ::cppu::WeakImplHelper<XNumberText, XServiceInfo>
{
-#if ENABLE_LIBNUMBERTEXT
Numbertext m_aNumberText;
-#endif
bool m_bInitialized;
virtual ~NumberText_Impl() override {}
@@ -118,22 +113,14 @@ void NumberText_Impl::EnsureInitialized()
#else
aPhysPath += "/";
#endif
-#if ENABLE_LIBNUMBERTEXT
OString path = OUStringToOString(aPhysPath, osl_getThreadTextEncoding());
m_aNumberText.set_prefix(path.getStr());
-#endif
}
-OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale&
-#if ENABLE_LIBNUMBERTEXT
- rLocale)
-#else
-)
-#endif
+OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& rLocale)
{
osl::MutexGuard aGuard(GetNumberTextMutex());
EnsureInitialized();
-#if ENABLE_LIBNUMBERTEXT
// libnumbertext supports Language + Country tags (separated by "_" or "-")
LanguageTag aLanguageTag(rLocale);
OUString aCode(aLanguageTag.getLanguage());
@@ -150,9 +137,6 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo
DBG_ASSERT(result, "numbertext: false");
OString aResult2(Numbertext::wstring2string(aResult).c_str());
return OUString::fromUtf8(aResult2);
-#else
- return rText;
-#endif
}
uno::Sequence<Locale> SAL_CALL NumberText_Impl::getAvailableLanguages()