[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer solenv/clang-format

Tomaž Vajngerl (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 3 22:24:27 UTC 2020


 drawinglayer/source/primitive2d/bitmapprimitive2d.cxx  |   59 +++++++----------
 include/drawinglayer/primitive2d/bitmapprimitive2d.hxx |   18 ++---
 solenv/clang-format/blacklist                          |    2 
 3 files changed, 35 insertions(+), 44 deletions(-)

New commits:
commit a334f77792dfff92e3c97f7f61f59d01fc9338cf
Author:     Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Feb 2 21:58:04 2020 +0100
Commit:     Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Feb 3 23:23:49 2020 +0100

    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 at gmail.com>

diff --git a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
index 4da17e185260..1953a36a71ac 100644
--- a/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
@@ -20,48 +20,43 @@
 #include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
 
-
 using namespace com::sun::star;
 
-
 namespace drawinglayer::primitive2d
 {
-        BitmapPrimitive2D::BitmapPrimitive2D(
-            const BitmapEx& rBitmapEx,
-            const basegfx::B2DHomMatrix& rTransform)
-        :   BasePrimitive2D(),
-            maBitmapEx(rBitmapEx),
-            maTransform(rTransform)
-        {
-        }
+BitmapPrimitive2D::BitmapPrimitive2D(const BitmapEx& rBitmapEx,
+                                     const basegfx::B2DHomMatrix& rTransform)
+    : BasePrimitive2D()
+    , maBitmapEx(rBitmapEx)
+    , maTransform(rTransform)
+{
+}
 
-        bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
-        {
-            if(BasePrimitive2D::operator==(rPrimitive))
-            {
-                const BitmapPrimitive2D& rCompare = static_cast<const BitmapPrimitive2D&>(rPrimitive);
+bool BitmapPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
+{
+    if (BasePrimitive2D::operator==(rPrimitive))
+    {
+        const BitmapPrimitive2D& rCompare = static_cast<const BitmapPrimitive2D&>(rPrimitive);
 
-                return (getBitmapEx() == rCompare.getBitmapEx()
-                    && getTransform() == rCompare.getTransform());
-            }
+        return (getBitmapEx() == rCompare.getBitmapEx()
+                && getTransform() == rCompare.getTransform());
+    }
 
-            return false;
-        }
+    return false;
+}
 
-        basegfx::B2DRange BitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
-        {
-            basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
-            aRetval.transform(maTransform);
-            return aRetval;
-        }
+basegfx::B2DRange
+BitmapPrimitive2D::getB2DRange(const geometry::ViewInformation2D& /*rViewInformation*/) const
+{
+    basegfx::B2DRange aRetval(0.0, 0.0, 1.0, 1.0);
+    aRetval.transform(maTransform);
+    return aRetval;
+}
 
-        sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage()
-        {
-            return getBitmapEx().GetSizeBytes();
-        }
+sal_Int64 SAL_CALL BitmapPrimitive2D::estimateUsage() { return getBitmapEx().GetSizeBytes(); }
 
-        // provide unique ID
-        ImplPrimitive2DIDBlock(BitmapPrimitive2D, PRIMITIVE2D_ID_BITMAPPRIMITIVE2D)
+// provide unique ID
+ImplPrimitive2DIDBlock(BitmapPrimitive2D, PRIMITIVE2D_ID_BITMAPPRIMITIVE2D)
 
 } // end of namespace
 
diff --git a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
index 41d76e6549ba..747e9e571c21 100644
--- a/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
@@ -28,7 +28,6 @@
 
 namespace drawinglayer::primitive2d
 {
-
 /** BitmapPrimitive2D class
 
     This class is the central primitive for Bitmap-based primitives.
@@ -40,18 +39,16 @@ class DRAWINGLAYER_DLLPUBLIC BitmapPrimitive2D final : public BasePrimitive2D
 {
 private:
     /// the RGBA Bitmap-data
-    BitmapEx                                    maBitmapEx;
+    BitmapEx maBitmapEx;
 
     /** the object transformation from unit coordinates, defining
         size, shear, rotate and position
      */
-    basegfx::B2DHomMatrix                       maTransform;
+    basegfx::B2DHomMatrix maTransform;
 
 public:
     /// constructor
-    BitmapPrimitive2D(
-        const BitmapEx& rBitmapEx,
-        const basegfx::B2DHomMatrix& rTransform);
+    BitmapPrimitive2D(const BitmapEx& rBitmapEx, const basegfx::B2DHomMatrix& rTransform);
 
     /// data read access
     const BitmapEx& getBitmapEx() const { return maBitmapEx; }
@@ -61,13 +58,14 @@ public:
     virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
 
     /// get range
-    virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
-
-    /// provide unique ID
-    DeclPrimitive2DIDBlock()
+    virtual basegfx::B2DRange
+    getB2DRange(const geometry::ViewInformation2D& rViewInformation) const override;
 
     // XAccounting
     virtual sal_Int64 SAL_CALL estimateUsage() override;
+
+    /// provide unique ID
+    DeclPrimitive2DIDBlock()
 };
 
 } // end of namespace drawinglayer::primitive2d
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 219f02652113..e8408c03c6d7 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3751,7 +3751,6 @@ drawinglayer/source/geometry/viewinformation2d.cxx
 drawinglayer/source/geometry/viewinformation3d.cxx
 drawinglayer/source/primitive2d/animatedprimitive2d.cxx
 drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx
-drawinglayer/source/primitive2d/bitmapprimitive2d.cxx
 drawinglayer/source/primitive2d/borderlineprimitive2d.cxx
 drawinglayer/source/primitive2d/controlprimitive2d.cxx
 drawinglayer/source/primitive2d/cropprimitive2d.cxx
@@ -6052,7 +6051,6 @@ include/drawinglayer/geometry/viewinformation2d.hxx
 include/drawinglayer/geometry/viewinformation3d.hxx
 include/drawinglayer/primitive2d/animatedprimitive2d.hxx
 include/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
-include/drawinglayer/primitive2d/bitmapprimitive2d.hxx
 include/drawinglayer/primitive2d/borderlineprimitive2d.hxx
 include/drawinglayer/primitive2d/controlprimitive2d.hxx
 include/drawinglayer/primitive2d/cropprimitive2d.hxx


More information about the Libreoffice-commits mailing list