[Libreoffice-commits] core.git: sw/source
Luboš Luňák
l.lunak at collabora.com
Fri Nov 21 02:56:37 PST 2014
sw/source/core/docnode/node.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 43f98495b5d0756fc37eef99efba45e388101a1a
Author: Luboš Luňák <l.lunak at collabora.com>
Date: Fri Nov 21 11:55:35 2014 +0100
do not use sal_uInt16 for indexing stl vector
Change-Id: I1a0087211bfd4d73cd5af781f5f3117b440fb188
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 2103ffd..9f72b91 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -509,9 +509,8 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
// Find the right Anchor first
const SwFrmFmt* pFmt = 0;
const SwFrmFmts& rFmts = *pDoc->GetSpzFrmFmts();
- sal_uInt16 n;
- for( n = 0; n < rFmts.size(); ++n )
+ for( size_t n = 0; n < rFmts.size(); ++n )
{
const SwFrmFmt* pFrmFmt = rFmts[ n ];
const SwFmtCntnt& rCntnt = pFrmFmt->GetCntnt();
@@ -534,6 +533,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
while( pFlyNd )
{
// Get up through the Anchor
+ size_t n;
for( n = 0; n < rFmts.size(); ++n )
{
const SwFrmFmt* pFrmFmt = rFmts[ n ];
@@ -635,7 +635,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
// the Anchor can only be in the Body text
const SwTxtFtn* pTxtFtn;
const SwFtnIdxs& rFtnArr = pDoc->GetFtnIdxs();
- for( sal_uInt16 n = 0; n < rFtnArr.size(); ++n )
+ for( size_t n = 0; n < rFtnArr.size(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
(SwNode*)pSttNd ==
&pTxtFtn->GetStartNode()->GetNode() )
@@ -714,7 +714,7 @@ SwFrmFmt* SwNode::GetFlyFmt() const
{
// The hard way through the Doc is our last way out
const SwFrmFmts& rFrmFmtTbl = *GetDoc()->GetSpzFrmFmts();
- for( sal_uInt16 n = 0; n < rFrmFmtTbl.size(); ++n )
+ for( size_t n = 0; n < rFrmFmtTbl.size(); ++n )
{
SwFrmFmt* pFmt = rFrmFmtTbl[n];
const SwFmtCntnt& rCntnt = pFmt->GetCntnt();
@@ -1756,7 +1756,7 @@ bool SwCntntNode::IsAnyCondition( SwCollCondition& rTmp ) const
const SwTxtFtn* pTxtFtn;
const SwNode* pSrchNd = pSttNd;
- for( sal_uInt16 n = 0; n < rFtnArr.size(); ++n )
+ for( size_t n = 0; n < rFtnArr.size(); ++n )
if( 0 != ( pTxtFtn = rFtnArr[ n ])->GetStartNode() &&
pSrchNd == &pTxtFtn->GetStartNode()->GetNode() )
{
More information about the Libreoffice-commits
mailing list