Kaydet (Commit) 99e545dd authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:returnconstant in SwSpellDialogChildWindow

Change-Id: If02664294bc9503ac8a373793edfdb8231582e76
Reviewed-on: https://gerrit.libreoffice.org/58961
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 576b5346
......@@ -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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment