[Libreoffice-commits] core.git: cui/source editeng/inc editeng/source include/editeng sc/source sd/source sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 6 19:47:05 UTC 2021
cui/source/dialogs/hyphen.cxx | 2 +-
cui/source/factory/dlgfact.cxx | 2 +-
cui/source/factory/dlgfact.hxx | 2 +-
cui/source/inc/hyphen.hxx | 2 +-
editeng/inc/edtspell.hxx | 2 +-
editeng/source/editeng/editview.cxx | 13 ++++++-------
editeng/source/editeng/edtspell.cxx | 2 +-
editeng/source/editeng/impedit.hxx | 6 +++---
editeng/source/editeng/impedit4.cxx | 17 ++++++-----------
editeng/source/misc/splwrap.cxx | 4 ++--
editeng/source/outliner/outlvw.cxx | 12 ++++++------
include/editeng/editview.hxx | 6 +++---
include/editeng/edtdlg.hxx | 2 +-
include/editeng/outliner.hxx | 7 ++++---
include/editeng/splwrap.hxx | 6 +++---
sc/source/ui/drawfunc/drtxtob.cxx | 3 +--
sc/source/ui/inc/spelleng.hxx | 10 +++++-----
sc/source/ui/view/spelleng.cxx | 14 +++++++-------
sc/source/ui/view/viewfun4.cxx | 5 +++--
sd/source/ui/func/futhes.cxx | 8 +++++---
sd/source/ui/view/Outliner.cxx | 1 +
sw/source/uibase/docvw/AnnotationWin2.cxx | 2 +-
sw/source/uibase/lingu/sdrhhcwrap.cxx | 2 +-
sw/source/uibase/shells/annotsh.cxx | 8 ++++----
sw/source/uibase/shells/drwtxtsh.cxx | 7 ++++---
25 files changed, 72 insertions(+), 73 deletions(-)
New commits:
commit c2c5b1f7558004aa0d3541b7c4ffadc5d6bad331
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Apr 6 17:28:59 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Apr 6 21:46:05 2021 +0200
remove Application::GetDefDialogParent call in editeng
and pass in an explicit parent to use
Change-Id: I1aa768ec5ac13b2097b78499f964a3590a0ac14e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113695
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index f7b6549fc042..a16dca1e20a3 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -403,7 +403,7 @@ IMPL_LINK_NOARG(SvxHyphenWordDialog, GetFocusHdl_Impl, weld::Widget&, void)
SvxHyphenWordDialog::SvxHyphenWordDialog(
const OUString &rWord, LanguageType nLang,
- weld::Window* pParent,
+ weld::Widget* pParent,
uno::Reference< linguistic2::XHyphenator > const &xHyphen,
SvxSpellWrapper* pWrapper)
: SfxDialogController(pParent, "cui/ui/hyphenate.ui", "HyphenateDialog")
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 25f2c6f124af..6d0a44086d47 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1079,7 +1079,7 @@ VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialo
return VclPtr<AbstractThesaurusDialog_Impl>::Create(std::make_shared<SvxThesaurusDialog>(pParent, xThesaurus, rWord, nLanguage));
}
-VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Window* pParent,
+VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDialog(weld::Widget* pParent,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper)
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 2d7afbe6f6a1..1abf42683c95 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -796,7 +796,7 @@ public:
css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
const OUString &rWord, LanguageType nLanguage) override;
- virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Window*,
+ virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Widget*,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper) override;
diff --git a/cui/source/inc/hyphen.hxx b/cui/source/inc/hyphen.hxx
index 4625d2491e18..cb8104c70315 100644
--- a/cui/source/inc/hyphen.hxx
+++ b/cui/source/inc/hyphen.hxx
@@ -72,7 +72,7 @@ class SvxHyphenWordDialog : public SfxDialogController
public:
SvxHyphenWordDialog(const OUString &rWord, LanguageType nLang,
- weld::Window* pParent,
+ weld::Widget* pParent,
css::uno::Reference<css::linguistic2::XHyphenator> const &xHyphen,
SvxSpellWrapper* pWrapper);
virtual ~SvxHyphenWordDialog() override;
diff --git a/editeng/inc/edtspell.hxx b/editeng/inc/edtspell.hxx
index eaf73b8908de..91e2218dad06 100644
--- a/editeng/inc/edtspell.hxx
+++ b/editeng/inc/edtspell.hxx
@@ -45,7 +45,7 @@ private:
virtual bool SpellMore() override;
public:
- EditSpellWrapper(weld::Window* pWin, bool bIsStart, EditView* pView);
+ EditSpellWrapper(weld::Widget* pWin, bool bIsStart, EditView* pView);
};
/**
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 7cc5e123db35..6320c1f8dfbd 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -837,30 +837,29 @@ void EditView::CompleteAutoCorrect( vcl::Window const * pFrameWin )
}
}
-EESpellState EditView::StartSpeller( bool bMultipleDoc )
+EESpellState EditView::StartSpeller(weld::Widget* pDialogParent, bool bMultipleDoc)
{
if ( !pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
return EESpellState::NoSpeller;
- return pImpEditView->pEditEngine->pImpEditEngine->Spell( this, bMultipleDoc );
+ return pImpEditView->pEditEngine->pImpEditEngine->Spell(this, pDialogParent, bMultipleDoc);
}
-EESpellState EditView::StartThesaurus()
+EESpellState EditView::StartThesaurus(weld::Widget* pDialogParent)
{
if ( !pImpEditView->pEditEngine->pImpEditEngine->GetSpeller().is() )
return EESpellState::NoSpeller;
- return pImpEditView->pEditEngine->pImpEditEngine->StartThesaurus( this );
+ return pImpEditView->pEditEngine->pImpEditEngine->StartThesaurus(this, pDialogParent);
}
-void EditView::StartTextConversion(
+void EditView::StartTextConversion(weld::Widget* pDialogParent,
LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont,
sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{
- pImpEditView->pEditEngine->pImpEditEngine->Convert( this, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc );
+ pImpEditView->pEditEngine->pImpEditEngine->Convert(this, pDialogParent, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc);
}
-
sal_Int32 EditView::StartSearchAndReplace( const SvxSearchItem& rSearchItem )
{
return pImpEditView->pEditEngine->pImpEditEngine->StartSearchAndReplace( this, rSearchItem );
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index 04658edad326..f3aa07e25c1e 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -36,7 +36,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::linguistic2;
-EditSpellWrapper::EditSpellWrapper(weld::Window* pWindow,
+EditSpellWrapper::EditSpellWrapper(weld::Widget* pWindow,
bool bIsStart, EditView* pView )
: SvxSpellWrapper(pWindow, bIsStart, false/*bIsAllRight*/)
{
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index a9cacc93111e..39e52c9f7a4b 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -1001,15 +1001,15 @@ public:
css::lang::Locale GetLocale( const EditPaM& rPaM ) const;
void DoOnlineSpelling( ContentNode* pThisNodeOnly = nullptr, bool bSpellAtCursorPos = false, bool bInterruptible = true );
- EESpellState Spell( EditView* pEditView, bool bMultipleDoc );
+ EESpellState Spell(EditView* pEditView, weld::Widget* pDialogParent, bool bMultipleDoc);
EESpellState HasSpellErrors();
void ClearSpellErrors();
- EESpellState StartThesaurus( EditView* pEditView );
+ EESpellState StartThesaurus(EditView* pEditView, weld::Widget* pDialogParent);
css::uno::Reference< css::linguistic2::XSpellAlternatives >
ImpSpell( EditView* pEditView );
// text conversion functions
- void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc );
+ void Convert(EditView* pEditView, weld::Widget* pDialogParent, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc);
void ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange,
bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const vcl::Font *pTargetFont );
ConvInfo * GetConvInfo() const { return pConvInfo.get(); }
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index d3b24a16a120..fc4348764796 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1435,7 +1435,7 @@ void ImpEditEngine::CreateSpellInfo( bool bMultipleDocs )
}
-EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
+EESpellState ImpEditEngine::Spell(EditView* pEditView, weld::Widget* pDialogParent, bool bMultipleDoc)
{
SAL_WARN_IF( !xSpeller.is(), "editeng", "No Spell checker set!" );
@@ -1459,8 +1459,7 @@ EESpellState ImpEditEngine::Spell( EditView* pEditView, bool bMultipleDoc )
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pSpellInfo->aSpellStart )
bIsStart = true;
- vcl::Window* pParent = Application::GetDefDialogParent();
- std::unique_ptr<EditSpellWrapper> pWrp(new EditSpellWrapper(pParent ? pParent->GetFrameWeld() : nullptr,
+ std::unique_ptr<EditSpellWrapper> pWrp(new EditSpellWrapper(pDialogParent,
bIsStart, pEditView ));
pWrp->SpellDocument();
pWrp.reset();
@@ -1515,8 +1514,7 @@ bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang )
return bHasConvTxt;
}
-
-void ImpEditEngine::Convert( EditView* pEditView,
+void ImpEditEngine::Convert( EditView* pEditView, weld::Widget* pDialogParent,
LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont,
sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{
@@ -1562,9 +1560,7 @@ void ImpEditEngine::Convert( EditView* pEditView,
else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pConvInfo->aConvStart )
bIsStart = true;
- tools::Rectangle aDummy;
- pEditView->pImpEditView->DrawSelectionXOR();
- TextConvWrapper aWrp( pEditView->pImpEditView->GetPopupParent(aDummy),
+ TextConvWrapper aWrp( pDialogParent,
::comphelper::getProcessComponentContext(),
LanguageTag::convertToLocale( nSrcLang ),
LanguageTag::convertToLocale( nDestLang ),
@@ -2431,7 +2427,7 @@ void ImpEditEngine::ClearSpellErrors()
aEditDoc.ClearSpellErrors();
}
-EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
+EESpellState ImpEditEngine::StartThesaurus(EditView* pEditView, weld::Widget* pDialogParent)
{
EditSelection aCurSel( pEditView->pImpEditView->GetEditSelection() );
if ( !aCurSel.HasRange() )
@@ -2443,8 +2439,7 @@ EESpellState ImpEditEngine::StartThesaurus( EditView* pEditView )
return EESpellState::ErrorFound;
EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
- tools::Rectangle aDummy;
- ScopedVclPtr<AbstractThesaurusDialog> xDlg(pFact->CreateThesaurusDialog(pEditView->pImpEditView->GetPopupParent(aDummy), xThes,
+ ScopedVclPtr<AbstractThesaurusDialog> xDlg(pFact->CreateThesaurusDialog(pDialogParent, xThes,
aWord, GetLanguage( aCurSel.Max() ) ));
if (xDlg->Execute() == RET_OK)
{
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index fe6704b9513f..b51c9c97b613 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -132,7 +132,7 @@ SvxSpellWrapper::~SvxSpellWrapper()
*
--------------------------------------------------------------------*/
-SvxSpellWrapper::SvxSpellWrapper( weld::Window* pWn,
+SvxSpellWrapper::SvxSpellWrapper( weld::Widget* pWn,
const bool bStart, const bool bIsAllRight ) :
pWin ( pWn ),
@@ -149,7 +149,7 @@ SvxSpellWrapper::SvxSpellWrapper( weld::Window* pWn,
}
-SvxSpellWrapper::SvxSpellWrapper( weld::Window* pWn,
+SvxSpellWrapper::SvxSpellWrapper( weld::Widget* pWn,
Reference< XHyphenator > const &xHyphenator,
const bool bStart, const bool bOther ) :
pWin ( pWn ),
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 7201bf840f24..6423094e793b 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1223,17 +1223,17 @@ OUString OutlinerView::GetSelected() const
return pEditView->GetSelected();
}
-void OutlinerView::StartSpeller()
+void OutlinerView::StartSpeller(weld::Widget* pDialogParent)
{
- pEditView->StartSpeller();
+ pEditView->StartSpeller(pDialogParent);
}
-EESpellState OutlinerView::StartThesaurus()
+EESpellState OutlinerView::StartThesaurus(weld::Widget* pDialogParent)
{
- return pEditView->StartThesaurus();
+ return pEditView->StartThesaurus(pDialogParent);
}
-void OutlinerView::StartTextConversion(
+void OutlinerView::StartTextConversion(weld::Widget* pDialogParent,
LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont,
sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc )
{
@@ -1243,7 +1243,7 @@ void OutlinerView::StartTextConversion(
(LANGUAGE_CHINESE_TRADITIONAL == nSrcLang && LANGUAGE_CHINESE_SIMPLIFIED == nDestLang)
)
{
- pEditView->StartTextConversion( nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc );
+ pEditView->StartTextConversion(pDialogParent, nSrcLang, nDestLang, pDestFont, nOptions, bIsInteractive, bMultipleDoc);
}
else
{
diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx
index 97b7bb2df3c5..41cf529a81a2 100644
--- a/include/editeng/editview.hxx
+++ b/include/editeng/editview.hxx
@@ -287,12 +287,12 @@ public:
void CompleteAutoCorrect( vcl::Window const * pFrameWin = nullptr );
- EESpellState StartSpeller( bool bMultipleDoc = false );
- EESpellState StartThesaurus();
+ EESpellState StartSpeller(weld::Widget* pDialogParent, bool bMultipleDoc = false);
+ EESpellState StartThesaurus(weld::Widget* pDialogParent);
sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
// for text conversion
- void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc );
+ void StartTextConversion(weld::Widget* pDialogParent, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc);
void TransliterateText( TransliterationFlags nTransliterationMode );
diff --git a/include/editeng/edtdlg.hxx b/include/editeng/edtdlg.hxx
index a9f616627aa3..15b591a41ff9 100644
--- a/include/editeng/edtdlg.hxx
+++ b/include/editeng/edtdlg.hxx
@@ -97,7 +97,7 @@ public:
css::uno::Reference<css::linguistic2::XThesaurus> xThesaurus,
const OUString &rWord, LanguageType nLanguage) = 0;
- virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Window*,
+ virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog(weld::Widget*,
const OUString &rWord, LanguageType nLang,
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper) = 0;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index cf92acfbf283..870719fb89ce 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -55,6 +55,7 @@ class SvStream;
class SvxSearchItem;
class SvxFieldItem;
namespace vcl { class Window; }
+namespace weld { class Widget; }
class KeyEvent;
class MouseEvent;
class CommandEvent;
@@ -278,12 +279,12 @@ public:
PointerStyle GetPointer( const Point& rPosPixel );
bool Command(const CommandEvent& rCEvt);
- void StartSpeller();
- EESpellState StartThesaurus();
+ void StartSpeller(weld::Widget* pDialogParent);
+ EESpellState StartThesaurus(weld::Widget* pDialogParent);
sal_Int32 StartSearchAndReplace( const SvxSearchItem& rSearchItem );
// for text conversion
- void StartTextConversion( LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc );
+ void StartTextConversion(weld::Widget* pDialogParent, LanguageType nSrcLang, LanguageType nDestLang, const vcl::Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc);
void TransliterateText( TransliterationFlags nTransliterationMode );
diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx
index e9c719d45364..79d55d179be1 100644
--- a/include/editeng/splwrap.hxx
+++ b/include/editeng/splwrap.hxx
@@ -48,7 +48,7 @@ private:
friend class SvxHyphenWordDialog;
friend struct SvxHyphenWordDialog_Impl;
- weld::Window* pWin;
+ weld::Widget* pWin;
std::unique_ptr<weld::WaitObject> xWait;
css::uno::Reference<
css::uno::XInterface > xLast; // result of last spelling/hyphenation attempt
@@ -70,9 +70,9 @@ private:
void operator =(SvxSpellWrapper const &) = delete;
public:
- SvxSpellWrapper( weld::Window* pWn,
+ SvxSpellWrapper( weld::Widget* pWn,
const bool bStart, const bool bIsAllRight );
- SvxSpellWrapper( weld::Window* pWn,
+ SvxSpellWrapper( weld::Widget* pWn,
css::uno::Reference< css::linguistic2::XHyphenator > const &xHyphenator,
const bool bStart, const bool bOther );
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index d0fb849b31e6..c9f09e6d74b2 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -349,10 +349,9 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_THESAURUS:
{
- pOutView->StartThesaurus();
+ pOutView->StartThesaurus(rReq.GetFrameWeld());
}
break;
-
}
}
diff --git a/sc/source/ui/inc/spelleng.hxx b/sc/source/ui/inc/spelleng.hxx
index 06358a5136b7..c6d75675d397 100644
--- a/sc/source/ui/inc/spelleng.hxx
+++ b/sc/source/ui/inc/spelleng.hxx
@@ -27,7 +27,7 @@ class ScDocShell;
class ScDocument;
class SfxItemPool;
-namespace weld { class Window; }
+namespace weld { class Widget; }
/** Base class for special type of edit engines, i.e. for spell checker and text conversion. */
class ScConversionEngineBase : public ScEditEngineDefaulter
@@ -40,7 +40,7 @@ public:
virtual ~ScConversionEngineBase() override;
/** Derived classes implement to convert all cells in the selection or sheet. */
- virtual void ConvertAll( EditView& rEditView ) = 0;
+ virtual void ConvertAll(weld::Widget* pDialogParent, EditView& rEditView) = 0;
/** Returns true, if at least one cell has been modified. */
bool IsAnyModified() const { return mbIsAnyModified; }
@@ -103,7 +103,7 @@ public:
css::uno::Reference< css::linguistic2::XSpellChecker1 > const & xSpeller );
/** Checks spelling of all cells in the selection or sheet. */
- virtual void ConvertAll( EditView& rEditView ) override;
+ virtual void ConvertAll(weld::Widget* pDialogParent, EditView& rEditView) override;
protected:
/** Callback from edit engine to check the next cell. */
@@ -120,7 +120,7 @@ protected:
private:
/** Returns the spelling dialog if it is open. */
- weld::Window* GetDialogParent();
+ weld::Widget* GetDialogParent();
};
/** Edit engine for text conversion. */
@@ -135,7 +135,7 @@ public:
ScDocument* pRedoDoc );
/** Converts all cells in the selection or sheet according to set language. */
- virtual void ConvertAll( EditView& rEditView ) override;
+ virtual void ConvertAll(weld::Widget* pDialogParent, EditView& rEditView) override;
protected:
/** Callback from edit engine to convert the next cell. */
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index bb4c1f1ddf85..23b09806c98b 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -282,11 +282,11 @@ ScSpellingEngine::ScSpellingEngine(
SetSpeller( xSpeller );
}
-void ScSpellingEngine::ConvertAll( EditView& rEditView )
+void ScSpellingEngine::ConvertAll(weld::Widget* pDialogParent, EditView& rEditView)
{
EESpellState eState = EESpellState::Ok;
if( FindNextConversionCell() )
- eState = rEditView.StartSpeller( true );
+ eState = rEditView.StartSpeller(pDialogParent, true);
OSL_ENSURE( eState != EESpellState::NoSpeller, "ScSpellingEngine::Convert - no spell checker" );
}
@@ -303,7 +303,7 @@ bool ScSpellingEngine::NeedsConversion()
bool ScSpellingEngine::ShowTableWrapDialog()
{
- weld::Window* pParent = GetDialogParent();
+ weld::Widget* pParent = GetDialogParent();
weld::WaitObject aWaitOff(pParent);
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
@@ -316,7 +316,7 @@ bool ScSpellingEngine::ShowTableWrapDialog()
void ScSpellingEngine::ShowFinishDialog()
{
- weld::Window* pParent = GetDialogParent();
+ weld::Widget* pParent = GetDialogParent();
weld::WaitObject aWaitOff(pParent);
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pParent,
VclMessageType::Info, VclButtonsType::Ok,
@@ -324,7 +324,7 @@ void ScSpellingEngine::ShowFinishDialog()
xInfoBox->run();
}
-weld::Window* ScSpellingEngine::GetDialogParent()
+weld::Widget* ScSpellingEngine::GetDialogParent()
{
sal_uInt16 nWinId = ScSpellDialogChildWindow::GetChildWindowId();
SfxViewFrame* pViewFrm = mrViewData.GetViewShell()->GetViewFrame();
@@ -395,11 +395,11 @@ ScTextConversionEngine::ScTextConversionEngine(
{
}
-void ScTextConversionEngine::ConvertAll( EditView& rEditView )
+void ScTextConversionEngine::ConvertAll(weld::Widget* pDialogParent, EditView& rEditView)
{
if( FindNextConversionCell() )
{
- rEditView.StartTextConversion(
+ rEditView.StartTextConversion(pDialogParent,
maConvParam.GetSourceLang(), maConvParam.GetTargetLang(), maConvParam.GetTargetFont(),
maConvParam.GetOptions(), maConvParam.IsInteractive(), true );
// #i34769# restore initial cursor position
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 7586d0346154..8b09321620c4 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -305,6 +305,7 @@ void ScViewFunc::DoRefConversion()
if (!bOk)
ErrorMessage(STR_ERR_NOREF);
}
+
// Thesaurus - Undo ok
void ScViewFunc::DoThesaurus()
{
@@ -384,7 +385,7 @@ void ScViewFunc::DoThesaurus()
// language is now in EditEngine attributes -> no longer passed to StartThesaurus
- eState = pEditView->StartThesaurus();
+ eState = pEditView->StartThesaurus(GetViewData().GetDialogParent());
OSL_ENSURE(eState != EESpellState::NoSpeller, "No SpellChecker");
if (eState == EESpellState::ErrorFound) // should happen later through Wrapper!
@@ -534,7 +535,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam )
// *** do the conversion *** ----------------------------------------------
pEngine->ClearModifyFlag();
- pEngine->ConvertAll( *pEditView );
+ pEngine->ConvertAll(GetViewData().GetDialogParent(), *pEditView);
// *** undo/redo *** ------------------------------------------------------
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index 63d5ff021c9c..78d2ae6939b3 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -20,6 +20,7 @@
#include <futhes.hxx>
#include <editeng/outliner.hxx>
+#include <sfx2/request.hxx>
#include <svx/svdobj.hxx>
#include <svx/svdotext.hxx>
#include <editeng/eeitem.hxx>
@@ -28,6 +29,7 @@
#include <svx/svxerr.hxx>
#include <svx/dialmgr.hxx>
#include <editeng/unolingu.hxx>
+#include <vcl/weld.hxx>
#include <drawdoc.hxx>
#include <View.hxx>
#include <Outliner.hxx>
@@ -58,7 +60,7 @@ rtl::Reference<FuPoor> FuThesaurus::Create( ViewShell* pViewSh, ::sd::Window* pW
return xFunc;
}
-void FuThesaurus::DoExecute( SfxRequest& )
+void FuThesaurus::DoExecute(SfxRequest& rReq)
{
SfxErrorContext aContext(ERRCTX_SVX_LINGU_THESAURUS, OUString(),
mpWindow->GetFrameWeld(), RID_SVXERRCTX, SvxResLocale());
@@ -98,7 +100,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
pOutliner->SetDefaultLanguage( mpDoc->GetLanguage( EE_CHAR_LANGUAGE ) );
}
- EESpellState eState = const_cast<OutlinerView*>(pOutlView)->StartThesaurus();
+ EESpellState eState = const_cast<OutlinerView*>(pOutlView)->StartThesaurus(rReq.GetFrameWeld());
DBG_ASSERT(eState != EESpellState::NoSpeller, "No SpellChecker");
}
}
@@ -120,7 +122,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
pOutliner->SetDefaultLanguage( mpDoc->GetLanguage( EE_CHAR_LANGUAGE ) );
}
- EESpellState eState = pOutlView->StartThesaurus();
+ EESpellState eState = pOutlView->StartThesaurus(rReq.GetFrameWeld());
DBG_ASSERT(eState != EESpellState::NoSpeller, "No SpellChecker");
}
}
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 1e58117cdb81..b1ffdd972822 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1781,6 +1781,7 @@ void SdOutliner::StartConversion( LanguageType nSourceLanguage, LanguageType nT
if (pOutlinerView != nullptr)
{
pOutlinerView->StartTextConversion(
+ GetMessageBoxParent(),
nSourceLanguage,
nTargetLanguage,
pTargetFont,
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 2c82afeb8b3f..f463bf7597f1 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -381,7 +381,7 @@ void SwAnnotationWin::InitControls()
mxMenuButton->connect_mouse_move(LINK(this, SwAnnotationWin, MouseMoveHdl));
SetLanguage(GetLanguage());
- GetOutlinerView()->StartSpeller();
+ GetOutlinerView()->StartSpeller(mxSidebarTextControl->GetDrawingArea());
SetPostItText();
mpOutliner->CompleteOnlineSpelling();
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index 92e4eaadbbee..b09b3fa12b42 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -89,7 +89,7 @@ SdrHHCWrapper::~SdrHHCWrapper()
void SdrHHCWrapper::StartTextConversion()
{
- pOutlView->StartTextConversion( nSourceLang, nTargetLang, pTargetFont, nOptions, bIsInteractive, true );
+ pOutlView->StartTextConversion(pView->GetFrameWeld(), nSourceLang, nTargetLang, pTargetFont, nOptions, bIsInteractive, true);
}
bool SdrHHCWrapper::ConvertNextDocument()
diff --git a/sw/source/uibase/shells/annotsh.cxx b/sw/source/uibase/shells/annotsh.cxx
index 258e073de0f9..2071df547be6 100644
--- a/sw/source/uibase/shells/annotsh.cxx
+++ b/sw/source/uibase/shells/annotsh.cxx
@@ -1264,12 +1264,12 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
}
case SID_THESAURUS:
{
- pOLV->StartThesaurus();
+ pOLV->StartThesaurus(rReq.GetFrameWeld());
break;
}
case SID_HANGUL_HANJA_CONVERSION:
- pOLV->StartTextConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
- i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false );
+ pOLV->StartTextConversion(rReq.GetFrameWeld(), LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
+ i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false);
break;
case SID_CHINESE_CONVERSION:
@@ -1328,7 +1328,7 @@ void SwAnnotationShell::ExecLingu(SfxRequest &rReq)
vcl::Font aTargetFont = OutputDevice::GetDefaultFont( DefaultFontType::CJK_TEXT,
nTargetLang, GetDefaultFontFlags::OnlyOne );
- pOLV->StartTextConversion( nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false );
+ pOLV->StartTextConversion(rReq.GetFrameWeld(), nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false);
}
}
Reference< lang::XComponent > xComponent( xDialog, UNO_QUERY );
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 172d04fd2cc2..9fc21dfcbacf 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -270,11 +270,12 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest const &rReq)
switch(rReq.GetSlot())
{
case SID_THESAURUS:
- pOutlinerView->StartThesaurus();
+ pOutlinerView->StartThesaurus(rReq.GetFrameWeld());
break;
case SID_HANGUL_HANJA_CONVERSION:
- pOutlinerView->StartTextConversion(LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
+ pOutlinerView->StartTextConversion(rReq.GetFrameWeld(),
+ LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr,
i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true, false);
break;
@@ -335,7 +336,7 @@ void SwDrawTextShell::ExecDrawLingu(SfxRequest const &rReq)
vcl::Font aTargetFont = OutputDevice::GetDefaultFont(DefaultFontType::CJK_TEXT, nTargetLang, GetDefaultFontFlags::OnlyOne);
- pOutlinerView->StartTextConversion(nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false);
+ pOutlinerView->StartTextConversion(rReq.GetFrameWeld(), nSourceLang, nTargetLang, &aTargetFont, nOptions, false, false);
}
Reference<lang::XComponent> xComponent(xDialog, UNO_QUERY);
More information about the Libreoffice-commits
mailing list