Kaydet (Commit) 4512de03 authored tarafından Michael Stahl's avatar Michael Stahl

SvxBorderLine::GuessLinesWidths: use SAL_N_ELEMENTS

üst b8f24c52
...@@ -263,16 +263,14 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa ...@@ -263,16 +263,14 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
THICKTHIN_LARGEGAP THICKTHIN_LARGEGAP
}; };
size_t const len = SAL_N_ELEMENTS(aDoubleStyles);
int i = 0, len = sizeof( aDoubleStyles ) / sizeof( SvxBorderStyle );
long nWidth = 0; long nWidth = 0;
SvxBorderStyle nTestStyle(NO_STYLE); SvxBorderStyle nTestStyle(NO_STYLE);
while ( i < len && nWidth == 0 ) for (size_t i = 0; i < len && nWidth == 0; ++i)
{ {
nTestStyle = aDoubleStyles[i]; nTestStyle = aDoubleStyles[i];
BorderWidthImpl aWidthImpl = getWidthImpl( nTestStyle ); BorderWidthImpl aWidthImpl = getWidthImpl( nTestStyle );
nWidth = aWidthImpl.GuessWidth( nOut, nIn, nDist ); nWidth = aWidthImpl.GuessWidth( nOut, nIn, nDist );
i++;
} }
// If anything matched, then set it // If anything matched, then set it
......
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