diff options
Diffstat (limited to 'sw/source/filter/rtf/swparrtf.cxx')
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index db7178353a4d..35ad32b4d66b 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -593,7 +593,9 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection, { aCol._SetOrtho(false); sal_uInt16 nWishWidth = 0, nHalfPrev = 0; - for(sal_uInt16 n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i ) + for (sal_uInt16 n=0, i=0; + (static_cast<size_t>(n)+1) < rSection.maPageInfo.maColumns.size() && i < nCols; + n += 2, ++i) { SwColumn* pCol = &aCol.GetColumns()[ i ]; pCol->SetLeft( nHalfPrev ); @@ -2746,7 +2748,7 @@ sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace, { aCol._SetOrtho( sal_False ); sal_uInt16 nWishWidth = 0, nHalfPrev = 0; - for( sal_uInt16 n = 0, i = 0; n < rColumns.size(); n += 2, ++i ) + for (sal_uInt16 n = 0, i = 0; static_cast<size_t>(n+1) < rColumns.size(); n += 2, ++i) { SwColumn* pCol = &aCol.GetColumns()[ i ]; pCol->SetLeft( nHalfPrev ); |