diff options
Diffstat (limited to 'vcl/source/filter')
-rw-r--r-- | vcl/source/filter/graphicfilter.cxx | 16 | ||||
-rw-r--r-- | vcl/source/filter/graphicfilter2.cxx | 12 | ||||
-rw-r--r-- | vcl/source/filter/igif/gifread.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/jpeg/JpegReader.cxx | 6 | ||||
-rw-r--r-- | vcl/source/filter/sgfbram.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/sgvmain.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/sgvtext.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/wmf/emfwr.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winmtf.cxx | 8 | ||||
-rw-r--r-- | vcl/source/filter/wmf/winwmf.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/wmf/wmfwr.cxx | 6 |
11 files changed, 32 insertions, 32 deletions
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index dba350de110a..379b8c5a8ff2 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -846,10 +846,10 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r Size aOriginalSize; Size aPrefSize( rGraphic.GetPrefSize() ); MapMode aPrefMapMode( rGraphic.GetPrefMapMode() ); - if ( aPrefMapMode == MAP_PIXEL ) - aOriginalSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MAP_100TH_MM ); + if ( aPrefMapMode == MapUnit::MapPixel ) + aOriginalSize = Application::GetDefaultDevice()->PixelToLogic( aPrefSize, MapUnit::Map100thMM ); else - aOriginalSize = OutputDevice::LogicToLogic( aPrefSize, aPrefMapMode, MAP_100TH_MM ); + aOriginalSize = OutputDevice::LogicToLogic( aPrefSize, aPrefMapMode, MapUnit::Map100thMM ); if ( !nLogicalWidth ) nLogicalWidth = aOriginalSize.Width(); if ( !nLogicalHeight ) @@ -861,7 +861,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r if( nMode == 1 ) { Bitmap aBitmap( rGraphic.GetBitmap() ); - MapMode aMap( MAP_100TH_INCH ); + MapMode aMap( MapUnit::Map100thInch ); sal_Int32 nDPI = rConfigItem.ReadInt32( "Resolution", 75 ); Fraction aFrac( 1, std::min( std::max( nDPI, sal_Int32( 75 ) ), sal_Int32( 600 ) ) ); @@ -879,7 +879,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r else if( nMode == 2 ) { aGraphic = rGraphic; - aGraphic.SetPrefMapMode( MapMode( MAP_100TH_MM ) ); + aGraphic.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) ); aGraphic.SetPrefSize( Size( nLogicalWidth, nLogicalHeight ) ); } else @@ -898,7 +898,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r if( ( nMode == 1 ) || ( nMode == 2 ) ) { GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() ); - Size aNewSize( OutputDevice::LogicToLogic( Size( nLogicalWidth, nLogicalHeight ), MAP_100TH_MM, aMtf.GetPrefMapMode() ) ); + Size aNewSize( OutputDevice::LogicToLogic( Size( nLogicalWidth, nLogicalHeight ), MapUnit::Map100thMM, aMtf.GetPrefMapMode() ) ); if( aNewSize.Width() && aNewSize.Height() ) { @@ -1916,11 +1916,11 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString aSizePixel.Height()=(sal_uLong)(((double)aSizePixel.Height())*fFak); } - aVirDev->SetMapMode(MapMode(MAP_PIXEL)); + aVirDev->SetMapMode(MapMode(MapUnit::MapPixel)); aVirDev->SetOutputSizePixel(aSizePixel); Graphic aGraphic2=aGraphic; aGraphic2.Draw(aVirDev.get(),Point(0,0),aSizePixel); // this changes the MapMode - aVirDev->SetMapMode(MapMode(MAP_PIXEL)); + aVirDev->SetMapMode(MapMode(MapUnit::MapPixel)); aGraphic=Graphic(aVirDev->GetBitmap(Point(0,0),aSizePixel)); } } 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 ) ); } } } diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 7b9ac2ab799c..bc739efa9ba1 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -874,7 +874,7 @@ ReadState GIFReader::ReadGIF( Graphic& rGraphic ) if( nLogWidth100 && nLogHeight100 ) { rGraphic.SetPrefSize( Size( nLogWidth100, nLogHeight100 ) ); - rGraphic.SetPrefMapMode( MAP_100TH_MM ); + rGraphic.SetPrefMapMode( MapUnit::Map100thMM ); } } else diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index b1582d8da2b6..cde54c49dbde 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -227,11 +227,11 @@ bool JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam) Point aEmptyPoint; Fraction aFractX( 1, rParam.X_density ); Fraction aFractY( 1, rParam.Y_density ); - MapMode aMapMode( nUnit == 1 ? MAP_INCH : MAP_CM, aEmptyPoint, aFractX, aFractY ); - Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MAP_100TH_MM ); + MapMode aMapMode( nUnit == 1 ? MapUnit::MapInch : MapUnit::MapCM, aEmptyPoint, aFractX, aFractY ); + Size aPrefSize = OutputDevice::LogicToLogic( aSize, aMapMode, MapUnit::Map100thMM ); maBitmap.SetPrefSize(aPrefSize); - maBitmap.SetPrefMapMode(MapMode(MAP_100TH_MM)); + maBitmap.SetPrefMapMode(MapMode(MapUnit::Map100thMM)); } } diff --git a/vcl/source/filter/sgfbram.cxx b/vcl/source/filter/sgfbram.cxx index a2a51200a543..468c18cf52dc 100644 --- a/vcl/source/filter/sgfbram.cxx +++ b/vcl/source/filter/sgfbram.cxx @@ -433,7 +433,7 @@ bool SgfFilterVect(SvStream& rInp, SgfHeader& rHead, SgfEntry&, GDIMetaFile& rMt } rMtf.Stop(); rMtf.WindStart(); - MapMode aMap( MAP_10TH_MM, Point(), + MapMode aMap( MapUnit::Map10thMM, Point(), Fraction( 1, 4 ), Fraction( 1, 4 ) ); rMtf.SetPrefMapMode( aMap ); rMtf.SetPrefSize( Size( (short)rHead.Xsize, (short)rHead.Ysize ) ); diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index c4f474f043b5..cc0207513233 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -899,7 +899,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) rMtf.Stop(); rMtf.WindStart(); - MapMode aMap(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4)); + MapMode aMap(MapUnit::Map10thMM,Point(),Fraction(1,4),Fraction(1,4)); rMtf.SetPrefMapMode(aMap); rMtf.SetPrefSize(Size((sal_Int16)aPage.Paper.Size.x,(sal_Int16)aPage.Paper.Size.y)); bRet=true; diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index c062c50474ff..404dd4206c9b 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -681,7 +681,7 @@ void FormatLine(UCHAR* TBuf, sal_uInt16& Index, ObjTextType& Atr0, ObjTextType& sal_uInt16 i,j,k,h; sal_uInt16 re,li; - vOut->SetMapMode(MapMode(MAP_10TH_MM,Point(),Fraction(1,4),Fraction(1,4))); + vOut->SetMapMode(MapMode(MapUnit::Map10thMM,Point(),Fraction(1,4),Fraction(1,4))); nChars=0; SetTextContext(*vOut.get(),AktAtr,false,0,1,1,1,1); diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index b13f4459af5d..dda3d56f7db8 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -243,7 +243,7 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf) maVDev->EnableOutput( false ); maVDev->SetMapMode( rMtf.GetPrefMapMode() ); // don't work with pixel as destination map mode -> higher resolution preferable - maDestMapMode.SetMapUnit( MAP_100TH_MM ); + maDestMapMode.SetMapUnit( MapUnit::Map100thMM ); mHandlesUsed = std::vector<bool>(MAXHANDLES, false); mnHandleCount = mnRecordCount = mnRecordPos = mnRecordPlusPos = 0; mbRecordOpen = mbRecordPlusOpen = false; @@ -252,7 +252,7 @@ bool EMFWriter::WriteEMF(const GDIMetaFile& rMtf) mnHorTextAlign = 0; const Size aMtfSizePix( maVDev->LogicToPixel( rMtf.GetPrefSize(), rMtf.GetPrefMapMode() ) ); - const Size aMtfSizeLog( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MAP_100TH_MM ) ); + const Size aMtfSizeLog( OutputDevice::LogicToLogic( rMtf.GetPrefSize(), rMtf.GetPrefMapMode(), MapUnit::Map100thMM ) ); // seek over header // use [MS-EMF 2.2.11] HeaderExtension2 Object, otherwise resulting EMF cannot be converted with GetWinMetaFileBits() diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index b6d7d76ba682..fba68a2b467e 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -871,7 +871,7 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : WinMtfOutput::~WinMtfOutput() { mpGDIMetaFile->AddAction( new MetaPopAction() ); - mpGDIMetaFile->SetPrefMapMode( MAP_100TH_MM ); + mpGDIMetaFile->SetPrefMapMode( MapUnit::Map100thMM ); if ( mrclFrame.IsEmpty() ) mpGDIMetaFile->SetPrefSize( Size( mnDevWidth, mnDevHeight ) ); else @@ -1458,7 +1458,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b SolarMutexGuard aGuard; ScopedVclPtrInstance< VirtualDevice > pVDev; sal_Int32 nTextWidth; - pVDev->SetMapMode( MapMode( MAP_100TH_MM ) ); + pVDev->SetMapMode( MapMode( MapUnit::Map100thMM ) ); pVDev->SetFont( maFont ); if( pDXArry ) { @@ -1506,7 +1506,7 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, long* pDXArry, b SolarMutexGuard aGuard; ScopedVclPtrInstance< VirtualDevice > pVDev; pDX = new long[ rText.getLength() ]; - pVDev->SetMapMode( MAP_100TH_MM ); + pVDev->SetMapMode( MapUnit::Map100thMM ); pVDev->SetFont( maLatestFont ); pVDev->GetTextArray( rText, pDX, 0, rText.getLength()); } @@ -1523,7 +1523,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B if ( mbComplexClip ) { VclPtrInstance< VirtualDevice > pVDev; - MapMode aMapMode( MAP_100TH_MM ); + MapMode aMapMode( MapUnit::Map100thMM ); aMapMode.SetOrigin( Point( -rPos.X(), -rPos.Y() ) ); const Size aOutputSizePixel( pVDev->LogicToPixel( rSize, aMapMode ) ); const Size aSizePixel( rBitmap.GetSizePixel() ); diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index bb56e7c91ed5..f1b907f8f1c4 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -1256,8 +1256,8 @@ bool WMFReader::ReadHeader() if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) ) { const Fraction aFrac( 1, nUnitsPerInch ); - MapMode aWMFMap( MAP_INCH, Point(), aFrac, aFrac ); - Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MAP_100TH_MM ) ); + MapMode aWMFMap( MapUnit::MapInch, Point(), aFrac, aFrac ); + Size aSize100( OutputDevice::LogicToLogic( aWMFSize, aWMFMap, MapUnit::Map100thMM ) ); aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) ); } pOut->SetDevExt( aDevExt ); diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx index 7973b4368be1..3d8bb911df40 100644 --- a/vcl/source/filter/wmf/wmfwr.cxx +++ b/vcl/source/filter/wmf/wmfwr.cxx @@ -1400,7 +1400,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF ) if (aSrcMapMode!=pA->GetMapMode()) { - if( pA->GetMapMode().GetMapUnit() == MAP_RELATIVE ) + if( pA->GetMapMode().GetMapUnit() == MapUnit::MapRelative ) { MapMode aMM = pA->GetMapMode(); Fraction aScaleX = aMM.GetScaleX(); @@ -1637,7 +1637,7 @@ void WMFWriter::WriteHeader( const GDIMetaFile &, bool bPlaceable ) if( bPlaceable ) { sal_uInt16 nCheckSum, nValue; - Size aSize( OutputDevice::LogicToLogic(Size(1,1),MapMode(MAP_INCH), aTargetMapMode) ); + Size aSize( OutputDevice::LogicToLogic(Size(1,1),MapMode(MapUnit::MapInch), aTargetMapMode) ); sal_uInt16 nUnitsPerInch = (sal_uInt16) ( ( aSize.Width() + aSize.Height() ) >> 1 ); nCheckSum=0; @@ -1721,7 +1721,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream, } else { - aTargetMapMode = MapMode( MAP_INCH ); + aTargetMapMode = MapMode( MapUnit::MapInch ); const long nUnit = pVirDev->LogicToPixel( Size( 1, 1 ), aTargetMapMode ).Width(); const Fraction aFrac( 1, nUnit ); |