diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-04 10:56:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-07 11:53:46 +0200 |
commit | 24d59c9e044dfc04013b5d364237245b314f62ed (patch) | |
tree | 818abe2ed383f9bb65402b7573fd3569155a89d3 /lingucomponent | |
parent | 4d7867c3ac20083b5fd943f5bca44b102ccbe20e (diff) |
configure option to disable libnumbertext
Because we get a crash in CppunitTest_sw_odfexport when compiling with
clang >= 6.0.0
Also had to fix the ENABLE_LIBNUMBERTEXT being propogated, and the
way the code checked it.
Change-Id: I68e4a0078016d176f478ca4c1110fc296b6ca921
Diffstat (limited to 'lingucomponent')
-rw-r--r-- | lingucomponent/source/numbertext/numbertext.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lingucomponent/source/numbertext/numbertext.cxx b/lingucomponent/source/numbertext/numbertext.cxx index ec841a4bcab2..ee3ecbab9818 100644 --- a/lingucomponent/source/numbertext/numbertext.cxx +++ b/lingucomponent/source/numbertext/numbertext.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <config_libnumbertext.h> #include <iostream> #include <osl/file.hxx> @@ -37,7 +38,7 @@ #include <sal/macros.h> -#ifdef ENABLE_LIBNUMBERTEXT +#if ENABLE_LIBNUMBERTEXT #include <Numbertext.hxx> #endif @@ -67,7 +68,7 @@ static osl::Mutex& GetNumberTextMutex() class NumberText_Impl : public ::cppu::WeakImplHelper<XNumberText, XServiceInfo> { -#if defined(ENABLE_LIBNUMBERTEXT) || defined(SYSTEM_LIBNUMBERTEXT) +#if ENABLE_LIBNUMBERTEXT Numbertext m_aNumberText; #endif bool m_bInitialized; @@ -114,7 +115,7 @@ void NumberText_Impl::EnsureInitialized() #else aPhysPath += "/"; #endif -#if defined(ENABLE_LIBNUMBERTEXT) || defined(SYSTEM_LIBNUMBERTEXT) +#if ENABLE_LIBNUMBERTEXT OString path = OUStringToOString(aPhysPath, osl_getThreadTextEncoding()); m_aNumberText.set_prefix(path.getStr()); #endif @@ -122,7 +123,7 @@ void NumberText_Impl::EnsureInitialized() } OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Locale& -#if defined(ENABLE_LIBNUMBERTEXT) || defined(SYSTEM_LIBNUMBERTEXT) +#if ENABLE_LIBNUMBERTEXT rLocale) #else ) @@ -130,7 +131,7 @@ OUString SAL_CALL NumberText_Impl::getNumberText(const OUString& rText, const Lo { osl::MutexGuard aGuard(GetNumberTextMutex()); EnsureInitialized(); -#if defined(ENABLE_LIBNUMBERTEXT) || defined(SYSTEM_LIBNUMBERTEXT) +#if ENABLE_LIBNUMBERTEXT // libnumbertext supports Language + Country tags (separated by "_" or "-") LanguageTag aLanguageTag(rLocale); OUString aCode(aLanguageTag.getLanguage()); |