[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Jul 9 00:03:11 PDT 2015
writerfilter/source/dmapper/StyleSheetTable.cxx | 26 ++++++++++++------------
1 file changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 50637913f1c3f84eae19213d59c271766b2233fe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jul 9 09:01:46 2015 +0200
writerfilter: avoid PropValVector inheriting from an STL container
Change-Id: Ic77b40ef7b518ad34b60530984fb6180d4426e39
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 9e652ea..4cd4d8f 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -866,9 +866,9 @@ void StyleSheetTable::lcl_entry(int /*pos*/, writerfilter::Reference<Properties>
/*-------------------------------------------------------------------------
sorting helper
-----------------------------------------------------------------------*/
-typedef std::vector< beans::PropertyValue > _PropValVector;
-class PropValVector : public _PropValVector
+class PropValVector
{
+ std::vector<beans::PropertyValue> m_aValues;
public:
PropValVector(){}
@@ -879,25 +879,25 @@ public:
void PropValVector::Insert(const beans::PropertyValue& rVal)
{
- _PropValVector::iterator aIt = begin();
- while(aIt != end())
+ auto aIt = m_aValues.begin();
+ while (aIt != m_aValues.end())
{
- if(aIt->Name > rVal.Name)
+ if (aIt->Name > rVal.Name)
{
- insert( aIt, rVal );
+ m_aValues.insert( aIt, rVal );
return;
}
++aIt;
}
- push_back(rVal);
+ m_aValues.push_back(rVal);
}
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();
sal_Int32 nVal = 0;
- _PropValVector::iterator aIt = begin();
- while(aIt != end())
+ auto aIt = m_aValues.begin();
+ while (aIt != m_aValues.end())
{
pValues[nVal++] = aIt->Value;
++aIt;
@@ -906,11 +906,11 @@ uno::Sequence< uno::Any > PropValVector::getValues()
}
uno::Sequence< OUString > PropValVector::getNames()
{
- uno::Sequence< OUString > aRet( size() );
+ uno::Sequence< OUString > aRet( m_aValues.size() );
OUString* pNames = aRet.getArray();
sal_Int32 nVal = 0;
- _PropValVector::iterator aIt = begin();
- while(aIt != end())
+ auto aIt = m_aValues.begin();
+ while (aIt != m_aValues.end())
{
pNames[nVal++] = aIt->Name;
++aIt;
More information about the Libreoffice-commits
mailing list