summaryrefslogtreecommitdiffstats
path: root/i18npool/inc
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool/inc')
-rw-r--r--i18npool/inc/breakiteratorImpl.hxx3
-rw-r--r--i18npool/inc/breakiterator_cjk.hxx4
-rw-r--r--i18npool/inc/breakiterator_th.hxx53
-rw-r--r--i18npool/inc/breakiterator_unicode.hxx3
-rw-r--r--i18npool/inc/bullet.h36
-rw-r--r--i18npool/inc/calendarImpl.hxx5
-rw-r--r--i18npool/inc/calendar_gregorian.hxx2
-rw-r--r--i18npool/inc/calendar_hijri.hxx12
-rw-r--r--i18npool/inc/cclass_unicode.hxx15
-rw-r--r--i18npool/inc/characterclassificationImpl.hxx8
-rw-r--r--i18npool/inc/collatorImpl.hxx6
-rw-r--r--i18npool/inc/indexentrysupplier_asian.hxx22
-rw-r--r--i18npool/inc/indexentrysupplier_default.hxx3
-rw-r--r--i18npool/inc/indexentrysupplier_ja_phonetic.hxx4
-rw-r--r--i18npool/inc/inputsequencechecker.hxx6
-rw-r--r--i18npool/inc/localedata.hxx19
-rw-r--r--i18npool/inc/nativenumbersupplier.hxx2
-rw-r--r--i18npool/inc/textToPronounce_zh.hxx12
-rw-r--r--i18npool/inc/textconversion.hxx43
-rw-r--r--i18npool/inc/textconversionImpl.hxx3
-rw-r--r--i18npool/inc/transliterationImpl.hxx2
-rw-r--r--i18npool/inc/transliteration_Ignore.hxx10
-rw-r--r--i18npool/inc/transliteration_Numeric.hxx2
-rw-r--r--i18npool/inc/transliteration_body.hxx11
-rw-r--r--i18npool/inc/wtt.h2
-rw-r--r--i18npool/inc/xdictionary.hxx6
26 files changed, 162 insertions, 132 deletions
diff --git a/i18npool/inc/breakiteratorImpl.hxx b/i18npool/inc/breakiteratorImpl.hxx
index c27645a60ef2..a2700b7a9bf9 100644
--- a/i18npool/inc/breakiteratorImpl.hxx
+++ b/i18npool/inc/breakiteratorImpl.hxx
@@ -22,6 +22,7 @@
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
#include <vector>
namespace com::sun::star::uno { class XComponentContext; }
@@ -103,7 +104,7 @@ protected:
private:
struct lookupTableItem {
- lookupTableItem(const css::lang::Locale& _aLocale, css::uno::Reference < XBreakIterator > const & _xBI) : aLocale(_aLocale), xBI(_xBI) {};
+ lookupTableItem(css::lang::Locale _aLocale, css::uno::Reference < XBreakIterator > _xBI) : aLocale(std::move(_aLocale)), xBI(std::move(_xBI)) {};
css::lang::Locale aLocale;
css::uno::Reference < XBreakIterator > xBI;
};
diff --git a/i18npool/inc/breakiterator_cjk.hxx b/i18npool/inc/breakiterator_cjk.hxx
index fce0d295ca68..0f8b0c6c0a7d 100644
--- a/i18npool/inc/breakiterator_cjk.hxx
+++ b/i18npool/inc/breakiterator_cjk.hxx
@@ -20,7 +20,7 @@
#include "breakiterator_unicode.hxx"
#include "xdictionary.hxx"
-
+#include <optional>
#include <memory>
namespace i18npool {
@@ -43,7 +43,7 @@ public:
const css::i18n::LineBreakUserOptions& bOptions ) override;
protected:
- std::unique_ptr<xdictionary> m_xDict;
+ std::optional<xdictionary> m_oDict;
OUString hangingCharacters;
};
diff --git a/i18npool/inc/breakiterator_th.hxx b/i18npool/inc/breakiterator_th.hxx
deleted file mode 100644
index cc6a717493ab..000000000000
--- a/i18npool/inc/breakiterator_th.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#pragma once
-
-#include "breakiterator_unicode.hxx"
-
-namespace i18npool {
-
-
-
-class BreakIterator_th final : public BreakIterator_Unicode
-{
-public:
- BreakIterator_th();
- virtual ~BreakIterator_th() override;
- virtual sal_Int32 SAL_CALL previousCharacters(const OUString& text, sal_Int32 start,
- const css::lang::Locale& nLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
- sal_Int32& nDone) override;
- virtual sal_Int32 SAL_CALL nextCharacters(const OUString& text, sal_Int32 start,
- const css::lang::Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 count,
- sal_Int32& nDone) override;
- virtual css::i18n::LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
- const css::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
- const css::i18n::LineBreakHyphenationOptions& hOptions,
- const css::i18n::LineBreakUserOptions& bOptions ) override;
-
-private:
- OUString cachedText; // for cell index
- std::vector<sal_Int32> m_aNextCellIndex;
- std::vector<sal_Int32> m_aPreviousCellIndex;
-
- void makeIndex(const OUString& text, sal_Int32 pos);
-};
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/inc/breakiterator_unicode.hxx b/i18npool/inc/breakiterator_unicode.hxx
index d468a2ebf941..d2cf5339f7d8 100644
--- a/i18npool/inc/breakiterator_unicode.hxx
+++ b/i18npool/inc/breakiterator_unicode.hxx
@@ -70,7 +70,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
protected:
- const char *cBreakIterator, *lineRule;
+ OUString cBreakIterator;
+ const char *lineRule;
/** Used as map value. */
struct BI_ValueData
diff --git a/i18npool/inc/bullet.h b/i18npool/inc/bullet.h
index 67ea0f7d2600..6f2fd5f702ae 100644
--- a/i18npool/inc/bullet.h
+++ b/i18npool/inc/bullet.h
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#pragma once
+
+#include <sal/types.h>
+
namespace i18npool {
const sal_Unicode table_AIUFullWidth_ja_JP[] = {
@@ -239,7 +243,37 @@ const sal_Unicode table_CircledNumber[] = {
0x2470, // CIRCLED NUMBER SEVENTEEN
0x2471, // CIRCLED NUMBER EIGHTEEN
0x2472, // CIRCLED NUMBER NINETEEN
- 0x2473 // CIRCLED NUMBER TWENTY
+ 0x2473, // CIRCLED NUMBER TWENTY
+ 0x3251, // CIRCLED NUMBER TWENTY ONE
+ 0x3252, // CIRCLED NUMBER TWENTY TWO
+ 0x3253, // CIRCLED NUMBER TWENTY THREE
+ 0x3254, // CIRCLED NUMBER TWENTY FOUR
+ 0x3255, // CIRCLED NUMBER TWENTY FIVE
+ 0x3256, // CIRCLED NUMBER TWENTY SIX
+ 0x3257, // CIRCLED NUMBER TWENTY SEVEN
+ 0x3258, // CIRCLED NUMBER TWENTY EIGHT
+ 0x3259, // CIRCLED NUMBER TWENTY NINE
+ 0x325A, // CIRCLED NUMBER THIRTY
+ 0x325B, // CIRCLED NUMBER THIRTY ONE
+ 0x325C, // CIRCLED NUMBER THIRTY TWO
+ 0x325D, // CIRCLED NUMBER THIRTY THREE
+ 0x325E, // CIRCLED NUMBER THIRTY FOUR
+ 0x325F, // CIRCLED NUMBER THIRTY FIVE
+ 0x32B1, // CIRCLED NUMBER THIRTY SIX
+ 0x32B2, // CIRCLED NUMBER THIRTY SEVEN
+ 0x32B3, // CIRCLED NUMBER THIRTY EIGHT
+ 0x32B4, // CIRCLED NUMBER THIRTY NINE
+ 0x32B5, // CIRCLED NUMBER FORTY
+ 0x32B6, // CIRCLED NUMBER FORTY ONE
+ 0x32B7, // CIRCLED NUMBER FORTY TWO
+ 0x32B8, // CIRCLED NUMBER FORTY THREE
+ 0x32B9, // CIRCLED NUMBER FORTY FOUR
+ 0x32BA, // CIRCLED NUMBER FORTY FIVE
+ 0x32BB, // CIRCLED NUMBER FORTY SIX
+ 0x32BC, // CIRCLED NUMBER FORTY SEVEN
+ 0x32BD, // CIRCLED NUMBER FORTY EIGHT
+ 0x32BE, // CIRCLED NUMBER FORTY NINE
+ 0x32BF // CIRCLED NUMBER FIFTY
};
const sal_Unicode table_HangulJamo_ko[] = {
diff --git a/i18npool/inc/calendarImpl.hxx b/i18npool/inc/calendarImpl.hxx
index 4d90ed0ef2be..0580a878535e 100644
--- a/i18npool/inc/calendarImpl.hxx
+++ b/i18npool/inc/calendarImpl.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/i18n/XCalendar4.hpp>
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <utility>
#include <vector>
namespace com::sun::star::uno { class XComponentContext; }
@@ -92,8 +93,8 @@ public:
private:
struct lookupTableItem {
- lookupTableItem(const OUString& rCacheID, css::uno::Reference < css::i18n::XCalendar4 > const & _xCalendar)
- : m_aCacheID(rCacheID), xCalendar(_xCalendar) {}
+ lookupTableItem(OUString aCacheID, css::uno::Reference < css::i18n::XCalendar4 > _xCalendar)
+ : m_aCacheID(std::move(aCacheID)), xCalendar(std::move(_xCalendar)) {}
OUString m_aCacheID;
css::uno::Reference < css::i18n::XCalendar4 > xCalendar;
};
diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx
index 1ee7cabaab1e..e19698875f85 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -102,7 +102,7 @@ protected:
const Era *eraArray;
std::unique_ptr<icu::Calendar> body;
rtl::Reference<NativeNumberSupplierService> mxNatNum;
- const char* cCalendar;
+ OUString cCalendar;
css::lang::Locale aLocale;
sal_uInt32 fieldSet;
sal_Int16 fieldValue[FIELD_INDEX_COUNT];
diff --git a/i18npool/inc/calendar_hijri.hxx b/i18npool/inc/calendar_hijri.hxx
index b25c4cb0b44f..c02fa31e5d94 100644
--- a/i18npool/inc/calendar_hijri.hxx
+++ b/i18npool/inc/calendar_hijri.hxx
@@ -36,12 +36,12 @@ private:
void mapToGregorian() override;
void mapFromGregorian() override;
-private:
- static double NewMoon(sal_Int32 n);
- static void getHijri(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year);
- static void ToGregorian(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year);
- static void getGregorianDay(sal_Int32 jd, sal_Int32 *pnDay, sal_Int32 *pnMonth, sal_Int32 *pnYear);
- static sal_Int32 getJulianDay(sal_Int32 day, sal_Int32 month, sal_Int32 year);
+public:
+ static double SAL_DLLPUBLIC_EXPORT NewMoon(sal_Int32 n);
+ static void SAL_DLLPUBLIC_EXPORT getHijri(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year);
+ static void SAL_DLLPUBLIC_EXPORT ToGregorian(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year);
+ static void SAL_DLLPUBLIC_EXPORT getGregorianDay(sal_Int32 jd, sal_Int32 *pnDay, sal_Int32 *pnMonth, sal_Int32 *pnYear);
+ static sal_Int32 SAL_DLLPUBLIC_EXPORT getJulianDay(sal_Int32 day, sal_Int32 month, sal_Int32 year);
};
}
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx
index 4ae4f5fd362e..3a5f28f124ab 100644
--- a/i18npool/inc/cclass_unicode.hxx
+++ b/i18npool/inc/cclass_unicode.hxx
@@ -64,7 +64,7 @@ namespace i18npool {
class cclass_Unicode final : public cppu::WeakImplHelper < css::i18n::XCharacterClassification, css::lang::XServiceInfo >
{
public:
- cclass_Unicode(const css::uno::Reference < css::uno::XComponentContext >& rxContext );
+ cclass_Unicode(css::uno::Reference < css::uno::XComponentContext > xContext );
virtual ~cclass_Unicode() override;
virtual OUString SAL_CALL toUpper( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount,
@@ -94,7 +94,11 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
private:
- rtl::Reference<Transliteration_casemapping> trans;
+ // These are performance sensitive, so we don't want to use locking and switch their state, so just
+ // have multiple copies.
+ rtl::Reference<Transliteration_casemapping> transToUpper;
+ rtl::Reference<Transliteration_casemapping> transToLower;
+ rtl::Reference<Transliteration_casemapping> transToTitle;
// --- parser specific (implemented in cclass_unicode_parser.cxx) ---
@@ -134,7 +138,6 @@ private:
std::unique_ptr<ParserFlags[]> pCont;
sal_Int32 nStartTypes;
sal_Int32 nContTypes;
- ScanState eState;
sal_Unicode cGroupSep;
sal_Unicode cDecimalSep;
sal_Unicode cDecimalSepAlt;
@@ -143,10 +146,10 @@ private:
static sal_Int32 getParseTokensType(sal_uInt32 c, bool isFirst);
/// Access parser table flags.
- ParserFlags getFlags(sal_uInt32 c);
+ ParserFlags getFlags(sal_uInt32 c, ScanState eState);
/// Access parser flags via International and special definitions.
- ParserFlags getFlagsExtended(sal_uInt32 c) const;
+ ParserFlags getFlagsExtended(sal_uInt32 c, ScanState eState) const;
/// Access parser table flags for user defined start characters.
ParserFlags getStartCharsFlags( sal_uInt32 c );
@@ -175,7 +178,7 @@ private:
void setupInternational( const css::lang::Locale& rLocale );
/// Implementation of getCharacterType() for one single character
- static sal_Int32 getCharType( const OUString& Text, sal_Int32 *nPos, sal_Int32 increment);
+ static sal_Int32 getCharType( std::u16string_view Text, sal_Int32 *nPos, sal_Int32 increment);
};
diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx
index dad22515a79e..bcfc7836a92f 100644
--- a/i18npool/inc/characterclassificationImpl.hxx
+++ b/i18npool/inc/characterclassificationImpl.hxx
@@ -20,8 +20,8 @@
#include <com/sun/star/i18n/XCharacterClassification.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
#include <vector>
-#include <memory>
#include <optional>
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -69,9 +69,9 @@ public:
private:
struct lookupTableItem {
- lookupTableItem(const css::lang::Locale& rLocale, const OUString& rName,
- css::uno::Reference < XCharacterClassification > const & rxCI) :
- aLocale(rLocale), aName(rName), xCI(rxCI) {};
+ lookupTableItem(css::lang::Locale _aLocale, OUString _aName,
+ css::uno::Reference < XCharacterClassification > _xCI) :
+ aLocale(std::move(_aLocale)), aName(std::move(_aName)), xCI(std::move(_xCI)) {};
css::lang::Locale aLocale;
OUString aName;
css::uno::Reference < XCharacterClassification > xCI;
diff --git a/i18npool/inc/collatorImpl.hxx b/i18npool/inc/collatorImpl.hxx
index 150f96bd7aa6..4d2eee6b7fa9 100644
--- a/i18npool/inc/collatorImpl.hxx
+++ b/i18npool/inc/collatorImpl.hxx
@@ -24,8 +24,8 @@
#include <cppuhelper/implbase.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <utility>
#include <vector>
-#include <memory>
#include <optional>
namespace com::sun::star::i18n { class XLocaleData5; }
@@ -80,8 +80,8 @@ private:
OUString algorithm;
OUString service;
css::uno::Reference < XCollator > xC;
- lookupTableItem(const css::lang::Locale& rLocale, const OUString& _algorithm, const OUString& _service,
- css::uno::Reference < XCollator > const & _xC) : aLocale(rLocale), algorithm(_algorithm), service(_service), xC(_xC) {}
+ lookupTableItem(css::lang::Locale _aLocale, OUString _algorithm, OUString _service,
+ css::uno::Reference < XCollator > _xC) : aLocale(std::move(_aLocale)), algorithm(std::move(_algorithm)), service(std::move(_service)), xC(std::move(_xC)) {}
bool equals(const css::lang::Locale& rLocale, std::u16string_view _algorithm) {
return aLocale.Language == rLocale.Language &&
aLocale.Country == rLocale.Country &&
diff --git a/i18npool/inc/indexentrysupplier_asian.hxx b/i18npool/inc/indexentrysupplier_asian.hxx
index 52e452b17b01..8d733a0ce58b 100644
--- a/i18npool/inc/indexentrysupplier_asian.hxx
+++ b/i18npool/inc/indexentrysupplier_asian.hxx
@@ -21,7 +21,6 @@
#include "indexentrysupplier_common.hxx"
-#include <osl/module.h>
namespace i18npool {
@@ -44,12 +43,25 @@ public:
const css::lang::Locale& rLocale2 ) override;
OUString SAL_CALL getPhoneticCandidate( const OUString& rIndexEntry,
const css::lang::Locale& rLocale ) override;
-#ifndef DISABLE_DYNLOADING
-private:
- oslModule hModule;
-#endif
};
}
+extern "C" {
+
+const sal_uInt16** get_indexdata_ko_dict(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_TW_radical(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_TW_stroke(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_pinyin(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_radical(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_stroke(sal_Int16&);
+const sal_uInt16** get_indexdata_zh_zhuyin(sal_Int16&);
+
+const sal_uInt16** get_ko_phonetic(sal_Int16&);
+const sal_uInt16** get_zh_pinyin(sal_Int16&);
+const sal_uInt16** get_zh_zhuyin(sal_Int16&);
+
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/inc/indexentrysupplier_default.hxx b/i18npool/inc/indexentrysupplier_default.hxx
index caf71326d632..e9c43583b634 100644
--- a/i18npool/inc/indexentrysupplier_default.hxx
+++ b/i18npool/inc/indexentrysupplier_default.hxx
@@ -88,7 +88,9 @@ public:
void makeIndexKeys(const css::lang::Locale &rLocale, std::u16string_view algorithm);
sal_Int16 getIndexWeight(const OUString& rIndexEntry);
OUString getIndexDescription(const OUString& rIndexEntry);
+ sal_Int16 compare(sal_Unicode c1, sal_Unicode c2);
+private:
IndexTable tables[MAX_TABLES];
sal_Int16 table_count;
IndexKey keys[MAX_KEYS];
@@ -97,7 +99,6 @@ public:
sal_Int16 mkey_count;
OUString skipping_chars;
rtl::Reference<CollatorImpl> collator;
- sal_Int16 compare(sal_Unicode c1, sal_Unicode c2);
};
}
diff --git a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
index 5ea5cfbb4430..ea19dcb12aee 100644
--- a/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
+++ b/i18npool/inc/indexentrysupplier_ja_phonetic.hxx
@@ -45,7 +45,7 @@ public:
class IndexEntrySupplier_##algorithm final : public IndexEntrySupplier_ja_phonetic {\
public:\
IndexEntrySupplier_##algorithm (const css::uno::Reference < css::uno::XComponentContext >& rxContext) : IndexEntrySupplier_ja_phonetic (rxContext) {\
- implementationName = "com.sun.star.i18n.IndexEntrySupplier_"#algo_descr;\
+ implementationName = "com.sun.star.i18n.IndexEntrySupplier_ja_phonetic" algo_descr;\
};\
virtual sal_Bool SAL_CALL loadAlgorithm(\
const css::lang::Locale& rLocale,\
@@ -55,7 +55,7 @@ public:\
/** descriptions formed by concatenating strings here must match names in .component file */
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_syllable, " (alphanumeric first) (grouped by syllable)" )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_first_by_consonant, " (alphanumeric first) (grouped by consonant)" )
-INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable, " (alphanumeric last) (grouped by consonant)" )
+INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_syllable, " (alphanumeric last) (grouped by syllable)" )
INDEXENTRYSUPPLIER_JA_PHONETIC( ja_phonetic_alphanumeric_last_by_consonant, " (alphanumeric last) (grouped by consonant)" )
}
diff --git a/i18npool/inc/inputsequencechecker.hxx b/i18npool/inc/inputsequencechecker.hxx
index b491f6b63175..4f93ada08201 100644
--- a/i18npool/inc/inputsequencechecker.hxx
+++ b/i18npool/inc/inputsequencechecker.hxx
@@ -22,8 +22,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/i18n/XExtendedInputSequenceChecker.hpp>
+#include <utility>
#include <vector>
-#include <memory>
#include <optional>
namespace com::sun::star::uno { class XComponentContext; }
@@ -58,8 +58,8 @@ private:
const char *serviceName;
struct lookupTableItem {
- lookupTableItem(const char* rLanguage, const css::uno::Reference < css::i18n::XExtendedInputSequenceChecker >& rxISC) :
- aLanguage(rLanguage), xISC(rxISC) {}
+ lookupTableItem(const char* rLanguage, css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > _xISC) :
+ aLanguage(rLanguage), xISC(std::move(_xISC)) {}
const char* aLanguage;
css::uno::Reference < css::i18n::XExtendedInputSequenceChecker > xISC;
};
diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx
index 724cbba342a7..06cf68fa7fdf 100644
--- a/i18npool/inc/localedata.hxx
+++ b/i18npool/inc/localedata.hxx
@@ -31,7 +31,6 @@
#include <rtl/ustring.hxx>
#include <vector>
#include <string_view>
-#include <memory>
#include <optional>
#include <osl/module.hxx>
@@ -49,14 +48,22 @@ struct LocaleDataLookupTableItem;
namespace i18npool {
+enum class DataLocaleLibrary {
+ EN,
+ ES,
+ EURO,
+ OTHERS
+};
+
+
struct LocaleDataLookupTableItem
{
- const char* dllName;
+ DataLocaleLibrary dllName;
osl::Module *module;
const char* localeName;
css::lang::Locale aLocale;
- LocaleDataLookupTableItem(const char *name, osl::Module* m, const char* lname) : dllName(name), module(m), localeName(lname)
+ LocaleDataLookupTableItem(DataLocaleLibrary name, osl::Module* m, const char* lname) : dllName(std::move(name)), module(m), localeName(lname)
{
}
bool equals(const css::lang::Locale& rLocale) const
@@ -150,8 +157,8 @@ private:
/// @throws css::uno::RuntimeException
oslGenericFunction getFunctionSymbol( const css::lang::Locale& rLocale, const char* pFunction );
- sal_Unicode ** getIndexArray(const css::lang::Locale& rLocale, sal_Int16& indexCount);
- sal_Unicode ** getIndexArrayForAlgorithm(const css::lang::Locale& rLocale, std::u16string_view rAlgorithm);
+ OUString const * getIndexArray(const css::lang::Locale& rLocale, sal_Int16& indexCount);
+ OUString const * getIndexArrayForAlgorithm(const css::lang::Locale& rLocale, std::u16string_view rAlgorithm);
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::i18n::CalendarItem2 > &
getCalendarItemByName(const OUString& name,
@@ -163,7 +170,7 @@ private:
///
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::i18n::CalendarItem2 > getCalendarItems(
- sal_Unicode const * const * const allCalendars,
+ OUString const * allCalendars,
sal_Int16 & rnOffset,
const sal_Int16 nWhichItem,
const sal_Int16 nCalendar,
diff --git a/i18npool/inc/nativenumbersupplier.hxx b/i18npool/inc/nativenumbersupplier.hxx
index 01459ce9f7a5..61e336024da4 100644
--- a/i18npool/inc/nativenumbersupplier.hxx
+++ b/i18npool/inc/nativenumbersupplier.hxx
@@ -68,7 +68,7 @@ public:
const css::lang::Locale& rLocale,
sal_Int16 nNativeNumberMode,
css::uno::Sequence<sal_Int32>* pOffset,
- const OUString& rNativeNumberParams = OUString());
+ std::u16string_view rNativeNumberParams = std::u16string_view());
/// @throws css::uno::RuntimeException
static sal_Unicode getNativeNumberChar( const sal_Unicode inChar,
const css::lang::Locale& aLocale, sal_Int16 nNativeNumberMode ) ;
diff --git a/i18npool/inc/textToPronounce_zh.hxx b/i18npool/inc/textToPronounce_zh.hxx
index 2ac854abddbd..02190673d8a3 100644
--- a/i18npool/inc/textToPronounce_zh.hxx
+++ b/i18npool/inc/textToPronounce_zh.hxx
@@ -20,25 +20,17 @@
#pragma once
#include "transliteration_Ignore.hxx"
-#include <osl/module.hxx>
namespace i18npool {
class TextToPronounce_zh : public transliteration_Ignore
{
protected:
-#ifndef DISABLE_DYNLOADING
- oslModule hModule;
-#endif
- sal_uInt16 **idx;
+ sal_uInt16 const **idx;
const sal_Unicode* getPronounce(const sal_Unicode ch);
public:
-#ifndef DISABLE_DYNLOADING
- TextToPronounce_zh(const char* func_name);
-#else
- TextToPronounce_zh(sal_uInt16 ** (*function)());
-#endif
+ TextToPronounce_zh(sal_uInt16 const ** (*function)(sal_Int16 &));
virtual ~TextToPronounce_zh() override;
OUString
diff --git a/i18npool/inc/textconversion.hxx b/i18npool/inc/textconversion.hxx
index a6fefa1c507e..d15ca121f32d 100644
--- a/i18npool/inc/textconversion.hxx
+++ b/i18npool/inc/textconversion.hxx
@@ -21,7 +21,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/i18n/XExtendedTextConversion.hpp>
#include <cppuhelper/implbase.hxx>
-#include <osl/module.h>
namespace com::sun::star::linguistic2 { class XConversionDictionary; }
namespace com::sun::star::linguistic2 { class XConversionDictionaryList; }
@@ -66,11 +65,6 @@ public:
getSupportedServiceNames() override;
private:
const char* implementationName;
-protected:
-#ifndef DISABLE_DYNLOADING
- oslModule hModule;
- oslGenericFunction getFunctionBySymbol(const char* func);
-#endif
};
// for Hangul2Hanja conversion
@@ -112,18 +106,13 @@ private:
css::uno::Reference < css::linguistic2::XConversionDictionaryList > xCDL;
sal_Int32 maxLeftLength;
sal_Int32 maxRightLength;
- css::uno::Sequence< OUString >
- getCharConversions(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, bool toHanja);
+ static css::uno::Sequence< OUString >
+ getCharConversions(std::u16string_view aText, sal_Int32 nStartPos, sal_Int32 nLength, bool toHanja);
};
-// for SChines/TChinese word conversion
-typedef struct {
- sal_Int16 count;
-} STC_WordIndex;
-
class TextConversion_zh final : public TextConversionService
{
public:
@@ -149,12 +138,36 @@ public:
private:
// user defined dictionary list
css::uno::Reference < css::linguistic2::XConversionDictionaryList > xCDL;
- OUString getWordConversion(const OUString& aText,
+ OUString getWordConversion(std::u16string_view aText,
sal_Int32 nStartPos, sal_Int32 nLength, bool toSChinese, sal_Int32 nConversionOptions, css::uno::Sequence <sal_Int32>& offset);
- rtl:: OUString getCharConversion(const rtl:: OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, bool toSChinese, sal_Int32 nConversionOptions);
+ static OUString getCharConversion(std::u16string_view aText, sal_Int32 nStartPos, sal_Int32 nLength, bool toSChinese, sal_Int32 nConversionOptions);
css::lang::Locale aLocale;
};
} // i18npool
+extern "C" {
+
+const sal_Unicode* getHangul2HanjaData();
+const i18npool::Hangul_Index* getHangul2HanjaIndex();
+sal_Int16 getHangul2HanjaIndexCount();
+const sal_uInt16* getHanja2HangulIndex();
+const sal_Unicode* getHanja2HangulData();
+
+const sal_Unicode* getSTC_CharData_T2S();
+const sal_uInt16* getSTC_CharIndex_T2S();
+const sal_Unicode* getSTC_CharData_S2V();
+const sal_uInt16* getSTC_CharIndex_S2V();
+const sal_Unicode* getSTC_CharData_S2T();
+const sal_uInt16* getSTC_CharIndex_S2T();
+
+const sal_Unicode *getSTC_WordData(sal_Int32&);
+
+const sal_uInt16 *getSTC_WordIndex_T2S(sal_Int32&);
+const sal_uInt16 *getSTC_WordEntry_T2S();
+const sal_uInt16 *getSTC_WordIndex_S2T(sal_Int32&);
+const sal_uInt16 *getSTC_WordEntry_S2T();
+
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/inc/textconversionImpl.hxx b/i18npool/inc/textconversionImpl.hxx
index 29a049cca785..f1502b619bf0 100644
--- a/i18npool/inc/textconversionImpl.hxx
+++ b/i18npool/inc/textconversionImpl.hxx
@@ -21,6 +21,7 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/i18n/XExtendedTextConversion.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
namespace com::sun::star::uno { class XComponentContext; }
@@ -35,7 +36,7 @@ class TextConversionImpl final : public cppu::WeakImplHelper
>
{
public:
- TextConversionImpl( const css::uno::Reference < css::uno::XComponentContext >& rxContext ) : m_xContext(rxContext) {};
+ TextConversionImpl( css::uno::Reference < css::uno::XComponentContext > xContext ) : m_xContext(std::move(xContext)) {};
// Methods
css::i18n::TextConversionResult SAL_CALL
diff --git a/i18npool/inc/transliterationImpl.hxx b/i18npool/inc/transliterationImpl.hxx
index 95c5fa2a088f..57441067346a 100644
--- a/i18npool/inc/transliterationImpl.hxx
+++ b/i18npool/inc/transliterationImpl.hxx
@@ -91,7 +91,7 @@ private:
css::uno::Reference< css::i18n::XExtendedTransliteration > caseignore;
/// @throws css::uno::RuntimeException
- bool loadModuleByName( const OUString& implName,
+ bool loadModuleByName( std::u16string_view implName,
css::uno::Reference<css::i18n::XExtendedTransliteration> & body, const css::lang::Locale& rLocale);
void clear();
diff --git a/i18npool/inc/transliteration_Ignore.hxx b/i18npool/inc/transliteration_Ignore.hxx
index 3ce28f5c682a..ba685c8e4548 100644
--- a/i18npool/inc/transliteration_Ignore.hxx
+++ b/i18npool/inc/transliteration_Ignore.hxx
@@ -126,7 +126,7 @@ TRANSLITERATION_IGNORE(ProlongedSoundMark_ja_JP)
#undef TRANSLITERATION_IGNORE
-#define TRANSLITERATION_IGNORE( name ) \
+#define TRANSLITERATION_IGNORE( name, implname ) \
class ignore##name final : public transliteration_Ignore {\
public:\
ignore##name () {\
@@ -134,7 +134,7 @@ public:\
table = nullptr;\
map = nullptr;\
transliterationName = "ignore"#name;\
- implementationName = "com.sun.star.i18n.Transliteration.ignore"#name;\
+ implementationName = "com.sun.star.i18n.Transliteration." implname;\
};\
OUString foldingImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, \
css::uno::Sequence< sal_Int32 >* pOffset) override; \
@@ -146,9 +146,9 @@ public:\
override;\
};
-TRANSLITERATION_IGNORE(Kana)
-TRANSLITERATION_IGNORE(Width)
-TRANSLITERATION_IGNORE(Size_ja_JP)
+TRANSLITERATION_IGNORE(Kana, "IGNORE_KANA")
+TRANSLITERATION_IGNORE(Width, "IGNORE_WIDTH")
+TRANSLITERATION_IGNORE(Size_ja_JP, "ignoreSize_ja_JP")
#undef TRANSLITERATION_IGNORE
diff --git a/i18npool/inc/transliteration_Numeric.hxx b/i18npool/inc/transliteration_Numeric.hxx
index a01f505b929a..7c0d7ec95dfc 100644
--- a/i18npool/inc/transliteration_Numeric.hxx
+++ b/i18npool/inc/transliteration_Numeric.hxx
@@ -49,7 +49,7 @@ protected:
private:
/// @throws css::uno::RuntimeException
OUString
- transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
+ transliterateBullet( std::u16string_view inStr, sal_Int32 startPos, sal_Int32 nCount,
css::uno::Sequence< sal_Int32 >* pOffset ) const;
};
diff --git a/i18npool/inc/transliteration_body.hxx b/i18npool/inc/transliteration_body.hxx
index a53aa77d15d2..6c3418fd7994 100644
--- a/i18npool/inc/transliteration_body.hxx
+++ b/i18npool/inc/transliteration_body.hxx
@@ -70,7 +70,16 @@ class Transliteration_casemapping final : public Transliteration_body
{
public:
Transliteration_casemapping();
- void setMappingType(const MappingType rMappingType, const css::lang::Locale& rLocale );
+ void setMappingType( const MappingType rMappingType )
+ {
+ if (nMappingType != rMappingType)
+ nMappingType = rMappingType;
+ }
+ void setLocale( const css::lang::Locale& rLocale )
+ {
+ if (aLocale != rLocale)
+ aLocale = rLocale;
+ }
};
class Transliteration_togglecase final : public Transliteration_body
diff --git a/i18npool/inc/wtt.h b/i18npool/inc/wtt.h
index f3e76f968434..c81afe0e1f7f 100644
--- a/i18npool/inc/wtt.h
+++ b/i18npool/inc/wtt.h
@@ -18,6 +18,8 @@
*/
#pragma once
+#include <sal/types.h>
+
namespace i18npool {
/*
diff --git a/i18npool/inc/xdictionary.hxx b/i18npool/inc/xdictionary.hxx
index cc7364bd14fc..f0861408bbd6 100644
--- a/i18npool/inc/xdictionary.hxx
+++ b/i18npool/inc/xdictionary.hxx
@@ -18,6 +18,7 @@
*/
#pragma once
+#include <osl/file.h>
#include <sal/types.h>
#include <com/sun/star/i18n/Boundary.hpp>
@@ -63,6 +64,11 @@ private:
css::i18n::Boundary boundary;
bool japaneseWordBreak;
+#ifdef DICT_JA_ZH_IN_DATAFILE
+ oslFileHandle m_aFileHandle;
+ sal_uInt64 m_nFileSize;
+ char* m_pMapping;
+#endif
public:
xdictionary(const char *lang);