diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-04-23 07:46:57 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2015-05-03 22:31:56 +0200 |
commit | 9fbb74b5b688eb51bf3b849e56841a00b836628c (patch) | |
tree | 9d8085d38e5b470d78e38cd87c0752ddb7f07816 /sw | |
parent | f66572b2ff5f27ab938edbe3a2329395aae43c2d (diff) |
sal_uInt16 to size_type
Change-Id: Ib6715c5b61c718302b910a19ef557960e0f7aa93
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/edimp.hxx | 7 | ||||
-rw-r--r-- | sw/source/core/edit/edattr.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/unocore/unocrsrhelper.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj.cxx | 2 |
5 files changed, 19 insertions, 18 deletions
diff --git a/sw/inc/edimp.hxx b/sw/inc/edimp.hxx index 63ef3d0ac332..f43e8579849e 100644 --- a/sw/inc/edimp.hxx +++ b/sw/inc/edimp.hxx @@ -45,13 +45,14 @@ class SwPamRanges : private _SwPamRanges { public: SwPamRanges( const SwPaM& rRing ); + using _SwPamRanges::size_type; void Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ); - SwPaM& SetPam( sal_uInt16 nArrPos, SwPaM& rPam ); + SwPaM& SetPam( size_type nArrPos, SwPaM& rPam ); - sal_uInt16 Count() const + size_type Count() const { return _SwPamRanges::size(); } - SwPamRange operator[]( sal_uInt16 nPos ) const + SwPamRange operator[]( size_type nPos ) const { return _SwPamRanges::operator[](nPos); } }; diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index fe78210af212..19b1074c6b51 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -529,7 +529,7 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus ) { SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->MoveLeftMargin( aRangeArr.SetPam( n, aPam ), bRight, bModulus ); } diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index c4e1ab482c9f..0617ef2d3698 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -41,7 +41,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ) { aRg.nStart = aRg.nEnd; aRg.nEnd = rIdx1.GetIndex(); } _SwPamRanges::const_iterator it = lower_bound(aRg); //search Insert Position - sal_uInt16 nPos = it - begin(); + size_type nPos = it - begin(); if (!empty() && (it != end()) && (*it) == aRg) { // is the one in the Array smaller? @@ -95,7 +95,7 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ) _SwPamRanges::insert( aRg ); } -SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam ) +SwPaM& SwPamRanges::SetPam( size_type nArrPos, SwPaM& rPam ) { OSL_ASSERT( nArrPos < Count() ); const SwPamRange& rTmp = (*this)[ nArrPos ]; @@ -136,7 +136,7 @@ bool SwEditShell::NoNum() GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->NoNum( aRangeArr.SetPam( n, aPam )); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); } @@ -155,7 +155,7 @@ bool SwEditShell::SelectionHasNumber() const if (!bResult && pTxtNd && pTxtNd->Len()==0 && !pTxtNd->GetNumRule()) { SwPamRanges aRangeArr( *GetCrsr() ); SwPaM aPam( *GetCrsr()->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { aRangeArr.SetPam( n, aPam ); { @@ -201,7 +201,7 @@ bool SwEditShell::SelectionHasBullet() const if (!bResult && pTxtNd && pTxtNd->Len()==0 && !pTxtNd->GetNumRule()) { SwPamRanges aRangeArr( *GetCrsr() ); SwPaM aPam( *GetCrsr()->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { aRangeArr.SetPam( n, aPam ); { @@ -281,7 +281,7 @@ void SwEditShell::DelNumRules() GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { GetDoc()->DelNumRules( aRangeArr.SetPam( n, aPam ) ); } @@ -314,7 +314,7 @@ bool SwEditShell::NumUpDown( bool bDown ) GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->NumUpDown( aRangeArr.SetPam( n, aPam ), bDown ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); } @@ -535,7 +535,7 @@ bool SwEditShell::OutlineUpDown( short nOffset ) GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) bRet = bRet && GetDoc()->OutlineUpDown( aRangeArr.SetPam( n, aPam ), nOffset ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); @@ -745,7 +745,7 @@ void SwEditShell::SetCurNumRule( const SwNumRule& rRule, SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); OUString sContinuedListId(rContinuedListId); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { aRangeArr.SetPam( n, aPam ); OUString sListId = GetDoc()->SetNumRule( aPam, rRule, @@ -804,7 +804,7 @@ void SwEditShell::SetNumRuleStart( bool bFlag, SwPaM* pPaM ) GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->SetNumRuleStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), bFlag ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); } @@ -831,7 +831,7 @@ void SwEditShell::SetNodeNumStart( sal_uInt16 nStt, SwPaM* pPaM ) GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( *pCrsr ); SwPaM aPam( *pCrsr->GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) GetDoc()->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), nStt ); GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); } diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 47d9dce0b151..b33e0f141ba3 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -837,7 +837,7 @@ void setNumberingProperty(const Any& rValue, SwPaM& rPam) pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( rPam ); SwPaM aPam( *rPam.GetPoint() ); - for ( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for ( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { // no start of a new list pDoc->SetNumRule( aRangeArr.SetPam( n, aPam ), aRule, false ); @@ -927,7 +927,7 @@ void resetCrsrPropertyValue(const SfxItemPropertySimpleEntry& rEntry, SwPaM& rPa pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( rPam ); SwPaM aPam( *rPam.GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) pDoc->SetNodeNumStart( *aRangeArr.SetPam( n, aPam ).GetPoint(), 1 ); pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL ); } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 86b35a4e681c..c1259a40ee89 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -354,7 +354,7 @@ lcl_SetNodeNumStart(SwPaM & rCrsr, uno::Any const& rValue) pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL ); SwPamRanges aRangeArr( rCrsr ); SwPaM aPam( *rCrsr.GetPoint() ); - for( sal_uInt16 n = 0; n < aRangeArr.Count(); ++n ) + for( SwPamRanges::size_type n = 0; n < aRangeArr.Count(); ++n ) { pDoc->SetNumRuleStart(*aRangeArr.SetPam( n, aPam ).GetPoint()); pDoc->SetNodeNumStart(*aRangeArr.SetPam( n, aPam ).GetPoint(), |