summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-04-06 17:28:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-04-06 21:46:05 +0200
commitc2c5b1f7558004aa0d3541b7c4ffadc5d6bad331 (patch)
tree9e378ae5f69e27d354b01d1f63e23014493c6513 /sc
parentb5b27f017b08ad4fbc67222a36f71933aa5a47dd (diff)
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@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx3
-rw-r--r--sc/source/ui/inc/spelleng.hxx10
-rw-r--r--sc/source/ui/view/spelleng.cxx14
-rw-r--r--sc/source/ui/view/viewfun4.cxx5
4 files changed, 16 insertions, 16 deletions
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 *** ------------------------------------------------------