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 | |
parent | 04a8ba2084950f998d791edad29739c124c8c4b8 (diff) |
convert Orientation to scoped enum
Change-Id: Ifbfcf3557ca2a16d21e7a1d613ee54c1c6625f07
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpprn.cxx | 2 | ||||
-rw-r--r-- | vcl/osx/salprn.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/jobset.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 10 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/genprnpsp.cxx | 4 | ||||
-rw-r--r-- | vcl/win/gdi/salprn.cxx | 6 |
7 files changed, 21 insertions, 21 deletions
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx index c5c8ea550d2b..35946f283b48 100644 --- a/vcl/headless/svpprn.cxx +++ b/vcl/headless/svpprn.cxx @@ -60,7 +60,7 @@ inline int PtTo10Mu( int nPoints ) { return (int)((((double)nPoints)*35.27777778 static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { - pJobSetup->SetOrientation( (Orientation)(rData.m_eOrientation == orientation::Landscape ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT) ); + pJobSetup->SetOrientation( (Orientation)(rData.m_eOrientation == orientation::Landscape ? Orientation::Landscape : Orientation::Portrait) ); // copy page size OUString aPaper; 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; diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 6424eaacafc3..0fc9a7cecb74 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -52,7 +52,7 @@ struct Impl364JobSetupData ImplJobSetup::ImplJobSetup() { mnSystem = 0; - meOrientation = ORIENTATION_PORTRAIT; + meOrientation = Orientation::Portrait; meDuplexMode = DUPLEX_UNKNOWN; mnPaperBin = 0; mePaperFormat = PAPER_USER; diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index d2c0f87c3834..8b0aa60a055b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1322,7 +1322,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe rData.SetPaperFormat( ImplGetPaperFormat( rPaperInfo.getWidth(), rPaperInfo.getHeight() )); - rData.SetOrientation( ORIENTATION_PORTRAIT ); + rData.SetOrientation( Orientation::Portrait ); bFound = true; break; } @@ -1348,7 +1348,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe rData.SetPaperFormat( ImplGetPaperFormat( rPaperInfo.getWidth(), rPaperInfo.getHeight() )); - rData.SetOrientation( ORIENTATION_LANDSCAPE ); + rData.SetOrientation( Orientation::Landscape ); bFound = true; break; } @@ -1359,7 +1359,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe { sal_Int64 nBestMatch = SAL_MAX_INT64; int nBestIndex = 0; - Orientation eBestOrientation = ORIENTATION_PORTRAIT; + Orientation eBestOrientation = Orientation::Portrait; for( int i = 0; i < nPaperCount; i++ ) { const PaperInfo& rPaperInfo = GetPaperInfo( i ); @@ -1372,7 +1372,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe { nBestMatch = nMatch; nBestIndex = i; - eBestOrientation = ORIENTATION_PORTRAIT; + eBestOrientation = Orientation::Portrait; } // check landscape match @@ -1383,7 +1383,7 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe { nBestMatch = nMatch; nBestIndex = i; - eBestOrientation = ORIENTATION_LANDSCAPE; + eBestOrientation = Orientation::Landscape; } } const PaperInfo& rBestInfo = GetPaperInfo( nBestIndex ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 258df1778a59..0ddf2f6c4570 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -654,7 +654,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC // setup sizes for N-Up Size aNupSize( maPController->getPrinter()->PixelToLogic( maPController->getPrinter()->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) ); - if( maPController->getPrinter()->GetOrientation() == ORIENTATION_LANDSCAPE ) + if( maPController->getPrinter()->GetOrientation() == Orientation::Landscape ) { maNupLandscapeSize = aNupSize; maNupPortraitSize = Size( aNupSize.Height(), aNupSize.Width() ); diff --git a/vcl/unx/generic/print/genprnpsp.cxx b/vcl/unx/generic/print/genprnpsp.cxx index e9b9d87e6884..573518ed7868 100644 --- a/vcl/unx/generic/print/genprnpsp.cxx +++ b/vcl/unx/generic/print/genprnpsp.cxx @@ -156,7 +156,7 @@ inline int TenMuToPt( int nUnits ) { return (int)((((double)nUnits)/35.27777778) static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData ) { pJobSetup->SetOrientation( (Orientation)(rData.m_eOrientation == orientation::Landscape ? - ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT)); + Orientation::Landscape : Orientation::Portrait)); // copy page size OUString aPaper; @@ -668,7 +668,7 @@ bool PspSalInfoPrinter::SetData( // merge orientation if necessary if( nSetDataFlags & JobSetFlags::ORIENTATION ) - aData.m_eOrientation = pJobSetup->GetOrientation() == ORIENTATION_LANDSCAPE ? orientation::Landscape : orientation::Portrait; + aData.m_eOrientation = pJobSetup->GetOrientation() == Orientation::Landscape ? orientation::Landscape : orientation::Portrait; // merge duplex if necessary if( nSetDataFlags & JobSetFlags::DUPLEXMODE ) diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx index 140ecf3a8cd5..3ec4097d067d 100644 --- a/vcl/win/gdi/salprn.cxx +++ b/vcl/win/gdi/salprn.cxx @@ -466,9 +466,9 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS if ( nFlags & JobSetFlags::ORIENTATION ) { if ( CHOOSE_DEVMODE(dmOrientation) == DMORIENT_PORTRAIT ) - pSetupData->SetOrientation( ORIENTATION_PORTRAIT ); + pSetupData->SetOrientation( Orientation::Portrait ); else if ( CHOOSE_DEVMODE(dmOrientation) == DMORIENT_LANDSCAPE ) - pSetupData->SetOrientation( ORIENTATION_LANDSCAPE ); + pSetupData->SetOrientation( Orientation::Landscape ); } // PaperBin @@ -732,7 +732,7 @@ static void ImplJobSetupToDevMode( WinSalInfoPrinter* pPrinter, const ImplJobSet if ( nFlags & JobSetFlags::ORIENTATION ) { CHOOSE_DEVMODE(dmFields) |= DM_ORIENTATION; - if ( pSetupData->GetOrientation() == ORIENTATION_PORTRAIT ) + if ( pSetupData->GetOrientation() == Orientation::Portrait ) CHOOSE_DEVMODE(dmOrientation) = DMORIENT_PORTRAIT; else CHOOSE_DEVMODE(dmOrientation) = DMORIENT_LANDSCAPE; |