LibreOffice Module linguistic (master) 1
|
#include <cppuhelper/factory.hxx>
#include "dicimp.hxx"
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
#include <linguistic/misc.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
#include <tools/debug.hxx>
#include <tools/stream.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <comphelper/sequence.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/linguistic2/DictionaryEventFlags.hpp>
#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSpellChecker1.hpp>
#include <algorithm>
#include <utility>
Go to the source code of this file.
Macros | |
#define | BUFSIZE 4096 |
#define | VERS2_NOLANGUAGE 1024 |
#define | MAX_HEADER_LENGTH 16 |
Functions | |
static uno::Reference< XLinguServiceManager2 > | GetLngSvcMgr_Impl () |
static bool | getTag (std::string_view rLine, std::string_view rTagName, OString &rTagValue) |
sal_Int16 | ReadDicVersion (SvStream &rStream, LanguageType &nLng, bool &bNeg, OUString &aDicName) |
static OString | formatForSave (const uno::Reference< XDictionaryEntry > &xEntry, rtl_TextEncoding eEnc) |
Variables | |
constexpr OUStringLiteral | SPELLML_SUPPORT = u"<?xml?>" |
constexpr OUStringLiteral | EXTENSION_FOR_TITLE_TEXT = u"." |
const char *const | pVerStr2 = "WBSWG2" |
const char *const | pVerStr5 = "WBSWG5" |
const char *const | pVerStr6 = "WBSWG6" |
const char *const | pVerOOo7 = "OOoUserDict1" |
const sal_Int16 | DIC_VERSION_DONTKNOW = -1 |
const sal_Int16 | DIC_VERSION_2 = 2 |
const sal_Int16 | DIC_VERSION_5 = 5 |
const sal_Int16 | DIC_VERSION_6 = 6 |
const sal_Int16 | DIC_VERSION_7 = 7 |
#define BUFSIZE 4096 |
Definition at line 58 of file dicimp.cxx.
#define MAX_HEADER_LENGTH 16 |
Definition at line 61 of file dicimp.cxx.
#define VERS2_NOLANGUAGE 1024 |
Definition at line 59 of file dicimp.cxx.
|
static |
Definition at line 390 of file dicimp.cxx.
References aStr, and OUStringToOString().
Referenced by DictionaryNeo::saveEntries().
|
static |
Definition at line 89 of file dicimp.cxx.
References comphelper::getProcessComponentContext().
Referenced by DictionaryNeo::addEntry_Impl().
|
static |
Definition at line 96 of file dicimp.cxx.
References nPos, and comphelper::string::strip().
Referenced by ReadDicVersion().
sal_Int16 ReadDicVersion | ( | SvStream & | rStream, |
LanguageType & | nLng, | ||
bool & | bNeg, | ||
OUString & | aDicName | ||
) |
Definition at line 109 of file dicimp.cxx.
References LanguageTag::convertToLanguageType(), DIC_VERSION_2, DIC_VERSION_5, DIC_VERSION_6, DIC_VERSION_7, DIC_VERSION_DONTKNOW, EXTENSION_FOR_TITLE_TEXT, find(), SvStream::GetError(), getTag(), LANGUAGE_NONE, MAX_HEADER_LENGTH, pVerOOo7, pVerStr2, pVerStr5, pVerStr6, SvStream::ReadBytes(), SvStream::ReadCharAsBool(), SvStream::ReadLine(), SvStream::ReadUInt16(), SvStream::Seek(), SvStream::Tell(), and VERS2_NOLANGUAGE.
Referenced by IsVers2OrNewer(), and DictionaryNeo::loadEntries().
const sal_Int16 DIC_VERSION_2 = 2 |
Definition at line 84 of file dicimp.cxx.
Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().
const sal_Int16 DIC_VERSION_5 = 5 |
Definition at line 85 of file dicimp.cxx.
Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().
const sal_Int16 DIC_VERSION_6 = 6 |
Definition at line 86 of file dicimp.cxx.
Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().
const sal_Int16 DIC_VERSION_7 = 7 |
Definition at line 87 of file dicimp.cxx.
Referenced by DictionaryNeo::loadEntries(), ReadDicVersion(), and DictionaryNeo::saveEntries().
const sal_Int16 DIC_VERSION_DONTKNOW = -1 |
Definition at line 83 of file dicimp.cxx.
Referenced by ReadDicVersion().
|
constexpr |
Definition at line 76 of file dicimp.cxx.
Referenced by ReadDicVersion(), and DictionaryNeo::saveEntries().
const char* const pVerOOo7 = "OOoUserDict1" |
Definition at line 81 of file dicimp.cxx.
Referenced by ReadDicVersion(), and DictionaryNeo::saveEntries().
const char* const pVerStr2 = "WBSWG2" |
Definition at line 78 of file dicimp.cxx.
Referenced by ReadDicVersion().
const char* const pVerStr5 = "WBSWG5" |
Definition at line 79 of file dicimp.cxx.
Referenced by ReadDicVersion().
const char* const pVerStr6 = "WBSWG6" |
Definition at line 80 of file dicimp.cxx.
Referenced by ReadDicVersion().
|
constexpr |
Definition at line 65 of file dicimp.cxx.
Referenced by DictionaryNeo::addEntry_Impl().