[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Aug 14 14:19:03 UTC 2018
sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 17 ++++++-----------
sw/source/uibase/inc/SwSpellDialogChildWindow.hxx | 2 +-
2 files changed, 7 insertions(+), 12 deletions(-)
New commits:
commit 99e545dda9198bfcb4c63a2c7f1ba7fc4ded2a49
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Aug 13 11:24:26 2018 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Aug 14 16:18:37 2018 +0200
loplugin:returnconstant in SwSpellDialogChildWindow
Change-Id: If02664294bc9503ac8a373793edfdb8231582e76
Reviewed-on: https://gerrit.libreoffice.org/58961
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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);
More information about the Libreoffice-commits
mailing list