From c9c1135de2be25c8630c1197df80e5ceb4f9907a Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 4 Jul 2017 17:20:56 +0200 Subject: editeng: add some operator<< for ESelection, EPosition Change-Id: I4c3ff2101e7e80c0738401753333bc8c088987f3 --- include/editeng/editdata.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/editeng/editdata.hxx b/include/editeng/editdata.hxx index 12b6bff6474d..cf19fbde88d4 100644 --- a/include/editeng/editdata.hxx +++ b/include/editeng/editdata.hxx @@ -24,6 +24,7 @@ #include #include #include +#include class SfxItemSet; class SfxPoolItem; @@ -106,6 +107,13 @@ struct EPosition { } }; +template +inline std::basic_ostream & operator <<( + std::basic_ostream & stream, EPosition const& pos) +{ + return stream << "EPosition(" << pos.nPara << ',' << pos.nIndex << ")"; +} + struct ESelection { sal_Int32 nStartPara; @@ -138,6 +146,13 @@ struct ESelection bool HasRange() const; }; +template +inline std::basic_ostream & operator <<( + std::basic_ostream & stream, ESelection const& sel) +{ + return stream << "ESelection(" << sel.nStartPara << ',' << sel.nStartPos << "," << sel.nEndPara << "," << sel.nEndPos << ")"; +} + inline bool ESelection::HasRange() const { return ( nStartPara != nEndPara ) || ( nStartPos != nEndPos ); -- cgit