summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-29 08:47:03 +0200
committerNoel Grandin <noel@peralex.com>2013-11-06 08:51:23 +0200
commitfa109ceba9796eddef82a71bc454e0fe393c81ce (patch)
treedc965ea5c59f87ab4689dc476e482cd6ad56a7d5 /sw
parent296329a926877d069f55364a177d734f385ce7ae (diff)
convert xub_StrLen to sal_Int32
convert various module-local functions Change-Id: I89f3eb40b107e2617958e474ffe86bd73e01cf33
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/docedt.cxx2
-rw-r--r--sw/source/core/edit/edattr.cxx2
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx10
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx6
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx13
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/core/undo/undel.cxx3
10 files changed, 23 insertions, 27 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 552b10c7ff48..5de01055da4b 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 ab94255154db..20f139cfb976 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 9f2f244f91d2..50b63640c210 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 152d06693030..a8a96769749d 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 5c284615b92c..5fa402976f77 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 c688eb6b8954..e9d3796a1817 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 ff0da2365dda..474cd818a203 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 a71601a902b2..8dfa6a389375 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 e474f63cb59a..1c9ee697afff 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 d60883fa4fd9..cb4f9a26e58b 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;