diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 635b1982f8d8..bc6d88e886d3 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -891,19 +891,14 @@ void PropValVector::Insert(const beans::PropertyValue& rVal) } m_aValues.push_back(rVal); } + uno::Sequence< uno::Any > PropValVector::getValues() { - uno::Sequence< uno::Any > aRet( m_aValues.size() ); - uno::Any* pValues = aRet.getArray(); - sal_Int32 nVal = 0; - auto aIt = m_aValues.begin(); - while (aIt != m_aValues.end()) - { - pValues[nVal++] = aIt->Value; - ++aIt; - } - return aRet; + std::vector aRet; + std::transform(m_aValues.begin(), m_aValues.end(), std::back_inserter(aRet), [](const beans::PropertyValue& rValue) { return rValue.Value; }); + return comphelper::containerToSequence(aRet); } + uno::Sequence< OUString > PropValVector::getNames() { std::vector aRet; @@ -911,7 +906,6 @@ uno::Sequence< OUString > PropValVector::getNames() return comphelper::containerToSequence(aRet); } - void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { try