[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/source
Stephan Bergmann
sbergman at redhat.com
Mon Jun 30 07:43:08 PDT 2014
include/vcl/outdev.hxx | 9 ++-------
include/vcl/syswin.hxx | 7 -------
include/vcl/window.hxx | 8 --------
vcl/source/window/window.cxx | 2 --
4 files changed, 2 insertions(+), 24 deletions(-)
New commits:
commit 8a0df1b7e50ee4e39be0242ca245627b4eedd7e5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 30 16:42:28 2014 +0200
Clean up OutputDevice and derived classes noncopyable-ness
Change-Id: Id29e52c94a89cac20e29ae0a1f0b9f90ffdfcf09
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index cefffe2..199ca08 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -42,6 +42,7 @@
#include <unotools/fontdefs.hxx>
+#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#ifdef check
# //some problem with MacOSX and a check define
@@ -244,7 +245,7 @@ extern const sal_uLong nVCLBLut[ 6 ];
extern const sal_uLong nVCLDitherLut[ 256 ];
extern const sal_uLong nVCLLut[ 256 ];
-class VCL_DLLPUBLIC OutputDevice
+class VCL_DLLPUBLIC OutputDevice: private boost::noncopyable
{
friend class Application;
friend class Bitmap;
@@ -350,15 +351,9 @@ private:
protected:
OutputDevice();
-private:
- SAL_DLLPRIVATE OutputDevice( const OutputDevice& rOutDev );
-
public:
virtual ~OutputDevice();
-private:
- SAL_DLLPRIVATE OutputDevice& operator =( const OutputDevice& rOutDev );
-
public:
/** Get the graphic context that the output device uses to draw on.
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 098f49e..f5a1eca 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -158,13 +158,6 @@ public:
SAL_DLLPRIVATE bool ImplIsInTaskPaneList( Window* pWin );
private:
- // Default construction is forbidden and not implemented.
- SystemWindow();
-
- // Copy assignment is forbidden and not implemented.
- SystemWindow (const SystemWindow &);
- SystemWindow & operator= (const SystemWindow &);
-
SAL_DLLPRIVATE void ImplMoveToScreen( long& io_rX, long& io_rY, long i_nWidth, long i_nHeight, Window* i_pConfigureWin );
protected:
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index ddf010d..3cf10320 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -619,14 +619,6 @@ private:
public:
virtual Region GetActiveClipRegion() const SAL_OVERRIDE;
-private:
- // Default construction is forbidden and not implemented.
- SAL_DLLPRIVATE Window();
-
- // Copy assignment is forbidden and not implemented.
- SAL_DLLPRIVATE Window (const Window &);
- SAL_DLLPRIVATE Window & operator= (const Window &);
-
protected:
// Single argument ctors shall be explicit.
explicit Window( WindowType nType );
commit f8e34ea78a3159b3bf717353a3fc7d62e7fecd57
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 30 16:38:35 2014 +0200
...and ~SystemWindow can recursively destroy its child windows
...so when the pMyParent vs. pMySysWin typos in the asserts (thanks Matteo and
Micheal for spotting) were fixed, they would fire in such scenarios. So just
hope that it is fine to effectively skip those safety checks in these cases,
too.
Change-Id: Ib925e57b68643c75a5d4db67fd64692015482179
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4770d1a..af060f2 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -336,7 +336,6 @@ Window::~Window()
if ( pMyParent->IsSystemWindow() )
{
pMySysWin = dynamic_cast<SystemWindow *>(pMyParent);
- assert(pMyParent != 0);
}
pMyParent = pMyParent->GetParent();
}
@@ -361,7 +360,6 @@ Window::~Window()
if ( pMyParent->IsSystemWindow() )
{
pMySysWin = dynamic_cast<SystemWindow *>(pMyParent);
- assert(pMyParent != 0);
}
pMyParent = pMyParent->GetParent();
}
More information about the Libreoffice-commits
mailing list