[Libreoffice-commits] core.git: sc/inc

Tor Lillqvist tml at collabora.com
Sun Nov 26 15:04:47 UTC 2017


 sc/inc/conditio.hxx |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

New commits:
commit 752d263c36b3de9d9a0247df46216c610a5c48ed
Author: Tor Lillqvist <tml at collabora.com>
Date:   Fri Nov 24 22:41:20 2017 +0200

    Add debug output operator<< for ScFormatEntry::Type
    
    Change-Id: I4e23f17a59e995d76258420f07818079c7a9b94b
    Reviewed-on: https://gerrit.libreoffice.org/45288
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 7ca023a801f5..b619e1545e97 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -252,6 +252,33 @@ protected:
 
 };
 
+template<typename charT, typename traits>
+inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScFormatEntry::Type& rType)
+{
+    switch (rType)
+    {
+    case ScFormatEntry::Type::Condition:
+        stream << "Condition";
+        break;
+    case ScFormatEntry::Type::Colorscale:
+        stream << "Colorscale";
+        break;
+    case ScFormatEntry::Type::Databar:
+        stream << "Databar";
+        break;
+    case ScFormatEntry::Type::Iconset:
+        stream << "Iconset";
+        break;
+    case ScFormatEntry::Type::Date:
+        stream << "Data";
+        break;
+    default:
+        stream << "?(" << (int)rType << ")";
+        break;
+    }
+    return stream;
+}
+
 class approx_less
 {
 public:


More information about the Libreoffice-commits mailing list