diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-01-25 09:44:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-01-28 10:12:29 +0100 |
commit | 7545d180fbc133fe19917a484aaad1e4df250c0a (patch) | |
tree | 7f5de995699f0eb1c7c586738be831e5108125e8 /filter | |
parent | 4e8a15ca224760e8f36952528b2b47def78fd865 (diff) |
both branches have a common piece
Change-Id: I1fd28f7dc0911bfdb8fd46aee91c3a81ce034ba6
Reviewed-on: https://gerrit.libreoffice.org/66899
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/bitmap.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/filter/source/graphicfilter/icgm/bitmap.cxx b/filter/source/graphicfilter/icgm/bitmap.cxx index f74ba6fb5d5b..bca6ec869ff1 100644 --- a/filter/source/graphicfilter/icgm/bitmap.cxx +++ b/filter/source/graphicfilter/icgm/bitmap.cxx @@ -308,13 +308,14 @@ bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc ) void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescriptor& rDest ) { + rDest.mxBitmap.Expand( 0, rSource.mnY ); + rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), + tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap ); + if ( ( rSource.mnR.Y == rDest.mnQ.Y ) && ( rSource.mnR.X == rDest.mnQ.X ) ) { // Insert on Bottom if ( mpCGM->mnVDCYmul == -1 ) rDest.mnOrigin = rSource.mnOrigin; // new origin - rDest.mxBitmap.Expand( 0, rSource.mnY ); - rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), - tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap ); FloatPoint aFloatPoint; aFloatPoint.X = rSource.mnQ.X - rSource.mnR.X; aFloatPoint.Y = rSource.mnQ.Y - rSource.mnR.Y; @@ -327,9 +328,6 @@ void CGMBitmap::ImplInsert( CGMBitmapDescriptor const & rSource, CGMBitmapDescri { // Insert on Top if ( mpCGM->mnVDCYmul == 1 ) rDest.mnOrigin = rSource.mnOrigin; // new origin - rDest.mxBitmap.Expand( 0, rSource.mnY ); - rDest.mxBitmap.CopyPixel( tools::Rectangle( Point( 0, rDest.mnY ), Size( rSource.mnX, rSource.mnY ) ), - tools::Rectangle( Point( 0, 0 ), Size( rSource.mnX, rSource.mnY ) ), &rSource.mxBitmap ); rDest.mnP = rSource.mnP; rDest.mnR = rSource.mnR; } |