diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-04 12:02:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-09-05 08:21:46 +0200 |
commit | 87ee6c044d79978d2121087f5e1a10f417adf9c7 (patch) | |
tree | 5b1747d9d625da42a47c3ff0635f0124de0cd511 /vcl/osx/salprn.cxx | |
parent | 04a8ba2084950f998d791edad29739c124c8c4b8 (diff) |
convert Orientation to scoped enum
Change-Id: Ifbfcf3557ca2a16d21e7a1d613ee54c1c6625f07
Diffstat (limited to 'vcl/osx/salprn.cxx')
-rw-r--r-- | vcl/osx/salprn.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/osx/salprn.cxx b/vcl/osx/salprn.cxx index d151f6cf6890..fa2f88b13c61 100644 --- a/vcl/osx/salprn.cxx +++ b/vcl/osx/salprn.cxx @@ -49,7 +49,7 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : mbJob( false ), mpPrinter( nil ), mpPrintInfo( nil ), - mePageOrientation( ORIENTATION_PORTRAIT ), + mePageOrientation( Orientation::Portrait ), mnStartPageOffsetX( 0 ), mnStartPageOffsetY( 0 ), mnCurPageRangeStart( 0 ), @@ -65,10 +65,10 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : mpPrintInfo = [pShared copy]; [mpPrintInfo setPrinter: mpPrinter]; #if MACOSX_SDK_VERSION >= 1090 - mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationPortrait) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT; + mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationPortrait) ? Orientation::Landscape : Orientation::Portrait; [mpPrintInfo setOrientation: NSPaperOrientationPortrait]; #else - mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT; + mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? Orientation::Landscape : Orientation::Portrait; [mpPrintInfo setOrientation: NSPortraitOrientation]; #endif } @@ -109,7 +109,7 @@ void AquaSalInfoPrinter::SetupPrinterGraphics( CGContextRef i_rContext ) const NSSize aPaperSize = [mpPrintInfo paperSize]; NSRect aImageRect = [mpPrintInfo imageablePageBounds]; - if( mePageOrientation == ORIENTATION_PORTRAIT ) + if( mePageOrientation == Orientation::Portrait ) { // move mirrored CTM back into paper double dX = 0, dY = aPaperSize.height; @@ -205,7 +205,7 @@ bool AquaSalInfoPrinter::SetPrinterData( ImplJobSetup* io_pSetupData ) void AquaSalInfoPrinter::setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation ) { - Orientation ePaperOrientation = ORIENTATION_PORTRAIT; + Orientation ePaperOrientation = Orientation::Portrait; const PaperInfo* pPaper = matchPaper( i_nWidth, i_nHeight, ePaperOrientation ); if( pPaper ) @@ -323,7 +323,7 @@ void AquaSalInfoPrinter::GetPageInfo( const ImplJobSetup*, o_rOutWidth = static_cast<long>( aImageRect.size.width * fXScaling ); o_rOutHeight = static_cast<long>( aImageRect.size.height * fYScaling ); - if( mePageOrientation == ORIENTATION_LANDSCAPE ) + if( mePageOrientation == Orientation::Landscape ) { std::swap( o_rOutWidth, o_rOutHeight ); std::swap( o_rPageWidth, o_rPageHeight ); @@ -669,7 +669,7 @@ const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight, const_cast<AquaSalInfoPrinter*>(this)->InitPaperFormats( nullptr ); const PaperInfo* pMatch = nullptr; - o_rOrientation = ORIENTATION_PORTRAIT; + o_rOrientation = Orientation::Portrait; for( int n = 0; n < 2 ; n++ ) { for( size_t i = 0; i < m_aPaperFormats.size(); i++ ) @@ -681,7 +681,7 @@ const PaperInfo* AquaSalInfoPrinter::matchPaper( long i_nWidth, long i_nHeight, return pMatch; } } - o_rOrientation = ORIENTATION_LANDSCAPE; + o_rOrientation = Orientation::Landscape; std::swap( i_nWidth, i_nHeight ); } return pMatch; |