[Libreoffice-commits] core.git: sw/inc sw/source

Takeshi Abe tabe at fixedpoint.jp
Fri Sep 30 05:28:31 UTC 2016


 sw/inc/accmap.hxx                |   14 +++++++++++++-
 sw/inc/ndarr.hxx                 |    4 +++-
 sw/source/core/access/accmap.cxx |   17 -----------------
 sw/source/core/inc/UndoTable.hxx |   12 ++++++++----
 sw/source/core/inc/rootfrm.hxx   |    8 ++++++--
 sw/source/core/inc/sectfrm.hxx   |    3 ---
 sw/source/core/layout/newfrm.cxx |    2 --
 sw/source/core/undo/untbl.cxx    |    8 --------
 8 files changed, 30 insertions(+), 38 deletions(-)

New commits:
commit 8e812b87ff7f8c5bf2c6f8858646c55effd2eea3
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Wed Sep 28 17:20:15 2016 +0900

    tdf#75757 Remove inheritance from std container
    
    Change-Id: I476c83ea195281f977bb6fa5019f983609ff3a6e
    Reviewed-on: https://gerrit.libreoffice.org/29347
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx
index e09129a..469fba1 100644
--- a/sw/inc/accmap.hxx
+++ b/sw/inc/accmap.hxx
@@ -30,6 +30,7 @@
 #include <svx/AccessibleControlShape.hxx>
 #include <svx/AccessibleShape.hxx>
 #include "fesh.hxx"
+#include <list>
 #include <vector>
 #include <set>
 #include <o3tl/typed_flags_set.hxx>
@@ -44,7 +45,6 @@ class SwAccessibleContext;
 class SwAccessibleContextMap_Impl;
 class SwAccessibleEventList_Impl;
 class SwAccessibleEventMap_Impl;
-class SwShapeList_Impl;
 class SdrObject;
 namespace accessibility { class AccessibleShape; }
 class SwAccessibleShapeMap_Impl;
@@ -56,6 +56,18 @@ class SwAccPreviewData;
 struct PreviewPage;
 namespace vcl { class Window; }
 
+// The shape list is filled if an accessible shape is destroyed. It
+// simply keeps a reference to the accessible shape's XShape. These
+// references are destroyed within the EndAction when firing events.
+// There are two reason for this. First of all, a new accessible shape
+// for the XShape might be created soon. It's then cheaper if the XShape
+// still exists. The other reason are situations where an accessible shape
+// is destroyed within an SwFrameFormat::Modify. In this case, destroying
+// the XShape at the same time (indirectly by destroying the accessible
+// shape) leads to an assert, because a client of the Modify is destroyed
+// within a Modify call.
+using SwShapeList_Impl = std::list<css::uno::Reference<css::drawing::XShape>>;
+
 enum class AccessibleStates
 {
     NONE                   = 0x0000,
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 713a2d4..f5861b0 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -57,7 +57,6 @@ class SwTableFormat;
 class SwTableLine;
 class SwTableLineFormat;
 class SwTableNode;
-class SwTableToTextSaves;
 class SwTextFormatColl;
 class SwTextNode;
 class SwUndoTableToText;
@@ -83,6 +82,9 @@ public:
     bool Seek_Entry(SwNode* rP, sal_uInt16* pnPos) const;
 };
 
+struct SwTableToTextSave;
+using SwTableToTextSaves = std::vector<std::unique_ptr<SwTableToTextSave>>;
+
 class SW_DLLPUBLIC SwNodes
     : private BigPtrArray
 {
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index 7a42739..54c5531 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -544,23 +544,6 @@ void SwAccessibleEventList_Impl::MoveMissingXAccToEnd()
     OSL_ENSURE(size() == nSize ,"");
 }
 
-// The shape list is filled if an accessible shape is destroyed. It
-// simply keeps a reference to the accessible shape's XShape. These
-// references are destroyed within the EndAction when firing events.
-// There are two reason for this. First of all, a new accessible shape
-// for the XShape might be created soon. It's then cheaper if the XShape
-// still exists. The other reason are situations where an accessible shape
-// is destroyed within an SwFrameFormat::Modify. In this case, destroying
-// the XShape at the same time (indirectly by destroying the accessible
-// shape) leads to an assert, because a client of the Modify is destroyed
-// within a Modify call.
-
-class SwShapeList_Impl: public std::list < uno::Reference < drawing::XShape > >
-{
-public:
-    SwShapeList_Impl() {}
-};
-
 struct SwAccessibleChildFunc
 {
     bool operator()( const SwAccessibleChild& r1,
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index bd72b5d..ed31bde 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
 #define INCLUDED_SW_SOURCE_CORE_INC_UNDOTABLE_HXX
 
+#include <ndarr.hxx>
 #include <undobj.hxx>
 #include <set>
 #include <swtypes.hxx>
@@ -32,11 +33,8 @@ class SfxItemSet;
 struct SwSaveRowSpan;
 class SaveTable;
 class SwDDEFieldType;
-class SwUndoSaveSections;
-class SwUndoMoves;
 class SwUndoDelete;
 class SwSelBoxes;
-class SwTableToTextSaves;
 class SwTable;
 class SwTableBox;
 class SwStartNode;
@@ -162,6 +160,8 @@ public:
     void SaveBoxContent( const SwTableBox& rBox );
 };
 
+using SwUndoSaveSections = std::vector<std::unique_ptr<SwUndoSaveSection>>;
+
 class SwUndoTableNdsChg : public SwUndo
 {
     SaveTable* pSaveTable;
@@ -217,6 +217,9 @@ public:
     }
 };
 
+class SwUndoMove;
+using SwUndoMoves = std::vector<std::unique_ptr<SwUndoMove>>;
+
 class SwUndoTableMerge : public SwUndo, private SwUndRng
 {
     sal_uLong nTableNode;
@@ -272,7 +275,8 @@ public:
     void SetBox( const SwTableBox& rBox );
 };
 
-class SwUndoTableCpyTable_Entries;
+struct UndoTableCpyTable_Entry;
+using SwUndoTableCpyTable_Entries = std::vector<std::unique_ptr<UndoTableCpyTable_Entry>>;
 
 class SwUndoTableCpyTable : public SwUndo
 {
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 776ccf9..f67665e 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -24,6 +24,7 @@
 #include <doc.hxx>
 #include <IDocumentTimerAccess.hxx>
 #include <o3tl/typed_flags_set.hxx>
+#include <set>
 #include <vector>
 
 class SwContentFrame;
@@ -35,8 +36,6 @@ class SwCursor;
 class SwShellCursor;
 class SwTableCursor;
 class SwLayVout;
-class SwDestroyList;
-class SwCurrShells;
 class SwViewOption;
 class SwSelectionList;
 struct SwPosition;
@@ -64,6 +63,11 @@ enum class SwRemoveResult
     Prev
 };
 
+using SwCurrShells = std::set<CurrShell*>;
+
+class SwSectionFrame;
+using SwDestroyList = std::set<SwSectionFrame*>;
+
 /// The root element of a Writer document layout.
 class SwRootFrame: public SwLayoutFrame
 {
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 4c2b53c..5a9431f 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -22,7 +22,6 @@
 
 #include "layfrm.hxx"
 #include "flowfrm.hxx"
-#include <set>
 
 class SwSection;
 class SwSectionFormat;
@@ -161,8 +160,6 @@ public:
     DECL_FIXEDMEMPOOL_NEWDEL(SwSectionFrame)
 };
 
-class SwDestroyList : public std::set<SwSectionFrame*> {};
-
 inline const SwSectionFrame *SwSectionFrame::GetFollow() const
 {
     return static_cast<const SwSectionFrame*>(SwFlowFrame::GetFollow());
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index b8b0963..e49fb63 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -349,8 +349,6 @@ void FrameFinit()
 
 // RootFrame::Everything that belongs to CurrShell
 
-class SwCurrShells : public std::set<CurrShell*> {};
-
 CurrShell::CurrShell( SwViewShell *pNew )
 {
     OSL_ENSURE( pNew, "insert 0-Shell?" );
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index a6b48eb..392dae9 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -81,13 +81,6 @@
 
 typedef std::vector<std::shared_ptr<SfxItemSet> > SfxItemSets;
 
-class SwUndoSaveSections : public std::vector<std::unique_ptr<SwUndoSaveSection>> {};
-
-class SwUndoMoves : public std::vector<std::unique_ptr<SwUndoMove>> {};
-
-struct SwTableToTextSave;
-class SwTableToTextSaves : public std::vector<std::unique_ptr<SwTableToTextSave>> {};
-
 struct UndoTableCpyTable_Entry
 {
     sal_uLong nBoxIdx, nOffset;
@@ -100,7 +93,6 @@ struct UndoTableCpyTable_Entry
     explicit UndoTableCpyTable_Entry( const SwTableBox& rBox );
     ~UndoTableCpyTable_Entry();
 };
-class SwUndoTableCpyTable_Entries : public std::vector<std::unique_ptr<UndoTableCpyTable_Entry>> {};
 
 class SaveBox;
 class SaveLine;


More information about the Libreoffice-commits mailing list