diff options
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/address.hxx | 19 |
1 files changed, 19 insertions, 0 deletions
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 { |