C++11: disable ctors/operators with delete (dtrans)

replace the old declare and don't implement pattern
with C++11 delete keyword.
remove obsolete default ctor declarations.

Change-Id: I90cce42445e3b0558dc9b6e0f9cd2a27359e5d9e
Reviewed-on: https://gerrit.libreoffice.org/25411
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
This commit is contained in:
Jochen Nitschke 2016-05-24 17:27:38 +02:00 committed by Michael Stahl
parent 68502698d2
commit d5397bf17d
5 changed files with 10 additions and 19 deletions

View file

@ -57,10 +57,6 @@ class DragSource:
// The mouse button that set off the drag and drop operation
short m_MouseButton;
DragSource();
DragSource(const DragSource&);
DragSource &operator= ( const DragSource&);
// First starting a new drag and drop thread if
// the last one has finished
void StartDragImpl(
@ -89,6 +85,8 @@ public:
public:
explicit DragSource(const Reference<XComponentContext>& rxContext);
virtual ~DragSource();
DragSource(const DragSource&) = delete;
DragSource &operator= ( const DragSource&) = delete;
// XInitialization
virtual void SAL_CALL initialize( const Sequence< Any >& aArguments )

View file

@ -44,13 +44,11 @@ class SourceContext: public MutexDummy,
// the action ( copy, move etc)
sal_Int8 m_currentAction;
SourceContext();
SourceContext( const SourceContext&);
SourceContext &operator= (const SourceContext& );
public:
SourceContext( DragSource* pSource, const Reference<XDragSourceListener>& listener);
~SourceContext();
SourceContext(const SourceContext&) = delete;
SourceContext &operator= (const SourceContext&) = delete;
virtual void SAL_CALL addDragSourceListener( const Reference<XDragSourceListener >& dsl )
throw( RuntimeException);

View file

@ -106,14 +106,11 @@ private:
Reference<XDropTargetDragContext> m_currentDragContext;
Reference<XDropTargetDropContext> m_currentDropContext;
private:
DropTarget();
DropTarget(DropTarget&);
DropTarget &operator= (DropTarget&);
public:
explicit DropTarget(const Reference<XComponentContext>& rxContext);
virtual ~DropTarget();
DropTarget(DropTarget&) = delete;
DropTarget &operator= (DropTarget&) = delete;
// Overrides WeakComponentImplHelper::disposing which is called by
// WeakComponentImplHelper::dispose

View file

@ -37,12 +37,11 @@ class TargetDragContext: public WeakImplHelper<XDropTargetDragContext>
// to non-interface functions of m_pDropTarget
DropTarget* m_pDropTarget;
TargetDragContext();
TargetDragContext( const TargetDragContext&);
TargetDragContext &operator= ( const TargetDragContext&);
public:
explicit TargetDragContext(DropTarget* pTarget);
~TargetDragContext();
TargetDragContext( const TargetDragContext&) = delete;
TargetDragContext &operator= ( const TargetDragContext&) = delete;
virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation )
throw( RuntimeException);

View file

@ -36,12 +36,11 @@ class TargetDropContext: public WeakImplHelper<XDropTargetDropContext>
// to non-interface functions of m_pDropTarget
DropTarget* m_pDropTarget;
TargetDropContext();
TargetDropContext( const TargetDropContext&);
TargetDropContext &operator= ( const TargetDropContext&);
public:
explicit TargetDropContext(DropTarget* pTarget);
~TargetDropContext();
TargetDropContext( const TargetDropContext&) = delete;
TargetDropContext &operator= ( const TargetDropContext&) = delete;
// XDropTargetDragContext
virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation )