summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-28 20:27:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-07-29 13:52:55 +0200
commita57ec3ca97b587c76dc082b75532cc62d423cc8d (patch)
tree755697d219d8da567b9cdd3bd4a883837b3befbb
parent3e35fb78ac577d6bca9a05276f50ab98a8b6425f (diff)
use the parent as available from HangulHanjaConversion
Change-Id: I9b8e34f4358620f2bc3c510ea3d581be8f87bb97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119648 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--editeng/source/misc/hangulhanja.cxx6
-rw-r--r--include/editeng/hangulhanja.hxx1
-rw-r--r--sw/inc/hhcwrp.hxx3
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx4
4 files changed, 8 insertions, 6 deletions
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 1908586240e8..c6057413d2d6 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -131,6 +131,7 @@ namespace editeng
bool IsValid() const { return m_xConverter.is(); }
+ weld::Widget* GetUIParent() const { return m_pUIParent; }
LanguageType GetSourceLang() const { return m_nSourceLang; }
LanguageType GetTargetLang() const { return m_nTargetLang; }
const vcl::Font * GetTargetFont() const { return m_pTargetFont; }
@@ -960,6 +961,11 @@ namespace editeng
return m_bUseSavedValues;
}
+ weld::Widget* HangulHanjaConversion::GetUIParent() const
+ {
+ return m_pImpl->GetUIParent();
+ }
+
LanguageType HangulHanjaConversion::GetSourceLanguage( ) const
{
return m_pImpl->GetSourceLang();
diff --git a/include/editeng/hangulhanja.hxx b/include/editeng/hangulhanja.hxx
index 25c7d0b1d354..cbbeaef658f0 100644
--- a/include/editeng/hangulhanja.hxx
+++ b/include/editeng/hangulhanja.hxx
@@ -122,6 +122,7 @@ namespace editeng
// converts the whole document
void ConvertDocument();
+ weld::Widget* GetUIParent() const; // the parent window for any UI we raise
LanguageType GetSourceLanguage() const;
LanguageType GetTargetLanguage() const;
const vcl::Font* GetTargetFont() const;
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index accde1e11ba9..f565401d830c 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -21,8 +21,6 @@
#include <editeng/hangulhanja.hxx>
#include <editeng/svxenum.hxx>
-#include <vcl/vclptr.hxx>
-#include <vcl/window.hxx>
#include "swdllapi.h"
class SwView;
@@ -33,7 +31,6 @@ class SwPaM;
class SW_DLLPUBLIC SwHHCWrapper final : public editeng::HangulHanjaConversion
{
SwView * m_pView;
- VclPtr<vcl::Window> m_pWin;
SwWrtShell &m_rWrtShell;
std::unique_ptr<SwConversionArgs> m_pConvArgs; /**< object for arguments (and results) needed
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 03b36d197b65..7e78777fef51 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -93,7 +93,6 @@ SwHHCWrapper::SwHHCWrapper(
nConvOptions,
bIsInteractive )
, m_pView( pSwView )
- , m_pWin( &pSwView->GetEditWin() )
, m_rWrtShell( pSwView->GetWrtShell() )
, m_nLastPos( 0 )
, m_nUnitOffset( 0 )
@@ -648,7 +647,7 @@ void SwHHCWrapper::FindConvText_impl()
bool bFound = false;
- m_pWin->EnterWait();
+ weld::WaitObject aWait(GetUIParent());
bool bConv = true;
while ( bConv )
@@ -664,7 +663,6 @@ void SwHHCWrapper::FindConvText_impl()
bConv = ConvNext_impl();
}
}
- m_pWin->LeaveWait();
}
void SwHHCWrapper::ConvStart_impl( SwConversionArgs /* [out] */ *pConversionArgs, SvxSpellArea eArea )