sc/inc/address.hxx |   19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

New commits:
commit 0b1c92bde2be59dffdfd801b2dbb8d9a68f68526
Author: Tor Lillqvist <t...@collabora.com>
Date:   Thu Sep 14 18:57:46 2017 +0300

    Add debugging output operator<< for ScRange

diff --git a/sc/inc/address.hxx b/sc/inc/address.hxx
index bc585a359422..8f6ba1f32296 100644
--- a/sc/inc/address.hxx
+++ b/sc/inc/address.hxx
@@ -652,6 +652,25 @@ public:
     inline size_t hashStartColumn() 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 ScRange& rRange)
+{
+    stream << rRange.aStart;
+    if (rRange.aEnd != rRange.aStart)
+    {
+        stream << ":";
+        if (rRange.aEnd.Tab() != rRange.aStart.Tab())
+            stream << rRange.aEnd;
+        else
+            stream <<
+                "R" << rRange.aEnd.Row()+1 <<
+                "C" << rRange.aEnd.Col()+1;
+    }
+
+    return stream;
+}
+
 inline void ScRange::GetVars( SCCOL& nCol1, SCROW& nRow1, SCTAB& nTab1,
                               SCCOL& nCol2, SCROW& nRow2, SCTAB& nTab2 ) const
 {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to