include/basegfx/color/bcolor.hxx        |   13 +++++++++++++
 include/basegfx/matrix/b2dhommatrix.hxx |   16 ++++++++++++++++
 2 files changed, 29 insertions(+)

New commits:
commit cc18a06a5abca3f336d2263fc8248368c08635e4
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Apr 28 14:18:54 2017 +0200

    Printing of some more basegfx types
    
    ...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with
    CPPUNIT_ASSERT_EQUAL
    
    Change-Id: I24ede3cc287bcc3b5e73eb400e4044c469657659

diff --git a/include/basegfx/color/bcolor.hxx b/include/basegfx/color/bcolor.hxx
index d0854e63a579..300f8db81e81 100644
--- a/include/basegfx/color/bcolor.hxx
+++ b/include/basegfx/color/bcolor.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
 #define INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
 
+#include <sal/config.h>
+
+#include <ostream>
+
 #include <basegfx/tuple/b3dtuple.hxx>
 #include <vector>
 #include <basegfx/basegfxdllapi.h>
@@ -173,6 +177,15 @@ namespace basegfx
         }
 
     };
+
+    template<typename charT, typename traits>
+    std::basic_ostream<charT, traits> & operator <<(
+        std::basic_ostream<charT, traits> & stream, BColor const & color)
+    {
+        return stream
+            << '[' << color.getRed() << ", " << color.getGreen() << ", "
+            << color.getBlue() << ']';
+    }
 } // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_COLOR_BCOLOR_HXX
diff --git a/include/basegfx/matrix/b2dhommatrix.hxx 
b/include/basegfx/matrix/b2dhommatrix.hxx
index 524be07bcfae..a7ab0c3f5917 100644
--- a/include/basegfx/matrix/b2dhommatrix.hxx
+++ b/include/basegfx/matrix/b2dhommatrix.hxx
@@ -20,6 +20,10 @@
 #ifndef INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
 #define INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
 
+#include <sal/config.h>
+
+#include <ostream>
+
 #include <sal/types.h>
 #include <o3tl/cow_wrapper.hxx>
 #include <basegfx/basegfxdllapi.h>
@@ -104,6 +108,18 @@ namespace basegfx
         aMul *= rMatA;
         return aMul;
     }
+
+    template<typename charT, typename traits>
+    std::basic_ostream<charT, traits> & operator <<(
+        std::basic_ostream<charT, traits> & stream, B2DHomMatrix const & 
matrix)
+    {
+        return stream
+            << '[' << matrix.get(0, 0) << ' ' << matrix.get(0, 1) << ' '
+            << matrix.get(0, 2) << "; " << matrix.get(1, 0) << ' '
+            << matrix.get(1, 1) << ' ' << matrix.get(1, 2) << "; "
+            << matrix.get(2, 0) << ' ' << matrix.get(2, 1) << ' '
+            << matrix.get(2, 2) << ']';
+    }
 } // end of namespace basegfx
 
 #endif // INCLUDED_BASEGFX_MATRIX_B2DHOMMATRIX_HXX
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to