[Libreoffice-commits] core.git: 4 commits - connectivity/source cui/source dbaccess/source editeng/source filter/source include/linguistic include/tools linguistic/source sc/source sfx2/source svtools/source svx/source sw/source vcl/source vcl/win

Noel Grandin noel at peralex.com
Wed Nov 6 07:52:00 CET 2013


 connectivity/source/drivers/file/quotedstring.cxx     |    2 +-
 connectivity/source/drivers/flat/ETable.cxx           |    8 ++++----
 cui/source/dialogs/hyphen.cxx                         |    4 ++--
 dbaccess/source/ui/dlg/queryfilter.cxx                |    2 +-
 dbaccess/source/ui/misc/TokenWriter.cxx               |    2 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |   10 +++++-----
 editeng/source/editeng/impedit2.cxx                   |    6 +++---
 editeng/source/items/svxfont.cxx                      |    2 +-
 editeng/source/misc/svxacorr.cxx                      |    2 +-
 filter/source/msfilter/eschesdo.cxx                   |    2 +-
 include/linguistic/misc.hxx                           |    2 +-
 include/tools/inetmime.hxx                            |    3 +--
 linguistic/source/misc.cxx                            |    2 +-
 sc/source/core/tool/compiler.cxx                      |    8 ++++----
 sc/source/core/tool/interpr2.cxx                      |    4 ++--
 sc/source/filter/excel/xecontent.cxx                  |    2 +-
 sc/source/filter/excel/xeroot.cxx                     |    2 +-
 sc/source/filter/excel/xicontent.cxx                  |    9 ++++-----
 sc/source/filter/excel/xihelper.cxx                   |    4 ++--
 sc/source/filter/ftools/ftools.cxx                    |    2 +-
 sc/source/ui/app/inputhdl.cxx                         |    4 ++--
 sc/source/ui/navipi/navipi.cxx                        |    2 +-
 sc/source/ui/pagedlg/areasdlg.cxx                     |    2 +-
 sc/source/ui/view/output2.cxx                         |    7 +++----
 sfx2/source/dialog/filedlghelper.cxx                  |    2 +-
 svtools/source/svhtml/parhtml.cxx                     |   14 ++++++--------
 svx/source/svdraw/svdotextdecomposition.cxx           |    2 +-
 svx/source/svdraw/svdotextpathdecomposition.cxx       |    2 +-
 sw/source/core/crsr/findtxt.cxx                       |    6 +++---
 sw/source/core/doc/docbm.cxx                          |    4 ++--
 sw/source/core/doc/doccomp.cxx                        |    4 ++--
 sw/source/core/doc/docedt.cxx                         |    4 ++--
 sw/source/core/docnode/ndtbl.cxx                      |    2 +-
 sw/source/core/edit/autofmt.cxx                       |    6 +++---
 sw/source/core/edit/edattr.cxx                        |    2 +-
 sw/source/core/table/swtable.cxx                      |    2 +-
 sw/source/core/text/frmcrsr.cxx                       |    2 +-
 sw/source/core/text/itrform2.cxx                      |   10 +++++-----
 sw/source/core/text/porfld.cxx                        |    2 +-
 sw/source/core/text/porlay.cxx                        |    6 +++---
 sw/source/core/text/txtfly.cxx                        |    4 ++--
 sw/source/core/text/txtfrm.cxx                        |    6 +++---
 sw/source/core/txtnode/fntcache.cxx                   |   18 +++++++++---------
 sw/source/core/txtnode/fntcap.cxx                     |    4 ++--
 sw/source/core/txtnode/ndtxt.cxx                      |   15 ++++++---------
 sw/source/core/txtnode/swfont.cxx                     |    2 +-
 sw/source/core/txtnode/txtedt.cxx                     |    6 +++---
 sw/source/core/undo/undel.cxx                         |    5 ++---
 sw/source/core/undo/unovwr.cxx                        |    8 ++++----
 sw/source/core/unocore/unochart.cxx                   |    2 +-
 sw/source/filter/basflt/iodetect.cxx                  |    2 +-
 sw/source/filter/ww8/wrtw8nds.cxx                     |    2 +-
 sw/source/filter/ww8/ww8par.cxx                       |    6 +++---
 sw/source/filter/ww8/ww8par2.cxx                      |    2 +-
 sw/source/filter/ww8/ww8par3.cxx                      |    4 ++--
 sw/source/filter/ww8/ww8par5.cxx                      |    4 ++--
 sw/source/ui/docvw/edtwin.cxx                         |    4 ++--
 sw/source/ui/vba/vbatemplate.cxx                      |    2 +-
 vcl/source/control/field2.cxx                         |    4 ++--
 vcl/source/gdi/outdev3.cxx                            |    4 ++--
 vcl/win/source/window/salframe.cxx                    |    2 +-
 61 files changed, 130 insertions(+), 139 deletions(-)

New commits:
commit e74f4232844666e74aa2b8383894931c9007188e
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 29 11:22:48 2013 +0200

    convert linguistic::isUpper from xub_StrLen to sal_Int32
    
    Change-Id: I7bf426e1753b3761c9ce8930ad637526a9895495

diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx
index 805e3c1..5bbc321 100644
--- a/include/linguistic/misc.hxx
+++ b/include/linguistic/misc.hxx
@@ -143,7 +143,7 @@ LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPo
                     ::com::sun::star::linguistic2::XHyphenatedWord > &rxHyphWord );
 
 
-LNG_DLLPUBLIC sal_Bool        IsUpper( const OUString &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage );
+LNG_DLLPUBLIC sal_Bool        IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage );
 
 inline sal_Bool        IsUpper( const OUString &rText, sal_Int16 nLanguage )     { return IsUpper( rText, 0, rText.getLength(), nLanguage ); }
 LNG_DLLPUBLIC CapType SAL_CALL capitalType(const OUString&, CharClass *);
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index a590af8..c7d208d 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -595,7 +595,7 @@ osl::Mutex & lcl_GetCharClassMutex()
     return aMutex;
 }
 
-sal_Bool IsUpper( const OUString &rText, xub_StrLen nPos, xub_StrLen nLen, sal_Int16 nLanguage )
+sal_Bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage )
 {
     MutexGuard  aGuard( lcl_GetCharClassMutex() );
 
commit 48d4fa594e255d05f0be15bcb345f2cf6681962f
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 29 11:10:35 2013 +0200

    convert INetMIMEOutputSink::write from xub_StrLen to sal_Int32
    
    Change-Id: I923a6cb4ee6641c9a289e28c32f431ba6c38d5dc

diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index 07785a8..2d08556 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -782,8 +782,7 @@ public:
 
         @param nEnd  The offset past the last character to write.
      */
-    void write(const OString& rOctets, xub_StrLen nBegin,
-                      xub_StrLen nEnd)
+    void write(const OString& rOctets, sal_Int32 nBegin, sal_Int32 nEnd)
     {
         writeSequence(rOctets.getStr() + nBegin, rOctets.getStr() + nEnd);
         m_nColumn += nEnd - nBegin;
commit fa109ceba9796eddef82a71bc454e0fe393c81ce
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Oct 29 08:47:03 2013 +0200

    convert xub_StrLen to sal_Int32
    
    convert various module-local functions
    
    Change-Id: I89f3eb40b107e2617958e474ffe86bd73e01cf33

diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 7e98f51..1c094c3 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1590,11 +1590,11 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons
     return bIsSequenceChecking;
 }
 
-static  bool lcl_HasStrongLTR ( const OUString& rTxt, xub_StrLen nStart, xub_StrLen nEnd )
+static  bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int32 nEnd )
  {
      for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
      {
-         const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ]);
+         const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ] );
          if ( nCharDir == U_LEFT_TO_RIGHT ||
               nCharDir == U_LEFT_TO_RIGHT_EMBEDDING ||
               nCharDir == U_LEFT_TO_RIGHT_OVERRIDE )
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index c214b81..2b632b3 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -1137,7 +1137,7 @@ void ImplEESdrObject::Init( ImplEESdrWriter& rEx )
     if( mXPropSet.is() )
     {
         static const sal_Char aPrefix[] = "com.sun.star.";
-        static const xub_StrLen nPrefix = sizeof(aPrefix)-1;
+        static const sal_Int32 nPrefix = sizeof(aPrefix)-1;
 
         // detect name first to make below test (is group) work
         mType = OUString( mXShape->getShapeType() );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 3a9534e..45485c3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -411,7 +411,7 @@ ScCompiler::Convention::Convention( FormulaGrammar::AddressConvention eConv )
     }
 }
 
-static bool lcl_isValidQuotedText( const OUString& rFormula, xub_StrLen nSrcPos, ParseResult& rRes )
+static bool lcl_isValidQuotedText( const OUString& rFormula, sal_Int32 nSrcPos, ParseResult& rRes )
 {
     // Tokens that start at ' can have anything in them until a final '
     // but '' marks an escaped '
@@ -419,7 +419,7 @@ static bool lcl_isValidQuotedText( const OUString& rFormula, xub_StrLen nSrcPos,
     // surrounded by '
     if (rFormula[nSrcPos] == '\'')
     {
-        xub_StrLen nPos = nSrcPos+1;
+        sal_Int32 nPos = nSrcPos+1;
         while (nPos < rFormula.getLength())
         {
             if (rFormula[nPos] == '\'')
@@ -1748,7 +1748,7 @@ void ScCompiler::SetError(sal_uInt16 nError)
         pArr->SetCodeError( nError);
 }
 
-static sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, const sal_Unicode* pSrc, xub_StrLen nMax )
+static sal_Unicode* lcl_UnicodeStrNCpy( sal_Unicode* pDst, const sal_Unicode* pSrc, sal_Int32 nMax )
 {
     const sal_Unicode* const pStop = pDst + nMax;
     while ( *pSrc && pDst < pStop )
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 38abae3..5c918dc 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -59,7 +59,7 @@
 // macro is sufficient since only used in ctor
 #define SCNAV_COLDIGITS     (static_cast<xub_StrLen>( floor( log10( static_cast<double>(SCNAV_MAXCOL)))) + 1)   // 1...256...18278
 // precomputed constant because it is used in every change of spin button field
-static const xub_StrLen SCNAV_COLLETTERS = ::ScColToAlpha(SCNAV_MAXCOL).getLength();    // A...IV...ZZZ
+static const sal_Int32 SCNAV_COLLETTERS = ::ScColToAlpha(SCNAV_MAXCOL).getLength();    // A...IV...ZZZ
 
 #define SCNAV_MAXROW        (MAXROWCOUNT)
 
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index dfe44e0..0fbf4eb 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2033,7 +2033,7 @@ void FileDialogHelper_Impl::saveConfig()
 
 namespace
 {
-    static OUString getInitPath( const OUString& _rFallback, const xub_StrLen _nFallbackToken )
+    static OUString getInitPath( const OUString& _rFallback, const sal_Int32 _nFallbackToken )
     {
         SfxApplication *pSfxApp = SFX_APP();
         OUString sPath = pSfxApp->GetLastDir_Impl();
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 552b10c..5de0105 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -976,7 +976,7 @@ namespace
     static const int BEHIND_SAME_NODE = 3;     // Same node index but content index behind given content index
     static const int BEHIND_NODE = 4;          // Position behind the given node index
 
-    static int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, xub_StrLen nCntnt )
+    static int lcl_RelativePosition( const SwPosition& rPos, sal_uLong nNode, sal_Int32 nCntnt )
     {
         sal_uLong nIndex = rPos.nNode.GetIndex();
         int nReturn = BEFORE_NODE;
@@ -1000,7 +1000,7 @@ namespace
         return rPos.nNode > rNdIdx || ( pIdx && rPos.nNode == rNdIdx && rPos.nContent > pIdx->GetIndex() );
     }
 
-    static void lcl_ChkPaM( std::vector<sal_uLong> &rSaveArr, sal_uLong nNode, xub_StrLen nCntnt,
+    static void lcl_ChkPaM( std::vector<sal_uLong> &rSaveArr, sal_uLong nNode, sal_Int32 nCntnt,
                     const SwPaM& rPam, _SwSaveTypeCountContent& rSave,
                     bool bChkSelDirection )
     {
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index ab94255..20f139c 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -127,7 +127,7 @@ struct _SaveRedline
 
 typedef boost::ptr_vector< _SaveRedline > _SaveRedlines;
 
-static bool lcl_MayOverwrite( const SwTxtNode *pNode, const xub_StrLen nPos )
+static bool lcl_MayOverwrite( const SwTxtNode *pNode, const sal_Int32 nPos )
 {
     sal_Unicode const cChr = pNode->GetTxt()[nPos];
     switch (cChr)
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 9f2f244..50b6364 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -454,7 +454,7 @@ static inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType )
     return nRet;
 }
 
-static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos,
+static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, sal_Int32 nPos,
                             sal_uInt16 &rScrpt, bool bInSelection, bool bNum )
 {
     bool bRet = false;
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 152d066..a8a9676 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -931,7 +931,7 @@ sal_Bool SwTxtFrm::_UnitUp( SwPaM *pPam, const SwTwips nOffset,
 // nPos: the new visual position
 // bLeft: whether the break iterator has to add or subtract from the
 //        current position
-static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, xub_StrLen nIdx,
+static void lcl_VisualMoveRecursion( const SwLineLayout& rCurrLine, sal_Int32 nIdx,
                               xub_StrLen& nPos, sal_Bool& bRight,
                               sal_uInt8& nCrsrLevel, sal_uInt8 nDefaultDir )
 {
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 5c28461..5fa4029 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -72,7 +72,7 @@ namespace {
     //! Calculates and sets optimal repaint offset for the current line
     static long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
                                     SwLineLayout &rCurr,
-                                    const xub_StrLen nOldLineEnd,
+                                    const sal_Int32 nOldLineEnd,
                                     const std::vector<long> &rFlyStarts );
     //! Determine if we need to build hidden portions
     static bool lcl_BuildHiddenPortion( const SwTxtSizeInfo& rInf, xub_StrLen &rPos );
@@ -184,8 +184,8 @@ SwLinePortion *SwTxtFormatter::UnderFlow( SwTxtFormatInfo &rInf )
     // line again.
     // Can be seen in 8081.sdw, if you enter text in the first line
 
-    const xub_StrLen nSoftHyphPos = rInf.GetSoftHyphPos();
-    const xub_StrLen nUnderScorePos = rInf.GetUnderScorePos();
+    const sal_Int32 nSoftHyphPos = rInf.GetSoftHyphPos();
+    const sal_Int32 nUnderScorePos = rInf.GetUnderScorePos();
 
     // Save flys and set to 0, or else segmentation fault
     // Not ClearFly(rInf) !
@@ -2729,7 +2729,7 @@ namespace {
     *************************************************************************/
     long lcl_CalcOptRepaint( SwTxtFormatter &rThis,
                          SwLineLayout &rCurr,
-                         const xub_StrLen nOldLineEnd,
+                         const sal_Int32 nOldLineEnd,
                          const std::vector<long> &rFlyStarts )
     {
         SwTxtFormatInfo txtFmtInfo = rThis.GetInfo();
@@ -2738,7 +2738,7 @@ namespace {
         // something of our text has moved to the next line
             return 0;
 
-        xub_StrLen nReformat = std::min( txtFmtInfo.GetReformatStart(), nOldLineEnd );
+        sal_Int32 nReformat = std::min<sal_Int32>( txtFmtInfo.GetReformatStart(), nOldLineEnd );
 
         // in case we do not have any fly in our line, our repaint position
         // is the changed position - 1
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index c688eb6..e9d3796 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -264,7 +264,7 @@ void SwLineLayout::CreateSpaceAdd( const long nInit )
  * in [nStt, nEnd[
  *************************************************************************/
 
-static bool lcl_HasOnlyBlanks( const OUString& rTxt, xub_StrLen nStt, xub_StrLen nEnd )
+static bool lcl_HasOnlyBlanks( const OUString& rTxt, sal_Int32 nStt, sal_Int32 nEnd )
 {
     bool bBlankOnly = true;
     while ( nStt < nEnd )
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index ff0da23..474cd81 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -819,7 +819,7 @@ void SwTxtFrm::CalcLineSpace()
     lcl_SetWrong( *this, nPos, nCnt, bMove ); \
 }
 
-static void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove )
+static void lcl_SetWrong( SwTxtFrm& rFrm, sal_Int32 nPos, long nCnt, bool bMove )
 {
     if ( !rFrm.IsFollow() )
     {
@@ -892,13 +892,13 @@ static void lcl_SetWrong( SwTxtFrm& rFrm, xub_StrLen nPos, long nCnt, bool bMove
 #define SET_SCRIPT_INVAL( nPos )\
     lcl_SetScriptInval( *this, nPos );
 
-static void lcl_SetScriptInval( SwTxtFrm& rFrm, xub_StrLen nPos )
+static void lcl_SetScriptInval( SwTxtFrm& rFrm, sal_Int32 nPos )
 {
     if( rFrm.GetPara() )
         rFrm.GetPara()->GetScriptInfo().SetInvalidity( nPos );
 }
 
-static void lcl_ModifyOfst( SwTxtFrm* pFrm, xub_StrLen nPos, xub_StrLen nLen )
+static void lcl_ModifyOfst( SwTxtFrm* pFrm, xub_StrLen nPos, sal_Int32 nLen )
 {
     while( pFrm && pFrm->GetOfst() <= nPos )
         pFrm = pFrm->GetFollow();
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index a71601a..8dfa6a3 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1140,18 +1140,15 @@ bool SwTxtNode::DontExpandFmt( const SwIndex& rIdx, bool bFlag,
     return bRet;
 }
 
-static bool lcl_GetTxtAttrDefault(xub_StrLen const nIndex,
-    xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+static bool lcl_GetTxtAttrDefault(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd)
 {
     return ((nHintStart <= nIndex) && (nIndex <  nHintEnd));
 }
-static bool lcl_GetTxtAttrExpand(xub_StrLen const nIndex,
-    xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+static bool lcl_GetTxtAttrExpand(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd)
 {
     return ((nHintStart <  nIndex) && (nIndex <= nHintEnd));
 }
-static bool lcl_GetTxtAttrParent(xub_StrLen const nIndex,
-    xub_StrLen const nHintStart, xub_StrLen const nHintEnd)
+static bool lcl_GetTxtAttrParent(sal_Int32 nIndex, sal_Int32 nHintStart, sal_Int32 nHintEnd)
 {
     return ((nHintStart <  nIndex) && (nIndex <  nHintEnd));
 }
@@ -1160,12 +1157,12 @@ static void
 lcl_GetTxtAttrs(
     ::std::vector<SwTxtAttr *> *const pVector, SwTxtAttr **const ppTxtAttr,
     SwpHints *const pSwpHints,
-    xub_StrLen const nIndex, RES_TXTATR const nWhich,
+    sal_Int32 nIndex, RES_TXTATR const nWhich,
     enum SwTxtNode::GetTxtAttrMode const eMode)
 {
     sal_uInt16 const nSize = (pSwpHints) ? pSwpHints->Count() : 0;
     xub_StrLen nPreviousIndex(0); // index of last hint with nWhich
-    bool (*pMatchFunc)(xub_StrLen const, xub_StrLen const, xub_StrLen const)=0;
+    bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=0;
     switch (eMode)
     {
         case SwTxtNode::DEFAULT:   pMatchFunc = &lcl_GetTxtAttrDefault; break;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index e474f63..1c9ee69 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -97,7 +97,7 @@ extern       SwTxtFrm  *pLinguFrm;
 
 static sal_uInt16
 lcl_MaskRedlines( const SwTxtNode& rNode, OUStringBuffer& rText,
-                         const xub_StrLen nStt, const xub_StrLen nEnd,
+                         sal_Int32 nStt, sal_Int32 nEnd,
                          const sal_Unicode cChar )
 {
     sal_uInt16 nNumOfMaskedRedlines = 0;
@@ -142,7 +142,7 @@ lcl_MaskRedlines( const SwTxtNode& rNode, OUStringBuffer& rText,
  */
 static sal_uInt16
 lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, OUStringBuffer& rText,
-                                      const xub_StrLen nStt, const xub_StrLen nEnd,
+                                      sal_Int32 nStt, sal_Int32 nEnd,
                                       const sal_Unicode cChar = CH_TXTATR_INWORD,
                                       bool bCheckShowHiddenChar = true )
 {
@@ -175,7 +175,7 @@ lcl_MaskRedlinesAndHiddenText( const SwTxtNode& rNode, OUStringBuffer& rText,
 /**
  * Used for spell checking. Calculates a rectangle for repaint.
  */
-static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, xub_StrLen nChgStart, xub_StrLen nChgEnd )
+static SwRect lcl_CalculateRepaintRect( SwTxtFrm& rTxtFrm, sal_Int32 nChgStart, sal_Int32 nChgEnd )
 {
     SwRect aRect;
 
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index d60883f..cb4f9a2 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -552,8 +552,7 @@ static bool lcl_IsSpecialCharacter(sal_Unicode nChar)
     return false;
 }
 
-static OUString lcl_DenotedPortion(OUString rStr, xub_StrLen nStart,
-                                 xub_StrLen nEnd)
+static OUString lcl_DenotedPortion(OUString rStr, sal_Int32 nStart, sal_Int32 nEnd)
 {
     OUString aResult;
 
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 162dfff..f328d0a 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -433,7 +433,7 @@ static void ImplPatternProcessStrictModify( Edit* pEdit,
 
 // -----------------------------------------------------------------------
 
-static xub_StrLen ImplPatternLeftPos(const OString& rEditMask, xub_StrLen nCursorPos)
+static xub_StrLen ImplPatternLeftPos(const OString& rEditMask, sal_Int32 nCursorPos)
 {
     // search non-literal predecessor
     xub_StrLen nNewPos = nCursorPos;
@@ -2224,7 +2224,7 @@ static bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const OUSt
 
 // -----------------------------------------------------------------------
 
-static bool ImplCutTimePortion( OUStringBuffer& _rStr, xub_StrLen _nSepPos, sal_Bool _bSkipInvalidCharacters, short* _pPortion )
+static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, sal_Bool _bSkipInvalidCharacters, short* _pPortion )
 {
     OUString sPortion(_rStr.getStr(), _nSepPos );
     _rStr = _nSepPos < _rStr.getLength()
commit 296329a926877d069f55364a177d734f385ce7ae
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Oct 28 12:21:40 2013 +0200

    convert xub_StrLen to sal_Int32
    
    convert for loops using xub_StrLen to use sal_Int32
    
    Change-Id: I5f635ca078966fefe938dbc7e8dea7c8d0d0b554

diff --git a/connectivity/source/drivers/file/quotedstring.cxx b/connectivity/source/drivers/file/quotedstring.cxx
index f69230d..5cbe815 100644
--- a/connectivity/source/drivers/file/quotedstring.cxx
+++ b/connectivity/source/drivers/file/quotedstring.cxx
@@ -142,7 +142,7 @@ namespace connectivity
                         sBuff.append(cChar);
                     }
                 }
-            } // for( xub_StrLen i = nStartPos; i < nLen; ++i )
+            } // for( sal_Int32 i = nStartPos; i < nLen; ++i )
             return sBuff.makeStringAndClear();
         }
         return OUString();
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index bace952..6e5f148 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -140,7 +140,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
         sal_Int32 nStartPosHeaderLine = 0; // use for efficient way to get the tokens
         sal_Int32 nStartPosFirstLine = 0; // use for efficient way to get the tokens
         sal_Int32 nStartPosFirstLine2 = 0;
-        for (xub_StrLen i = 0; i < nFieldCount; i++)
+        for( sal_Int32 i = 0; i < nFieldCount; i++ )
         {
             if ( nRowCount == 0)
             {
@@ -173,7 +173,7 @@ void OFlatTable::fillColumns(const ::com::sun::star::lang::Locale& _aLocale)
     }
     while(nRowCount < nMaxRowsToScan && bRead);
 
-    for (xub_StrLen i = 0; i < nFieldCount; i++)
+    for( sal_Int32 i = 0; i < nFieldCount; i++ )
     {
         // check if the columname already exists
         OUString aAlias(aColumnNames[i]);
@@ -242,7 +242,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
                     xub_StrLen nDot = 0;
                     xub_StrLen nDecimalDelCount = 0;
                     xub_StrLen nSpaceCount = 0;
-                    for (xub_StrLen j = 0; j < aField2.getLength(); j++)
+                    for( sal_Int32 j = 0; j < aField2.getLength(); j++ )
                     {
                         const sal_Unicode c = aField2[j];
                         if ( j == nSpaceCount && m_cFieldDelimiter != 32 && c == 32 )
@@ -275,7 +275,7 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
                     {
                         // Is the delimiter correct?
                         const OUString aValue = aField2.getToken(0,cDecimalDelimiter);
-                        for (sal_Int32 j = aValue.getLength() - 4; j >= 0; j -= 4)
+                        for( sal_Int32 j = aValue.getLength() - 4; j >= 0; j -= 4)
                         {
                             const sal_Unicode c = aValue[j];
                             // just digits, decimal- and thousands-delimiter?
diff --git a/cui/source/dialogs/hyphen.cxx b/cui/source/dialogs/hyphen.cxx
index ca46130..ed436b6 100644
--- a/cui/source/dialogs/hyphen.cxx
+++ b/cui/source/dialogs/hyphen.cxx
@@ -236,7 +236,7 @@ void SvxHyphenWordDialog::ContinueHyph_Impl( sal_uInt16 nInsPos )
             DBG_ASSERT(nInsPos <= aTmp.getLength() - 2, "wrong hyphen position");
 
             sal_Int16 nIdxPos = -1;
-            for (sal_uInt16 i = 0; i <= nInsPos; ++i)
+            for (sal_Int32 i = 0; i <= nInsPos; ++i)
             {
                 if (HYPH_POS_CHAR == aTmp[ i ])
                     nIdxPos++;
@@ -304,7 +304,7 @@ void SvxHyphenWordDialog::SelLeft()
     if (nOldPos > 0)
     {
         OUString aTxt( aEditWord );
-        for ( xub_StrLen i = nOldPos - 1;  i > 0; --i)
+        for( sal_Int32 i = nOldPos - 1;  i > 0; --i )
         {
             DBG_ASSERT(i <= aTxt.getLength(), "index out of range");
             if (aTxt[ i ] == sal_Unicode( HYPH_POS_CHAR ))
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index e624cbb..47a81a3 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -717,7 +717,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox )
         }
         else if(eColumnSearch == ColumnSearch::CHAR)
         {
-            for(xub_StrLen i=6;i<10;i++)
+            for(sal_Int32 i=6; i<10; i++)
                 pComp->InsertEntry(aSTR_COMPARE_OPERATORS.getToken(i, ';'));
         }
         else if(eColumnSearch == ColumnSearch::BASIC)
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 1e4895f..c58e9cd 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -107,7 +107,7 @@ ODatabaseImportExport::ODatabaseImportExport(const ::svx::ODataAccessDescriptor&
     if( nCount > SBA_FORMAT_SELECTION_COUNT && !rExchange.getToken(4, ';').isEmpty())
     {
         m_pRowMarker = new sal_Int32[nCount-SBA_FORMAT_SELECTION_COUNT];
-        for(xub_StrLen i=SBA_FORMAT_SELECTION_COUNT;i<nCount;++i)
+        for(sal_Int32 i=SBA_FORMAT_SELECTION_COUNT; i<nCount; ++i)
             m_pRowMarker[i-SBA_FORMAT_SELECTION_COUNT] = rExchange.getToken(i,char(11)).toInt32();
     }
     osl_atomic_decrement( &m_refCount );
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 1b45eac..b4b9d5f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -202,7 +202,7 @@ void OSelectionBrowseBox::initialize()
         if ( lcl_SupportsCoreSQLGrammar(xConnection) )
         {
             sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';');
-            for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)
+            for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ )
                 m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';'));
         }
         else // else only COUNT(*) and COUNT("table".*)
@@ -2260,9 +2260,9 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUSt
             break;
         default:
             {
-                xub_StrLen nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';');
-                xub_StrLen i;
-                for ( i = 0; i < nCount-1; i++) // grouping is not counted
+                sal_Int32 nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';');
+                sal_Int32 i;
+                for( i = 0; i < nCount-1; i++ ) // grouping is not counted
                 {
                     if(rFkt.equalsIgnoreAsciiCase(m_aFunctionStrings.getToken(i, ';')))
                     {
@@ -2707,7 +2707,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry)
                 xub_StrLen nCount = comphelper::string::getTokenCount(m_aFunctionStrings, ';');
                 if ( _pEntry->isNumeric() )
                     --nCount;
-                for (xub_StrLen nIdx = 1; nIdx < nCount; nIdx++)
+                for( sal_Int32 nIdx = 1; nIdx < nCount; nIdx++ )
                     m_pFunctionCell->InsertEntry(m_aFunctionStrings.getToken(nIdx, ';'));
             }
 
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index e595ddd..7e98f51 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1592,7 +1592,7 @@ sal_Bool ImpEditEngine::IsInputSequenceCheckingRequired( sal_Unicode nChar, cons
 
 static  bool lcl_HasStrongLTR ( const OUString& rTxt, xub_StrLen nStart, xub_StrLen nEnd )
  {
-     for ( xub_StrLen nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
+     for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
      {
          const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ]);
          if ( nCharDir == U_LEFT_TO_RIGHT ||
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 4861d73..40f0420 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -425,7 +425,7 @@ Size SvxFont::QuickGetTextSize( const OutputDevice *pOut, const OUString &rTxt,
 
         if ( pDXArray )
         {
-            for ( xub_StrLen i = 0; i < nLen; i++ )
+            for ( sal_Int32 i = 0; i < nLen; i++ )
                 pDXArray[i] += ( (i+1) * long( nKern ) );
             // The last one is a nKern too big:
             pDXArray[nLen-1] -= nKern;
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index a459c67..3c4302f 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1097,7 +1097,7 @@ bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const OUString& rT
     aConverted += rCC.uppercase(OUString(rTxt[nSttPos]));
     aConverted += rCC.lowercase(OUString(rTxt[nSttPos+1]));
 
-    for (xub_StrLen i = nSttPos+2; i < nEndPos; ++i)
+    for( sal_Int32 i = nSttPos+2; i < nEndPos; ++i )
     {
         if ( IsLowerLetter(rCC.getCharacterType(rTxt, i)) )
             // A lowercase letter disqualifies the whole text.
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 2dab6fda..3a9534e 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3309,7 +3309,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
                 bLastAlp = bNextNum = true;
                 xub_StrLen nStrip = 0;
                 xub_StrLen nCount = nRefs;
-                for ( xub_StrLen j=1; j<nCount; j++ )
+                for ( sal_Int32 j=1; j<nCount; j++ )
                 {
                     aTmp2 = aSymbol.getToken( 0, ':', nIndex );
                     sal_Int32 nLen2 = aTmp2.getLength();
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 8a3bc40..e7198c4 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2136,9 +2136,9 @@ void ScInterpreter::ScBase()
         {
             const xub_StrLen nConstBuf = 128;
             sal_Unicode aBuf[nConstBuf];
-            xub_StrLen nBuf = std::max( (xub_StrLen) fChars, (xub_StrLen) (nMinLen+1) );
+            sal_Int32 nBuf = std::max<sal_Int32>( fChars, nMinLen + 1 );
             sal_Unicode* pBuf = (nBuf <= nConstBuf ? aBuf : new sal_Unicode[nBuf]);
-            for ( xub_StrLen j = 0; j < nBuf; ++j )
+            for ( sal_Int32 j = 0; j < nBuf; ++j )
             {
                 pBuf[j] = '0';
             }
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 65eb8a2..3cee5e6 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1812,7 +1812,7 @@ XclExpWebQuery::XclExpWebQuery(
     OUString aAppendTable;
     sal_Int32 nStringIx = 0;
     bool bExitLoop = false;
-    for( xub_StrLen nToken = 0; (nToken < nTokenCnt) && !bExitLoop; ++nToken )
+    for( sal_Int32 nToken = 0; (nToken < nTokenCnt) && !bExitLoop; ++nToken )
     {
         OUString aToken( rSource.getToken( 0, ';', nStringIx ) );
         mbEntireDoc = ScfTools::IsHTMLDocName( aToken );
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index be02afc..7e650c6 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -320,7 +320,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const OUS
 
         sal_uInt16 pnPasswd[16];
         memset( pnPasswd, 0, sizeof( pnPasswd ) );
-        for (xub_StrLen nChar = 0; nChar < aPass.getLength(); ++nChar )
+        for( sal_Int32 nChar = 0; nChar < aPass.getLength(); ++nChar )
             pnPasswd[nChar] = aPass[nChar];
 
         ::msfilter::MSCodec_Std97 aCodec;
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index 1e7d368..39557bd 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -347,8 +347,7 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl)
         // Needs at least 4 characters.
         return;
 
-    sal_Unicode c = rUrl[0];
-    if (c != '#')
+    if (rUrl[0] != '#')
         // the 1st character must be '#'.
         return;
 
@@ -356,9 +355,9 @@ void XclImpHyperlink::ConvertToValidTabName(OUString& rUrl)
 
     bool bInQuote = false;
     bool bQuoteTabName = false;
-    for (xub_StrLen i = 1; i < n; ++i)
+    for( sal_Int32 i = 1; i < n; ++i )
     {
-        c = rUrl[i];
+        sal_Unicode c = rUrl[i];
         if (c == '\'')
         {
             if (bInQuote && i+1 < n && rUrl[i+1] == sal_Unicode('\''))
@@ -937,7 +936,7 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm )
         xub_StrLen nTokenCnt = ScStringUtil::GetQuotedTokenCount( aTables, aQuotedPairs, ',' );
         maTables = "";
         sal_Int32 nStringIx = 0;
-        for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken )
+        for( sal_Int32 nToken = 0; nToken < nTokenCnt; ++nToken )
         {
             OUString aToken( ScStringUtil::GetQuotedToken( aTables, 0, aQuotedPairs, ',', nStringIx ) );
             sal_Int32 nTabNum = CharClass::isAsciiNumeric( aToken ) ? aToken.toInt32() : 0;
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index b6df6eb..d101a9d 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -708,8 +708,8 @@ void XclImpUrlHelper::DecodeUrl(
                     {
                         if( *(pChar + 1) )
                         {
-                            xub_StrLen nLen = *++pChar;
-                            for( xub_StrLen nChar = 0; (nChar < nLen) && *(pChar + 1); ++nChar )
+                            sal_Int32 nLen = *++pChar;
+                            for( sal_Int32 nChar = 0; (nChar < nLen) && *(pChar + 1); ++nChar )
                                 lclAppendUrlChar( rUrl, *++pChar );
 //                            rUrl.Append( ':' );
                         }
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index a399702..38858af 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -158,7 +158,7 @@ OUString ScfTools::ConvertToScDefinedName(const OUString& rName )
     sal_Int32 nLen = sName.getLength();
     if( nLen && !ScCompiler::IsCharFlagAllConventions( sName, 0, SC_COMPILER_C_CHAR_NAME ) )
         sName = sName.replaceAt( 0, 1, "_" );
-    for( xub_StrLen nPos = 1; nPos < nLen; ++nPos )
+    for( sal_Int32 nPos = 1; nPos < nLen; ++nPos )
         if( !ScCompiler::IsCharFlagAllConventions( sName, nPos, SC_COMPILER_C_NAME ) )
             sName = sName.replaceAt( nPos, 1, "_" );
     return sName;
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index e9987ee..c4dcb4b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2459,8 +2459,8 @@ void ScInputHandler::SetMode( ScInputMode eNewMode )
 
 static bool lcl_IsNumber(const OUString& rString)
 {
-    xub_StrLen nLen = rString.getLength();
-    for (xub_StrLen i=0; i<nLen; i++)
+    sal_Int32 nLen = rString.getLength();
+    for (sal_Int32 i=0; i<nLen; i++)
     {
         sal_Unicode c = rString[i];
         if ( c < '0' || c > '9' )
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index b58154e..0e28c5c 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -790,7 +790,7 @@ static bool lcl_CheckRepeatString( const OUString& rStr, ScDocument* pDoc, bool
     SCCOLROW nVal = 0;
     sal_Int32 nLen = rStr.getLength();
     bool bEndPos = false;
-    for (xub_StrLen i = 0; i < nLen; ++i)
+    for( sal_Int32 i = 0; i < nLen; ++i )
     {
         const sal_Unicode c = rStr[i];
         if (c == rsep)
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index d725a52..1ca9f40 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -627,7 +627,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth
     sal_uInt8 nSignCount = 0, nDecimalCount = 0, nExpCount = 0;
     sal_Int32 nLen = aString.getLength();
     sal_Unicode cDecSep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator[0];
-    for (xub_StrLen i = 0; i < nLen; ++i)
+    for( sal_Int32 i = 0; i < nLen; ++i )
     {
         sal_Unicode c = aString[i];
         if (c == sal_Unicode('-'))
@@ -1223,9 +1223,8 @@ void ScOutputData::GetOutputArea( SCCOL nX, SCSIZE nArrY, long nPosX, long nPosY
     if ( nMergeRows == 0 )
         nMergeRows = 1;
 
-    long i;
     long nMergeSizeX = 0;
-    for ( i=0; i<nMergeCols; i++ )
+    for ( long i=0; i<nMergeCols; i++ )
     {
         long nColWidth = ( nCellX+i <= nX2 ) ?
                 pRowInfo[0].pCellInfo[nCellX+i+1].nWidth :
@@ -2021,7 +2020,7 @@ void ScOutputData::DrawStrings( sal_Bool bPixelToLogic )
                             {
                                 double fMul = GetStretch();
                                 sal_Int32 nLen = aString.getLength();
-                                for (xub_StrLen i=0; i<nLen; i++)
+                                for( sal_Int32 i = 0; i<nLen; i++ )
                                     pDX[i] = (long)(pDX[i] / fMul + 0.5);
                             }
 
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index dd90ac3..81d3584 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -498,7 +498,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
                 else if( HTML_ISALPHA( nNextCh ) )
                 {
                     OUStringBuffer sEntityBuffer( MAX_ENTITY_LEN );
-                    xub_StrLen nPos = 0L;
+                    sal_Int32 nPos = 0L;
                     do
                     {
                         sEntityBuffer.append( nNextCh );
@@ -520,7 +520,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
                             DBG_ASSERT( rInput.Tell() - nStreamPos ==
                                         (sal_uLong)(nPos+1L)*GetCharSize(),
                                         "UTF-8 is failing here" );
-                            for( xub_StrLen i=nPos-1L; i>1L; i-- )
+                            for( sal_Int32 i = nPos-1; i>1; i-- )
                             {
                                 nNextCh = sEntityBuffer[i];
                                 sEntityBuffer.setLength( i );
@@ -1899,14 +1899,12 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
         if( 0xfe == (sal_uChar)pHeader[0] )
             bUCS2B = true;
 
-        xub_StrLen nLen;
-        for( nLen = 2;
-             pHeader[nLen] != 0 || pHeader[nLen+1] != 0;
-             nLen+=2 )
-            ;
+        sal_Int32 nLen = 2;
+        while( pHeader[nLen] != 0 || pHeader[nLen+1] != 0 )
+             nLen += 2;
 
         OStringBuffer sTmp( (nLen - 2)/2 );
-        for( xub_StrLen nPos = 2; nPos < nLen; nPos += 2 )
+        for( sal_Int32 nPos = 2; nPos < nLen; nPos += 2 )
         {
             sal_Unicode cUC;
             if( bUCS2B )
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx
index 9384184..970ddf8 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -246,7 +246,7 @@ namespace
             {
                 aDXArray.reserve(rInfo.mnTextLen);
 
-                for(xub_StrLen a(0); a < rInfo.mnTextLen; a++)
+                for(sal_Int32 a=0; a < rInfo.mnTextLen; a++)
                 {
                     aDXArray.push_back((double)rInfo.mpDXArray[a]);
                 }
diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx
index 528a5ae..298db87 100644
--- a/svx/source/svdraw/svdotextpathdecomposition.cxx
+++ b/svx/source/svdraw/svdotextpathdecomposition.cxx
@@ -100,7 +100,7 @@ namespace
             {
                 maDblDXArray.reserve(mnTextLength);
 
-                for(xub_StrLen a(0); a < mnTextLength; a++)
+                for(sal_Int32 a=0; a < mnTextLength; a++)
                 {
                     maDblDXArray.push_back((double)rInfo.mpDXArray[a]);
                 }
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index d38a5aa..dd01534 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -183,7 +183,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
     xub_StrLen aIndex = 0;
     while (aCount)
     {
-        for (xub_StrLen i = 0; i <pHts->Count();i++)
+        for (sal_Int32 i = 0; i < pHts->Count(); i++ )
         {
             aIndex++;
             const SwTxtAttr* pTxtAttr = (*pHts)[i];
@@ -197,7 +197,7 @@ xub_StrLen GetPostIt(xub_StrLen aCount,const SwpHints *pHts)
         }
     }
     // throw away all following non postits
-    for (xub_StrLen i = aIndex; i <pHts->Count();i++)
+    for( sal_Int32 i = aIndex; i < pHts->Count(); i++ )
     {
         const SwTxtAttr* pTxtAttr = (*pHts)[i];
         if ( (pTxtAttr->Which()==RES_TXTATR_FIELD) &&
@@ -266,7 +266,7 @@ bool SwPaM::Find( const SearchOptions& rSearchOpt, bool bSearchInNotes , utl::Te
                     nStart = swap;
                 }
 
-                for (xub_StrLen i = 0; i <pHts->Count();i++)
+                for( sal_Int32 i = 0; i < pHts->Count(); i++ )
                 {
                     xub_StrLen aPos = *(*pHts)[i]->GetStart();
                     const SwTxtAttr* pTxtAttr = (*pHts)[i];
diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx
index fd603b3..0432fdf 100644
--- a/sw/source/core/doc/doccomp.cxx
+++ b/sw/source/core/doc/doccomp.cxx
@@ -1028,7 +1028,7 @@ sal_uLong SwCompareLine::GetHashValue() const
     case ND_SECTIONNODE:
         {
             OUString sStr( GetText() );
-            for( xub_StrLen n = 0; n < sStr.getLength(); ++n )
+            for( sal_Int32 n = 0; n < sStr.getLength(); ++n )
                 ( nRet <<= 1 ) += sStr[ n ];
         }
         break;
@@ -1243,7 +1243,7 @@ OUString SwCompareLine::GetText() const
 sal_uLong SwCompareLine::GetTxtNodeHashValue( const SwTxtNode& rNd, sal_uLong nVal )
 {
     OUString sStr( rNd.GetExpandTxt() );
-    for( xub_StrLen n = 0; n < sStr.getLength(); ++n )
+    for( sal_Int32 n = 0; n < sStr.getLength(); ++n )
         ( nVal <<= 1 ) += sStr[ n ];
     return nVal;
 }
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 261b28d..ab94255 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1410,7 +1410,7 @@ lcl_CalcBreaks( ::std::vector<xub_StrLen> & rBreaks, SwPaM const & rPam )
     if (nEnd == pTxtNode->Len())
         return; // paragraph selected until the end
 
-    for (xub_StrLen i = nStart; i < nEnd; ++i)
+    for (sal_Int32 i = nStart; i < nEnd; ++i)
     {
         const sal_Unicode c(pTxtNode->GetTxt()[i]);
         if ((CH_TXTATR_INWORD == c) || (CH_TXTATR_BREAKWORD == c))
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 0ca0223..5683c1f 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1057,7 +1057,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
 
         if( T2T_PARA != cCh )
         {
-            for (xub_StrLen nChPos = 0; nChPos < pTxtNd->GetTxt().getLength();)
+            for (sal_Int32 nChPos = 0; nChPos < pTxtNd->GetTxt().getLength();)
             {
                 if (pTxtNd->GetTxt()[nChPos] == cCh)
                 {
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 575f3d0..12522f8 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -459,7 +459,7 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl
         ++nLvl;
     }
 
-    for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n)
+    for( xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n )
     {
         switch (rTxt[n])
         {
@@ -504,7 +504,7 @@ sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const
     xub_StrLen nANChar = 0, nBlnk = 0;
 
     CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().GetLanguage().GetLanguage() );
-    for( xub_StrLen n = 0, nEnd = rStr.getLength(); n < nEnd; ++n )
+    for( sal_Int32 n = 0, nEnd = rStr.getLength(); n < nEnd; ++n )
         if( IsSpace( rStr[ n ] ) )
             ++nBlnk;
         else if( rCC.isLetterNumeric( rStr, n ))
@@ -722,7 +722,7 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const OUString& rStr ) const
 bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const
 {
     const OUString& rTxt = rNd.GetTxt();
-    for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n)
+    for( sal_Int32 n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n )
         if (!IsSpace(rTxt[n]))
         {
             CharClass& rCC = GetCharClass( rNd.GetSwAttrSet().
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index eb71ce9..9c89884 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1350,7 +1350,7 @@ static bool lcl_IsValidRowName( const OUString& rStr )
 {
     bool bIsValid = true;
     sal_Int32 nLen = rStr.getLength();
-    for (xub_StrLen i = 0;  i < nLen && bIsValid;  ++i)
+    for( sal_Int32 i = 0;  i < nLen && bIsValid; ++i )
     {
         const sal_Unicode cChar = rStr[i];
         if (cChar < '0' || cChar > '9')
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 4d977d9..7fbc03c 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -249,7 +249,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
             if ( nCurrDir != UBIDI_RTL )
             {
                 nCurrDir = UBIDI_RTL;
-                for ( xub_StrLen nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx )
+                for( sal_Int32 nCharIdx = 0; nCharIdx < nEnd; ++nCharIdx )
                 {
                     UCharDirection nCharDir = u_charDirection ( aTxt[ nCharIdx ]);
                     if ( nCharDir == U_LEFT_TO_RIGHT ||
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 3e0ee4f..c688eb6 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -118,9 +118,9 @@ static bool lcl_ConnectToPrev( sal_Unicode cCh, sal_Unicode cPrevCh )
 /*************************************************************************
  * lcl_HasStrongLTR
  *************************************************************************/
-static  bool lcl_HasStrongLTR ( const OUString& rTxt, xub_StrLen nStart, xub_StrLen nEnd )
+static  bool lcl_HasStrongLTR ( const OUString& rTxt, sal_Int32 nStart, sal_Int32 nEnd )
  {
-     for ( xub_StrLen nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
+     for( sal_Int32 nCharIdx = nStart; nCharIdx < nEnd; ++nCharIdx )
      {
          const UCharDirection nCharDir = u_charDirection ( rTxt[ nCharIdx ] );
          if ( nCharDir == U_LEFT_TO_RIGHT ||
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 8698b43..1e66412 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -486,9 +486,9 @@ sal_Bool SwTxtFly::DrawTextOpaque( SwDrawTextInfo &rInf )
                                                       rInf.GetLen();
         if( rInf.GetSpace() > 0 )
         {
-            xub_StrLen nSpaceCnt = 0;
+            sal_Int32 nSpaceCnt = 0;
             const xub_StrLen nEndPos = rInf.GetIdx() + nTmpLen;
-            for( xub_StrLen nPos = rInf.GetIdx(); nPos < nEndPos; ++nPos )
+            for( sal_Int32 nPos = rInf.GetIdx(); nPos < nEndPos; ++nPos )
             {
                 if( CH_BLANK == rInf.GetText()[ nPos ] )
                     ++nSpaceCnt;
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 4c51fa9..0f882dc 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1029,7 +1029,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             }
 
             // calculate offsets
-            for ( xub_StrLen j = 1; j < rInf.GetLen(); ++j )
+            for( sal_Int32 j = 1; j < rInf.GetLen(); ++j )
             {
                 long nScr = pKernArray[ j ] - pKernArray[ j - 1 ];
                 nNextFix += nWidthPerChar;
@@ -1128,14 +1128,14 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                         }
                     }
                     long nGridAddSum = nGridWidthAdd;
-                    for(xub_StrLen i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd )
+                    for(sal_Int32 i = 0; i < rInf.GetLen(); i++, nGridAddSum += nGridWidthAdd )
                     {
                         pKernArray[i] += nGridAddSum;
                     }
                     long nKernSum = rInf.GetKern();
                     if ( bSpecialJust || rInf.GetKern() )
                     {
-                        for( xub_StrLen i = 0; i < rInf.GetLen(); i++, nKernSum += rInf.GetKern() )
+                        for( sal_Int32 i = 0; i < rInf.GetLen(); i++, nKernSum += rInf.GetKern() )
                         {
                             if ( CH_BLANK == rInf.GetText()[ rInf.GetIdx()+i ] )
                                 nKernSum += nSpaceAdd;
@@ -1197,7 +1197,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                 //long nKernAdd = rInf.GetKern();
         long nKernAdd = 0;
                 long nGridAddSum = nGridWidthAdd + nKernAdd;
-                for(xub_StrLen i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd + nKernAdd )
+                for(sal_Int32 i = 0; i < rInf.GetLen(); i++,nGridAddSum += nGridWidthAdd + nKernAdd )
                 {
                     pKernArray[i] += nGridAddSum;
                 }
@@ -1255,7 +1255,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
                 }
                 nDiff /= nZwi;
                 long nSum = nDiff;
-                for( xub_StrLen i = 0; i < nZwi; )
+                for( sal_Int32 i = 0; i < nZwi; )
                 {
                     pKernArray[ i ] += nSum;
                     if( ++i == nRest )
@@ -1345,7 +1345,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
 
             if ( bStretch || bPaintBlank || rInf.GetKern() || bSpecialJust )
             {
-                for( xub_StrLen i = 0; i < rInf.GetLen(); i++,
+                for( sal_Int32 i = 0; i < rInf.GetLen(); i++,
                      nKernSum += rInf.GetKern() )
                 {
                     if ( CH_BLANK == rInf.GetText()[ rInf.GetIdx()+i ] )
@@ -1630,7 +1630,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
             const long nOtherHalf = nSpaceAdd - nHalfSpace;
             if ( nSpaceAdd && ( cChPrev == CH_BLANK ) )
                 nSpaceSum = nHalfSpace;
-            for ( xub_StrLen i=1; i<nCnt; ++i,nKernSum += rInf.GetKern() )
+            for( sal_Int32 i=1; i<nCnt; ++i, nKernSum += rInf.GetKern() )
             {
                 nCh = rInf.GetText()[ rInf.GetIdx() + i ];
 
@@ -1951,7 +1951,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
             if ( pPrtFont->GetKerning() )
                 nMul = 1;
             const sal_uInt16 nDiv = nMul+1;
-            for( xub_StrLen i=1; i<nCnt; i++ )
+            for( sal_Int32 i = 1; i<nCnt; i++ )
             {
                 nCh = rInf.GetText()[ rInf.GetIdx() + i ];
                 long nScr;
@@ -2149,7 +2149,7 @@ xub_StrLen SwFntObj::GetCrsrOfst( SwDrawTextInfo &rInf )
             else
                 nGridWidthAdd = nGridWidthAdd - nDefaultFontHeight;
 
-            for(xub_StrLen j = 0; j < rInf.GetLen(); j++)
+            for(sal_Int32 j = 0; j < rInf.GetLen(); j++)
             {
                 long nScr = pKernArray[ j ] + ( nSpaceAdd + nGridWidthAdd  ) * ( j + 1 );
                 if( nScr >= rInf.GetOfst())
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index a73cf97..2ae345b 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -77,7 +77,7 @@ xub_StrLen sw_CalcCaseMap( const SwFont& rFnt,
     // special case for title case:
     const bool bTitle = SVX_CASEMAP_TITEL == rFnt.GetCaseMap() &&
                         g_pBreakIt->GetBreakIter().is();
-    for ( xub_StrLen i = nOfst; i < nEnd; ++i )
+    for ( sal_Int32 i = nOfst; i < nEnd; ++i )
     {
         OUString aTmp(rOrigString.copy(i, 1));
 
@@ -781,7 +781,7 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
                     rDo.GetInf().SetOut( *pOldOut );
                     if( !bWordWise && rDo.GetInf().GetSpace() )
                     {
-                        for( xub_StrLen nI = nOldPos; nI < nPos; ++nI )
+                        for( sal_Int32 nI = nOldPos; nI < nPos; ++nI )
                         {
                             if( CH_BLANK == rOldText[nI] )
                                 aPartSize.Width() += nSpaceAdd;
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index ef4edbf..a71601a 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3450,7 +3450,7 @@ void SwTxtNode::ReplaceText( const SwIndex& rStart, const xub_StrLen nDelLen,
     const xub_StrLen nStartPos = rStart.GetIndex();
     xub_StrLen nEndPos = nStartPos + nDelLen;
     xub_StrLen nLen = nDelLen;
-    for ( xub_StrLen nPos = nStartPos; nPos < nEndPos; ++nPos )
+    for( sal_Int32 nPos = nStartPos; nPos < nEndPos; ++nPos )
     {
         if ((CH_TXTATR_BREAKWORD == m_Text[nPos]) ||
             (CH_TXTATR_INWORD    == m_Text[nPos]))
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 6472131..897af65 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1263,7 +1263,7 @@ void SwSubFont::_DrawText( SwDrawTextInfo &rInf, const sal_Bool bGrey )
 
             const bool bAsianFont =
                 ( rInf.GetFont() && SW_CJK == rInf.GetFont()->GetActual() );
-            for( xub_StrLen nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp )
+            for( sal_Int32 nTmp = nOldIdx; nTmp < nTmpEnd; ++nTmp )
             {
                 if( CH_BLANK == rOldStr[nTmp] || bAsianFont ||
                     ( nTmp + 1 < rOldStr.getLength() && pSI &&
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 9786ab76..d60883f 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -605,7 +605,7 @@ OUString DenoteSpecialCharacters(const OUString & rStr)
         xub_StrLen nStart = 0;
         sal_Unicode cLast = 0;
 
-        for (xub_StrLen i = 0; i < rStr.getLength(); i++)
+        for( sal_Int32 i = 0; i < rStr.getLength(); i++)
         {
             if (lcl_IsSpecialCharacter(rStr[i]))
             {
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index bd0e91b..5ab6572 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -205,7 +205,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext)
         pTxtNd->SetIgnoreDontExpand( true );
 
         ++rIdx;
-        for( xub_StrLen n = 0; n < aDelStr.getLength(); n++  )
+        for( sal_Int32 n = 0; n < aDelStr.getLength(); n++  )
         {
             // do it individually, to keep the attributes!
             OUString aTmpStr(aDelStr[n]);
@@ -249,7 +249,7 @@ void SwUndoOverwrite::RepeatImpl(::sw::RepeatContext & rContext)
         ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo());
         rDoc.Overwrite(*pAktPam, OUString(aInsStr[0]));
     }
-    for( xub_StrLen n = 1; n < aInsStr.getLength(); ++n )
+    for( sal_Int32 n = 1; n < aInsStr.getLength(); ++n )
         rDoc.Overwrite( *pAktPam, OUString(aInsStr[n]) );
 }
 
@@ -277,7 +277,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext)
     bool bOldExpFlg = pTxtNd->IsIgnoreDontExpand();
     pTxtNd->SetIgnoreDontExpand( true );
 
-    for( xub_StrLen n = 0; n < aInsStr.getLength(); n++  )
+    for( sal_Int32 n = 0; n < aInsStr.getLength(); n++  )
     {
         // do it individually, to keep the attributes!
         OUString const ins(
@@ -459,7 +459,7 @@ void _UndoTransliterate_Data::SetChangeAtNode( SwDoc& rDoc )
         else
         {
             sal_Int32* p = aOffsets.getArray();
-            for( xub_StrLen n = 0; n < nLen; ++n, ++p )
+            for( sal_Int32 n = 0; n < nLen; ++n, ++p )
                 *p = n + nStart;
         }
         pTNd->ReplaceTextOnly( nStart, nLen, sText, aOffsets );
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 4d53bc6..6c441c77 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -465,7 +465,7 @@ static bool GetSubranges( const OUString &rRangeRepresentation,
     {
         OUString *pRanges = aRanges.getArray();
         OUString aFirstTable;
-        for ( xub_StrLen i = 0;  i < nLen && bRes;  ++i)
+        for( sal_Int32 i = 0; i < nLen && bRes; ++i )
         {
             OUString aRange( aRangesStr.getToken( i, ';' ) );
             if (!aRange.isEmpty())
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 9351dc0..2a1ad72 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -474,7 +474,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
                 bSwap = true;
                 sal_Char* pF = (sal_Char*)pNewBuf;
                 sal_Char* pN = pF+1;
-                for(xub_StrLen n = 0; n < nNewLen; ++n, pF+=2, pN+=2)
+                for(sal_uLong n = 0; n < nNewLen; ++n, pF+=2, pN+=2 )
                 {
                     sal_Char c = *pF;
                     *pF = *pN;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 53ced4e..ed80643 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -414,7 +414,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
     sw::PoolItems aRangeItems;
     if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
     {
-        for (xub_StrLen i = 0; i < pTxtAttrs->Count(); ++i)
+        for( sal_Int32 i = 0; i < pTxtAttrs->Count(); ++i )
         {
             const SwTxtAttr* pHt = (*pTxtAttrs)[i];
             const xub_StrLen* pEnd = pHt->GetEnd();
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c906b0b..e0d52c8 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3059,7 +3059,7 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
         if (!bIsUnicode)
             nEndUsed = Custom8BitToUnicode(hConverter, p8Bits, nL2, pBuffer, nStrLen);
 
-        for( xub_StrLen nI = 0; nI < nStrLen; ++nI, ++pBuffer )
+        for( sal_Int32 nI = 0; nI < nStrLen; ++nI, ++pBuffer )
             if (m_bRegardHindiDigits && bBidi && LangUsesHindiNumbers(nCTLLang))
                 *pBuffer = TranslateToHindiNumbers(*pBuffer);
 
@@ -5428,7 +5428,7 @@ namespace
 
                 sal_uInt16 pStd97Pass[16];
                 memset( pStd97Pass, 0, sizeof( pStd97Pass ) );
-                for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+                for( sal_Int32 nChar = 0; nChar < nLen; ++nChar )
                     pStd97Pass[nChar] = sUniPassword[nChar];
 
                 aCodec97.InitKey( pStd97Pass, pDocId );
@@ -5459,7 +5459,7 @@ namespace
             {
                 sal_Unicode pPassword[16];
                 memset( pPassword, 0, sizeof( pPassword ) );
-                for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+                for( sal_Int32 nChar = 0; nChar < nLen; ++nChar )
                     pPassword[nChar] = sUniPassword[nChar];
 
                 rCodec.InitKey( pPassword, pDocId );
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index b4ddec9..efd48e5 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -611,7 +611,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
     }
     else
     {
-        for(xub_StrLen i = SVBT8ToByte(rAV.cbTextBefore);
+        for(sal_Int32 i = SVBT8ToByte(rAV.cbTextBefore);
             i < SVBT8ToByte(rAV.cbTextAfter); ++i, pTxt += 2)
         {
             sTxt += OUString(SVBT16ToShort(*(SVBT16*)pTxt));
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 29dbf46..6e28911 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -486,11 +486,11 @@ WW8LSTInfo* WW8ListManager::GetLSTByListId( sal_uInt32 nIdLst ) const
 }
 
 static void lcl_CopyGreaterEight(OUString &rDest, OUString &rSrc,
-    xub_StrLen nStart, xub_StrLen nLen = STRING_LEN)
+    sal_Int32 nStart, sal_Int32 nLen = STRING_LEN)
 {
     if (nLen > rSrc.getLength() || nLen == STRING_LEN)
         nLen = rSrc.getLength();
-    for (xub_StrLen nI = nStart; nI < nLen; ++nI)
+    for( sal_Int32 nI = nStart; nI < nLen; ++nI)
     {
         sal_Unicode nChar = rSrc[nI];
         if (nChar > WW8ListManager::nMaxLevel)
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 7e81e88..e949d35 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -267,7 +267,7 @@ xub_StrLen FindParaStart( const OUString& rStr, sal_Unicode cToken, sal_Unicode
 {
     bool bStr = false; // ignore inside a string
 
-    for( xub_StrLen nBuf=0; nBuf+1 < rStr.getLength(); nBuf++ )
+    for( sal_Int32 nBuf = 0; nBuf+1 < rStr.getLength(); nBuf++ )
     {
         if( rStr[ nBuf ] == '"' )
             bStr = !bStr;
@@ -973,7 +973,7 @@ void SwWW8ImplReader::MakeTagString( OUString& rStr, const OUString& rOrg )
     sal_Unicode cChar;
     rStr = rOrg;
 
-    for( xub_StrLen nI = 0;
+    for( sal_Int32 nI = 0;
             nI < rStr.getLength() && rStr.getLength() < (MAX_FIELDLEN - 4); ++nI )
     {
         bool bSetAsHex = false;
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index ffbd5f6..2ddd993 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -863,7 +863,7 @@ void SwEditWin::FlushInBuffer()
                 OUString aNewText( aOldText );
                 if (rCTLOptions.IsCTLSequenceCheckingTypeAndReplace())
                 {
-                    for (xub_StrLen k = 0;  k < m_aInBuffer.getLength();  ++k)
+                    for( sal_Int32 k = 0;  k < m_aInBuffer.getLength();  ++k)
                     {
                         const sal_Unicode cChar = m_aInBuffer[k];
                         const sal_Int32 nPrevPos =xISC->correctInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode );
@@ -893,7 +893,7 @@ void SwEditWin::FlushInBuffer()
                 }
                 else
                 {
-                    for (xub_StrLen k = 0;  k < m_aInBuffer.getLength();  ++k)
+                    for( sal_Int32 k = 0;  k < m_aInBuffer.getLength(); ++k )
                     {
                         const sal_Unicode cChar = m_aInBuffer[k];
                         if (xISC->checkInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode ))
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index fda8741..c641baa 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -33,7 +33,7 @@ static OUString lcl_CheckGroupName( const OUString& rGroupName )
 {
     OUString sRet;
     //group name should contain only A-Z and a-z and spaces
-    for( xub_StrLen i = 0; i < rGroupName.getLength(); i++ )
+    for( sal_Int32 i = 0; i < rGroupName.getLength(); i++ )
     {
         sal_Unicode cChar = rGroupName[i];
         if (comphelper::string::isalnumAscii(cChar) ||
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 8d97a43..66e8ab1 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -2761,7 +2761,7 @@ ImplMultiTextLineInfo::ImplMultiTextLineInfo()
 
 ImplMultiTextLineInfo::~ImplMultiTextLineInfo()
 {
-    for ( xub_StrLen i = 0; i < mnLines; i++ )
+    for( sal_Int32 i = 0; i < mnLines; i++ )
         delete mpLines[i];
     delete [] mpLines;
 }
@@ -2782,7 +2782,7 @@ void ImplMultiTextLineInfo::AddLine( ImplTextLineInfo* pLine )
 
 void ImplMultiTextLineInfo::Clear()
 {
-    for ( xub_StrLen i = 0; i < mnLines; i++ )
+    for( sal_Int32 i = 0; i < mnLines; i++ )
         delete mpLines[i];
     mnLines = 0;
 }
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index 771d498..87e5c1a 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -5243,7 +5243,7 @@ static sal_Bool ImplHandleIMECompositionInput( WinSalFrame* pFrame,
                 sal_Int32 nTextLen2 = aEvt.maText.getLength();
                 pSalAttrAry = new sal_uInt16[nTextLen2];
                 memset( pSalAttrAry, 0, nTextLen2*sizeof( sal_uInt16 ) );
-                for ( xub_StrLen i = 0; (i < nTextLen2) && (i < nAttrLen); i++ )
+                for( sal_Int32 i = 0; (i < nTextLen2) && (i < nAttrLen); i++ )
                 {
                     BYTE nWinAttr = pAttrBuf[i];
                     sal_uInt16   nSalAttr;


More information about the Libreoffice-commits mailing list