summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichaël Lefèvre <lefevre00@yahoo.fr>2014-10-13 16:13:31 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-10-15 19:35:54 +0000
commit07f9ccf99c6746351dfdd26a046c788693632dfb (patch)
tree51963695db952e5d716fd01b4eda6cf8123cb7cf /vcl
parent91502a72c12c559442e8bf77c27a516b49c2a68d (diff)
fdo#75757: remove inheritance to std::vector
from TEParaPortions (through ToolsList, close to be deleted ;). Change-Id: Iec92ebb54ebc44d94ccc8cb30230ffb44b937b35 Reviewed-on: https://gerrit.libreoffice.org/11954 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/edit/textdat2.hxx13
-rw-r--r--vcl/source/edit/textdata.cxx14
2 files changed, 12 insertions, 15 deletions
diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx
index 85f3b36938d9..b5e211807cb7 100644
--- a/vcl/source/edit/textdat2.hxx
+++ b/vcl/source/edit/textdat2.hxx
@@ -225,12 +225,19 @@ public:
void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine );
};
-class TEParaPortions : public ToolsList<TEParaPortion*>
+class TEParaPortions
{
+private:
+ std::vector<TEParaPortion*> mvData;
+
public:
- TEParaPortions();
+ TEParaPortions() : mvData() {}
~TEParaPortions();
- void Reset();
+
+ size_t Count() const { return mvData.size(); }
+ TEParaPortion* GetObject( size_t nIndex ) { return mvData[nIndex]; }
+ void Insert( TEParaPortion* pObject, size_t nPos ) { mvData.insert( mvData.begin()+nPos, pObject ); }
+ void Remove( size_t nPos ) { mvData.erase( mvData.begin()+nPos ); }
};
class TextSelFunctionSet: public FunctionSet
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 195bf8529f07..e6bebd2378b1 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -212,21 +212,11 @@ void TEParaPortion::CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormat
}
}
-TEParaPortions::TEParaPortions()
-{
-}
-
TEParaPortions::~TEParaPortions()
{
- Reset();
-}
-
-void TEParaPortions::Reset()
-{
- TEParaPortions::iterator aIter( begin() );
- while ( aIter != end() )
+ std::vector<TEParaPortion*>::iterator aIter( mvData.begin() );
+ while ( aIter != mvData.end() )
delete *aIter++;
- clear();
}
IdleFormatter::IdleFormatter()