add std::ostream operators for Region and PolyPolygon

Change-Id: I8f4129b840a27f3029643ad2a4852f9e10604905
This commit is contained in:
Michael Stahl
2014-02-02 22:25:28 +01:00
parent 9b9eb2e4f6
commit e4be770ec8
2 changed files with 41 additions and 0 deletions

View File

@@ -278,6 +278,18 @@ public:
typedef std::vector< PolyPolygon > PolyPolyVector;
template<typename charT, typename traits>
inline std::basic_ostream<charT, traits> & operator <<(
std::basic_ostream<charT, traits> & stream, const PolyPolygon& rPolyPoly)
{
if (!rPolyPoly.Count())
stream << "EMPTY";
for (sal_uInt16 i = 0; i < rPolyPoly.Count(); ++i)
stream << "[" << i << "] " << rPolyPoly.GetObject(i);
return stream;
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */