summaryrefslogtreecommitdiff
path: root/accessibility/source/extended/textwindowaccessibility.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 16:33:44 +0200
committerNoel Grandin <noel@peralex.com>2015-05-28 12:49:54 +0200
commitd5129a9dd68978f9eccdd4597b5b6834557c422a (patch)
treedf43250172f784f3048ce42ce1c3410d1d449c1e /accessibility/source/extended/textwindowaccessibility.cxx
parentf3331f7694e74f349375c223ce7ed84838e92d89 (diff)
new clang plugin: loopvartoosmall
Idea from bubli - look for loops where the index variable is of such size that it cannot cover the range revealed by examining the length part of the condition. So far, I have only run the plugin up till the VCL module. Also the plugin deliberately excludes anything more complicated than a straightforward incrementing for loop. Change-Id: Ifced18b01c03ea537c64168465ce0b8287a42015
Diffstat (limited to 'accessibility/source/extended/textwindowaccessibility.cxx')
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 1a391ce13f04..ca205003f344 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1416,7 +1416,7 @@ Document::retrieveParagraphBoundaryOfLine( Paragraph const * pParagraph,
static_cast< css::uno::XWeak * >( this ) );
::sal_Int32 nLineStart = 0;
::sal_Int32 nLineEnd = 0;
- for ( ::sal_uInt16 nLine = 0; nLine <= nLineNo; ++nLine )
+ for ( ::sal_Int32 nLine = 0; nLine <= nLineNo; ++nLine )
{
::sal_Int32 nLineLength = static_cast< ::sal_Int32 >(
m_rEngine.GetLineLen( nNumber, nLine ) );