[Libreoffice-commits] core.git: include/svx svx/source

Rishabh Kumar kris.kr296 at gmail.com
Thu Jun 16 17:46:51 UTC 2016


 include/svx/xbtmpit.hxx         |    1 +
 svx/source/xoutdev/xattrbmp.cxx |    6 ++++++
 2 files changed, 7 insertions(+)

New commits:
commit d9aa7006c0880bc16adb8de140b46cd47a7c8248
Author: Rishabh Kumar <kris.kr296 at gmail.com>
Date:   Thu Jun 16 15:54:53 2016 +0530

    [GSoC] Member function to identify Pattern
    
    Change-Id: I72ca21204248bfe279445f01ab247f19ec958fb1
    Reviewed-on: https://gerrit.libreoffice.org/26361
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Rishabh Kumar <kris.kr296 at yahoo.in>

diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx
index 5dd2d2c..24782f7 100644
--- a/include/svx/xbtmpit.hxx
+++ b/include/svx/xbtmpit.hxx
@@ -65,6 +65,7 @@ public:
 
     const GraphicObject& GetGraphicObject() const { return maGraphicObject;}
     void SetGraphicObject(const GraphicObject& rGraphicObject);
+    bool isPattern() const;
 
     static bool CompareValueFunc( const NameOrIndex* p1, const NameOrIndex* p2 );
     XFillBitmapItem* checkForUniqueItem( SdrModel* pModel ) const;
diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx
index 3e8dbf7..1d7572e 100644
--- a/svx/source/xoutdev/xattrbmp.cxx
+++ b/svx/source/xoutdev/xattrbmp.cxx
@@ -357,6 +357,12 @@ void XFillBitmapItem::SetGraphicObject(const GraphicObject& rGraphicObject)
     maGraphicObject = rGraphicObject;
 }
 
+bool XFillBitmapItem::isPattern() const
+{
+    BitmapColor aBack, aFront;
+    return isHistorical8x8(GetGraphicObject().GetGraphic().GetBitmap(), aBack, aFront);
+}
+
 sal_uInt16 XFillBitmapItem::GetVersion(sal_uInt16 /*nFileFormatVersion*/) const
 {
     return 2;


More information about the Libreoffice-commits mailing list