summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-11-24 13:05:05 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2013-11-24 14:46:57 +0100
commit12bdbfbc43b66b671d83deb6ddf8dfb09a9f5749 (patch)
tree7a0a22d8d5473f6f4f4d7d42164c365283ff06d8 /sw
parent2dda972cb91923333abb854be7a9d44a38a9fa36 (diff)
STRING_LEN is no more the maximum string length + some cleanups
Change-Id: Idbdfb4dd39ce5e419f7b9338db39ddda186d014d
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docedt.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d33deada3b90..35d62913382e 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1223,22 +1223,20 @@ static std::vector<sal_uInt16> * lcl_RangesToVector(sal_uInt16 * pRanges)
static bool lcl_StrLenOverFlow( const SwPaM& rPam )
{
- // If we try to merge two paragraph we have to test if afterwards
+ // If we try to merge two paragraphs we have to test if afterwards
// the string doesn't exceed the allowed string length
- bool bRet = false;
if( rPam.GetPoint()->nNode != rPam.GetMark()->nNode )
{
const SwPosition* pStt = rPam.Start(), *pEnd = rPam.End();
const SwTxtNode* pEndNd = pEnd->nNode.GetNode().GetTxtNode();
if( (0 != pEndNd) && pStt->nNode.GetNode().IsTxtNode() )
{
- sal_uInt64 nSum = pStt->nContent.GetIndex() +
+ const sal_uInt64 nSum = pStt->nContent.GetIndex() +
pEndNd->GetTxt().getLength() - pEnd->nContent.GetIndex();
- if( nSum > STRING_LEN )
- bRet = true;
+ return nSum > static_cast<sal_uInt64>(SAL_MAX_INT32);
}
}
- return bRet;
+ return false;
}
void sw_GetJoinFlags( SwPaM& rPam, sal_Bool& rJoinTxt, sal_Bool& rJoinPrev )