summaryrefslogtreecommitdiff
path: root/editeng/source/misc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-30 11:34:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-10-31 13:30:59 +0100
commite2aa85a6fbc039e8b1950f0e4b8484595d0b47eb (patch)
tree2658525d24372ee535be570d682c9f1ca75a178b /editeng/source/misc
parent32c53b465bc2052c2756f12294699fabae754756 (diff)
avoid intermediate vcl::Windows
Change-Id: Iac6bc83265e007a699a8993b89ac2efaa3739d95 Reviewed-on: https://gerrit.libreoffice.org/81761 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng/source/misc')
-rw-r--r--editeng/source/misc/splwrap.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 979be61afa71..0c9e23f360fc 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -45,10 +45,6 @@
#include <map>
#include <memory>
-#define WAIT_ON() if(pWin != nullptr) { pWin->EnterWait(); }
-
-#define WAIT_OFF() if(pWin != nullptr) { pWin->LeaveWait(); }
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
@@ -139,7 +135,7 @@ SvxSpellWrapper::~SvxSpellWrapper()
*
--------------------------------------------------------------------*/
-SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn,
+SvxSpellWrapper::SvxSpellWrapper( weld::Window* pWn,
const bool bStart, const bool bIsAllRight ) :
pWin ( pWn ),
@@ -156,7 +152,7 @@ SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn,
}
-SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn,
+SvxSpellWrapper::SvxSpellWrapper( weld::Window* pWn,
Reference< XHyphenator > const &xHyphenator,
const bool bStart, const bool bOther ) :
pWin ( pWn ),
@@ -275,7 +271,7 @@ void SvxSpellWrapper::SpellDocument( )
{
EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
ScopedVclPtr<AbstractHyphenWordDialog> pDlg(pFact->CreateHyphenWordDialog(
- pWin ? pWin->GetFrameWeld() : nullptr,
+ pWin,
xHyphWord->getWord(),
LanguageTag( xHyphWord->getLocale() ).getLanguageType(),
xHyph, this ));
@@ -347,16 +343,16 @@ bool SvxSpellWrapper::SpellNext( )
else
{
// a BODY_area done, ask for the other BODY_area
- WAIT_OFF();
+ xWait.reset();
const char* pResId = bReverse ? RID_SVXSTR_QUERY_BW_CONTINUE : RID_SVXSTR_QUERY_CONTINUE;
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin ? pWin->GetFrameWeld() : nullptr,
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pWin,
VclMessageType::Question, VclButtonsType::YesNo,
EditResId(pResId)));
if (xBox->run() != RET_YES)
{
// sacrifice the other area if necessary ask for special area
- WAIT_ON();
+ xWait.reset(new weld::WaitObject(pWin));
bStartDone = bEndDone = true;
return SpellNext();
}
@@ -366,7 +362,7 @@ bool SvxSpellWrapper::SpellNext( )
SpellStart( bStartChk ? SvxSpellArea::BodyStart : SvxSpellArea::BodyEnd );
bGoOn = true;
}
- WAIT_ON();
+ xWait.reset(new weld::WaitObject(pWin));
}
return bGoOn;
}
@@ -419,7 +415,7 @@ bool SvxSpellWrapper::FindSpellError()
{
ShowLanguageErrors();
- WAIT_ON();
+ xWait.reset(new weld::WaitObject(pWin));
bool bSpell = true;
Reference< XDictionary > xAllRightDic;
@@ -465,7 +461,7 @@ bool SvxSpellWrapper::FindSpellError()
bSpell = SpellNext();
}
}
- WAIT_OFF();
+ xWait.reset();
return GetLast().is();
}