summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-10-30 13:57:28 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-03 16:37:23 +0100
commita4225957dfcdfed525297683e988f8fa1948220d (patch)
treecbca801f385ce611300eedf0b9d9a1d53678dd26
parentdc1656a71acca3a20ba99c162ae5169f15b362fc (diff)
ScTabView::getRowColumnHeaders: include info about columns, too
Change-Id: Id7db9fa9b451dcf2423142b38c2c12b369e16fae (cherry picked from commit ac47e5758e56ac30d98c1d6386dfad24ac59b1f6)
-rw-r--r--sc/source/ui/view/tabview.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index f177bbe704f1..4dccc9b4032a 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2324,8 +2324,20 @@ OUString ScTabView::getRowColumnHeaders()
aRows.push_back(std::make_pair("", aRow));
}
+ boost::property_tree::ptree aCols;
+ for (SCCOL nCol = 0; nCol < nEndCol; ++nCol)
+ {
+ boost::property_tree::ptree aCol;
+ sal_uInt16 nSize = pColBar[SC_SPLIT_LEFT]->GetEntrySize(nCol);
+ aCol.put("size", OString::number(nSize).getStr());
+ OUString aText = pColBar[SC_SPLIT_LEFT]->GetEntryText(nCol);
+ aCol.put("text", aText.toUtf8().getStr());
+ aCols.push_back(std::make_pair("", aCol));
+ }
+
boost::property_tree::ptree aTree;
aTree.add_child("rows", aRows);
+ aTree.add_child("columns", aCols);
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
return OUString::fromUtf8(aStream.str().c_str());