diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-04-13 10:07:19 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-04-13 11:34:32 +0000 |
commit | 0de868cd0f430efc6256926c2865530818d7b7dd (patch) | |
tree | 60e681b0e119d50022500fbc0f91cbdd4d7c979c /sfx2/source | |
parent | 19b34c0039c6293f9b37aa70f8055aa2be28ba09 (diff) |
tdf#94306 replace boost::noncopyable in sfx2 to sot
Replace with C++11 delete copy-constructur
and copy-assignment.
Remove boost/noncopyable.hpp includes.
Add missing default ctors.
Make some overloaded ctors explicit,
seems cppcheck doesn't flag: T(const template<X>& rx).
Change-Id: I63c5a3ac84a33ea6d49868e2d9aa281ada79958e
Reviewed-on: https://gerrit.libreoffice.org/24050
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/itemdel.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/control/querystatus.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/docundomanager.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/explorer/nochaos.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/inc/docundomanager.hxx | 4 |
9 files changed, 27 insertions, 20 deletions
diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx index 8c9243397bdf..d29f5fd4e703 100644 --- a/sfx2/source/control/itemdel.cxx +++ b/sfx2/source/control/itemdel.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include "itemdel.hxx" #include <vcl/svapp.hxx> #include <tools/errcode.hxx> @@ -28,7 +27,7 @@ #include <svl/itempool.hxx> -class SfxItemDisruptor_Impl: private boost::noncopyable +class SfxItemDisruptor_Impl { SfxPoolItem * pItem; Link<Application*,void> aLink; @@ -40,6 +39,8 @@ public: explicit SfxItemDisruptor_Impl(SfxPoolItem *pItemToDesrupt); void LaunchDeleteOnIdle(); ~SfxItemDisruptor_Impl(); + SfxItemDisruptor_Impl(const SfxItemDisruptor_Impl&) = delete; + SfxItemDisruptor_Impl& operator=(const SfxItemDisruptor_Impl&) = delete; }; SfxItemDisruptor_Impl::SfxItemDisruptor_Impl( SfxPoolItem *pItemToDesrupt ): diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx index 2e6fa9801842..3e10e9e6cb03 100644 --- a/sfx2/source/control/querystatus.cxx +++ b/sfx2/source/control/querystatus.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <sfx2/querystatus.hxx> #include <svl/poolitem.hxx> #include <svl/eitem.hxx> @@ -46,13 +45,14 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; class SfxQueryStatus_Impl: - public cppu::WeakImplHelper<css::frame::XStatusListener>, - private boost::noncopyable + public cppu::WeakImplHelper<css::frame::XStatusListener> { public: SfxQueryStatus_Impl( const css::uno::Reference< css::frame::XDispatchProvider >& rDispatchProvider, sal_uInt16 nSlotId, const OUString& aCommand ); virtual ~SfxQueryStatus_Impl(); + SfxQueryStatus_Impl(const SfxQueryStatus_Impl&) = delete; + SfxQueryStatus_Impl& operator=(const SfxQueryStatus_Impl&) = delete; // Query method SfxItemState QueryState( SfxPoolItem*& pPoolItem ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index edbdcac3078d..8827712c30ef 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <boost/noncopyable.hpp> #include <memory> #include <vcl/menu.hxx> @@ -178,7 +177,7 @@ static sal_uInt16 nLastItemId = USHRT_MAX; #define MAX_FILTER_ENTRIES 14 -class SfxCommonTemplateDialog_Impl::DeletionWatcher : private boost::noncopyable +class SfxCommonTemplateDialog_Impl::DeletionWatcher { typedef void (DeletionWatcher::* bool_type)(); @@ -195,6 +194,9 @@ public: m_pDialog->impl_setDeletionWatcher(m_pPrevious); } + DeletionWatcher(const DeletionWatcher&) = delete; + DeletionWatcher& operator=(const DeletionWatcher&) = delete; + // Signal that the dialog was deleted void signal() { diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index ab2572c52eb4..e0a2cb81d29e 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <unotools/localedatawrapper.hxx> #include <comphelper/processfactory.hxx> #include <svl/eitem.hxx> @@ -63,7 +62,7 @@ struct SfxVersionInfo SfxVersionInfo(); }; -class SfxVersionTableDtor: private boost::noncopyable +class SfxVersionTableDtor { private: std::vector< SfxVersionInfo* > aTableList; @@ -72,6 +71,8 @@ public: explicit SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo ); ~SfxVersionTableDtor() { DelDtor(); } + SfxVersionTableDtor(const SfxVersionTableDtor&) = delete; + SfxVersionTableDtor& operator=(const SfxVersionTableDtor&) = delete; void DelDtor(); diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 22f0f27540d1..e2ceb4db6f0d 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <cppuhelper/compbase.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/document/XDocumentProperties.hpp> @@ -126,12 +125,13 @@ typedef ::cppu::WeakComponentImplHelper< class SfxDocumentMetaData: private ::cppu::BaseMutex, - public SfxDocumentMetaData_Base, - private boost::noncopyable + public SfxDocumentMetaData_Base { public: explicit SfxDocumentMetaData( css::uno::Reference< css::uno::XComponentContext > const & context); + SfxDocumentMetaData(const SfxDocumentMetaData&) = delete; + SfxDocumentMetaData& operator=(const SfxDocumentMetaData&) = delete; // css::lang::XServiceInfo: virtual OUString SAL_CALL getImplementationName() diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 4362ddb64c53..28e12befcd2b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -121,7 +121,6 @@ #include "sfxacldetect.hxx" #include <officecfg/Office/Common.hxx> -#include <boost/noncopyable.hpp> #include <memory> using namespace ::com::sun::star; @@ -166,7 +165,7 @@ bool IsLockingUsed() } // anonymous namespace -class SfxMedium_Impl : private boost::noncopyable +class SfxMedium_Impl { public: StreamMode m_nStorOpenMode; @@ -240,6 +239,8 @@ public: explicit SfxMedium_Impl(); ~SfxMedium_Impl(); + SfxMedium_Impl(const SfxMedium_Impl&) = delete; + SfxMedium_Impl& operator=(const SfxMedium_Impl&) = delete; OUString getFilterMimeType() { return !m_pFilter ? OUString() : m_pFilter->GetMimeType(); } diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx index 9c00fa44e8ff..40ee06e0ee12 100644 --- a/sfx2/source/doc/docundomanager.cxx +++ b/sfx2/source/doc/docundomanager.cxx @@ -32,7 +32,6 @@ #include <tools/diagnose_ex.h> #include <framework/undomanagerhelper.hxx> -#include <boost/noncopyable.hpp> #include <stack> @@ -181,7 +180,6 @@ namespace sfx2 //= UndoManagerGuard class UndoManagerGuard :public ::framework::IMutexGuard - ,public ::boost::noncopyable { public: explicit UndoManagerGuard( DocumentUndoManager& i_undoManager ) @@ -194,6 +192,9 @@ namespace sfx2 { } + UndoManagerGuard(const UndoManagerGuard&) = delete; + UndoManagerGuard& operator=(const UndoManagerGuard&) = delete; + virtual void clear() override { m_guard.clear(); diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index ba13039a680d..b99d7fbc7d08 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <boost/noncopyable.hpp> #include <svl/itempool.hxx> #include <svl/poolitem.hxx> #include <svl/stritem.hxx> @@ -34,7 +33,7 @@ class CntItemPool; -class CntStaticPoolDefaults_Impl: private boost::noncopyable +class CntStaticPoolDefaults_Impl { sal_uInt32 m_nItems; SfxPoolItem** m_ppDefaults; @@ -46,6 +45,8 @@ private: public: explicit CntStaticPoolDefaults_Impl( CntItemPool* pPool ); ~CntStaticPoolDefaults_Impl(); + CntStaticPoolDefaults_Impl(const CntStaticPoolDefaults_Impl&) = delete; + CntStaticPoolDefaults_Impl& operator=(const CntStaticPoolDefaults_Impl&) = delete; SfxPoolItem** GetDefaults() const { return m_ppDefaults; } const SfxItemInfo* GetItemInfos() const { return m_pItemInfos; } diff --git a/sfx2/source/inc/docundomanager.hxx b/sfx2/source/inc/docundomanager.hxx index 084e0915a7a9..81e90ea4c589 100644 --- a/sfx2/source/inc/docundomanager.hxx +++ b/sfx2/source/inc/docundomanager.hxx @@ -27,7 +27,6 @@ #include <cppuhelper/implbase.hxx> #include <memory> -#include <boost/noncopyable.hpp> /** base class for sub components of an SfxBaseModel, which share their ref count and lifetime with the SfxBaseModel */ @@ -104,13 +103,14 @@ namespace sfx2 struct DocumentUndoManager_Impl; class DocumentUndoManager :public DocumentUndoManager_Base ,public SfxModelSubComponent - ,public ::boost::noncopyable { friend struct DocumentUndoManager_Impl; public: DocumentUndoManager( SfxBaseModel& i_document ); virtual ~DocumentUndoManager(); + DocumentUndoManager(const DocumentUndoManager&) = delete; + DocumentUndoManager& operator=(const DocumentUndoManager&) = delete; // SfxModelSubComponent overridables virtual void disposing() override; |