diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-15 09:44:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-15 18:07:29 +0200 |
commit | 48480d4f19d2fb92ca4ae0527eec4753cdc439c0 (patch) | |
tree | ea84bf9c8867f69bd8dabf5a8ed6a9446b3f9d2e /oox/source/drawingml/chart | |
parent | 49c9b3723056addb0a443eaee71c8aacbdda4dc6 (diff) |
make tools::Rectangle::getBottom return 0 when empty
LayoutConverter::calcAbsRectangle needed to be tweaked because
we now end up with a zero width/height instead of a large
negative number.
Change-Id: I81f04759a1d5bf6f44753a1701596796fad40567
Reviewed-on: https://gerrit.libreoffice.org/75610
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml/chart')
-rw-r--r-- | oox/source/drawingml/chart/converterbase.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 7faeb36576d1..7f12741c568e 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -350,18 +350,18 @@ bool LayoutConverter::calcAbsRectangle( awt::Rectangle& orRect ) const { if( !mrModel.mbAutoLayout ) { - awt::Size rChartSize=getChartSize(); - if( (rChartSize.Width < 0) || (rChartSize.Height < 0) ) + awt::Size aChartSize=getChartSize(); + if( aChartSize.Width <= 0 || aChartSize.Height <= 0 ) { - rChartSize.Width = 16000; - rChartSize.Height = 9000; + aChartSize.Width = 16000; + aChartSize.Height = 9000; } - orRect.X = lclCalcPosition( rChartSize.Width, mrModel.mfX, mrModel.mnXMode ); - orRect.Y = lclCalcPosition( rChartSize.Height, mrModel.mfY, mrModel.mnYMode ); + orRect.X = lclCalcPosition( aChartSize.Width, mrModel.mfX, mrModel.mnXMode ); + orRect.Y = lclCalcPosition( aChartSize.Height, mrModel.mfY, mrModel.mnYMode ); if( (orRect.X >= 0) && (orRect.Y >= 0) ) { - orRect.Width = lclCalcSize( orRect.X, rChartSize.Width, mrModel.mfW, mrModel.mnWMode ); - orRect.Height = lclCalcSize( orRect.Y, rChartSize.Height, mrModel.mfH, mrModel.mnHMode ); + orRect.Width = lclCalcSize( orRect.X, aChartSize.Width, mrModel.mfW, mrModel.mnWMode ); + orRect.Height = lclCalcSize( orRect.Y, aChartSize.Height, mrModel.mfH, mrModel.mnHMode ); return (orRect.Width > 0) && (orRect.Height > 0); } } |