cppu/qa/test_unotype.cxx | 11 ----------- include/basegfx/point/b2dpoint.hxx | 15 ++++++++------- include/basegfx/polygon/b2dpolygon.hxx | 28 ++++++++++++++-------------- include/basegfx/polygon/b2dpolypolygon.hxx | 28 ++++++++++++++-------------- include/basegfx/range/b2drange.hxx | 15 +++++++-------- include/basegfx/range/b2irange.hxx | 22 +++++++++++----------- 6 files changed, 54 insertions(+), 65 deletions(-)
New commits: commit cd7cd5342248354ab322c3722c100d2cfb525bd8 Author: Stephan Bergmann <[email protected]> Date: Fri Apr 28 14:16:01 2017 +0200 Remove now-duplicate css::uno::Type operator << ...was missing from 06c1dc4c09ba816affb8b65e8215bcd56a81df91 "LIBO_INTERNAL_ONLY: printing of css::uno::Reference/Type" Change-Id: Ifb3f8f72bfeb1038f01797aab9afb5f5059f9d5b diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index 20727db830f2..391e9b352962 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -25,7 +25,6 @@ #include <cppunit/plugin/TestPlugIn.h> #include <cppunit/extensions/HelperMacros.h> -#include <ostream> #include <typeinfo> #include "com/sun/star/beans/Optional.hpp" @@ -46,16 +45,6 @@ namespace com { namespace sun { namespace star { namespace uno { class Any; } } } } -namespace com { namespace sun { namespace star { namespace uno { - -template<typename charT, typename traits> std::basic_ostream<charT, traits> & -operator <<(std::basic_ostream<charT, traits> & stream, Type const & type) { - return stream << type.getTypeName(); -} - -} } } } - - namespace { struct DerivedStruct1: css::lang::EventObject {}; commit 8c9f2efe621b7d5bc41e76b734a3fe9de90fa795 Author: Stephan Bergmann <[email protected]> Date: Fri Apr 28 14:14:02 2017 +0200 Make some basegfx operator << found by ADL ...as will be needed by some upcoming replacements of CPPUNIT_ASSERT with CPPUNIT_ASSERT_EQUAL Change-Id: I7c861f1cb81de4540e88d89dbf095acc61a56503 diff --git a/include/basegfx/point/b2dpoint.hxx b/include/basegfx/point/b2dpoint.hxx index f757cac731da..0f1613252091 100644 --- a/include/basegfx/point/b2dpoint.hxx +++ b/include/basegfx/point/b2dpoint.hxx @@ -123,14 +123,15 @@ namespace basegfx matrix are used. */ BASEGFX_DLLPUBLIC B2DPoint operator*( const B2DHomMatrix& rMat, const B2DPoint& rPoint ); -} // end of namespace basegfx -template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const basegfx::B2DPoint& point ) -{ - return stream << "(" << point.getX() << "," << point.getY() << ")"; -} + template< typename charT, typename traits > + inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const B2DPoint& point ) + { + return stream << "(" << point.getX() << "," << point.getY() << ")"; + } + +} // end of namespace basegfx #endif // INCLUDED_BASEGFX_POINT_B2DPOINT_HXX diff --git a/include/basegfx/polygon/b2dpolygon.hxx b/include/basegfx/polygon/b2dpolygon.hxx index c32d8251002e..703f24548975 100644 --- a/include/basegfx/polygon/b2dpolygon.hxx +++ b/include/basegfx/polygon/b2dpolygon.hxx @@ -223,23 +223,23 @@ namespace basegfx // typedef for a vector of B2DPolygons typedef ::std::vector< B2DPolygon > B2DPolygonVector; -} // end of namespace basegfx - -template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const basegfx::B2DPolygon& poly ) -{ - stream << "<" << poly.count() << ":"; - for (sal_uInt32 i = 0; i < poly.count(); i++) + template< typename charT, typename traits > + inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const B2DPolygon& poly ) { - if (i > 0) - stream << "--"; - stream << poly.getB2DPoint(i); + stream << "<" << poly.count() << ":"; + for (sal_uInt32 i = 0; i < poly.count(); i++) + { + if (i > 0) + stream << "--"; + stream << poly.getB2DPoint(i); + } + stream << ">"; + + return stream; } - stream << ">"; - return stream; -} +} // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYGON_HXX diff --git a/include/basegfx/polygon/b2dpolypolygon.hxx b/include/basegfx/polygon/b2dpolypolygon.hxx index c033989a722b..ddc05a669ceb 100644 --- a/include/basegfx/polygon/b2dpolypolygon.hxx +++ b/include/basegfx/polygon/b2dpolypolygon.hxx @@ -131,23 +131,23 @@ namespace basegfx // typedef for a vector of B2DPolyPolygons typedef ::std::vector< B2DPolyPolygon > B2DPolyPolygonVector; -} // end of namespace basegfx - -template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const basegfx::B2DPolyPolygon& poly ) -{ - stream << "[" << poly.count() << ":"; - for (sal_uInt32 i = 0; i < poly.count(); i++) + template< typename charT, typename traits > + inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const B2DPolyPolygon& poly ) { - if (i > 0) - stream << ","; - stream << poly.getB2DPolygon(i); + stream << "[" << poly.count() << ":"; + for (sal_uInt32 i = 0; i < poly.count(); i++) + { + if (i > 0) + stream << ","; + stream << poly.getB2DPolygon(i); + } + stream << "]"; + + return stream; } - stream << "]"; - return stream; -} +} // end of namespace basegfx #endif // INCLUDED_BASEGFX_POLYGON_B2DPOLYPOLYGON_HXX diff --git a/include/basegfx/range/b2drange.hxx b/include/basegfx/range/b2drange.hxx index e664e2c7e06c..0de9dba0e783 100644 --- a/include/basegfx/range/b2drange.hxx +++ b/include/basegfx/range/b2drange.hxx @@ -312,15 +312,14 @@ namespace basegfx const B2DRange& rFirst, const B2DRange& rSecond ); -} // end of namespace basegfx - + template< typename charT, typename traits > + inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const B2DRange& range ) + { + return stream << range.getWidth() << "x" << range.getHeight() << "@" << range.getMinimum(); + } -template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const basegfx::B2DRange& range ) -{ - return stream << range.getWidth() << "x" << range.getHeight() << "@" << range.getMinimum(); -} +} // end of namespace basegfx #endif // INCLUDED_BASEGFX_RANGE_B2DRANGE_HXX diff --git a/include/basegfx/range/b2irange.hxx b/include/basegfx/range/b2irange.hxx index 396aebdaf26d..3d7d0edba6c9 100644 --- a/include/basegfx/range/b2irange.hxx +++ b/include/basegfx/range/b2irange.hxx @@ -238,18 +238,18 @@ namespace basegfx const B2IRange& rFirst, const B2IRange& rSecond ); -} // end of namespace basegfx + template< typename charT, typename traits > + inline std::basic_ostream<charT, traits> & operator <<( + std::basic_ostream<charT, traits> & stream, const B2IRange& range ) + { + if (range.isEmpty()) + return stream << "EMPTY"; + else + return stream << range.getWidth() << 'x' << range.getHeight() + << "@(" << range.getMinX() << "," << range.getMinY() << ")"; + } -template< typename charT, typename traits > -inline std::basic_ostream<charT, traits> & operator <<( - std::basic_ostream<charT, traits> & stream, const basegfx::B2IRange& range ) -{ - if (range.isEmpty()) - return stream << "EMPTY"; - else - return stream << range.getWidth() << 'x' << range.getHeight() - << "@(" << range.getMinX() << "," << range.getMinY() << ")"; -} +} // end of namespace basegfx #endif // INCLUDED_BASEGFX_RANGE_B2IRANGE_HXX _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
