|
LibreOffice Module editeng (master) 1
|
#include <memory>#include <utility>#include <algorithm>#include <string_view>#include <sal/config.h>#include <com/sun/star/linguistic2/XSpellChecker1.hpp>#include <com/sun/star/embed/XStorage.hpp>#include <com/sun/star/io/IOException.hpp>#include <com/sun/star/io/XStream.hpp>#include <tools/urlobj.hxx>#include <i18nlangtag/mslangid.hxx>#include <i18nutil/transliteration.hxx>#include <sal/log.hxx>#include <osl/diagnose.h>#include <vcl/svapp.hxx>#include <vcl/settings.hxx>#include <svl/fstathelper.hxx>#include <svl/urihelper.hxx>#include <unotools/charclass.hxx>#include <com/sun/star/i18n/UnicodeType.hpp>#include <unotools/collatorwrapper.hxx>#include <com/sun/star/i18n/UnicodeScript.hpp>#include <com/sun/star/i18n/OrdinalSuffix.hpp>#include <unotools/localedatawrapper.hxx>#include <unotools/transliterationwrapper.hxx>#include <comphelper/processfactory.hxx>#include <comphelper/storagehelper.hxx>#include <o3tl/string_view.hxx>#include <editeng/editids.hrc>#include <sot/storage.hxx>#include <editeng/udlnitem.hxx>#include <editeng/wghtitem.hxx>#include <editeng/postitem.hxx>#include <editeng/crossedoutitem.hxx>#include <editeng/escapementitem.hxx>#include <editeng/svxacorr.hxx>#include <editeng/unolingu.hxx>#include <vcl/window.hxx>#include <com/sun/star/xml/sax/InputSource.hpp>#include <com/sun/star/xml/sax/FastParser.hpp>#include <com/sun/star/xml/sax/Writer.hpp>#include <com/sun/star/xml/sax/SAXParseException.hpp>#include <unotools/streamwrap.hxx>#include "SvXMLAutoCorrectImport.hxx"#include "SvXMLAutoCorrectExport.hxx"#include "SvXMLAutoCorrectTokenHandler.hxx"#include <ucbhelper/content.hxx>#include <com/sun/star/ucb/ContentCreationException.hpp>#include <com/sun/star/ucb/XCommandEnvironment.hpp>#include <com/sun/star/ucb/TransferInfo.hpp>#include <com/sun/star/ucb/NameClash.hpp>#include <comphelper/diagnose_ex.hxx>#include <xmloff/xmltoken.hxx>#include <unordered_map>#include <rtl/character.hxx>Go to the source code of this file.
Classes | |
| struct | o3tl::typed_flags< Flags > |
| struct | SvxAutocorrWordList::CompareSvxAutocorrWordList |
| struct | SvxAutocorrWordList::Impl |
Namespaces | |
| namespace | o3tl |
Functions | |
| static OUString | EncryptBlockName_Imp (std::u16string_view rName) |
| static bool | NonFieldWordDelim (const sal_Unicode c) |
| static bool | IsWordDelim (const sal_Unicode c) |
| static bool | IsLowerLetter (sal_Int32 nCharType) |
| static bool | IsUpperLetter (sal_Int32 nCharType) |
| static bool | lcl_IsUnsupportedUnicodeChar (CharClass const &rCC, const OUString &rTxt, sal_Int32 nStt, sal_Int32 nEnd) |
| static bool | lcl_IsSymbolChar (CharClass const &rCC, const OUString &rTxt, sal_Int32 nStt, sal_Int32 nEnd) |
| static bool | lcl_IsInArr (std::u16string_view arr, const sal_uInt32 c) |
| static const LanguageTag & | GetAppLang () |
| static LanguageType | GetDocLanguage (const SvxAutoCorrDoc &rDoc, sal_Int32 nPos) |
| Never use an unresolved LANGUAGE_SYSTEM. More... | |
| static LocaleDataWrapper & | GetLocaleDataWrapper (LanguageType nLang) |
| static TransliterationWrapper & | GetIgnoreTranslWrapper () |
| static CollatorWrapper & | GetCollatorWrapper () |
| constexpr OUStringLiteral | sEmDash (u"\u2014") |
| constexpr OUStringLiteral | sEnDash (u"\u2013") |
| static bool | lcl_HasPrecedingChar (std::u16string_view rTxt, sal_Int32 nPos, const sal_Unicode sPrecedingChar, const sal_Unicode sStopChar, const sal_Unicode *aStopChars) |
| static void | GeneratePackageName (std::u16string_view rShort, OUString &rPackageName) |
| static const SvxAutocorrWord * | lcl_SearchWordsInList (SvxAutoCorrectLanguageLists *pList, std::u16string_view rTxt, sal_Int32 &rStt, sal_Int32 nEndPos) |
| static bool | lcl_FindAbbreviation (const SvStringsISortDtor *pList, const OUString &sWord) |
Variables | |
| const sal_Unicode | cNonBreakingSpace = 0xA0 |
| constexpr OUStringLiteral | pXMLImplWordStart_ExcptLstStr = u"WordExceptList.xml" |
| constexpr OUStringLiteral | pXMLImplCplStt_ExcptLstStr = u"SentenceExceptList.xml" |
| constexpr OUStringLiteral | pXMLImplAutocorr_ListStr = u"DocumentList.xml" |
| constexpr std::u16string_view | sImplSttSkipChars = u"\"'([{\u2018\u2019\u201a\u201b\u201c\u201d\u201e\u201f\u0083\u0084\u0089\u0091\u0092\u0093\u0094" |
| constexpr std::u16string_view | sImplEndSkipChars = u"\"')]}\u2018\u2019\u201a\u201b\u201c\u201d\u201e\u201f\u0083\u0084\u0089\u0091\u0092\u0093\u0094" |
| constexpr sal_Unicode | cEmDash = 0x2014 |
| constexpr sal_Unicode | cEnDash = 0x2013 |
| constexpr sal_Unicode | cApostrophe = 0x2019 |
| constexpr sal_Unicode | cLeftDoubleAngleQuote = 0xAB |
| constexpr sal_Unicode | cRightDoubleAngleQuote = 0xBB |
| constexpr sal_Unicode | cLeftSingleAngleQuote = 0x2039 |
| constexpr sal_Unicode | cRightSingleAngleQuote = 0x203A |
| const sal_Unicode | aStopDoubleAngleQuoteStart [] = { 0x201E, 0x201D, 0x201C, 0 } |
| const sal_Unicode | aStopDoubleAngleQuoteEnd [] = { cRightDoubleAngleQuote, cLeftDoubleAngleQuote, 0x201D, 0x201E, 0 } |
| const sal_Unicode | aStopDoubleAngleQuoteEndRo [] = { cLeftDoubleAngleQuote, cRightDoubleAngleQuote, 0x201D, 0x201E, 0x201C, 0 } |
| const sal_Unicode | aStopSingleQuoteEnd [] = { 0x201A, 0x2018, 0x201C, 0x201E, 0 } |
| const sal_Unicode | aStopSingleQuoteEndRuUa [] = { 0x201E, 0x201C, cRightDoubleAngleQuote, cLeftDoubleAngleQuote, 0 } |
|
static |
Definition at line 1932 of file svxacorr.cxx.
References aName, lcl_IsInArr(), nPos, and u.
Referenced by SvxAutoCorrectLanguageLists::MakeCombinedChanges(), and SvxAutoCorrectLanguageLists::PutText().
|
static |
Definition at line 1945 of file svxacorr.cxx.
References aBuf, nPos, and OUStringToOString().
Referenced by SvxAutoCorrectLanguageLists::MakeCombinedChanges(), and SvxAutoCorrectLanguageLists::PutText().
|
static |
Definition at line 201 of file svxacorr.cxx.
References AllSettings::GetLanguageTag(), and Application::GetSettings().
Referenced by SvxAutoCorrect::FnChgToEnEmDash(), GetCollatorWrapper(), SvxAutoCorrect::GetDefaultFlags(), GetDocLanguage(), and GetIgnoreTranslWrapper().
|
static |
Definition at line 236 of file svxacorr.cxx.
References GetAppLang(), getLocale(), and CollatorWrapper::loadDefaultCollator().
Referenced by SvxAutocorrWordList::Insert(), and SvxAutocorrWordList::CompareSvxAutocorrWordList::operator()().
|
static |
Never use an unresolved LANGUAGE_SYSTEM.
Definition at line 207 of file svxacorr.cxx.
References GetAppLang(), SvxAutoCorrDoc::GetLanguage(), LanguageTag::getLanguageType(), LANGUAGE_SYSTEM, and nPos.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::GetPrevAutoCorrWord(), and SvxAutoCorrect::GetQuote().
|
static |
Definition at line 223 of file svxacorr.cxx.
References GetAppLang().
Referenced by SvxAutocorrWordList::WordMatches().
|
static |
Definition at line 215 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect(), and SvxAutoCorrect::GetQuote().
|
static |
Definition at line 126 of file svxacorr.cxx.
References CharClass::isLetterType().
Referenced by SvxAutoCorrect::FnCapitalStartWord(), and SvxAutoCorrect::FnCorrectCapsLock().
|
static |
Definition at line 132 of file svxacorr.cxx.
References CharClass::isLetterType().
Referenced by SvxAutoCorrect::FnCapitalStartSentence(), SvxAutoCorrect::FnCapitalStartWord(), and SvxAutoCorrect::FnCorrectCapsLock().
|
static |
Definition at line 120 of file svxacorr.cxx.
References NonFieldWordDelim().
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnAddNonBrkSpace(), SvxAutoCorrect::FnChgWeightUnderl(), SvxAutoCorrect::GetChunkForAutoText(), SvxAutoCorrect::GetPrevAutoCorrWord(), and SvxAutocorrWordList::WordMatches().
|
static |
Definition at line 2083 of file svxacorr.cxx.
References o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::begin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::find(), i, n, nPos, size, and o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::size().
Referenced by SvxAutoCorrect::FindInCplSttExceptList().
|
static |
Definition at line 1311 of file svxacorr.cxx.
References nPos.
Referenced by SvxAutoCorrect::DoAutoCorrect().
|
static |
Definition at line 177 of file svxacorr.cxx.
References arr.
Referenced by SvxAutoCorrect::DoAutoCorrect(), EncryptBlockName_Imp(), SvxAutoCorrect::FnCapitalStartSentence(), SvxAutoCorrect::FnChgOrdinalNumber(), SvxAutoCorrect::FnChgToEnEmDash(), and SvxAutoCorrect::GetPrevAutoCorrWord().
|
static |
Definition at line 166 of file svxacorr.cxx.
References CharClass::getType().
Referenced by SvxAutoCorrect::DoAutoCorrect(), and SvxAutoCorrect::GetPrevAutoCorrWord().
|
static |
Definition at line 138 of file svxacorr.cxx.
References CharClass::getScript().
Referenced by SvxAutoCorrect::DoAutoCorrect().
|
static |
Definition at line 1969 of file svxacorr.cxx.
References SvxAutoCorrectLanguageLists::GetAutocorrWordList(), and SvxAutocorrWordList::SearchWordsInList().
Referenced by SvxAutoCorrect::SearchWordsInList().
|
static |
Definition at line 114 of file svxacorr.cxx.
References cNonBreakingSpace.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnCapitalStartSentence(), and IsWordDelim().
|
constexpr |
Referenced by SvxAutoCorrect::FnChgToEnEmDash().
|
constexpr |
Referenced by SvxAutoCorrect::FnChgToEnEmDash().
| const sal_Unicode aStopDoubleAngleQuoteEnd[] = { cRightDoubleAngleQuote, cLeftDoubleAngleQuote, 0x201D, 0x201E, 0 } |
Definition at line 317 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
| const sal_Unicode aStopDoubleAngleQuoteEndRo[] = { cLeftDoubleAngleQuote, cRightDoubleAngleQuote, 0x201D, 0x201E, 0x201C, 0 } |
Definition at line 319 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
| const sal_Unicode aStopDoubleAngleQuoteStart[] = { 0x201E, 0x201D, 0x201C, 0 } |
Definition at line 316 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
| const sal_Unicode aStopSingleQuoteEnd[] = { 0x201A, 0x2018, 0x201C, 0x201E, 0 } |
Definition at line 320 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
| const sal_Unicode aStopSingleQuoteEndRuUa[] = { 0x201E, 0x201C, cRightDoubleAngleQuote, cLeftDoubleAngleQuote, 0 } |
Definition at line 321 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
|
constexpr |
Definition at line 309 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnCapitalStartSentence(), and SvxAutoCorrect::InsertQuote().
|
constexpr |
Definition at line 305 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
|
constexpr |
Definition at line 306 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect().
|
constexpr |
Definition at line 310 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::InsertQuote().
|
constexpr |
Definition at line 312 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::InsertQuote().
| const sal_Unicode cNonBreakingSpace = 0xA0 |
Definition at line 98 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnAddNonBrkSpace(), SvxAutoCorrect::InsertQuote(), and NonFieldWordDelim().
|
constexpr |
Definition at line 311 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::InsertQuote().
|
constexpr |
Definition at line 313 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::InsertQuote().
|
constexpr |
Definition at line 102 of file svxacorr.cxx.
Referenced by SvxAutoCorrectLanguageLists::LoadAutocorrWordList(), and SvxAutoCorrectLanguageLists::MakeBlocklist_Imp().
|
constexpr |
Definition at line 101 of file svxacorr.cxx.
Referenced by SvxAutoCorrectLanguageLists::AddToCplSttExceptList(), SvxAutoCorrectLanguageLists::LoadCplSttExceptList(), SvxAutoCorrectLanguageLists::MakeUserStorage_Impl(), and SvxAutoCorrectLanguageLists::SaveCplSttExceptList().
|
constexpr |
| constexpr std::u16string_view sImplEndSkipChars = u"\"')]}\u2018\u2019\u201a\u201b\u201c\u201d\u201e\u201f\u0083\u0084\u0089\u0091\u0092\u0093\u0094" |
Definition at line 110 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnChgOrdinalNumber(), and SvxAutoCorrect::FnChgToEnEmDash().
|
constexpr |
Definition at line 108 of file svxacorr.cxx.
Referenced by SvxAutoCorrect::DoAutoCorrect(), SvxAutoCorrect::FnChgOrdinalNumber(), SvxAutoCorrect::FnChgToEnEmDash(), and SvxAutoCorrect::GetPrevAutoCorrWord().