summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-06-01 19:31:38 +0200
committerLászló Németh <nemeth@numbertext.org>2020-06-02 18:40:06 +0200
commitda64ec8c8a91db6a6ec9657898f081d5ee67e739 (patch)
tree2bd7d3ddf24ce6c5adeb3c29dd46ead2e1215c0a /include
parent2d6395b87218cbf3512aa9b54807a859205006f0 (diff)
tdf#133589 AutoCorrect: transliterate to Old Hungarian
In right-to-left paragraph mode, transliterate Hungarian text word by word during typing, also add the associated checkbox to Localized Options page of AutoCorrect dialog window. Old Hungarian (ISO 15924: Hung) is a historical and renewed script which is still in use to transliterate Hungarian writing. As a localized AutoCorrect feature, the patch supports the followings: – word-by-word transliteration of Hungarian texts only in right-to-left paragraph mode. – consonant disambiguation of digraphs and trigraphs based on hyphenation (now pattern-based Huhyphn dictionary of libhyphen, planned dictionary based Hunspell later) – transliteration by extended hu-Hung module of Numbertext library. Note: transliteration of the selected text using AutoCorrect Apply function has't been implemented, yet. Change-Id: Iee0f18e2485c974c35acf0a3abc3a49c2cf80196 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95303 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'include')
-rw-r--r--include/editeng/svxacorr.hxx5
-rw-r--r--include/editeng/swafopt.hxx1
2 files changed, 5 insertions, 1 deletions
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 697ac614f76d..c9908c633d01 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -71,13 +71,14 @@ enum class ACFlags : sal_uInt32 {
IgnoreDoubleSpace = 0x00000800, // Ignore 2 Spaces
ChgSglQuotes = 0x00001000, // Replace simple quotes
CorrectCapsLock = 0x00002000, // Correct accidental use of cAPS LOCK key
+ TransliterateRTL = 0x00004000, // Transliterate RTL text
ChgWordLstLoad = 0x20000000, // Replacement list loaded
CplSttLstLoad = 0x40000000, // Exception list for Capital letters Start loaded
WrdSttLstLoad = 0x80000000, // Exception list for Word Start loaded
};
namespace o3tl {
- template<> struct typed_flags<ACFlags> : is_typed_flags<ACFlags, 0xe0003fff> {};
+ template<> struct typed_flags<ACFlags> : is_typed_flags<ACFlags, 0xe0007fff> {};
}
enum class ACQuotes
@@ -119,6 +120,8 @@ public:
virtual bool ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos,
SvxAutoCorrect& rACorrect,
OUString* pPara ) = 0;
+ virtual bool TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos ) = 0;
+
// Is called after the change of the signs by the functions
// - FnCapitalStartWord
// - FnCapitalStartSentence
diff --git a/include/editeng/swafopt.hxx b/include/editeng/swafopt.hxx
index 360954a24ab8..682e85e4d77a 100644
--- a/include/editeng/swafopt.hxx
+++ b/include/editeng/swafopt.hxx
@@ -103,6 +103,7 @@ struct EDITENG_DLLPUBLIC SvxSwAutoFormatFlags
bool bChgOrdinalNumber : 1;
bool bChgToEnEmDash : 1;
bool bAddNonBrkSpace : 1;
+ bool bTransliterateRTL : 1;
bool bChgWeightUnderl : 1;
bool bSetINetAttr : 1;