diff options
author | Jozsef Szakacs <zmx3@citromail.hu> | 2018-11-07 09:52:17 +0100 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-11-16 18:31:03 +0100 |
commit | 26caf1bc59c81704f11225e3e431e412deb8c475 (patch) | |
tree | 2bff1302475fcf09da9afb5d95961bc66b0f8830 /oox | |
parent | cb1d625aee558c9aa3c0bf3ea44b65f37dca48a8 (diff) |
tdf#114179: Custom size and position of the chart wall
By Xlsx files, rChartSize is using the Values that it gets from getChartSize(), this is the
same Size as rPageSize. By Docx files rChartSize was a negative number everytime,
so the calcAbsRectangle Method gave back a 'false' Value because of this. The rPageSize shows
at every Debugging, Width = 16000, and Height = 9000 for Docx files, and beacause rChartSize was
equal to rPageSize by Xlsx, I tried rChartSize with this Fixed Size.
Change-Id: Ia29fa3401475c33c1b5e3dde9c3cb030a02cceb4
Reviewed-on: https://gerrit.libreoffice.org/62991
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/converterbase.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx index 678c3a4ba630..7faeb36576d1 100644 --- a/oox/source/drawingml/chart/converterbase.cxx +++ b/oox/source/drawingml/chart/converterbase.cxx @@ -39,6 +39,7 @@ #include <oox/token/tokens.hxx> #include <comphelper/processfactory.hxx> + namespace oox { namespace drawingml { namespace chart { @@ -349,7 +350,12 @@ bool LayoutConverter::calcAbsRectangle( awt::Rectangle& orRect ) const { if( !mrModel.mbAutoLayout ) { - const awt::Size& rChartSize = getChartSize(); + awt::Size rChartSize=getChartSize(); + if( (rChartSize.Width < 0) || (rChartSize.Height < 0) ) + { + rChartSize.Width = 16000; + rChartSize.Height = 9000; + } orRect.X = lclCalcPosition( rChartSize.Width, mrModel.mfX, mrModel.mnXMode ); orRect.Y = lclCalcPosition( rChartSize.Height, mrModel.mfY, mrModel.mnYMode ); if( (orRect.X >= 0) && (orRect.Y >= 0) ) |