Kaydet (Commit) 6844ef8a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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: 's avatarStephan Bergmann <sbergman@redhat.com>
üst e6d79e89
......@@ -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;
};
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment