LibreOffice Module cui (master) 1
Classes | Macros | Typedefs | Functions
optlingu.cxx File Reference
#include <utility>
#include <vcl/settings.hxx>
#include <vcl/weld.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/safeint.hxx>
#include <officecfg/Office/Security.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/linguprops.hxx>
#include <editeng/unolingu.hxx>
#include <linguistic/misc.hxx>
#include <sfx2/sfxsids.hrc>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/diagnose_ex.hxx>
#include <comphelper/dispatchcommand.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
#include <com/sun/star/linguistic2/XSpellChecker.hpp>
#include <com/sun/star/linguistic2/XProofreader.hpp>
#include <com/sun/star/linguistic2/XHyphenator.hpp>
#include <com/sun/star/linguistic2/XThesaurus.hpp>
#include <com/sun/star/linguistic2/XDictionary.hpp>
#include <com/sun/star/linguistic2/XDictionaryList.hpp>
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
#include <com/sun/star/lang/XServiceDisplayName.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <unotools/extendedsecurityoptions.hxx>
#include <svl/eitem.hxx>
#include <vcl/svapp.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <svx/svxdlg.hxx>
#include <editeng/optitems.hxx>
#include <optlingu.hxx>
#include <dialmgr.hxx>
#include <strings.hrc>
#include <ucbhelper/content.hxx>
#include <set>
#include <vector>
#include <map>
Include dependency graph for optlingu.cxx:

Go to the source code of this file.

Classes

class  SvxLinguData_Impl
 

Macros

#define TYPE_SPELL   sal_uInt8(1)
 
#define TYPE_GRAMMAR   sal_uInt8(2)
 
#define TYPE_HYPH   sal_uInt8(3)
 
#define TYPE_THES   sal_uInt8(4)
 

Typedefs

typedef std::vector< ServiceInfo_Impl > ServiceInfoArr
 
typedef std::map< LanguageType, Sequence< OUString > > LangImplNameTable
 

Functions

constexpr OUStringLiteral cSpell (SN_SPELLCHECKER)
 
constexpr OUStringLiteral cGrammar (SN_GRAMMARCHECKER)
 
constexpr OUStringLiteral cHyph (SN_HYPHENATOR)
 
constexpr OUStringLiteral cThes (SN_THESAURUS)
 
static sal_Int32 lcl_SeqGetEntryPos (const Sequence< OUString > &rSeq, std::u16string_view rEntry)
 
static bool KillFile_Impl (const OUString &rURL)
 
static OUString lcl_GetPropertyName (EID_OPTIONS eEntryId)
 
static sal_Int32 lcl_SeqGetIndex (const Sequence< OUString > &rSeq, std::u16string_view rTxt)
 
static void lcl_MergeDisplayArray (SvxLinguData_Impl &rData, const ServiceInfo_Impl &rToAdd)
 
 IMPL_LINK (SvxLinguTabPage, BoxDoubleClickHdl_Impl, weld::TreeView &, rBox, bool)
 
 IMPL_LINK_NOARG (SvxLinguTabPage, PostDblClickHdl_Impl, void *, void)
 
 IMPL_LINK (SvxLinguTabPage, ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, rRowCol, void)
 
 IMPL_LINK (SvxLinguTabPage, DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, rRowCol, void)
 
 IMPL_LINK (SvxLinguTabPage, ClickHdl_Impl, weld::Button &, rBtn, void)
 
 IMPL_LINK (SvxLinguTabPage, SelectHdl_Impl, weld::TreeView &, rBox, void)
 
 IMPL_STATIC_LINK_NOARG (SvxLinguTabPage, OnLinkClick, weld::LinkButton &, bool)
 
 IMPL_LINK (SvxEditModulesDlg, SelectHdl_Impl, weld::TreeView &, rBox, void)
 
 IMPL_LINK (SvxEditModulesDlg, BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, rRowCol, void)
 
 IMPL_LINK_NOARG (SvxEditModulesDlg, LangSelectListBoxHdl_Impl, weld::ComboBox &, void)
 
 IMPL_LINK (SvxEditModulesDlg, UpDownHdl_Impl, weld::Button &, rBtn, void)
 
 IMPL_LINK_NOARG (SvxEditModulesDlg, ClickHdl_Impl, weld::Button &, void)
 
 IMPL_LINK_NOARG (SvxEditModulesDlg, BackHdl_Impl, weld::Button &, void)
 
 IMPL_STATIC_LINK_NOARG (SvxEditModulesDlg, OnLinkClick, weld::LinkButton &, bool)
 

Macro Definition Documentation

◆ TYPE_GRAMMAR

#define TYPE_GRAMMAR   sal_uInt8(2)

Definition at line 119 of file optlingu.cxx.

◆ TYPE_HYPH

#define TYPE_HYPH   sal_uInt8(3)

Definition at line 120 of file optlingu.cxx.

◆ TYPE_SPELL

#define TYPE_SPELL   sal_uInt8(1)

Definition at line 118 of file optlingu.cxx.

◆ TYPE_THES

#define TYPE_THES   sal_uInt8(4)

Definition at line 121 of file optlingu.cxx.

Typedef Documentation

◆ LangImplNameTable

typedef std::map< LanguageType, Sequence< OUString > > LangImplNameTable

Definition at line 352 of file optlingu.cxx.

◆ ServiceInfoArr

typedef std::vector< ServiceInfo_Impl > ServiceInfoArr

Definition at line 351 of file optlingu.cxx.

Function Documentation

◆ cGrammar()

constexpr OUStringLiteral cGrammar ( SN_GRAMMARCHECKER  )
constexpr

◆ cHyph()

constexpr OUStringLiteral cHyph ( SN_HYPHENATOR  )
constexpr

◆ cSpell()

constexpr OUStringLiteral cSpell ( SN_SPELLCHECKER  )
constexpr

◆ cThes()

constexpr OUStringLiteral cThes ( SN_THESAURUS  )
constexpr

◆ IMPL_LINK() [1/8]

IMPL_LINK ( SvxEditModulesDlg  ,
BoxCheckButtonHdl_Impl  ,
const weld::TreeView::iter_col ,
rRowCol  ,
void   
)

Definition at line 1650 of file optlingu.cxx.

References i, nPos, pData, TRISTATE_FALSE, and TYPE_HYPH.

◆ IMPL_LINK() [2/8]

IMPL_LINK ( SvxEditModulesDlg  ,
SelectHdl_Impl  ,
weld::TreeView ,
rBox  ,
void   
)

Definition at line 1626 of file optlingu.cxx.

References pData, and TYPE_HYPH.

◆ IMPL_LINK() [3/8]

IMPL_LINK ( SvxEditModulesDlg  ,
UpDownHdl_Impl  ,
weld::Button ,
rBtn  ,
void   
)

Definition at line 1951 of file optlingu.cxx.

References sId, TRISTATE_FALSE, and TRISTATE_TRUE.

◆ IMPL_LINK() [4/8]

IMPL_LINK ( SvxLinguTabPage  ,
BoxDoubleClickHdl_Impl  ,
weld::TreeView ,
rBox  ,
bool   
)

in order to avoid a bug causing a GPF when double clicking on a module entry and exiting the "Edit Modules" dialog after that.

Definition at line 1308 of file optlingu.cxx.

References LINK, and Application::PostUserEvent().

◆ IMPL_LINK() [5/8]

IMPL_LINK ( SvxLinguTabPage  ,
ClickHdl_Impl  ,
weld::Button ,
rBtn  ,
void   
)

◆ IMPL_LINK() [6/8]

IMPL_LINK ( SvxLinguTabPage  ,
DicsBoxCheckButtonHdl_Impl  ,
const weld::TreeView::iter_col ,
rRowCol  ,
void   
)

Definition at line 1338 of file optlingu.cxx.

References LinguMgr::GetIgnoreAllList(), and TRISTATE_TRUE.

◆ IMPL_LINK() [7/8]

IMPL_LINK ( SvxLinguTabPage  ,
ModulesBoxCheckButtonHdl_Impl  ,
const weld::TreeView::iter_col ,
rRowCol  ,
void   
)

Definition at line 1330 of file optlingu.cxx.

References TRISTATE_TRUE.

◆ IMPL_LINK() [8/8]

IMPL_LINK ( SvxLinguTabPage  ,
SelectHdl_Impl  ,
weld::TreeView ,
rBox  ,
void   
)

Definition at line 1510 of file optlingu.cxx.

References aData, and SAL_WARN.

◆ IMPL_LINK_NOARG() [1/4]

IMPL_LINK_NOARG ( SvxEditModulesDlg  ,
BackHdl_Impl  ,
weld::Button ,
void   
)

Definition at line 1985 of file optlingu.cxx.

◆ IMPL_LINK_NOARG() [2/4]

IMPL_LINK_NOARG ( SvxEditModulesDlg  ,
ClickHdl_Impl  ,
weld::Button ,
void   
)

Definition at line 1978 of file optlingu.cxx.

References m_xDialog, and RET_OK.

◆ IMPL_LINK_NOARG() [3/4]

IMPL_LINK_NOARG ( SvxEditModulesDlg  ,
LangSelectListBoxHdl_Impl  ,
weld::ComboBox ,
void   
)

Definition at line 1669 of file optlingu.cxx.

◆ IMPL_LINK_NOARG() [4/4]

IMPL_LINK_NOARG ( SvxLinguTabPage  ,
PostDblClickHdl_Impl  ,
void *  ,
void   
)

Definition at line 1324 of file optlingu.cxx.

◆ IMPL_STATIC_LINK_NOARG() [1/2]

IMPL_STATIC_LINK_NOARG ( SvxEditModulesDlg  ,
OnLinkClick  ,
weld::LinkButton ,
bool   
)

Definition at line 1991 of file optlingu.cxx.

References comphelper::dispatchCommand().

◆ IMPL_STATIC_LINK_NOARG() [2/2]

IMPL_STATIC_LINK_NOARG ( SvxLinguTabPage  ,
OnLinkClick  ,
weld::LinkButton ,
bool   
)

Definition at line 1558 of file optlingu.cxx.

References comphelper::dispatchCommand().

◆ KillFile_Impl()

static bool KillFile_Impl ( const OUString &  rURL)
static

Definition at line 95 of file optlingu.cxx.

References Any, Content, comphelper::getProcessComponentContext(), and TOOLS_WARN_EXCEPTION.

Referenced by IMPL_LINK().

◆ lcl_GetPropertyName()

static OUString lcl_GetPropertyName ( EID_OPTIONS  eEntryId)
static

◆ lcl_MergeDisplayArray()

static void lcl_MergeDisplayArray ( SvxLinguData_Impl rData,
const ServiceInfo_Impl &  rToAdd 
)
static

◆ lcl_SeqGetEntryPos()

static sal_Int32 lcl_SeqGetEntryPos ( const Sequence< OUString > &  rSeq,
std::u16string_view  rEntry 
)
static

Definition at line 81 of file optlingu.cxx.

References i.

Referenced by SvxLinguData_Impl::AddRemove(), and SvxEditModulesDlg::LangSelectHdl_Impl().

◆ lcl_SeqGetIndex()

static sal_Int32 lcl_SeqGetIndex ( const Sequence< OUString > &  rSeq,
std::u16string_view  rTxt 
)
static

Definition at line 407 of file optlingu.cxx.

References i.

Referenced by SvxLinguData_Impl::GetSortedImplNames().