summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-13 11:24:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-14 16:18:37 +0200
commit99e545dda9198bfcb4c63a2c7f1ba7fc4ded2a49 (patch)
tree4970ce33a23c1ca064f053a4331c07b333d41941
parent576b53468a15b2952dbdf9612f8a87d54b16680a (diff)
loplugin:returnconstant in SwSpellDialogChildWindow
Change-Id: If02664294bc9503ac8a373793edfdb8231582e76 Reviewed-on: https://gerrit.libreoffice.org/58961 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx17
-rw-r--r--sw/source/uibase/inc/SwSpellDialogChildWindow.hxx2
2 files changed, 7 insertions, 12 deletions
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 98c5fbf74835..acdef0ed9dbf 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -198,15 +198,11 @@ svx::SpellPortions SwSpellDialogChildWindow::GetNextWrongSentence(bool bRecheck)
// if no text selection exists the cursor has to be set into the text
if(!bDrawText && !bNormalText)
{
- if(!MakeTextSelection_Impl(*pWrtShell, eSelMode))
- return aRet;
- else
- {
- // the selection type has to be checked again - both text types are possible
- if(pWrtShell->GetSelectionType() & SelectionType::DrawObjectEditMode)
- bDrawText = true;
- bNormalText = !bDrawText;
- }
+ MakeTextSelection_Impl(*pWrtShell, eSelMode);
+ // the selection type has to be checked again - both text types are possible
+ if(pWrtShell->GetSelectionType() & SelectionType::DrawObjectEditMode)
+ bDrawText = true;
+ bNormalText = !bDrawText;
}
if(bNormalText)
{
@@ -652,7 +648,7 @@ SwWrtShell* SwSpellDialogChildWindow::GetWrtShell_Impl()
// set the cursor into the body text - necessary if any object is selected
// on start of the spelling dialog
-bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellMode eSelMode)
+void SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellMode eSelMode)
{
SwView& rView = rShell.GetView();
switch(eSelMode)
@@ -714,7 +710,6 @@ bool SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
break;
default:; // prevent warning
}
- return true;
}
// select the next draw text object that has a spelling error
diff --git a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
index 50f8fdfdeaf7..82cd29204457 100644
--- a/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
+++ b/sw/source/uibase/inc/SwSpellDialogChildWindow.hxx
@@ -32,7 +32,7 @@ class SwSpellDialogChildWindow
std::unique_ptr<SpellState> m_pSpellState;
SwWrtShell* GetWrtShell_Impl();
- bool MakeTextSelection_Impl(SwWrtShell& rSh, ShellMode eSelMode);
+ void MakeTextSelection_Impl(SwWrtShell& rSh, ShellMode eSelMode);
bool FindNextDrawTextError_Impl(SwWrtShell& rSh);
bool SpellDrawText_Impl(SwWrtShell& rSh, svx::SpellPortions& rPortions);
void LockFocusNotification(bool bLock);