diff options
author | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-08 11:34:59 +0100 |
---|---|---|
committer | Nigel Hawkins <n.hawkins@gmx.com> | 2011-08-08 20:23:05 +0100 |
commit | b090fcf34f105f7937ddd1d5e814fce3970b5894 (patch) | |
tree | 0cc8343db85a7d18b0ff195d0feadb5ff94615f9 /editeng/source/uno | |
parent | 7d2cea2bc9a9463db8e6b6e82cb8aa9504ba9b8e (diff) |
Replace SvUShorts with vector in editeng.hxx and cascade changes.
LGPLv3+/MPL
Diffstat (limited to 'editeng/source/uno')
-rw-r--r-- | editeng/source/uno/unoedprx.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unofored.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unoforou.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 17 |
5 files changed, 11 insertions, 14 deletions
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 45abc3f4a459..245241595af1 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -591,7 +591,7 @@ void SvxAccessibleTextAdapter::RemoveAttribs( const ESelection& , sal_Bool , sal DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); } -void SvxAccessibleTextAdapter::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const +void SvxAccessibleTextAdapter::GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const { DBG_ASSERT(mrTextForwarder, "SvxAccessibleTextAdapter: no forwarder"); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index b994e46c404d..b91227545da7 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -135,7 +135,7 @@ SfxItemPool* SvxEditEngineForwarder::GetPool() const return rEditEngine.GetEmptyItemSet().GetPool(); } -void SvxEditEngineForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const +void SvxEditEngineForwarder::GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const { rEditEngine.GetPortions( nPara, rList ); } diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx index 8f3d7593efca..5561d740dee2 100644 --- a/editeng/source/uno/unoforou.cxx +++ b/editeng/source/uno/unoforou.cxx @@ -201,7 +201,7 @@ SfxItemPool* SvxOutlinerForwarder::GetPool() const return rOutliner.GetEmptyItemSet().GetPool(); } -void SvxOutlinerForwarder::GetPortions( sal_uInt16 nPara, SvUShorts& rList ) const +void SvxOutlinerForwarder::GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const { ((EditEngine&)rOutliner.GetEditEngine()).GetPortions( nPara, rList ); } diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 0d097884b588..680b0f9f27fe 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2486,7 +2486,7 @@ void SvxDummyTextSource::RemoveAttribs( const ESelection& , sal_Bool , sal_uInt1 { } -void SvxDummyTextSource::GetPortions( sal_uInt16, SvUShorts& ) const +void SvxDummyTextSource::GetPortions( sal_uInt16, std::vector<sal_uInt16>& ) const { } diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index af227be6b673..33fcf225eb2d 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -32,9 +32,6 @@ #include <osl/mutex.hxx> #include <rtl/instance.hxx> -#define _SVSTDARR_sal_uIt16S -#include <svl/svstdarr.hxx> - #include <editeng/eeitem.hxx> #include <editeng/flditem.hxx> #include <editeng/unofield.hxx> @@ -321,9 +318,9 @@ sal_Bool SAL_CALL SvxUnoTextContent::hasElements() SvxTextForwarder* pForwarder = GetEditSource() ? GetEditSource()->GetTextForwarder() : NULL; if( pForwarder ) { - SvUShorts aPortions; + std::vector<sal_uInt16> aPortions; pForwarder->GetPortions( mnParagraph, aPortions ); - return aPortions.Count() > 0; + return !aPortions.empty(); } else { @@ -426,7 +423,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rT if( mpEditSource && mpEditSource->GetTextForwarder() ) { - mpPortions = new SvUShorts; + mpPortions = new std::vector<sal_uInt16>; mpEditSource->GetTextForwarder()->GetPortions( nPara, *mpPortions ); } else @@ -448,7 +445,7 @@ sal_Bool SAL_CALL SvxUnoTextRangeEnumeration::hasMoreElements() { SolarMutexGuard aGuard; - return mpPortions && mnNextPortion < mpPortions->Count(); + return mpPortions && mnNextPortion < mpPortions->size(); } uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() @@ -456,13 +453,13 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() { SolarMutexGuard aGuard; - if( mpPortions == NULL || mnNextPortion >= mpPortions->Count() ) + if( mpPortions == NULL || mnNextPortion >= mpPortions->size() ) throw container::NoSuchElementException(); sal_uInt16 nStartPos = 0; if (mnNextPortion > 0) - nStartPos = mpPortions->GetObject(mnNextPortion-1); - sal_uInt16 nEndPos = mpPortions->GetObject(mnNextPortion); + nStartPos = mpPortions->at(mnNextPortion-1); + sal_uInt16 nEndPos = mpPortions->at(mnNextPortion); ESelection aSel( mnParagraph, nStartPos, mnParagraph, nEndPos ); uno::Reference< text::XTextRange > xRange; |