diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2020-12-15 14:17:15 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-12-16 18:45:07 +0100 |
commit | 1eb25c11500a235aa141a327a5489f6861e60a89 (patch) | |
tree | 6359caccc115397a3be99e15947144154f50e1ac /chart2 | |
parent | b0068342398786ca50304260434a18880dddf74d (diff) |
tdf#136816: fix hidden legend entries in "Column and Line" charts
Regression from commit: 300e65cc47f3d6ae1563350757dbfadc080d7452
(tdf#123268 fix lost chart if all legend entries are hidden)
Change-Id: Id59cd8d681dada123feadbe7910be7fbc7ec37f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107757
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 353fd4d9630c..704a48872bf5 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -1000,8 +1000,6 @@ void VLegend::createShapes( std::vector<ViewLegendEntry> aNewEntries = pLegendEntryProvider->createLegendEntries( aMaxSymbolExtent, eLegendPosition, xLegendProp, xLegendContainer, m_xShapeFactory, m_xContext, mrModel); - if (aNewEntries.size() == 0) - return; aViewEntries.insert( aViewEntries.end(), aNewEntries.begin(), aNewEntries.end() ); } } @@ -1042,17 +1040,14 @@ void VLegend::createShapes( // create the buttons pButton->createShapes(xModelPage); } - } - Reference< drawing::XShape > xBorder = - pShapeFactory->createRectangle( xLegendContainer, - aLegendSize, - awt::Point(0,0), - aLineFillProperties.first, - aLineFillProperties.second, ShapeFactory::StackPosition::Bottom ); + Reference<drawing::XShape> xBorder = pShapeFactory->createRectangle( + xLegendContainer, aLegendSize, awt::Point(0, 0), aLineFillProperties.first, + aLineFillProperties.second, ShapeFactory::StackPosition::Bottom); - //because of this name this border will be used for marking the legend - ShapeFactory::setShapeName( xBorder, "MarkHandles" ); + //because of this name this border will be used for marking the legend + ShapeFactory::setShapeName(xBorder, "MarkHandles"); + } } } catch( const uno::Exception & ) |