diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-12 00:46:22 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-14 09:23:19 +0100 |
commit | ebeff3f074dd94dce4ce6cc55abd0495103684bd (patch) | |
tree | 4ba353f7ad94480fccfed3e78e305b80c0e5627b /sw/source/core/doc/docfmt.cxx | |
parent | cd470c64f9b09bb94262c606cfc36c8d923ffc54 (diff) |
xub_StrLen to sal_Int32 in SwIndex and some related
Change-Id: I66735635a88844c30a7fa1c886d2c1df34008f4f
Diffstat (limited to 'sw/source/core/doc/docfmt.cxx')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 223d48ccb387..d3f08d127b46 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -141,7 +141,7 @@ static bool lcl_RstTxtAttr( const SwNodePtr& rpNd, void* pArgs ) if( pTxtNode && pTxtNode->GetpSwpHints() ) { SwIndex aSt( pTxtNode, 0 ); - sal_uInt16 nEnd = pTxtNode->Len(); + sal_Int32 nEnd = pTxtNode->Len(); if( &pPara->pSttNd->nNode.GetNode() == pTxtNode && pPara->pSttNd->nContent.GetIndex() ) @@ -337,7 +337,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, pPam = new SwPaM( *rRg.GetPoint() ); SwIndex& rSt = pPam->GetPoint()->nContent; - sal_uInt16 nMkPos, nPtPos = rSt.GetIndex(); + sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); // Special case: if the Crsr is located within a URL attribute, we take over it's area SwTxtAttr const*const pURLAttr( @@ -359,8 +359,8 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos ) { - nMkPos = (xub_StrLen)aBndry.startPos; - nPtPos = (xub_StrLen)aBndry.endPos; + nMkPos = aBndry.startPos; + nPtPos = aBndry.endPos; } else { @@ -654,8 +654,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, aTxtSet.Put( rChgSet ); if( aTxtSet.Count() ) { - sal_uInt16 nInsCnt = rSt.GetIndex(); - sal_uInt16 nEnd = pStt->nNode == pEnd->nNode + const sal_Int32 nInsCnt = rSt.GetIndex(); + const sal_Int32 nEnd = pStt->nNode == pEnd->nNode ? pEnd->nContent.GetIndex() : pNode->Len(); SwRegHistory history( pNode, *pNode, pHistory ); @@ -787,7 +787,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, { SwTxtNode* pTxtNd = static_cast<SwTxtNode*>(pNode); const SwIndex& rSt = pStt->nContent; - sal_uInt16 nMkPos, nPtPos = rSt.GetIndex(); + sal_Int32 nMkPos, nPtPos = rSt.GetIndex(); const OUString& rStr = pTxtNd->GetTxt(); // Special case: if the Crsr is located within a URL attribute, we take over it's area @@ -810,8 +810,8 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos ) { - nMkPos = (xub_StrLen)aBndry.startPos; - nPtPos = (xub_StrLen)aBndry.endPos; + nMkPos = aBndry.startPos; + nPtPos = aBndry.endPos; } else nPtPos = nMkPos = rSt.GetIndex(); @@ -878,7 +878,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, if( pNode ) { - sal_uInt16 nLen = pNode->Len(); + const sal_Int32 nLen = pNode->Len(); if( pStt->nNode != pEnd->nNode ) aCntEnd.Assign( pNode, nLen ); @@ -943,8 +943,7 @@ lcl_InsAttr(SwDoc *const pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet, pNode = pEnd->nNode.GetNode().GetCntntNode(); if(pNode) { - sal_uInt16 nLen = pNode->Len(); - if( aCntEnd.GetIndex() != nLen ) + if( aCntEnd.GetIndex() != pNode->Len() ) { // the SwRegHistory inserts the attribute into the TxtNode! if( pNode->IsTxtNode() && pCharSet && pCharSet->Count() ) @@ -1110,7 +1109,7 @@ bool SwDoc::UpdateRsid( const SwPaM &rRg, const xub_StrLen nLen ) { return false; } - xub_StrLen const nStart(rRg.GetPoint()->nContent.GetIndex() - nLen); + const sal_Int32 nStart(rRg.GetPoint()->nContent.GetIndex() - nLen); SvxRsidItem aRsid( mnRsid, RES_CHRATR_RSID ); SfxItemSet aSet(GetAttrPool(), RES_CHRATR_RSID, RES_CHRATR_RSID); @@ -2464,7 +2463,7 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet ) SetRedlineMode_intern( (RedlineMode_t)(eOld | nsRedlineMode_t::REDLINE_IGNORE)); } - xub_StrLen const nEnd(rPam.End()->nContent.GetIndex()); + const sal_Int32 nEnd(rPam.End()->nContent.GetIndex()); std::vector<sal_uInt16> whichIds; SfxItemIter iter(rSet); for (SfxPoolItem const* pItem = iter.FirstItem(); |