Files
loongoffice/cppcanvas/source/wrapper/implbitmapcanvas.hxx
Stephan Bergmann 6844ef8a7e 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@redhat.com>
2018-07-27 08:28:46 +02:00

61 lines
2.3 KiB
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
#define INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
#include <com/sun/star/rendering/XBitmapCanvas.hpp>
#include <com/sun/star/rendering/XBitmap.hpp>
#include <basegfx/vector/b2dsize.hxx>
#include <cppcanvas/bitmapcanvas.hxx>
#include "implcanvas.hxx"
namespace cppcanvas
{
namespace internal
{
// share Canvas implementation from ImplCanvas
class ImplBitmapCanvas : public virtual BitmapCanvas, protected virtual ImplCanvas
{
public:
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;
private:
const css::uno::Reference< css::rendering::XBitmapCanvas > mxBitmapCanvas;
const css::uno::Reference< css::rendering::XBitmap > mxBitmap;
};
}
}
#endif // INCLUDED_CPPCANVAS_SOURCE_WRAPPER_IMPLBITMAPCANVAS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */