diff options
author | Muhammet Kara <muhammet.kara@collabora.com> | 2019-01-17 17:26:15 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-18 08:29:21 +0100 |
commit | ec4a282657d84e9e745b68fa8299c8ecc4c7ea7a (patch) | |
tree | 2e0e70cea99ab199b10cb86c5755756ca1a9fd29 /sc/source/ui/unoobj/docuno.cxx | |
parent | 924da47e0343a5698547c8c82c13afbb012ff9c8 (diff) |
Add aCalcPageSize and aCalcPagePos properties to ScModelObj::getRenderer
So that we can adjust page offset when outputting to GDIMetaFiles
Change-Id: I1c28440a1ff62a879b6341748a6d3092f2bfda96
Reviewed-on: https://gerrit.libreoffice.org/66526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 74fa335a9eab..74b982b5fc75 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1894,7 +1894,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 aPageSize.Height = TwipsToHMM( aTwips.Height()); } - long nPropCount = bWasCellRange ? 3 : 2; + long nPropCount = bWasCellRange ? 5 : 4; uno::Sequence<beans::PropertyValue> aSequence(nPropCount); beans::PropertyValue* pArray = aSequence.getArray(); pArray[0].Name = SC_UNONAME_PAGESIZE; @@ -1907,8 +1907,19 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 table::CellRangeAddress aRangeAddress( nTab, aCellRange.aStart.Col(), aCellRange.aStart.Row(), aCellRange.aEnd.Col(), aCellRange.aEnd.Row() ); + tools::Rectangle aMMRect( pDocShell->GetDocument().GetMMRect( + aCellRange.aStart.Col(), aCellRange.aStart.Row(), + aCellRange.aEnd.Col(), aCellRange.aEnd.Row(), aCellRange.aStart.Tab())); + + awt::Size aCalcPageSize ( aMMRect.GetSize().Width(), aMMRect.GetSize().Height() ); + awt::Point aCalcPagePos( aMMRect.getX(), aMMRect.getY() ); + pArray[2].Name = SC_UNONAME_SOURCERANGE; pArray[2].Value <<= aRangeAddress; + pArray[3].Name = SC_UNONAME_CALCPAGESIZE; + pArray[3].Value <<= aCalcPageSize; + pArray[4].Name = SC_UNONAME_CALCPAGEPOS; + pArray[4].Value <<= aCalcPagePos; } if( ! pPrinterOptions ) |