diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-01-25 19:34:12 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-01-27 23:49:18 +0100 |
commit | 4512de034a0eabc2e66fd9516581bba94aa20a08 (patch) | |
tree | 17331100e78c70c86d0219e87c50c037de10090f | |
parent | b8f24c52c4d3c4ed562fe6c7ae8fa17218a66c1e (diff) |
SvxBorderLine::GuessLinesWidths: use SAL_N_ELEMENTS
-rw-r--r-- | editeng/source/items/borderline.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 61ceccead0cc..8d073c6da93b 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -263,16 +263,14 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa THICKTHIN_LARGEGAP }; - - int i = 0, len = sizeof( aDoubleStyles ) / sizeof( SvxBorderStyle ); + size_t const len = SAL_N_ELEMENTS(aDoubleStyles); long nWidth = 0; SvxBorderStyle nTestStyle(NO_STYLE); - while ( i < len && nWidth == 0 ) + for (size_t i = 0; i < len && nWidth == 0; ++i) { nTestStyle = aDoubleStyles[i]; BorderWidthImpl aWidthImpl = getWidthImpl( nTestStyle ); nWidth = aWidthImpl.GuessWidth( nOut, nIn, nDist ); - i++; } // If anything matched, then set it |