diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-20 16:41:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-05 06:51:20 +0000 |
commit | 954f752cf10fc6a8777af2a6a93e496688464687 (patch) | |
tree | 0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /sd/source/ui/tools/PreviewRenderer.cxx | |
parent | merge dbaccess::StorageInputStream with dbaccess::StorageXMLInputStream (diff) | |
download | core-954f752cf10fc6a8777af2a6a93e496688464687.tar.gz core-954f752cf10fc6a8777af2a6a93e496688464687.zip |
convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"
And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.
Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/tools/PreviewRenderer.cxx')
-rw-r--r-- | sd/source/ui/tools/PreviewRenderer.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index d4b8aca487cf..8a2cf3f8d3d7 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -160,7 +160,7 @@ Image PreviewRenderer::RenderSubstitution ( // Set a map mode that makes a typical substitution text completely // visible. MapMode aMapMode (mpPreviewDevice->GetMapMode()); - aMapMode.SetMapUnit(MAP_100TH_MM); + aMapMode.SetMapUnit(MapUnit::Map100thMM); Fraction aFinalScale(25 * rPreviewPixelSize.Width(), 28000); aMapMode.SetScaleX(aFinalScale); aMapMode.SetScaleY(aFinalScale); @@ -365,7 +365,7 @@ void PreviewRenderer::SetupOutputSize ( // First set the map mode to some arbitrary scale that is numerically // stable. MapMode aMapMode (mpPreviewDevice->GetMapMode()); - aMapMode.SetMapUnit(MAP_PIXEL); + aMapMode.SetMapUnit(MapUnit::MapPixel); // Adapt it to the desired width. const Size aPageModelSize (rPage.GetSize()); @@ -449,7 +449,7 @@ Image PreviewRenderer::ScaleBitmap ( (long)((nWidth*1.0 * aSize.Height()) / aSize.Width() + 0.5)); Size aPreviewSize (aFrameSize.Width()-2,aFrameSize.Height()-2); MapMode aMapMode (mpPreviewDevice->GetMapMode()); - aMapMode.SetMapUnit(MAP_PIXEL); + aMapMode.SetMapUnit(MapUnit::MapPixel); aMapMode.SetOrigin (Point()); aMapMode.SetScaleX (1.0); aMapMode.SetScaleY (1.0); |