diff options
-rw-r--r-- | sc/inc/rangelst.hxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 19d6d7701e0c..932a5ed52d6d 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -22,6 +22,7 @@ #include "global.hxx" #include "address.hxx" +#include <ostream> #include <vector> #include <sal/types.h> @@ -100,6 +101,22 @@ private: }; typedef tools::SvRef<ScRangeList> ScRangeListRef; +// 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 ScRangeList& rRangeList) +{ + stream << "("; + for (size_t i = 0; i < rRangeList.size(); ++i) + { + if (i > 0) + stream << ","; + stream << *(rRangeList[i]); + } + stream << ")"; + + return stream; +} + // RangePairList: // aRange[0]: actual range, // aRange[1]: data for that range, e.g. Rows belonging to a ColName |