LibreOffice Module sw (master)  1
Functions
SwLangHelper Namespace Reference

Functions

void GetLanguageStatus (OutlinerView *pOLV, SfxItemSet &rSet)
 
bool SetLanguageStatus (OutlinerView *pOLV, SfxRequest &rReq, SwView const &rView, SwWrtShell &rSh)
 
void SetLanguage (SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
 
void SetLanguage (SwWrtShell &rWrtSh, OutlinerView const *pOLV, const ESelection &rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet)
 
void SetLanguage_None (SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet)
 
void SetLanguage_None (SwWrtShell &rWrtSh, OutlinerView const *pOLV, const ESelection &rSelection, bool bIsForSelection, SfxItemSet &rCoreSet)
 
void ResetLanguages (SwWrtShell &rWrtSh, OutlinerView const *pOLV=nullptr)
 
void SelectCurrentPara (SwWrtShell &rWrtSh)
 
void SelectPara (EditView &rEditView, const ESelection &rCurSel)
 
OUString GetTextForLanguageGuessing (EditEngine const *rEditEngine, const ESelection &rDocSelection)
 
OUString GetTextForLanguageGuessing (SwWrtShell const &rSh)
 
LanguageType GetLanguage (SfxItemSet const &aSet, sal_uInt16 nLangWhichId)
 
LanguageType GetLanguage (SwWrtShell &rSh, sal_uInt16 nLangWhichId)
 
LanguageType GetCurrentLanguage (SfxItemSet const &aSet, SvtScriptType nScriptType)
 
LanguageType GetCurrentLanguage (SwWrtShell &rSh)
 

Function Documentation

LanguageType SwLangHelper::GetCurrentLanguage ( SfxItemSet const &  aSet,
SvtScriptType  nScriptType 
)
Returns
: the language in use for the selected text. 'In use' means the language(s) matching the script type(s) of the selected text. Or in other words, the language a spell checker would use. If there is more than one language LANGUAGE_DONTKNOW will be returned.

Definition at line 481 of file langhelper.cxx.

References EE_CHAR_LANGUAGE, EE_CHAR_LANGUAGE_CJK, EE_CHAR_LANGUAGE_CTL, GetLanguage(), LANGUAGE_DONTKNOW, LANGUAGE_NONE, and LANGUAGE_SYSTEM.

Referenced by GetLanguageStatus(), and SwTextShell::GetState().

LanguageType SwLangHelper::GetCurrentLanguage ( SwWrtShell rSh)
Returns
: the language in use for the selected text. 'In use' means the language(s) matching the script type(s) of the selected text. Or in other words, the language a spell checker would use. If there is more than one language LANGUAGE_DONTKNOW will be returned.

Definition at line 433 of file langhelper.cxx.

References GetLanguage(), SwEditShell::GetScriptType(), LANGUAGE_DONTKNOW, LANGUAGE_NONE, LANGUAGE_SYSTEM, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE, and RES_CHRATR_LANGUAGE.

LanguageType SwLangHelper::GetLanguage ( SfxItemSet const &  aSet,
sal_uInt16  nLangWhichId 
)
LanguageType SwLangHelper::GetLanguage ( SwWrtShell rSh,
sal_uInt16  nLangWhichId 
)
Returns
: the language for the selected text that is set for the specified attribute (script type). If there are more than one languages used LANGUAGE_DONTKNOW will be returned.
Parameters
nLangWhichId: one of RES_CHRATR_LANGUAGE, RES_CHRATR_CJK_LANGUAGE, RES_CHRATR_CTL_LANGUAGE,

Definition at line 394 of file langhelper.cxx.

References SwViewShell::GetAttrPool(), SwEditShell::GetCurAttr(), and GetLanguage().

void SwLangHelper::GetLanguageStatus ( OutlinerView pOLV,
SfxItemSet rSet 
)
OUString SwLangHelper::GetTextForLanguageGuessing ( EditEngine const *  rEditEngine,
const ESelection rDocSelection 
)

Definition at line 547 of file langhelper.cxx.

References EditEngine::GetText(), and ESelection::nEndPos.

Referenced by GetLanguageStatus(), and SwTextShell::GetState().

OUString SwLangHelper::GetTextForLanguageGuessing ( SwWrtShell const &  rSh)
void SwLangHelper::ResetLanguages ( SwWrtShell rWrtSh,
OutlinerView const *  pOLV = nullptr 
)
void SwLangHelper::SelectCurrentPara ( SwWrtShell rWrtSh)
void SwLangHelper::SelectPara ( EditView rEditView,
const ESelection rCurSel 
)
void SwLangHelper::SetLanguage ( SwWrtShell rWrtSh,
const OUString &  rLangText,
bool  bIsForSelection,
SfxItemSet rCoreSet 
)
void SwLangHelper::SetLanguage ( SwWrtShell rWrtSh,
OutlinerView const *  pOLV,
const ESelection rSelection,
const OUString &  rLangText,
bool  bIsForSelection,
SfxItemSet rCoreSet 
)
void SwLangHelper::SetLanguage_None ( SwWrtShell rWrtSh,
bool  bIsForSelection,
SfxItemSet rCoreSet 
)

Definition at line 305 of file langhelper.cxx.

Referenced by SwTextShell::Execute(), SwSpellPopup::Execute(), and SetLanguageStatus().

void SwLangHelper::SetLanguage_None ( SwWrtShell rWrtSh,
OutlinerView const *  pOLV,
const ESelection rSelection,
bool  bIsForSelection,
SfxItemSet rCoreSet 
)
bool SwLangHelper::SetLanguageStatus ( OutlinerView pOLV,
SfxRequest rReq,
SwView const &  rView,
SwWrtShell rSh 
)