diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-02-02 22:25:28 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-02-03 12:34:06 +0100 |
commit | e4be770ec8218d80dcc9f1e38fd1c69717beb4fb (patch) | |
tree | 54906d6850d9263b21b82845cbe5bfaac3460335 /include/tools | |
parent | 9b9eb2e4f619c63eabdc54b5d749ac55d8eaf333 (diff) |
add std::ostream operators for Region and PolyPolygon
Change-Id: I8f4129b840a27f3029643ad2a4852f9e10604905
Diffstat (limited to 'include/tools')
-rw-r--r-- | include/tools/poly.hxx | 12 |
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: */ |