diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-02-02 12:41:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-02-02 12:51:33 +0100 |
commit | 220cdd6f2c178a115dd2776658fdaaf826315eed (patch) | |
tree | 6b2029738715cdb4aca1d194dba9a4db27be2f5d /sw/source | |
parent | 4b096419770a5b9018f011afb5e78e00c30c526a (diff) |
std::set->o3tl::sorted_vector in SwDoc
Change-Id: Id8f6df99245aeb25e1c32ef4d7c06187c8ab353e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87823
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/DocumentRedlineManager.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docftn.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/doclay.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/ftnidx.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/undo/unsect.cxx | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 57621a2f6cd9..768f4772a9c2 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -936,7 +936,7 @@ void DocumentRedlineManager::SetRedlineFlags( RedlineFlags eMode ) CheckAnchoredFlyConsistency(m_rDoc); CHECK_REDLINE( *this ) - std::set<SwRootFrame *> hiddenLayouts; + o3tl::sorted_vector<SwRootFrame *> hiddenLayouts; if (eShowMode == (RedlineFlags::ShowInsert | RedlineFlags::ShowDelete)) { // sw_redlinehide: the problem here is that MoveFromSection @@ -944,7 +944,7 @@ void DocumentRedlineManager::SetRedlineFlags( RedlineFlags eMode ) // SwRangeRedline has wrong positions until after the nodes // are all moved, so fix things up by force by re-creating // all merged frames from scratch. - std::set<SwRootFrame *> const layouts(m_rDoc.GetAllLayouts()); + o3tl::sorted_vector<SwRootFrame *> const layouts(m_rDoc.GetAllLayouts()); for (SwRootFrame *const pLayout : layouts) { if (pLayout->IsHideRedlines()) diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 4ad631e560b2..7cf8984bbae9 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1184,7 +1184,7 @@ static bool lcl_CheckSmartTagsAgain( const SwNodePtr& rpNd, void* ) */ void SwDoc::SpellItAgainSam( bool bInvalid, bool bOnlyWrong, bool bSmartTags ) { - std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> aAllLayouts = GetAllLayouts(); assert(getIDocumentLayoutAccess().GetCurrentLayout() && "SpellAgain: Where's my RootFrame?"); if( bInvalid ) { @@ -1207,7 +1207,7 @@ void SwDoc::InvalidateAutoCompleteFlag() SwRootFrame* pTmpRoot = getIDocumentLayoutAccess().GetCurrentLayout(); if( pTmpRoot ) { - std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> aAllLayouts = GetAllLayouts(); for( auto aLayout : aAllLayouts ) aLayout->AllInvalidateAutoCompleteWords(); for( sal_uLong nNd = 1, nCnt = GetNodes().Count(); nNd < nCnt; ++nNd ) diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 882959ede139..9bd2a9ec63c7 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -316,7 +316,7 @@ void SwDoc::SetFootnoteInfo(const SwFootnoteInfo& rInfo) if (pTmpRoot) { - std::set<SwRootFrame*> aAllLayouts = GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> aAllLayouts = GetAllLayouts(); if ( bFootnotePos ) for( auto aLayout : aAllLayouts ) aLayout->AllRemoveFootnotes(); diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index b5a98cf724dd..4b43892c4abe 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -1657,9 +1657,9 @@ bool SwDoc::IsInVerticalText( const SwPosition& rPos ) const return SvxFrameDirection::Vertical_RL_TB == nDir || SvxFrameDirection::Vertical_LR_TB == nDir; } -std::set<SwRootFrame*> SwDoc::GetAllLayouts() +o3tl::sorted_vector<SwRootFrame*> SwDoc::GetAllLayouts() { - std::set<SwRootFrame*> aAllLayouts; + o3tl::sorted_vector<SwRootFrame*> aAllLayouts; SwViewShell *pStart = getIDocumentLayoutAccess().GetCurrentViewShell(); if(pStart) { diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 2782ff681a98..d85c58d67689 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1068,7 +1068,7 @@ void SwTOXBaseSection::Update(const SfxItemSet* pAttr, pDoc->GetNodes().Delete( aInsPos ); aN2L.RestoreUpperFrames( pDoc->GetNodes(), nIdx, nIdx + 1 ); - std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); for ( const auto& rpLayout : aAllLayouts ) { SwFrame::CheckPageDescs( static_cast<SwPageFrame*>(rpLayout->Lower()) ); diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx index d28d9309aaef..099af5bbefe1 100644 --- a/sw/source/core/doc/ftnidx.cxx +++ b/sw/source/core/doc/ftnidx.cxx @@ -77,7 +77,7 @@ void SwFootnoteIdxs::UpdateFootnote( const SwNodeIndex& rStt ) if( FTNNUM_CHAPTER == rFootnoteInfo.m_eNum ) { SwRootFrame const* pLayout(nullptr); - std::set<SwRootFrame*> layouts = pDoc->GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> layouts = pDoc->GetAllLayouts(); // sw_redlinehide: here we need to know if there's *any* layout with // IsHideRedlines(), because then the hidden-numbers have to be updated for (SwRootFrame const* pTmp : layouts) @@ -279,7 +279,7 @@ void SwFootnoteIdxs::UpdateAllFootnote() SwUpdFootnoteEndNtAtEnd aNumArr; SwRootFrame const* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); - std::set<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> aAllLayouts = pDoc->GetAllLayouts(); // For normal Footnotes per-chapter and per-document numbering are treated separately. // For Endnotes we only have document-wise numbering. if( FTNNUM_CHAPTER == rFootnoteInfo.m_eNum ) diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 80d4a55c4946..71c54b541fa0 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -189,7 +189,7 @@ void SwUndoInsSection::RedoImpl(::sw::UndoRedoContext & rContext) pLayoutToReset->SetHideRedlines(m_pTOXBase->second == sw::RedlineMode::Shown); } }); - std::set<SwRootFrame *> layouts(rDoc.GetAllLayouts()); + o3tl::sorted_vector<SwRootFrame *> layouts(rDoc.GetAllLayouts()); for (SwRootFrame const*const p : layouts) { if ((m_pTOXBase->second == sw::RedlineMode::Hidden) == p->IsHideRedlines()) |