LibreOffice Module linguistic (master) 1
Macros | Functions | Variables
dicimp.cxx File Reference
#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>
Include dependency graph for dicimp.cxx:

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
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   4096

Definition at line 58 of file dicimp.cxx.

◆ MAX_HEADER_LENGTH

#define MAX_HEADER_LENGTH   16

Definition at line 61 of file dicimp.cxx.

◆ VERS2_NOLANGUAGE

#define VERS2_NOLANGUAGE   1024

Definition at line 59 of file dicimp.cxx.

Function Documentation

◆ formatForSave()

static OString formatForSave ( const uno::Reference< XDictionaryEntry > &  xEntry,
rtl_TextEncoding  eEnc 
)
static

Definition at line 390 of file dicimp.cxx.

References aStr, and OUStringToOString().

Referenced by DictionaryNeo::saveEntries().

◆ GetLngSvcMgr_Impl()

static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl ( )
static

Definition at line 89 of file dicimp.cxx.

References comphelper::getProcessComponentContext().

Referenced by DictionaryNeo::addEntry_Impl().

◆ getTag()

static bool getTag ( std::string_view  rLine,
std::string_view  rTagName,
OString &  rTagValue 
)
static

Definition at line 96 of file dicimp.cxx.

References nPos, and comphelper::string::strip().

Referenced by ReadDicVersion().

◆ ReadDicVersion()

sal_Int16 ReadDicVersion ( SvStream rStream,
LanguageType nLng,
bool &  bNeg,
OUString &  aDicName 
)

Variable Documentation

◆ DIC_VERSION_2

const sal_Int16 DIC_VERSION_2 = 2

Definition at line 84 of file dicimp.cxx.

Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().

◆ DIC_VERSION_5

const sal_Int16 DIC_VERSION_5 = 5

Definition at line 85 of file dicimp.cxx.

Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().

◆ DIC_VERSION_6

const sal_Int16 DIC_VERSION_6 = 6

Definition at line 86 of file dicimp.cxx.

Referenced by DictionaryNeo::loadEntries(), and ReadDicVersion().

◆ DIC_VERSION_7

const sal_Int16 DIC_VERSION_7 = 7

◆ DIC_VERSION_DONTKNOW

const sal_Int16 DIC_VERSION_DONTKNOW = -1

Definition at line 83 of file dicimp.cxx.

Referenced by ReadDicVersion().

◆ EXTENSION_FOR_TITLE_TEXT

constexpr OUStringLiteral EXTENSION_FOR_TITLE_TEXT = u"."
constexpr

Definition at line 76 of file dicimp.cxx.

Referenced by ReadDicVersion(), and DictionaryNeo::saveEntries().

◆ pVerOOo7

const char* const pVerOOo7 = "OOoUserDict1"

Definition at line 81 of file dicimp.cxx.

Referenced by ReadDicVersion(), and DictionaryNeo::saveEntries().

◆ pVerStr2

const char* const pVerStr2 = "WBSWG2"

Definition at line 78 of file dicimp.cxx.

Referenced by ReadDicVersion().

◆ pVerStr5

const char* const pVerStr5 = "WBSWG5"

Definition at line 79 of file dicimp.cxx.

Referenced by ReadDicVersion().

◆ pVerStr6

const char* const pVerStr6 = "WBSWG6"

Definition at line 80 of file dicimp.cxx.

Referenced by ReadDicVersion().

◆ SPELLML_SUPPORT

constexpr OUStringLiteral SPELLML_SUPPORT = u"<?xml?>"
constexpr

Definition at line 65 of file dicimp.cxx.

Referenced by DictionaryNeo::addEntry_Impl().