Kaydet (Commit) 8c9f2efe authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 06c1dc4c
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment