summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/print3.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-19 15:12:38 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-19 21:34:46 +0200
commit3aef606f2758172a27718a06fea0ff9080e4d80f (patch)
treead323c90301d80bbb3b68163d8b87e5402b687ed /vcl/source/gdi/print3.cxx
parent5afba3e12c8d4eb1ebb8e087134eb87593bb017a (diff)
use tools::Long in vcl
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/gdi/print3.cxx')
-rw-r--r--vcl/source/gdi/print3.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 3291b00d5ed1..04ac1f5a92e6 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1125,8 +1125,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
{
// user overridden page size, center Metafile
o_rMtf.WindStart();
- long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
- long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
+ tools::Long nDX = (aPaperSize.Width() - aPageSize.aSize.Width()) / 2;
+ tools::Long nDY = (aPaperSize.Height() - aPageSize.aSize.Height()) / 2;
o_rMtf.Move( nDX, nDY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() );
o_rMtf.WindStart();
o_rMtf.SetPrefSize( aPaperSize );
@@ -1151,8 +1151,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
aMPArea.AdjustHeight(rMPS.nVerticalSpacing );
// determine offsets
- long nAdvX = aMPArea.Width() / rMPS.nColumns;
- long nAdvY = aMPArea.Height() / rMPS.nRows;
+ tools::Long nAdvX = aMPArea.Width() / rMPS.nColumns;
+ tools::Long nAdvY = aMPArea.Height() / rMPS.nRows;
// determine size of a "cell" subpage, leave a little space around pages
Size aSubPageSize( nAdvX - rMPS.nHorizontalSpacing, nAdvY - rMPS.nVerticalSpacing );
@@ -1182,7 +1182,7 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
PrinterController::PageSize aPageSize = getPageFile( nPage, aPageFile, i_bMayUseCache );
if( aPageSize.aSize.Width() && aPageSize.aSize.Height() )
{
- long nCellX = 0, nCellY = 0;
+ tools::Long nCellX = 0, nCellY = 0;
switch( rMPS.nOrder )
{
case NupOrderType::LRTB:
@@ -1210,16 +1210,16 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte
aPageFile.WindStart();
// move the subpage so it is centered in its "cell"
- long nOffX = (aSubPageSize.Width() - long(double(aPageSize.aSize.Width()) * fScale)) / 2;
- long nOffY = (aSubPageSize.Height() - long(double(aPageSize.aSize.Height()) * fScale)) / 2;
- long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
- long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
+ tools::Long nOffX = (aSubPageSize.Width() - tools::Long(double(aPageSize.aSize.Width()) * fScale)) / 2;
+ tools::Long nOffY = (aSubPageSize.Height() - tools::Long(double(aPageSize.aSize.Height()) * fScale)) / 2;
+ tools::Long nX = rMPS.nLeftMargin + nOffX + nAdvX * nCellX;
+ tools::Long nY = rMPS.nTopMargin + nOffY + nAdvY * nCellY;
aPageFile.Move( nX, nY, mpImplData->mxPrinter->GetDPIX(), mpImplData->mxPrinter->GetDPIY() );
aPageFile.WindStart();
// calculate border rectangle
tools::Rectangle aSubPageRect( Point( nX, nY ),
- Size( long(double(aPageSize.aSize.Width())*fScale),
- long(double(aPageSize.aSize.Height())*fScale) ) );
+ Size( tools::Long(double(aPageSize.aSize.Width())*fScale),
+ tools::Long(double(aPageSize.aSize.Height())*fScale) ) );
// append subpage to page
appendSubPage( o_rMtf, aSubPageRect, aPageFile, rMPS.bDrawBorder );