Kaydet (Commit) 50637913 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: avoid PropValVector inheriting from an STL container

Change-Id: Ic77b40ef7b518ad34b60530984fb6180d4426e39
üst 2e99e4e1
...@@ -866,9 +866,9 @@ void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties> ...@@ -866,9 +866,9 @@ void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
sorting helper sorting helper
-----------------------------------------------------------------------*/ -----------------------------------------------------------------------*/
typedef std::vector< beans::PropertyValue > _PropValVector; class PropValVector
class PropValVector : public _PropValVector
{ {
std::vector<beans::PropertyValue> m_aValues;
public: public:
PropValVector(){} PropValVector(){}
...@@ -879,25 +879,25 @@ public: ...@@ -879,25 +879,25 @@ public:
void PropValVector::Insert(const beans::PropertyValue& rVal) void PropValVector::Insert(const beans::PropertyValue& rVal)
{ {
_PropValVector::iterator aIt = begin(); auto aIt = m_aValues.begin();
while(aIt != end()) while (aIt != m_aValues.end())
{ {
if(aIt->Name > rVal.Name) if (aIt->Name > rVal.Name)
{ {
insert( aIt, rVal ); m_aValues.insert( aIt, rVal );
return; return;
} }
++aIt; ++aIt;
} }
push_back(rVal); m_aValues.push_back(rVal);
} }
uno::Sequence< uno::Any > PropValVector::getValues() uno::Sequence< uno::Any > PropValVector::getValues()
{ {
uno::Sequence< uno::Any > aRet( size() ); uno::Sequence< uno::Any > aRet( m_aValues.size() );
uno::Any* pValues = aRet.getArray(); uno::Any* pValues = aRet.getArray();
sal_Int32 nVal = 0; sal_Int32 nVal = 0;
_PropValVector::iterator aIt = begin(); auto aIt = m_aValues.begin();
while(aIt != end()) while (aIt != m_aValues.end())
{ {
pValues[nVal++] = aIt->Value; pValues[nVal++] = aIt->Value;
++aIt; ++aIt;
...@@ -906,11 +906,11 @@ uno::Sequence< uno::Any > PropValVector::getValues() ...@@ -906,11 +906,11 @@ uno::Sequence< uno::Any > PropValVector::getValues()
} }
uno::Sequence< OUString > PropValVector::getNames() uno::Sequence< OUString > PropValVector::getNames()
{ {
uno::Sequence< OUString > aRet( size() ); uno::Sequence< OUString > aRet( m_aValues.size() );
OUString* pNames = aRet.getArray(); OUString* pNames = aRet.getArray();
sal_Int32 nVal = 0; sal_Int32 nVal = 0;
_PropValVector::iterator aIt = begin(); auto aIt = m_aValues.begin();
while(aIt != end()) while (aIt != m_aValues.end())
{ {
pNames[nVal++] = aIt->Name; pNames[nVal++] = aIt->Name;
++aIt; ++aIt;
......
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