summaryrefslogtreecommitdiff
path: root/vcl/source/filter/graphicfilter2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-09-20 16:41:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-05 06:51:20 +0000
commit954f752cf10fc6a8777af2a6a93e496688464687 (patch)
tree0fc776cdcb6ad9b1d2b9673ac044bb5b4f496972 /vcl/source/filter/graphicfilter2.cxx
parentc1e18e05a53c1d55afe36a887ca25f74f3f1d32d (diff)
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 'vcl/source/filter/graphicfilter2.cxx')
-rw-r--r--vcl/source/filter/graphicfilter2.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 4e57a0172980..66c83e9cfc92 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -335,10 +335,10 @@ bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo )
if ( nUnits && nHorizontalResolution && nVerticalResolution )
{
MapMode aMap;
- aMap.SetMapUnit( nUnits == 1 ? MAP_INCH : MAP_CM );
+ aMap.SetMapUnit( nUnits == 1 ? MapUnit::MapInch : MapUnit::MapCM );
aMap.SetScaleX( Fraction( 1, nHorizontalResolution ) );
aMap.SetScaleY( Fraction( 1, nVerticalResolution ) );
- aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MAP_100TH_MM ) );
+ aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap, MapMode( MapUnit::Map100thMM ) );
}
}
}
@@ -490,10 +490,10 @@ bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo )
nDPIy = nTemp16;
// set logical size
- MapMode aMap( MAP_INCH, Point(),
+ MapMode aMap( MapUnit::MapInch, Point(),
Fraction( 1, nDPIx ), Fraction( 1, nDPIy ) );
aLogSize = OutputDevice::LogicToLogic( aPixSize, aMap,
- MapMode( MAP_100TH_MM ) );
+ MapMode( MapUnit::Map100thMM ) );
// number of color planes
cByte = 5; // Illegal value in case of EOF.
@@ -1035,7 +1035,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo )
rStm.ReadUInt16( nTemp16 );
aLogSize = OutputDevice::LogicToLogic( aLogSize,
MapMode( (MapUnit) nTemp16 ),
- MapMode( MAP_100TH_MM ) );
+ MapMode( MapUnit::Map100thMM ) );
}
}
}
@@ -1063,7 +1063,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo )
rStm.SeekRel( 0x06 );
ReadMapMode( rStm, aMapMode );
ReadPair( rStm, aLogSize );
- aLogSize = OutputDevice::LogicToLogic( aLogSize, aMapMode, MapMode( MAP_100TH_MM ) );
+ aLogSize = OutputDevice::LogicToLogic( aLogSize, aMapMode, MapMode( MapUnit::Map100thMM ) );
}
}
}