Kaydet (Commit) 07f9ccf9 authored tarafından Michaël Lefèvre's avatar Michaël Lefèvre Kaydeden (comit) Caolán McNamara

fdo#75757: remove inheritance to std::vector

from TEParaPortions (through ToolsList, close to be deleted ;).

Change-Id: Iec92ebb54ebc44d94ccc8cb30230ffb44b937b35
Reviewed-on: https://gerrit.libreoffice.org/11954Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 91502a72
......@@ -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
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment