diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-24 11:28:30 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-24 14:46:57 +0100 |
commit | 2dda972cb91923333abb854be7a9d44a38a9fa36 (patch) | |
tree | 6ae71d34a56f9984b7704ba837e1c7a2896f2dd5 /sw | |
parent | 188886a3dcbe9b2ea156976dc61d870a47f59cf2 (diff) |
xub_StrLen to sal_Int32
Change-Id: I8ad8cade0b2cbc29a934a983c72d25f7f00af6bc
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/doc/doccorr.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/UndoTable.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/mvsave.hxx | 12 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 12 |
7 files changed, 25 insertions, 25 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index b2e07d739a1f..0c04ec9d378a 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -926,14 +926,14 @@ namespace struct { sal_uInt16 nType, nCount; } TC; sal_uLong nTypeCount; } TYPECOUNT; - xub_StrLen nContent; + sal_Int32 nContent; public: _SwSaveTypeCountContent() { TYPECOUNT.nTypeCount = 0; nContent = 0; } _SwSaveTypeCountContent( const std::vector<sal_uLong> &rArr, sal_uInt16& rPos ) { TYPECOUNT.nTypeCount = rArr[ rPos++ ]; - nContent = static_cast<xub_StrLen>(rArr[ rPos++ ]); + nContent = static_cast<sal_Int32>(rArr[ rPos++ ]); } void Add( std::vector<sal_uLong> &rArr ) { @@ -954,8 +954,8 @@ namespace void SetTypeAndCount( sal_uInt16 nT, sal_uInt16 nC ) { TYPECOUNT.TC.nCount = nC; TYPECOUNT.TC.nType = nT; } - void SetContent( xub_StrLen n ) { nContent = n; } - xub_StrLen GetContent() const { return nContent; } + void SetContent( sal_Int32 n ) { nContent = n; } + sal_Int32 GetContent() const { return nContent; } }; // #i59534: If a paragraph will be splitted we have to restore some redline positions @@ -1235,7 +1235,7 @@ void _DelBookmarks( void _SaveCntntIdx(SwDoc* pDoc, sal_uLong nNode, - xub_StrLen nCntnt, + sal_Int32 nCntnt, std::vector<sal_uLong> &rSaveArr, sal_uInt8 nSaveFly) { @@ -1454,7 +1454,7 @@ void _SaveCntntIdx(SwDoc* pDoc, void _RestoreCntntIdx(SwDoc* pDoc, std::vector<sal_uLong> &rSaveArr, sal_uLong nNode, - xub_StrLen nOffset, + sal_Int32 nOffset, bool bAuto) { SwCntntNode* pCNd = pDoc->GetNodes()[ nNode ]->GetCntntNode(); @@ -1616,8 +1616,8 @@ void _RestoreCntntIdx(SwDoc* pDoc, void _RestoreCntntIdx(std::vector<sal_uLong> &rSaveArr, const SwNode& rNd, - xub_StrLen nLen, - xub_StrLen nChkLen) + sal_Int32 nLen, + sal_Int32 nChkLen) { const SwDoc* pDoc = rNd.GetDoc(); const SwRedlineTbl& rRedlTbl = pDoc->GetRedlineTbl(); diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index 07984d98692b..7b59c1feaf41 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -245,7 +245,7 @@ void SwDoc::CorrAbs(const SwNodeIndex& rStartNode, void PaMCorrRel( const SwNodeIndex &rOldNode, const SwPosition &rNewPos, - const xub_StrLen nOffset ) + const sal_Int32 nOffset ) { const SwNode* pOldNode = &rOldNode.GetNode(); SwPosition aNewPos( rNewPos ); diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index d9bd0ca264af..d33deada3b90 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -628,7 +628,7 @@ static void lcl_RestoreRedlines( SwDoc* pDoc, sal_uInt32 nInsPos, _SaveRedlines& // because of unnecessary expanded redlines // From now on this class saves the redline positions of all redlines which ends exact at the // insert position (node _and_ content index) -_SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, xub_StrLen nCnt ) +_SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nCnt ) : pSavArr( 0 ), pSavIdx( 0 ), nSavCntnt( nCnt ) { SwNode& rNd = rInsIdx.GetNode(); diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx index 0fd261368732..27507ee6dff0 100644 --- a/sw/source/core/inc/UndoTable.hxx +++ b/sw/source/core/inc/UndoTable.hxx @@ -124,7 +124,7 @@ public: void SetRange( const SwNodeRange& ); void AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, - xub_StrLen nCntntIdx = STRING_MAXLEN); + sal_Int32 nCntntIdx = SAL_MAX_INT32); }; class SwUndoAttrTbl : public SwUndo diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index 1cf3c6fd906b..e79d83eb8468 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -80,13 +80,13 @@ void _DelBookmarks(const SwNodeIndex& rStt, ::std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =0, const SwIndex* pSttIdx =0, const SwIndex* pEndIdx =0); -void _SaveCntntIdx( SwDoc* pDoc, sal_uLong nNode, xub_StrLen nCntnt, +void _SaveCntntIdx( SwDoc* pDoc, sal_uLong nNode, sal_Int32 nCntnt, std::vector<sal_uLong>& rSaveArr, sal_uInt8 nSaveFly = 0 ); void _RestoreCntntIdx( SwDoc* pDoc, std::vector<sal_uLong>& rSaveArr, - sal_uLong nNode, xub_StrLen nOffset = 0, + sal_uLong nNode, sal_Int32 nOffset = 0, bool bAuto = false ); void _RestoreCntntIdx( std::vector<sal_uLong>& rSaveArr, const SwNode& rNd, - xub_StrLen nLen, xub_StrLen nCorrLen ); + sal_Int32 nLen, sal_Int32 nCorrLen ); /** data structure to temporarily hold fly anchor positions relative to some @@ -143,7 +143,7 @@ void PaMCorrAbs( const SwPaM& rRange, // Setzt alle PaMs in OldNode auf relative Pos void PaMCorrRel( const SwNodeIndex &rOldNode, const SwPosition &rNewPos, - const xub_StrLen nOffset = 0 ); + const sal_Int32 nOffset = 0 ); // Hilfsklasse zum kopieren von absatzgebundenen Flys. Durch die Sortierung @@ -186,11 +186,11 @@ class _SaveRedlEndPosForRestore { std::vector<SwPosition*>* pSavArr; SwNodeIndex* pSavIdx; - xub_StrLen nSavCntnt; + sal_Int32 nSavCntnt; void _Restore(); public: - _SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, xub_StrLen nCntnt ); + _SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx, sal_Int32 nCntnt ); ~_SaveRedlEndPosForRestore(); void Restore() { if( pSavArr ) _Restore(); } }; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 619e2031f2a4..cc2b5de49059 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -626,7 +626,7 @@ SwCntntNode *SwTxtNode::JoinNext() { SwDoc* pDoc = rNds.GetDoc(); std::vector<sal_uLong> aBkmkArr; - _SaveCntntIdx( pDoc, aIdx.GetIndex(), USHRT_MAX, aBkmkArr, SAVEFLY ); + _SaveCntntIdx( pDoc, aIdx.GetIndex(), SAL_MAX_INT32, aBkmkArr, SAVEFLY ); SwTxtNode *pTxtNode = aIdx.GetNode().GetTxtNode(); sal_Int32 nOldLen = m_Text.getLength(); @@ -721,7 +721,7 @@ SwCntntNode *SwTxtNode::JoinPrev() { SwDoc* pDoc = rNds.GetDoc(); std::vector<sal_uLong> aBkmkArr; - _SaveCntntIdx( pDoc, aIdx.GetIndex(), USHRT_MAX, aBkmkArr, SAVEFLY ); + _SaveCntntIdx( pDoc, aIdx.GetIndex(), SAL_MAX_INT32, aBkmkArr, SAVEFLY ); SwTxtNode *pTxtNode = aIdx.GetNode().GetTxtNode(); const sal_Int32 nLen = pTxtNode->Len(); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 1b3761609085..f247ada037e0 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -202,13 +202,13 @@ struct SwTblToTxtSave { sal_uLong m_nSttNd; sal_uLong m_nEndNd; - xub_StrLen m_nCntnt; + sal_Int32 m_nCntnt; SwHistory* m_pHstry; // metadata references for first and last paragraph in cell ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoStart; ::boost::shared_ptr< ::sfx2::MetadatableUndo > m_pMetadataUndoEnd; - SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCntnt ); + SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, sal_Int32 nCntnt ); ~SwTblToTxtSave() { delete m_pHstry; } }; @@ -359,7 +359,7 @@ SwRewriter SwUndoInsTbl::GetRewriter() const return aRewriter; } -SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, xub_StrLen nCnt ) +SwTblToTxtSave::SwTblToTxtSave( SwDoc& rDoc, sal_uLong nNd, sal_uLong nEndIdx, sal_Int32 nCnt ) : m_nSttNd( nNd ), m_nEndNd( nEndIdx), m_nCntnt( nCnt ), m_pHstry( 0 ) { // keep attributes of the joined node @@ -550,10 +550,10 @@ SwTableNode* SwNodes::UndoTableToText( sal_uLong nSttNd, sal_uLong nEndNd, const SwTblToTxtSave* pSave = &rSavedData[ --n ]; // if the start node was merged with last from prev. cell, // subtract 1 from index to get the merged paragraph, and split that - aSttIdx = pSave->m_nSttNd - ( ( USHRT_MAX != pSave->m_nCntnt ) ? 1 : 0); + aSttIdx = pSave->m_nSttNd - ( ( SAL_MAX_INT32 != pSave->m_nCntnt ) ? 1 : 0); SwTxtNode* pTxtNd = aSttIdx.GetNode().GetTxtNode(); - if( USHRT_MAX != pSave->m_nCntnt ) + if( SAL_MAX_INT32 != pSave->m_nCntnt ) { // split at ContentPosition, delete previous char (= separator) OSL_ENSURE( pTxtNd, "Where is my TextNode?" ); @@ -681,7 +681,7 @@ void SwUndoTblToTxt::SetRange( const SwNodeRange& rRg ) nEndNd = rRg.aEnd.GetIndex(); } -void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, xub_StrLen nCntntIdx ) +void SwUndoTblToTxt::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, sal_Int32 nCntntIdx ) { SwTblToTxtSave* pNew = new SwTblToTxtSave( rDoc, nNdIdx, nEndIdx, nCntntIdx ); pBoxSaves->push_back( pNew ); |