sw/inc/accmap.hxx | 4 ++-- sw/inc/doc.hxx | 3 ++- sw/source/core/doc/DocumentRedlineManager.cxx | 4 ++-- sw/source/core/doc/doc.cxx | 4 ++-- sw/source/core/doc/docftn.cxx | 2 +- sw/source/core/doc/doclay.cxx | 4 ++-- sw/source/core/doc/doctxm.cxx | 2 +- sw/source/core/doc/ftnidx.cxx | 4 ++-- sw/source/core/undo/unsect.cxx | 2 +- 9 files changed, 15 insertions(+), 14 deletions(-)
New commits: commit 220cdd6f2c178a115dd2776658fdaaf826315eed Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sun Feb 2 12:41:43 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Feb 2 12:51:33 2020 +0100 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.gran...@collabora.co.uk> diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index f19ea9d40269..20954f7ed608 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -21,6 +21,7 @@ // SwDoc interfaces #include <o3tl/deleter.hxx> +#include <o3tl/sorted_vector.hxx> #include <vcl/idle.hxx> #include "swdllapi.h" #include "swtypes.hxx" @@ -680,7 +681,7 @@ public: OUString GetUniqueFrameName() const; OUString GetUniqueShapeName() const; - std::set<SwRootFrame*> GetAllLayouts(); + o3tl::sorted_vector<SwRootFrame*> GetAllLayouts(); void SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName ); const SwFlyFrameFormat* FindFlyByName( const OUString& rName, SwNodeType nNdTyp = SwNodeType::NONE ) const; 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()) commit 4b096419770a5b9018f011afb5e78e00c30c526a Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Feb 1 21:50:47 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Feb 2 12:51:24 2020 +0100 std::set->o3tl::sorted_vector in SwAccessibleMap Change-Id: Ic05a160e91a435a540c95c23c9759f667376d61a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87822 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index d7e5269971ce..9f2aa0daf5fe 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -30,7 +30,7 @@ #include <vector> #include <memory> -#include <set> +#include <o3tl/sorted_vector.hxx> class SwAccessibleParagraph; class SwViewShell; @@ -304,7 +304,7 @@ public: virtual bool IsDocumentSelAll() override; //Para Container for InvalidateCursorPosition - typedef std::set< SwAccessibleParagraph* > SET_PARA; + typedef o3tl::sorted_vector< SwAccessibleParagraph* > SET_PARA; SET_PARA m_setParaAdd; SET_PARA m_setParaRemove; }; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits