22#include <svx/svxids.hrc>
38#include <com/sun/star/i18n/TextConversionOption.hpp>
40#include <editeng/editeng.hxx>
41#include <osl/diagnose.h>
59 const sal_uInt16 aLangWhichId_EE[3] =
73 for(sal_uInt16
n : aLangWhichId_EE)
78 sal_uInt16 nLangWhichId = 0;
86 OSL_FAIL(
"unexpected case" );
97 for (sal_uInt16
n : aLangWhichId_EE)
106 for(sal_uInt16
n : aLangWhichId_EE)
118 for( sal_uInt16 nPage = 0; nPage < nPageCount; nPage++ )
122 for(
size_t nObj = 0; nObj < nObjCount; ++nObj )
144 case SID_SEARCH_ITEM:
152 SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(rSearchItem.
Clone()));
184 auto pDrawDocShell =
dynamic_cast<DrawDocShell*
>(pShell);
190 if (pShell == pFirstShell)
194 rFunctionContext.resetSearchFunction();
219 pView,
mpDoc, rReq));
228 SD_MOD()->SetSearchItem(std::unique_ptr<SvxSearchItem>(rSearchItem.
Clone()));
229 xFuSearch->SearchAndReplace(&rSearchItem);
244 case SID_GET_COLORLIST:
258 case SID_HANGUL_HANJA_CONVERSION:
268 case SID_CHINESE_CONVERSION:
277 case SID_LANGUAGE_STATUS:
279 OUString aNewLangTxt;
284 if (aNewLangTxt ==
"*" )
299 if (!aNewLangTxt.isEmpty())
301 static constexpr OUStringLiteral aSelectionLangPrefix(
u"Current_");
302 static constexpr OUStringLiteral aParagraphLangPrefix(
u"Paragraph_");
303 static constexpr OUStringLiteral aDocumentLangPrefix(
u"Default_");
305 bool bSelection =
false;
306 bool bParagraph =
false;
310 if (-1 != (
nPos = aNewLangTxt.indexOf( aDocumentLangPrefix )))
312 aNewLangTxt = aNewLangTxt.replaceAt(
nPos, aDocumentLangPrefix.getLength(),
u"" );
314 if (aNewLangTxt ==
"LANGUAGE_NONE")
316 else if (aNewLangTxt ==
"RESET_LANGUAGES")
321 else if (-1 != (
nPos = aNewLangTxt.indexOf( aSelectionLangPrefix )))
324 aNewLangTxt = aNewLangTxt.replaceAt(
nPos, aSelectionLangPrefix.getLength(),
u"" );
326 else if (-1 != (
nPos = aNewLangTxt.indexOf( aParagraphLangPrefix )))
329 aNewLangTxt = aNewLangTxt.replaceAt(
nPos, aParagraphLangPrefix.getLength(),
u"" );
332 if (bSelection || bParagraph)
343 if (nScriptType == SvtScriptType::LATIN)
345 if (nScriptType == SvtScriptType::COMPLEX)
347 if (nScriptType == SvtScriptType::ASIAN)
371 Broadcast(
SfxHint(SfxHintId::LanguageChanged));
374 case SID_SPELLCHECK_IGNORE_ALL:
383 OUString sIgnoreText;
388 if(sIgnoreText ==
"Spelling")
396 case SID_SPELLCHECK_APPLY_SUGGESTION:
410 static constexpr OUStringLiteral sSpellingRule(
u"Spelling_");
412 if(-1 != (
nPos = sApplyText.indexOf( sSpellingRule )))
414 sApplyText = sApplyText.replaceAt(
nPos, sSpellingRule.getLength(),
u"");
420 case SID_NOTEBOOKBAR:
const OUString & GetValue() const
const SfxItemSet & GetEmptyItemSet() const
virtual bool RemoveCharAttribs(sal_uInt16 nWhich)=0
ESelection GetSelection() const
void SetSelection(const ESelection &rNewSel)
void InsertText(const OUString &rNew, bool bSelect=false, bool bLOKShowSelect=true)
OUString SpellIgnoreWord()
EditEngine * GetEditEngine() const
void SetAttribs(const SfxItemSet &rSet)
const EditTextObject & GetTextObject() const
EditView & GetEditView() const
SAL_DLLPRIVATE bool GetOnlineSpell() const
SAL_DLLPRIVATE void StartOnlineSpelling(bool bForceSpelling=true)
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
const OutlinerView * GetTextEditOutlinerView() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
virtual OutlinerParaObject * GetOutlinerParaObject() const
virtual SdrObjKind GetObjIdentifier() const
void ClearMergedItem(const sal_uInt16 nWhich=0)
void SetMergedItem(const SfxPoolItem &rItem)
static SfxAbstractDialogFactory * Create()
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetNext(const SfxObjectShell &rPrev, const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
virtual void Invalidate(sal_uInt16 nId=0) override
static SAL_WARN_UNUSED_RESULT SfxObjectShell * GetFirst(const std::function< bool(const SfxObjectShell *)> &isObjectShell=nullptr, bool bOnlyVisible=true)
sal_uInt16 GetSlot() const
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void SetReturnValue(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxViewFrame * GetFrame() const
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
static SfxInterface * GetStaticInterface()
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
SfxBindings & GetBindings()
static LanguageType GetLanguageType(std::u16string_view rStr)
const XColorListRef & GetColorList() const
virtual SvxSearchItem * Clone(SfxItemPool *pPool=nullptr) const override
void Execute(SfxRequest &rReq)
Handles SFX-Requests.
::sd::ViewShell * mpViewShell
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
static FuSearch * createPtr(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
rtl::Reference< FuSearch > & getFunctionSearch()
void setSearchFunction(rtl::Reference< FuSearch > const &xFunction)
static bool IsRunning(ViewShellBase const &rBase)
returns true if there is a running presentation for the given ViewShellBase
SdDrawDocument * GetDoc() const
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
::sd::View * GetView() const
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
SdrView * GetDrawView() const
SearchContext & getSearchContext()
static void ExecMethod(SfxBindings &rBindings, const OUString &rUIName)
static void CloseMethod(SfxBindings &rBindings)
static bool IsActive(bool bConsiderSingleToolbar=false)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CTL(EE_CHAR_START+16)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE_CJK(EE_CHAR_START+15)
constexpr TypedWhichId< SvxLanguageItem > EE_CHAR_LANGUAGE(EE_CHAR_START+14)
#define LANGUAGE_DONTKNOW
SvtScriptType GetScriptTypeOfLanguage(LanguageType nLang)
static void lcl_setLanguage(const SdDrawDocument *pDoc, std::u16string_view rLanguage, bool bLanguageNone=false)
static void lcl_setLanguageForObj(SdrObject *pObj, LanguageType nLang, bool bLanguageNone)