[Libreoffice-commits] core.git: cppcanvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jul 27 06:29:16 UTC 2018


 cppcanvas/source/wrapper/implbitmapcanvas.hxx |   10 +++++-----
 cppcanvas/source/wrapper/implcanvas.hxx       |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 6844ef8a7ed9b253b6cca4c8d8aec54ef05d013e
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 26 15:17:19 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jul 27 08:28:46 2018 +0200

    cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)
    
    ...by explicitly defaulting the copy/move functions (and, where needed in turn,
    also a default ctor) for classes that have a user-declared dtor that does
    nothing other than an implicitly-defined one would do, but needs to be user-
    declared because it is virtual and potentially serves as a key function to
    emit the vtable, or is non-public, etc.  There appears to be no good reason for
    these classes to have a deleted copy assignment op, so just change that to
    implicitly-defined, too.
    
    Change-Id: I65fb6ea78a13b7b3d237529613c0489c8cf50614
    Reviewed-on: https://gerrit.libreoffice.org/58119
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.hxx b/cppcanvas/source/wrapper/implbitmapcanvas.hxx
index 6f09794caf99..f2ccaf42153d 100644
--- a/cppcanvas/source/wrapper/implbitmapcanvas.hxx
+++ b/cppcanvas/source/wrapper/implbitmapcanvas.hxx
@@ -39,16 +39,16 @@ namespace cppcanvas
             explicit ImplBitmapCanvas( const css::uno::Reference< css::rendering::XBitmapCanvas >& rCanvas );
             virtual ~ImplBitmapCanvas() override;
 
+            ImplBitmapCanvas(ImplBitmapCanvas const &) = default;
+            ImplBitmapCanvas(ImplBitmapCanvas &&) = default;
+            ImplBitmapCanvas & operator =(ImplBitmapCanvas const &) = default;
+            ImplBitmapCanvas & operator =(ImplBitmapCanvas &&) = default;
+
             virtual ::basegfx::B2ISize      getSize() const override;
 
             virtual CanvasSharedPtr         clone() const override;
 
-            // take compiler-provided default copy constructor
-            //ImplBitmapCanvas(const ImplBitmapCanvas&);
-
         private:
-            ImplBitmapCanvas& operator=( const ImplBitmapCanvas& ) = delete;
-
             const css::uno::Reference< css::rendering::XBitmapCanvas >    mxBitmapCanvas;
             const css::uno::Reference< css::rendering::XBitmap >          mxBitmap;
         };
diff --git a/cppcanvas/source/wrapper/implcanvas.hxx b/cppcanvas/source/wrapper/implcanvas.hxx
index b71f2311f67b..b6f8d02da87c 100644
--- a/cppcanvas/source/wrapper/implcanvas.hxx
+++ b/cppcanvas/source/wrapper/implcanvas.hxx
@@ -53,6 +53,11 @@ namespace cppcanvas
             explicit ImplCanvas( const css::uno::Reference< css::rendering::XCanvas >& rCanvas );
             virtual ~ImplCanvas() override;
 
+            ImplCanvas(ImplCanvas const &) = default;
+            ImplCanvas(ImplCanvas &&) = default;
+            ImplCanvas & operator =(ImplCanvas const &) = default;
+            ImplCanvas & operator =(ImplCanvas &&) = default;
+
             virtual void                             setTransformation( const ::basegfx::B2DHomMatrix& rMatrix ) override;
             virtual ::basegfx::B2DHomMatrix          getTransformation() const override;
 
@@ -69,12 +74,7 @@ namespace cppcanvas
 
             virtual css::rendering::ViewState        getViewState() const override;
 
-            // take compiler-provided default copy constructor
-            //ImplCanvas(const ImplCanvas&);
-
         private:
-            ImplCanvas& operator=( const ImplCanvas& ) = delete;
-
             mutable css::rendering::ViewState                    maViewState;
             boost::optional<basegfx::B2DPolyPolygon>             maClipPolyPolygon;
             const css::uno::Reference< css::rendering::XCanvas > mxCanvas;


More information about the Libreoffice-commits mailing list