summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-08-04 13:00:41 +0300
committerTor Lillqvist <tml@collabora.com>2017-08-04 13:00:41 +0300
commite34df1a0607f51b8e1168fdfeb8703c9e4e9dd6b (patch)
tree27808e962d8c853b8df7d49b41124466fd457df6 /sc/inc
parentbf234dc9cd0481c241bbb0f755264562ee89d568 (diff)
Add debug output operator<< for ScAddress
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/address.hxx14
1 files changed, 14 insertions, 0 deletions
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 <rtl/strbuf.hxx>
#include <limits>
+#include <ostream>
+
#include "scdllapi.h"
#include "types.hxx"
#include <formula/grammar.hxx>
@@ -355,6 +357,18 @@ public:
OUString GetColRowString() const;
};
+// For use in SAL_DEBUG etc. Output format not guaranteed to be stable.
+template<typename charT, typename traits>
+inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & 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() )