[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Mon Feb 27 21:51:45 UTC 2017


 sw/source/core/crsr/findattr.cxx |    6 +++---
 sw/source/core/inc/pamtyp.hxx    |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 56dda82ff71c68f8bca1917fa6d642e26449a1d3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Feb 27 22:51:07 2017 +0100

    Clean up use of integer types
    
    Change-Id: Ia3c3e8b6c1988561284d91545e98e4939973c4b9

diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 73b5777..ba17536 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -90,7 +90,7 @@ bool CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
     return rItem1 == rItem2;
 }
 
-const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
+const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, size_t& rPos,
                                     sal_Int32 nContentPos )
 {
     while( rPos < rHtsArr.Count() )
@@ -103,7 +103,7 @@ const SwTextAttr* GetFrwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
     return nullptr; // invalid text attribute
 }
 
-const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, sal_uInt16& rPos,
+const SwTextAttr* GetBkwrdTextHint( const SwpHints& rHtsArr, size_t& rPos,
                                   sal_Int32 nContentPos )
 {
     while( rPos > 0 )
@@ -163,7 +163,7 @@ static bool lcl_Search( const SwTextNode& rTextNd, SwPaM& rPam,
 
     const SwTextAttr *pTextHt = nullptr;
     bool bForward = &fnMove == &fnMoveForward;
-    sal_uInt16 nPos = bForward ? 0 : rTextNd.GetSwpHints().Count();
+    size_t nPos = bForward ? 0 : rTextNd.GetSwpHints().Count();
     sal_Int32 nContentPos = rPam.GetPoint()->nContent.GetIndex();
 
     while( nullptr != ( pTextHt=(*fnMove.fnGetHint)(rTextNd.GetSwpHints(),nPos,nContentPos)))
diff --git a/sw/source/core/inc/pamtyp.hxx b/sw/source/core/inc/pamtyp.hxx
index 9b5bd95..bd472f8 100644
--- a/sw/source/core/inc/pamtyp.hxx
+++ b/sw/source/core/inc/pamtyp.hxx
@@ -34,8 +34,8 @@ void GoStartDoc( SwPosition*);
 void GoEndDoc( SwPosition*);
 void GoStartSection( SwPosition*);
 void GoEndSection( SwPosition*);
-const SwTextAttr* GetFrwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 );
-const SwTextAttr* GetBkwrdTextHint( const SwpHints&, sal_uInt16&, sal_Int32 );
+const SwTextAttr* GetFrwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
+const SwTextAttr* GetBkwrdTextHint( const SwpHints&, size_t&, sal_Int32 );
 
 bool GoNext(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
 bool GoPrevious(SwNode* pNd, SwIndex * pIdx, sal_uInt16 nMode );
@@ -48,7 +48,7 @@ typedef SwContentNode* (*GoNds)( SwNodeIndex*, bool );
 typedef void (*GoDoc)( SwPosition* );
 typedef void (*GoSection)( SwPosition* );
 typedef bool (SwPosition:: *CmpOp)( const SwPosition& ) const;
-typedef const SwTextAttr* (*GetHint)( const SwpHints&, sal_uInt16&, sal_Int32 );
+typedef const SwTextAttr* (*GetHint)( const SwpHints&, size_t&, sal_Int32 );
 typedef bool (utl::TextSearch:: *SearchText)( const OUString&, sal_Int32*,
                     sal_Int32*, css::util::SearchResult* );
 typedef void (*MvSection)( SwNodeIndex * );


More information about the Libreoffice-commits mailing list