summaryrefslogtreecommitdiff
path: root/chart2/source/view
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-03-09 17:19:29 +0100
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-03-30 23:52:44 +0200
commitfbdd2beac19540d86d832048baef6854435aa96c (patch)
tree468dba8aba567a3774b4f3a0ce0a18e9d884b1e5 /chart2/source/view
parent7784d66c837d0037c0af473255342738557fda96 (diff)
charts: fix drawing multiple buttons in legend
Change-Id: I101d6ee6e06e78ba5e0748a796b6640c47fa67cf
Diffstat (limited to 'chart2/source/view')
-rw-r--r--chart2/source/view/main/VLegend.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index b79c95ac4e41..eda2fd43d427 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -780,19 +780,20 @@ std::vector<std::shared_ptr<VButton>> lcl_createButtons(
int nCIDIndex = 0;
awt::Size aSize(2000, 700);
-
+ int y = 100;
for (OUString const & sColumnField : aColumnFields)
{
std::shared_ptr<VButton> pButton(new VButton);
aButtons.push_back(pButton);
pButton->init(xLegendContainer, xShapeFactory);
- awt::Point aNewPosition = awt::Point(100, 100);
+ awt::Point aNewPosition = awt::Point(100, y);
pButton->setLabel(sColumnField);
pButton->setCID("RowFieldButton." + OUString::number(nCIDIndex));
pButton->createShapes(aNewPosition, aSize, xModelPage);
nCIDIndex += 1;
+ y += aSize.Height + 100;;
}
- nUsedHeight += aSize.Height + 100;
+ nUsedHeight += y + 100;
return aButtons;
}