summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-07-04 17:20:56 +0200
committerMichael Stahl <mstahl@redhat.com>2017-07-05 11:35:03 +0200
commitc9c1135de2be25c8630c1197df80e5ceb4f9907a (patch)
tree99f82f12ea82ba360eed49799e8d945bd11dba54 /include
parentb4c4187bcc6ab03be1b9c1c05cf992677c546c08 (diff)
editeng: add some operator<< for ESelection, EPosition
Change-Id: I4c3ff2101e7e80c0738401753333bc8c088987f3
Diffstat (limited to 'include')
-rw-r--r--include/editeng/editdata.hxx15
1 files changed, 15 insertions, 0 deletions
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 <rtl/ustring.hxx>
#include <editeng/editengdllapi.h>
#include <memory>
+#include <ostream>
class SfxItemSet;
class SfxPoolItem;
@@ -106,6 +107,13 @@ struct EPosition
{ }
};
+template<typename charT, typename traits>
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & 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<typename charT, typename traits>
+inline std::basic_ostream<charT, traits> & operator <<(
+ std::basic_ostream<charT, traits> & 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 );