From e34df1a0607f51b8e1168fdfeb8703c9e4e9dd6b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Fri, 4 Aug 2017 13:00:41 +0300 Subject: Add debug output operator<< for ScAddress --- sc/inc/address.hxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sc/inc') diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx index a13f3e9ddb62..3aab8862ecbd 100644 --- a/sc/inc/address.hxx +++ b/sc/inc/address.hxx @@ -24,6 +24,8 @@ #include #include +#include + #include "scdllapi.h" #include "types.hxx" #include @@ -355,6 +357,18 @@ public: OUString GetColRowString() const; }; +// For use in SAL_DEBUG etc. Output format not guaranteed to be stable. +template +inline std::basic_ostream & operator <<(std::basic_ostream & stream, const ScAddress& rAddress) +{ + stream << + rAddress.Tab() << "!" << + "R" << rAddress.Row() << + "C" << rAddress.Col(); + + return stream; +} + inline void ScAddress::PutInOrder( ScAddress& rAddress ) { if ( rAddress.Col() < Col() ) -- cgit