remove bitmapprimitive2d.{cxx,hxx} from clang-format blacklist

Change-Id: I9d9d7cd8bba489c71a5c1ac0b23755d572696e10
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87904
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl
2020-02-02 21:58:04 +01:00
committed by Tomaž Vajngerl
parent 19181dab1c
commit a334f77792
3 changed files with 35 additions and 44 deletions

View File

@@ -20,48 +20,43 @@
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx> #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx> #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
using namespace com::sun::star; using namespace com::sun::star;
namespace drawinglayer::primitive2d namespace drawinglayer::primitive2d
{ {
BitmapPrimitive2D::BitmapPrimitive2D( BitmapPrimitive2D::BitmapPrimitive2D(const BitmapEx& rBitmapEx,
const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform)
const basegfx::B2DHomMatrix& rTransform) : BasePrimitive2D()
: BasePrimitive2D(), , maBitmapEx(rBitmapEx)
maBitmapEx(rBitmapEx), , maTransform(rTransform)
maTransform(rTransform) {
{ }
}
bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
{ {
if(BasePrimitive2D::operator==(rPrimitive)) if (BasePrimitive2D::operator==(rPrimitive))
{ {
const BitmapPrimitive2D& rCompare = static_cast<const BitmapPrimitive2D&>(rPrimitive); const BitmapPrimitive2D& rCompare = static_cast<const BitmapPrimitive2D&>(rPrimitive);
return (getBitmapEx() == rCompare.getBitmapEx() return (getBitmapEx() == rCompare.getBitmapEx()
&& getTransform() == rCompare.getTransform()); && getTransform() == rCompare.getTransform());
} }
return false; return false;
} }
basegfx::B2DRange BitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const basegfx::B2DRange
{ BitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0); {
aRetval.transform(maTransform); basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
return aRetval; aRetval.transform(maTransform);
} return aRetval;
}
sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage() sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage() { return getBitmapEx().GetSizeBytes(); }
{
return getBitmapEx().GetSizeBytes();
}
// provide unique ID // provide unique ID
ImplPrimitive2DIDBlock(BitmapPrimitive2D, PRIMITIVE2D_ID_BITMAPPRIMITIVE2D) ImplPrimitive2DIDBlock(BitmapPrimitive2D, PRIMITIVE2D_ID_BITMAPPRIMITIVE2D)
} // end of namespace } // end of namespace

View File

@@ -28,7 +28,6 @@
namespace drawinglayer::primitive2d namespace drawinglayer::primitive2d
{ {
/** BitmapPrimitive2D class /** BitmapPrimitive2D class
This class is the central primitive for Bitmap-based primitives. This class is the central primitive for Bitmap-based primitives.
@@ -40,18 +39,16 @@ class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D final : public BasePrimitive2D
{ {
private: private:
/// the RGBA Bitmap-data /// the RGBA Bitmap-data
BitmapEx maBitmapEx; BitmapEx maBitmapEx;
/** the object transformation from unit coordinates, defining /** the object transformation from unit coordinates, defining
size, shear, rotate and position size, shear, rotate and position
*/ */
basegfx::B2DHomMatrix maTransform; basegfx::B2DHomMatrix maTransform;
public: public:
/// constructor /// constructor
BitmapPrimitive2D( BitmapPrimitive2D(const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform);
const BitmapEx& rBitmapEx,
const basegfx::B2DHomMatrix& rTransform);
/// data read access /// data read access
const BitmapEx& getBitmapEx() const { return maBitmapEx; } const BitmapEx& getBitmapEx() const { return maBitmapEx; }
@@ -61,13 +58,14 @@ public:
virtual bool operator==(const BasePrimitive2D& rPrimitive) const override; virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
/// get range /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override; virtual basegfx::B2DRange
getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
/// provide unique ID
DeclPrimitive2DIDBlock()
// XAccounting // XAccounting
virtual sal_Int64 SAL_CALL estimateUsage() override; virtual sal_Int64 SAL_CALL estimateUsage() override;
/// provide unique ID
DeclPrimitive2DIDBlock()
}; };
} // end of namespace drawinglayer::primitive2d } // end of namespace drawinglayer::primitive2d

View File

@@ -3751,7 +3751,6 @@ drawinglayer/source/geometry/viewinformation2d.cxx
drawinglayer/source/geometry/viewinformation3d.cxx drawinglayer/source/geometry/viewinformation3d.cxx
drawinglayer/source/primitive2d/animatedprimitive2d.cxx drawinglayer/source/primitive2d/animatedprimitive2d.cxx
drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
drawinglayer/source/primitive2d/borderlineprimitive2d.cxx drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
drawinglayer/source/primitive2d/controlprimitive2d.cxx drawinglayer/source/primitive2d/controlprimitive2d.cxx
drawinglayer/source/primitive2d/cropprimitive2d.cxx drawinglayer/source/primitive2d/cropprimitive2d.cxx
@@ -6052,7 +6051,6 @@ include/drawinglayer/geometry/viewinformation2d.hxx
include/drawinglayer/geometry/viewinformation3d.hxx include/drawinglayer/geometry/viewinformation3d.hxx
include/drawinglayer/primitive2d/animatedprimitive2d.hxx include/drawinglayer/primitive2d/animatedprimitive2d.hxx
include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
include/drawinglayer/primitive2d/borderlineprimitive2d.hxx include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
include/drawinglayer/primitive2d/controlprimitive2d.hxx include/drawinglayer/primitive2d/controlprimitive2d.hxx
include/drawinglayer/primitive2d/cropprimitive2d.hxx include/drawinglayer/primitive2d/cropprimitive2d.hxx