summaryrefslogtreecommitdiff
path: root/sw/source/filter/rtf/swparrtf.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2012-07-27 17:30:49 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-27 17:50:22 +0200
commitf6f265313f055f3d767060509cbf05442c1bb548 (patch)
tree0985b94faf3e8f31c92ab43f10490f1c2af1fe07 /sw/source/filter/rtf/swparrtf.cxx
parent10dc090b31776f21a09e32dd409348e2ddb00cc5 (diff)
some tweaks in RTF filter
Diffstat (limited to 'sw/source/filter/rtf/swparrtf.cxx')
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx6
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 );