diff options
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gdimetafiletools.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/gdimtf.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 3 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl2.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pngread.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/pngwrite.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/textlayout.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/vectorgraphicdata.cxx | 2 |
12 files changed, 20 insertions, 19 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 02ab6d068bc8..8e20fd7a9aa3 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1476,7 +1476,7 @@ bool ImplWriteDIBBody(const Bitmap& rBitmap, SvStream& rOStm, BitmapReadAccess c // MapMode is integer-based, and suffers from roundoffs, // especially if maPrefSize is small. Trying to circumvent // that by performing part of the math in floating point. - const Size aScale100000(OutputDevice::LogicToLogic(Size(100000, 100000), MapUnit::Map100thMM, rBitmap.GetPrefMapMode())); + const Size aScale100000(OutputDevice::LogicToLogic(Size(100000, 100000), MapMode(MapUnit::Map100thMM), rBitmap.GetPrefMapMode())); const double fBmpWidthM((double)rBitmap.GetPrefSize().Width() / aScale100000.Width()); const double fBmpHeightM((double)rBitmap.GetPrefSize().Height() / aScale100000.Height()); diff --git a/vcl/source/gdi/gdimetafiletools.cxx b/vcl/source/gdi/gdimetafiletools.cxx index a5bd77e1b4ab..e63f64ca6b4b 100644 --- a/vcl/source/gdi/gdimetafiletools.cxx +++ b/vcl/source/gdi/gdimetafiletools.cxx @@ -717,11 +717,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if(MapUnit::MapPixel == rBitmapEx.GetPrefMapMode().GetMapUnit()) { - aLogicalSize = Application::GetDefaultDevice()->PixelToLogic(aLogicalSize, aMapModes.back().GetMapUnit()); + aLogicalSize = Application::GetDefaultDevice()->PixelToLogic(aLogicalSize, aMapModes.back()); } else { - aLogicalSize = OutputDevice::LogicToLogic(aLogicalSize, rBitmapEx.GetPrefMapMode(), aMapModes.back().GetMapUnit()); + aLogicalSize = OutputDevice::LogicToLogic(aLogicalSize, rBitmapEx.GetPrefMapMode(), aMapModes.back()); } bDone = handleBitmapContent( @@ -744,11 +744,11 @@ void clipMetafileContentAgainstOwnRegions(GDIMetaFile& rSource) if(MapUnit::MapPixel == rBitmap.GetPrefMapMode().GetMapUnit()) { - aLogicalSize = Application::GetDefaultDevice()->PixelToLogic(aLogicalSize, aMapModes.back().GetMapUnit()); + aLogicalSize = Application::GetDefaultDevice()->PixelToLogic(aLogicalSize, aMapModes.back()); } else { - aLogicalSize = OutputDevice::LogicToLogic(aLogicalSize, rBitmap.GetPrefMapMode(), aMapModes.back().GetMapUnit()); + aLogicalSize = OutputDevice::LogicToLogic(aLogicalSize, rBitmap.GetPrefMapMode(), aMapModes.back()); } bDone = handleBitmapContent( diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index a2310de9b564..a7c691fc1863 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -420,7 +420,7 @@ bool GDIMetaFile::ImplPlayWithRenderer( OutputDevice* pOut, const Point& rPos, S BitmapEx aBitmapEx; if( aBitmapEx.Create( xBitmapCanvas, aSize ) ) { - if ( pOut->GetMapMode() == MapUnit::MapPixel ) + if (pOut->GetMapMode().GetMapUnit() == MapUnit::MapPixel) pOut->DrawBitmapEx( rPos, aBitmapEx ); else pOut->DrawBitmapEx( rPos, rLogicDestSize, aBitmapEx ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 9d8833683f34..d60a4f2cf0a2 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -416,7 +416,8 @@ basegfx::B2DSize Graphic::GetPPI() const } else { - const Size aGrf1000thInchSize = OutputDevice::LogicToLogic(aGrfPrefMapModeSize, aGrfMap, MapUnit::Map1000thInch); + const Size aGrf1000thInchSize = OutputDevice::LogicToLogic( + aGrfPrefMapModeSize, aGrfMap, MapMode(MapUnit::Map1000thInch)); nGrfDPIx = 1000.0 * aGrfPixelSize.Width() / aGrf1000thInchSize.Width(); nGrfDPIy = 1000.0 * aGrfPixelSize.Height() / aGrf1000thInchSize.Height(); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d671c43b6e51..3e3525162845 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2201,7 +2201,7 @@ OutputDevice* PDFWriterImpl::getReferenceDevice() pVDev->SetReferenceDevice( m_aContext.DPIx, m_aContext.DPIy ); pVDev->SetOutputSizePixel( Size( 640, 480 ) ); - pVDev->SetMapMode( MapUnit::MapMM ); + pVDev->SetMapMode(MapMode(MapUnit::MapMM)); m_pReferenceDevice->mpPDFWriter = this; m_pReferenceDevice->ImplUpdateFontData(); diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index 632e526c9471..dc47a65b6554 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -107,7 +107,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz if( i_rContext.m_nMaxImageResolution > 50 ) { // do downsampling if necessary - const Size aDstSizeTwip( i_pDummyVDev->PixelToLogic( i_pDummyVDev->LogicToPixel( aSize ), MapUnit::MapTwip ) ); + const Size aDstSizeTwip( i_pDummyVDev->PixelToLogic(i_pDummyVDev->LogicToPixel(aSize), MapMode(MapUnit::MapTwip)) ); const Size aBmpSize( aBitmapEx.GetSizePixel() ); const double fBmpPixelX = aBmpSize.Width(); const double fBmpPixelY = aBmpSize.Height(); @@ -425,7 +425,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa } else { - const Size aDstSizeTwip( pDummyVDev->PixelToLogic( pDummyVDev->LogicToPixel( rSize ), MapUnit::MapTwip ) ); + const Size aDstSizeTwip( pDummyVDev->PixelToLogic(pDummyVDev->LogicToPixel(rSize), MapMode(MapUnit::MapTwip)) ); // i#115962# Always use at least 300 DPI for bitmap conversion of transparence gradients, // else the quality is not acceptable (see bugdoc as example) diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index 8dde053a7d82..0752d52ff6f7 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -436,7 +436,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint ) if ( mbpHYs && maPhysSize.Width() && maPhysSize.Height() ) { - aRet.SetPrefMapMode( MapUnit::Map100thMM ); + aRet.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); aRet.SetPrefSize( maPhysSize ); } } diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index ab15754724f4..072e74d62530 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -355,7 +355,7 @@ void PNGWriterImpl::ImplWriteTransparent() void PNGWriterImpl::ImplWritepHYs(const BitmapEx& rBmpEx) { - if (rBmpEx.GetPrefMapMode() == MapUnit::Map100thMM) + if (rBmpEx.GetPrefMapMode().GetMapUnit() == MapUnit::Map100thMM) { Size aPrefSize(rBmpEx.GetPrefSize()); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 5ac8a2a8d957..55f4b3fa3be9 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -241,7 +241,7 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly, mpAlphaVDev = pOldAlphaVDev; tools::Rectangle aPolyRect( LogicToPixel( rPolyPoly ).GetBoundRect() ); - const Size aDPISize( LogicToPixel( Size( 1, 1 ), MapUnit::MapInch ) ); + const Size aDPISize( LogicToPixel(Size(1, 1), MapMode(MapUnit::MapInch)) ); const long nBaseExtent = std::max( FRound( aDPISize.Width() / 300. ), 1L ); long nMove; const sal_uInt16 nTrans = ( nTransparencePercent < 13 ) ? 0 : @@ -1429,7 +1429,7 @@ bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) return false; const Size aPixSize = LogicToPixel( rSize ); - const Size aPageSize = PixelToLogic( aPixSize, MapUnit::Map100thMM ); + const Size aPageSize = PixelToLogic(aPixSize, MapMode(MapUnit::Map100thMM)); bool bNeedToChange(maJobSetup.ImplGetConstData().GetPaperWidth() != aPageSize.Width() || maJobSetup.ImplGetConstData().GetPaperHeight() != aPageSize.Height()); @@ -1518,7 +1518,7 @@ OUString Printer::GetPaperName( Paper ePaper ) OUString Printer::GetPaperName() const { - Size aPageSize = PixelToLogic( GetPaperSizePixel(), MapUnit::Map100thMM ); + Size aPageSize = PixelToLogic( GetPaperSizePixel(), MapMode(MapUnit::Map100thMM)); Paper ePaper = ImplGetPaperFormat( aPageSize.Width(), aPageSize.Height() ); if( ePaper == PAPER_USER ) ePaper = ImplGetPaperFormat( aPageSize.Height(), aPageSize.Width() ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 26d8f5fd2141..4a8006b2a8b6 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1282,7 +1282,7 @@ void PrinterController::printFilteredPage( int i_nPage ) } // in N-Up printing set the correct page size - mpImplData->mxPrinter->SetMapMode( MapUnit::Map100thMM ); + mpImplData->mxPrinter->SetMapMode(MapMode(MapUnit::Map100thMM)); // aPageSize was filtered through mpImplData->getRealPaperSize already by getFilteredPageFile() mpImplData->mxPrinter->SetPaperSizeUser( aPageSize.aSize, ! mpImplData->isFixedPageSize() ); if( mpImplData->mnFixedPaperBin != -1 && diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx index 8623cd0c6935..f533e84c0ba1 100644 --- a/vcl/source/gdi/textlayout.cxx +++ b/vcl/source/gdi/textlayout.cxx @@ -133,14 +133,14 @@ namespace vcl // now that the Zoom is part of the map mode, reset the target device's font to the "unzoomed" version Font aDrawFont( m_aUnzoomedPointFont ); - aDrawFont.SetFontSize( OutputDevice::LogicToLogic( aDrawFont.GetFontSize(), MapUnit::MapPoint, eTargetMapUnit ) ); + aDrawFont.SetFontSize( OutputDevice::LogicToLogic(aDrawFont.GetFontSize(), MapMode(MapUnit::MapPoint), MapMode(eTargetMapUnit)) ); _rTargetDevice.SetFont( aDrawFont ); // transfer font to the reference device m_rReferenceDevice.Push( PushFlags::FONT | PushFlags::TEXTLAYOUTMODE ); Font aRefFont( m_aUnzoomedPointFont ); aRefFont.SetFontSize( OutputDevice::LogicToLogic( - aRefFont.GetFontSize(), MapUnit::MapPoint, m_rReferenceDevice.GetMapMode().GetMapUnit() ) ); + aRefFont.GetFontSize(), MapMode(MapUnit::MapPoint), m_rReferenceDevice.GetMapMode()) ); m_rReferenceDevice.SetFont( aRefFont ); } diff --git a/vcl/source/gdi/vectorgraphicdata.cxx b/vcl/source/gdi/vectorgraphicdata.cxx index d5d66f80c440..48d6ecf65286 100644 --- a/vcl/source/gdi/vectorgraphicdata.cxx +++ b/vcl/source/gdi/vectorgraphicdata.cxx @@ -59,7 +59,7 @@ BitmapEx convertPrimitive2DSequenceToBitmapEx( aRealRect.Y2 = rTargetRange.getMaxY(); // get system DPI - const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MapUnit::MapInch)); + const Size aDPI(Application::GetDefaultDevice()->LogicToPixel(Size(1, 1), MapMode(MapUnit::MapInch))); const uno::Reference< rendering::XBitmap > xBitmap( xPrimitive2DRenderer->rasterize( |