diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-07 09:21:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-08-07 09:23:00 +0200 |
commit | 33aead22a90ec94e625bbc1b9808096e6c370616 (patch) | |
tree | f76144a32bab91f35fa2ca2de3d84d4b86854e55 /sw | |
parent | 09a9234c021ad98c5adeb493b5814e97b92ee912 (diff) |
sw: use std::unique_ptr in sw-global includes
Change-Id: I7b1a313e6c36fd162878cfc9f17ae73f91a72665
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 43 | ||||
-rw-r--r-- | sw/inc/fmtanchr.hxx | 4 | ||||
-rw-r--r-- | sw/inc/printdata.hxx | 11 | ||||
-rw-r--r-- | sw/inc/tblafmt.hxx | 4 | ||||
-rw-r--r-- | sw/inc/undobj.hxx | 4 | ||||
-rw-r--r-- | sw/inc/unofieldcoll.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/attr/swatrset.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/crsr/findtxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentDeviceManager.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/UndoInsert.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/app/docst.cxx | 6 |
13 files changed, 54 insertions, 48 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index e7542e1b7b77..b9f803b076ce 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -55,7 +55,6 @@ #include <unordered_map> #include <vector> -#include <boost/scoped_ptr.hpp> #include <boost/ptr_container/ptr_vector.hpp> namespace editeng { class SvxBorderLine; } @@ -253,7 +252,7 @@ class SW_DLLPUBLIC SwDoc : friend void _FinitCore(); // private Member - ::boost::scoped_ptr<SwNodes> m_pNodes; //< document content (Nodes Array) + std::unique_ptr<SwNodes> m_pNodes; //< document content (Nodes Array) SwAttrPool* mpAttrPool; //< the attribute pool SwPageDescs maPageDescs; //< PageDescriptors Link<> maOle2Link; //< OLE 2.0-notification @@ -268,26 +267,26 @@ class SW_DLLPUBLIC SwDoc : mxXForms; //< container with XForms models mutable com::sun::star::uno::Reference< com::sun::star::linguistic2::XProofreadingIterator > m_xGCIterator; - const ::boost::scoped_ptr< ::sw::mark::MarkManager> mpMarkManager; - const ::boost::scoped_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager; - const ::boost::scoped_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager; - const ::boost::scoped_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager; - const ::boost::scoped_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager; - const ::boost::scoped_ptr< ::sw::UndoManager > m_pUndoManager; - const ::boost::scoped_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager; - const ::boost::scoped_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager; - ::boost::scoped_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess; - const ::boost::scoped_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager; - const ::boost::scoped_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager; - const ::boost::scoped_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager; - const ::boost::scoped_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager; - const ::boost::scoped_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager; - const ::boost::scoped_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager; - const ::boost::scoped_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager; - const ::boost::scoped_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager; - const ::boost::scoped_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager; - const ::boost::scoped_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager; - const ::boost::scoped_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager; + const std::unique_ptr< ::sw::mark::MarkManager> mpMarkManager; + const std::unique_ptr< ::sw::MetaFieldManager > m_pMetaFieldManager; + const std::unique_ptr< ::sw::DocumentDrawModelManager > m_pDocumentDrawModelManager; + const std::unique_ptr< ::sw::DocumentRedlineManager > m_pDocumentRedlineManager; + const std::unique_ptr< ::sw::DocumentStateManager > m_pDocumentStateManager; + const std::unique_ptr< ::sw::UndoManager > m_pUndoManager; + const std::unique_ptr< ::sw::DocumentSettingManager > m_pDocumentSettingManager; + const std::unique_ptr< ::sw::DocumentChartDataProviderManager > m_pDocumentChartDataProviderManager; + std::unique_ptr< ::sw::DocumentDeviceManager > m_pDeviceAccess; + const std::unique_ptr< ::sw::DocumentTimerManager > m_pDocumentTimerManager; + const std::unique_ptr< ::sw::DocumentLinksAdministrationManager > m_pDocumentLinksAdministrationManager; + const std::unique_ptr< ::sw::DocumentListItemsManager > m_pDocumentListItemsManager; + const std::unique_ptr< ::sw::DocumentListsManager > m_pDocumentListsManager; + const std::unique_ptr< ::sw::DocumentOutlineNodesManager > m_pDocumentOutlineNodesManager; + const std::unique_ptr< ::sw::DocumentContentOperationsManager > m_pDocumentContentOperationsManager; + const std::unique_ptr< ::sw::DocumentFieldsManager > m_pDocumentFieldsManager; + const std::unique_ptr< ::sw::DocumentStatisticsManager > m_pDocumentStatisticsManager; + const std::unique_ptr< ::sw::DocumentLayoutManager > m_pDocumentLayoutManager; + const std::unique_ptr< ::sw::DocumentStylePoolManager > m_pDocumentStylePoolManager; + const std::unique_ptr< ::sw::DocumentExternalDataManager > m_pDocumentExternalDataManager; // Pointer SwFrameFormat *mpDfltFrameFormat; //< Default formats. diff --git a/sw/inc/fmtanchr.hxx b/sw/inc/fmtanchr.hxx index 54468ab91cb5..36851ce59788 100644 --- a/sw/inc/fmtanchr.hxx +++ b/sw/inc/fmtanchr.hxx @@ -25,7 +25,7 @@ #include <format.hxx> #include <svl/poolitem.hxx> -#include <boost/scoped_ptr.hpp> +#include <memory> struct SwPosition; class IntlWrapper; @@ -33,7 +33,7 @@ class IntlWrapper; /// FlyAnchors class SW_DLLPUBLIC SwFormatAnchor: public SfxPoolItem { - ::boost::scoped_ptr<SwPosition> m_pContentAnchor; /**< 0 for page-bound frames. + std::unique_ptr<SwPosition> m_pContentAnchor; /**< 0 for page-bound frames. Index for paragraph-bound frames. Position for character-bound frames. */ RndStdIds nAnchorId; diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx index e7fdfefcad90..bb4314b64b63 100644 --- a/sw/inc/printdata.hxx +++ b/sw/inc/printdata.hxx @@ -24,12 +24,11 @@ #include <vcl/print.hxx> #include <sfx2/objsh.hxx> -#include <boost/scoped_ptr.hpp> - #include <set> #include <map> #include <vector> #include <utility> +#include <memory> class SwDoc; class SwDocShell; @@ -236,17 +235,17 @@ class SwRenderData SfxObjectShellLock m_xTempDocShell; /// the view options to be applied for printing - ::boost::scoped_ptr<SwViewOptionAdjust_Impl> m_pViewOptionAdjust; + std::unique_ptr<SwViewOptionAdjust_Impl> m_pViewOptionAdjust; - ::boost::scoped_ptr<SwPrintData> m_pPrtOptions; + std::unique_ptr<SwPrintData> m_pPrtOptions; public: // PostIt relevant data /// an array of "_SetGetExpField *" sorted by page and line numbers - ::boost::scoped_ptr<_SetGetExpFields> m_pPostItFields; + std::unique_ptr<_SetGetExpFields> m_pPostItFields; /// this contains a SwDoc with the post-it content - ::boost::scoped_ptr<SwViewShell> m_pPostItShell; + std::unique_ptr<SwViewShell> m_pPostItShell; public: SwRenderData(); diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx index 9ee185f17dd0..64b8a9776d82 100644 --- a/sw/inc/tblafmt.hxx +++ b/sw/inc/tblafmt.hxx @@ -28,7 +28,7 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */ -#include <boost/scoped_ptr.hpp> +#include <memory> #include "hintids.hxx" #include <svx/algitem.hxx> @@ -298,7 +298,7 @@ public: class SW_DLLPUBLIC SwTableAutoFormatTable { struct Impl; - ::boost::scoped_ptr<Impl> m_pImpl; + std::unique_ptr<Impl> m_pImpl; SAL_DLLPRIVATE bool Load( SvStream& rStream ); SAL_DLLPRIVATE bool Save( SvStream& rStream ) const; diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx index 69703760d8a5..34cea59ecfc0 100644 --- a/sw/inc/undobj.hxx +++ b/sw/inc/undobj.hxx @@ -20,8 +20,8 @@ #define INCLUDED_SW_INC_UNDOBJ_HXX #include <vector> +#include <memory> -#include <boost/scoped_ptr.hpp> #include <boost/shared_ptr.hpp> #include <svl/undo.hxx> @@ -229,7 +229,7 @@ class SwUndoInserts : public SwUndo, public SwUndRng, private SwUndoSaveContent protected: sal_uLong nNdDiff; /// start of Content in UndoNodes for Redo - ::boost::scoped_ptr<SwNodeIndex> m_pUndoNodeIndex; + std::unique_ptr<SwNodeIndex> m_pUndoNodeIndex; sal_uInt16 nSetPos; // Start in the history list. SwUndoInserts( SwUndoId nUndoId, const SwPaM& ); diff --git a/sw/inc/unofieldcoll.hxx b/sw/inc/unofieldcoll.hxx index 1b1cab829262..30cf0dbd4571 100644 --- a/sw/inc/unofieldcoll.hxx +++ b/sw/inc/unofieldcoll.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_SW_INC_UNOFIELDCOLL_HXX #define INCLUDED_SW_INC_UNOFIELDCOLL_HXX -#include <boost/scoped_ptr.hpp> +#include <memory> #include <com/sun/star/util/XRefreshable.hpp> @@ -86,7 +86,7 @@ class SwXTextFieldTypes { private: class Impl; - ::boost::scoped_ptr<Impl> m_pImpl; // currently does not need UnoImplPtr + std::unique_ptr<Impl> m_pImpl; // currently does not need UnoImplPtr protected: virtual ~SwXTextFieldTypes(); diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 13806f1a5b25..b24f64a1c6b9 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <memory> + #include <cellatr.hxx> #include <charfmt.hxx> #include <cmdid.h> @@ -378,7 +380,7 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const } } - boost::scoped_ptr< SfxItemSet > tmpSet; + std::unique_ptr< SfxItemSet > tmpSet; const SwPageDesc* pPgDesc; if( pSrcDoc != pDstDoc && SfxItemState::SET == GetItemState( diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index c86188889cd1..a7086a1c6a0f 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <memory> #include <hintids.hxx> #include <comphelper/string.hxx> #include <svl/itemiter.hxx> @@ -615,8 +616,8 @@ lcl_FindField(bool & o_rFound, _SetGetExpFields const& rSrtLst, SwTextField *const pTextField, SwPosition const& rPos, sal_Int32 const nContentOffset) { - boost::scoped_ptr<_SetGetExpField> pSrch; - boost::scoped_ptr<SwIndex> pIndex; + std::unique_ptr<_SetGetExpField> pSrch; + std::unique_ptr<SwIndex> pIndex; if (-1 == nContentOffset) { pSrch.reset(new _SetGetExpField(rPos.nNode, pTextField, &rPos.nContent)); diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index 042c58d01354..e08c125a9112 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <memory> + #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <comphelper/string.hxx> @@ -661,7 +663,7 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove, const_cast<SwPaM*>(pRegion)->GetRingContainer().merge( m_rCursor.GetRingContainer() ); } - boost::scoped_ptr<OUString> pRepl( (bRegExp) + std::unique_ptr<OUString> pRepl( (bRegExp) ? ReplaceBackReferences( m_rSearchOpt, pCrsr ) : 0 ); bool const bReplaced = m_rCursor.GetDoc()->getIDocumentContentOperations().ReplaceRange( diff --git a/sw/source/core/doc/DocumentDeviceManager.cxx b/sw/source/core/doc/DocumentDeviceManager.cxx index fc1f86b79c09..a0e60adaf8b6 100644 --- a/sw/source/core/doc/DocumentDeviceManager.cxx +++ b/sw/source/core/doc/DocumentDeviceManager.cxx @@ -19,6 +19,8 @@ #include <DocumentDeviceManager.hxx> +#include <memory> + #include <IDocumentDeviceAccess.hxx> #include <doc.hxx> #include <DocumentSettingManager.hxx> @@ -43,11 +45,9 @@ #include <swwait.hxx> #include <fntcache.hxx> - class SwDocShell; class SwWait; - namespace sw { DocumentDeviceManager::DocumentDeviceManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ), mpPrt(0), mpVirDev(0), mpPrtData(0) {} @@ -310,7 +310,7 @@ void DocumentDeviceManager::PrtDataChanged() OSL_ENSURE( m_rDoc.getIDocumentSettingAccess().get(DocumentSettingId::USE_VIRTUAL_DEVICE) || 0 != getPrinter( false ), "PrtDataChanged will be called recursively!" ); SwRootFrm* pTmpRoot = m_rDoc.getIDocumentLayoutAccess().GetCurrentLayout(); - boost::scoped_ptr<SwWait> pWait; + std::unique_ptr<SwWait> pWait; bool bEndAction = false; if( m_rDoc.GetDocShell() ) diff --git a/sw/source/core/inc/UndoInsert.hxx b/sw/source/core/inc/UndoInsert.hxx index 8ef9263f8d41..d2a7378af6e9 100644 --- a/sw/source/core/inc/UndoInsert.hxx +++ b/sw/source/core/inc/UndoInsert.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_UNDOINSERT_HXX #define INCLUDED_SW_SOURCE_CORE_INC_UNDOINSERT_HXX +#include <memory> + #include <undobj.hxx> #include <rtl/ustring.hxx> #include <tools/mempool.hxx> @@ -35,7 +37,7 @@ namespace sw { class DocumentContentOperationsManager; } class SwUndoInsert: public SwUndo, private SwUndoSaveContent { /// start of Content in UndoNodes for Redo - ::boost::scoped_ptr<SwNodeIndex> m_pUndoNodeIndex; + std::unique_ptr<SwNodeIndex> m_pUndoNodeIndex; OUString *pText, *pUndoText; SwRedlineData* pRedlData; sal_uLong nNode; diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 29d432878a86..5c295441d4ce 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <algorithm> +#include <memory> #include <unofield.hxx> #include <unofieldcoll.hxx> @@ -1147,7 +1148,7 @@ public: bool m_bCallUpdate; sal_uInt16 m_nServiceId; OUString m_sTypeName; - boost::scoped_ptr<SwFieldProperties_Impl> m_pProps; + std::unique_ptr<SwFieldProperties_Impl> m_pProps; Impl(SwDoc *const pDoc, SwFormatField *const pFormat, sal_uInt16 const nServiceId) diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index a81e1f5e006c..a6407ed1369c 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <memory> + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XNameAccess.hpp> @@ -80,9 +82,7 @@ #include "unochart.hxx" #include "app.hrc" #include "swabstdlg.hxx" - #include <list.hxx> - #include <paratr.hxx> extern bool g_bNoInterrupt; // in swmodule.cxx @@ -790,7 +790,7 @@ sal_uInt16 SwDocShell::Edit( SW_MOD()->PutItem(SfxUInt16Item(SID_ATTR_METRIC, static_cast< sal_uInt16 >(eMetric))); SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create(); assert( pFact ); - boost::scoped_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog( + std::unique_ptr<SfxAbstractApplyTabDialog> pDlg(pFact->CreateTemplateDialog( 0, *(xTmp.get()), nFamily, sPage, pActShell ? pActShell : m_pWrtShell, bNew)); assert( pDlg ); |