summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-11-03 16:26:46 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-11-03 16:27:38 +0100
commit788cec0a60dcfce6d86c820e9d0f7a1eb634f7bf (patch)
tree5d2ac849adf443c5e48345e9c270a4719c8011ee /sc
parent1347b90c9e5f54fd0b7e7147519f34d3c1b282d5 (diff)
sc lok: avoid placeholder row when providing all headers
In case the logic visible area is known, info is provided only about the visible headers. Given that only relative sizes (no absolute positions) are provided, a placeholder row/col is added to the result that contains the total size of the skipped items. These placeholder items are not needed when providing all headers, so don't emit them. Change-Id: I48ccb73554313f4d2bb420e4402995719b0f9f7d
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabview.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 615f0d90d76a..d197750f68c2 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2308,7 +2308,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle)
}
if (!bSkip)
{
- if (aRows.empty())
+ if (aRows.empty() && nTotal > 0)
{
// The sizes are relative sizes, so include the total skipped size before the real items.
boost::property_tree::ptree aRow;
@@ -2345,7 +2345,7 @@ OUString ScTabView::getRowColumnHeaders(const Rectangle& rRectangle)
}
if (!bSkip)
{
- if (aCols.empty())
+ if (aCols.empty() && nTotal > 0)
{
boost::property_tree::ptree aCol;
aCol.put("size", OString::number(long((nTotalPixels + 0.5) / aViewData.GetPPTX())).getStr());