summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-02-02 22:25:28 +0100
committerMichael Stahl <mstahl@redhat.com>2014-02-03 12:34:06 +0100
commite4be770ec8218d80dcc9f1e38fd1c69717beb4fb (patch)
tree54906d6850d9263b21b82845cbe5bfaac3460335 /include/tools
parent9b9eb2e4f619c63eabdc54b5d749ac55d8eaf333 (diff)
add std::ostream operators for Region and PolyPolygon
Change-Id: I8f4129b840a27f3029643ad2a4852f9e10604905
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/poly.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx
index c67714310cba..ce96dc5ad008 100644
--- a/include/tools/poly.hxx
+++ b/include/tools/poly.hxx
@@ -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: */