Blame SOURCES/0254-ScTabView-getRowColumnHeaders-include-info-about-col.patch

f325b2
From 48b6afeef26d498f4338170e53306257ef9914d4 Mon Sep 17 00:00:00 2001
f325b2
From: Miklos Vajna <vmiklos@collabora.co.uk>
f325b2
Date: Fri, 30 Oct 2015 13:57:28 +0100
f325b2
Subject: [PATCH 254/398] ScTabView::getRowColumnHeaders: include info about
f325b2
 columns, too
f325b2
f325b2
Change-Id: Id7db9fa9b451dcf2423142b38c2c12b369e16fae
f325b2
(cherry picked from commit ac47e5758e56ac30d98c1d6386dfad24ac59b1f6)
f325b2
---
f325b2
 sc/source/ui/view/tabview.cxx | 12 ++++++++++++
f325b2
 1 file changed, 12 insertions(+)
f325b2
f325b2
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
f325b2
index f177bbe704f1..4dccc9b4032a 100644
f325b2
--- a/sc/source/ui/view/tabview.cxx
f325b2
+++ b/sc/source/ui/view/tabview.cxx
f325b2
@@ -2324,8 +2324,20 @@ OUString ScTabView::getRowColumnHeaders()
f325b2
         aRows.push_back(std::make_pair("", aRow));
f325b2
     }
f325b2
 
f325b2
+    boost::property_tree::ptree aCols;
f325b2
+    for (SCCOL nCol = 0; nCol < nEndCol; ++nCol)
f325b2
+    {
f325b2
+        boost::property_tree::ptree aCol;
f325b2
+        sal_uInt16 nSize = pColBar[SC_SPLIT_LEFT]->GetEntrySize(nCol);
f325b2
+        aCol.put("size", OString::number(nSize).getStr());
f325b2
+        OUString aText = pColBar[SC_SPLIT_LEFT]->GetEntryText(nCol);
f325b2
+        aCol.put("text", aText.toUtf8().getStr());
f325b2
+        aCols.push_back(std::make_pair("", aCol));
f325b2
+    }
f325b2
+
f325b2
     boost::property_tree::ptree aTree;
f325b2
     aTree.add_child("rows", aRows);
f325b2
+    aTree.add_child("columns", aCols);
f325b2
     std::stringstream aStream;
f325b2
     boost::property_tree::write_json(aStream, aTree);
f325b2
     return OUString::fromUtf8(aStream.str().c_str());
f325b2
-- 
f325b2
2.12.0
f325b2