summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-01-17 14:20:23 +0100
committerJulien Nabet <serval2412@yahoo.fr>2016-01-17 13:53:44 +0000
commit1570957ff9269a13eb8e8f28d1bddf1939a21a5f (patch)
tree8080fcedc5547c72e4b4da90b5d85494fc7438b9 /editeng
parentecef63a9a020d7996f1c65016e5691dee8b34132 (diff)
cppcheck: fix 2 variableScope reports in editeng
Change-Id: Ic87c5b1d8f96b7f25ce323a49455d1ac16d1bf86 Reviewed-on: https://gerrit.libreoffice.org/21533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/editeng/textconv.cxx16
2 files changed, 4 insertions, 14 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 9781f93172e9..7af42df8401a 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1711,9 +1711,9 @@ namespace accessibility
}
}
}
- bool bExtend = false;
if( nFoundFieldIndex >= 0 )
{
+ bool bExtend = false;
if( Segment.SegmentEnd < reeEnd )
{
Segment.SegmentEnd = reeEnd;
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index 78077148985b..6cb62f56bfba 100644
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -120,22 +120,12 @@ void TextConvWrapper::FindConvText_impl()
{
// modified version of SvxSpellWrapper::FindSpellError
- bool bFound = false;
-
m_pWin->EnterWait();
- bool bConvert = true;
- while ( bConvert )
+ while ( true )
{
- bFound = ConvContinue_impl();
- if (bFound)
- {
- bConvert = false;
- }
- else
- {
- bConvert = ConvNext_impl();
- }
+ if (ConvContinue_impl() || !ConvNext_impl())
+ break;
}
m_pWin->LeaveWait();
}