summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/table/swnewtable.cxx15
-rw-r--r--sw/source/core/unocore/unotbl.cxx3
2 files changed, 7 insertions, 11 deletions
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 391e1b1081f3..9a2a7372ddd8 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -371,7 +371,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
long nMid = ( nMin + nMax ) / 2;
SwBoxSelection* pRet = new SwBoxSelection();
- std::list< std::pair< SwTableBox*, long > > aNewWidthList;
+ std::vector< std::pair< SwTableBox*, long > > aNewWidthVector;
size_t nCheckBottom = nBottom;
long nLeftSpan = 0;
long nRightSpan = 0;
@@ -543,10 +543,10 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
std::pair< SwTableBox*, long > aTmp;
aTmp.first = pInnerBox;
aTmp.second = -nDiff;
- aNewWidthList.push_back( aTmp );
+ aNewWidthVector.push_back(aTmp);
aTmp.first = pOuterBox;
aTmp.second = nDiff;
- aNewWidthList.push_back( aTmp );
+ aNewWidthVector.push_back(aTmp);
}
pOuterBox = pOuterBox == pRightBox ? nullptr : pRightBox;
if( nDiff2 )
@@ -565,14 +565,11 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
bOkay = false;
if( bOkay )
{
- std::list< std::pair< SwTableBox*, long > >::iterator
- pCurr = aNewWidthList.begin();
- while( pCurr != aNewWidthList.end() )
+ for (auto const& newWidth : aNewWidthVector)
{
- SwFrameFormat* pFormat = pCurr->first->ClaimFrameFormat();
- long nNewWidth = pFormat->GetFrameSize().GetWidth() + pCurr->second;
+ SwFrameFormat* pFormat = newWidth.first->ClaimFrameFormat();
+ long nNewWidth = pFormat->GetFrameSize().GetWidth() + newWidth.second;
pFormat->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nNewWidth, 0 ) );
- ++pCurr;
}
}
else
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index ce2d9a370ad3..1905492f50ef 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -18,7 +18,6 @@
*/
#include <tuple>
-#include <list>
#include <array>
#include <utility>
#include <memory>
@@ -1803,7 +1802,7 @@ bool SwTableProperties_Impl::GetProperty(sal_uInt16 nWhichId, sal_uInt16 nMember
template<typename Tpoolitem>
void SwTableProperties_Impl::AddItemToSet(SfxItemSet& rSet, std::function<Tpoolitem()> aItemFactory, sal_uInt16 nWhich, std::initializer_list<sal_uInt16> vMember, bool bAddTwips)
{
- std::list< std::pair<sal_uInt16, const uno::Any* > > vMemberAndAny;
+ std::vector< std::pair<sal_uInt16, const uno::Any* > > vMemberAndAny;
for(sal_uInt16 nMember : vMember)
{
const uno::Any* pAny = nullptr;