diff options
author | Andras Timar <andras.timar@collabora.com> | 2015-04-04 14:13:18 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-04-09 23:29:15 +0000 |
commit | c7eef865555b2ed252b1dffa9b3ed69780c63495 (patch) | |
tree | 009ca7a1e79fc7b9b2b66ca47f8329f4bfdc8388 | |
parent | 6322ef95c9d3128ede01d45f1542c6ad03cac392 (diff) |
tdf#90404 OOXML chart legend import improvement
In the bugdoc, the chart legend had 6 entries in PowerPoint, but
only 5 in Impress. I played a lot with padding and offset parameters
in layout algorithm without success. Finally I introduced this 1mm
tolerance, so the fixed legend frame can expand up to 1mm, if necessary.
Change-Id: Id1ad1df67aab41d942133cea8d16fccf0f215167
Reviewed-on: https://gerrit.libreoffice.org/15149
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 6220362e844ad0e50a38c1627ddd05a082882009)
Reviewed-on: https://gerrit.libreoffice.org/15154
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 1df4e748e462..84d62bc6d07d 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -390,7 +390,7 @@ awt::Size lcl_placeLegendEntries( nSumHeight += aRowHeights[nR]; sal_Int32 nRemainingSpace = rAvailableSpace.Height - nSumHeight; - if( nRemainingSpace<0 ) + if( nRemainingSpace < -100 ) // 1mm tolerance for OOXML interop tdf#90404 { //remove entries that are too big for( sal_Int32 nR=nNumberOfRows; nR--; ) @@ -418,7 +418,7 @@ awt::Size lcl_placeLegendEntries( } nNumberOfRows = static_cast<sal_Int32>(aRowHeights.size()); } - if( nRemainingSpace > 0 ) + if( nRemainingSpace >= -100 ) // 1mm tolerance for OOXML interop tdf#90404 { sal_Int32 nNormalSpacingHeight = 2*nYPadding+(nNumberOfRows-1)*nYOffset; if( nRemainingSpace < nNormalSpacingHeight ) |