diff options
-rw-r--r-- | include/vcl/print.hxx | 20 | ||||
-rw-r--r-- | sfx2/source/dialog/printopt.cxx | 16 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print2.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 8 |
5 files changed, 26 insertions, 26 deletions
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index fcb11bc9d115..ff2f7b2ff3aa 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -85,25 +85,25 @@ public: }; -enum PrinterTransparencyMode +enum class PrinterTransparencyMode { - PRINTER_TRANSPARENCY_AUTO = 0, - PRINTER_TRANSPARENCY_NONE = 1 + Auto = 0, + NONE = 1 }; -enum PrinterGradientMode +enum class PrinterGradientMode { - PRINTER_GRADIENT_STRIPES = 0, - PRINTER_GRADIENT_COLOR = 1 + Stripes = 0, + Color = 1 }; -enum PrinterBitmapMode +enum class PrinterBitmapMode { - PRINTER_BITMAP_OPTIMAL = 0, - PRINTER_BITMAP_NORMAL = 1, - PRINTER_BITMAP_RESOLUTION = 2 + Optimal = 0, + Normal = 1, + Resolution = 2 }; diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 9ae649655c24..fd42d4a80e02 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -197,14 +197,14 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu { m_pReduceTransparencyCB->Check( pCurrentOptions->IsReduceTransparency() ); - if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO ) + if( pCurrentOptions->GetReducedTransparencyMode() == PrinterTransparencyMode::Auto ) m_pReduceTransparencyAutoRB->Check(); else m_pReduceTransparencyNoneRB->Check( ); m_pReduceGradientsCB->Check( pCurrentOptions->IsReduceGradients() ); - if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES ) + if( pCurrentOptions->GetReducedGradientMode() == PrinterGradientMode::Stripes ) m_pReduceGradientsStripesRB->Check(); else m_pReduceGradientsColorRB->Check(); @@ -213,9 +213,9 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu m_pReduceBitmapsCB->Check( pCurrentOptions->IsReduceBitmaps() ); - if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL ) + if( pCurrentOptions->GetReducedBitmapMode() == PrinterBitmapMode::Optimal ) m_pReduceBitmapsOptimalRB->Check(); - else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL ) + else if( pCurrentOptions->GetReducedBitmapMode() == PrinterBitmapMode::Normal ) m_pReduceBitmapsNormalRB->Check(); else m_pReduceBitmapsResolutionRB->Check(); @@ -250,13 +250,13 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu void SfxCommonPrintOptionsTabPage::ImplSaveControls( PrinterOptions* pCurrentOptions ) { pCurrentOptions->SetReduceTransparency( m_pReduceTransparencyCB->IsChecked() ); - pCurrentOptions->SetReducedTransparencyMode( m_pReduceTransparencyAutoRB->IsChecked() ? PRINTER_TRANSPARENCY_AUTO : PRINTER_TRANSPARENCY_NONE ); + pCurrentOptions->SetReducedTransparencyMode( m_pReduceTransparencyAutoRB->IsChecked() ? PrinterTransparencyMode::Auto : PrinterTransparencyMode::NONE ); pCurrentOptions->SetReduceGradients( m_pReduceGradientsCB->IsChecked() ); - pCurrentOptions->SetReducedGradientMode( m_pReduceGradientsStripesRB->IsChecked() ? PRINTER_GRADIENT_STRIPES : PRINTER_GRADIENT_COLOR ); + pCurrentOptions->SetReducedGradientMode( m_pReduceGradientsStripesRB->IsChecked() ? PrinterGradientMode::Stripes : PrinterGradientMode::Color ); pCurrentOptions->SetReducedGradientStepCount( (sal_uInt16) m_pReduceGradientsStepCountNF->GetValue() ); pCurrentOptions->SetReduceBitmaps( m_pReduceBitmapsCB->IsChecked() ); - pCurrentOptions->SetReducedBitmapMode( m_pReduceBitmapsOptimalRB->IsChecked() ? PRINTER_BITMAP_OPTIMAL : - ( m_pReduceBitmapsNormalRB->IsChecked() ? PRINTER_BITMAP_NORMAL : PRINTER_BITMAP_RESOLUTION ) ); + pCurrentOptions->SetReducedBitmapMode( m_pReduceBitmapsOptimalRB->IsChecked() ? PrinterBitmapMode::Optimal : + ( m_pReduceBitmapsNormalRB->IsChecked() ? PrinterBitmapMode::Normal : PrinterBitmapMode::Resolution ) ); pCurrentOptions->SetReducedBitmapResolution( aDPIArray[ std::min<sal_uInt16>( m_pReduceBitmapsResolutionLB->GetSelectEntryPos(), SAL_N_ELEMENTS(aDPIArray) - 1 ) ] ); pCurrentOptions->SetReducedBitmapIncludesTransparency( m_pReduceBitmapsTransparencyCB->IsChecked() ); diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index c0cfdf590c7a..c0d016f7ba1b 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -88,12 +88,12 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup ) // PrinterOptions PrinterOptions::PrinterOptions() : mbReduceTransparency( false ), - meReducedTransparencyMode( PRINTER_TRANSPARENCY_AUTO ), + meReducedTransparencyMode( PrinterTransparencyMode::Auto ), mbReduceGradients( false ), - meReducedGradientsMode( PRINTER_GRADIENT_STRIPES ), + meReducedGradientsMode( PrinterGradientMode::Stripes ), mnReducedGradientStepCount( 64 ), mbReduceBitmaps( false ), - meReducedBitmapMode( PRINTER_BITMAP_NORMAL ), + meReducedBitmapMode( PrinterBitmapMode::Normal ), mnReducedBitmapResolution( 200 ), mbReducedBitmapsIncludeTransparency( true ), mbConvertToGreyscales( false ), diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index d7056bc897e8..c2e589d2cce0 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -1346,7 +1346,7 @@ void Printer::DrawGradientEx( OutputDevice* pOut, const Rectangle& rRect, const if( rPrinterOptions.IsReduceGradients() ) { - if( PRINTER_GRADIENT_STRIPES == rPrinterOptions.GetReducedGradientMode() ) + if( PrinterGradientMode::Stripes == rPrinterOptions.GetReducedGradientMode() ) { if( !rGradient.GetSteps() || ( rGradient.GetSteps() > rPrinterOptions.GetReducedGradientStepCount() ) ) { diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index bb8081e54320..f2e73c623fb6 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1215,12 +1215,12 @@ DrawModeFlags PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMe if( rPrinterOptions.IsReduceBitmaps() ) { // calculate maximum resolution for bitmap graphics - if( PRINTER_BITMAP_OPTIMAL == rPrinterOptions.GetReducedBitmapMode() ) + if( PrinterBitmapMode::Optimal == rPrinterOptions.GetReducedBitmapMode() ) { nMaxBmpDPIX = std::min( sal_Int32(OPTIMAL_BMP_RESOLUTION), nMaxBmpDPIX ); nMaxBmpDPIY = std::min( sal_Int32(OPTIMAL_BMP_RESOLUTION), nMaxBmpDPIY ); } - else if( PRINTER_BITMAP_NORMAL == rPrinterOptions.GetReducedBitmapMode() ) + else if( PrinterBitmapMode::Normal == rPrinterOptions.GetReducedBitmapMode() ) { nMaxBmpDPIX = std::min( sal_Int32(NORMAL_BMP_RESOLUTION), nMaxBmpDPIX ); nMaxBmpDPIY = std::min( sal_Int32(NORMAL_BMP_RESOLUTION), nMaxBmpDPIY ); @@ -1241,7 +1241,7 @@ DrawModeFlags PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMe } // disable transparency output - if( rPrinterOptions.IsReduceTransparency() && ( PRINTER_TRANSPARENCY_NONE == rPrinterOptions.GetReducedTransparencyMode() ) ) + if( rPrinterOptions.IsReduceTransparency() && ( PrinterTransparencyMode::NONE == rPrinterOptions.GetReducedTransparencyMode() ) ) { mpImplData->mxPrinter->SetDrawMode( mpImplData->mxPrinter->GetDrawMode() | DrawModeFlags::NoTransparency ); } @@ -1256,7 +1256,7 @@ DrawModeFlags PrinterController::removeTransparencies( GDIMetaFile& i_rIn, GDIMe } mpImplData->mxPrinter->RemoveTransparenciesFromMetaFile( i_rIn, o_rOut, nMaxBmpDPIX, nMaxBmpDPIY, rPrinterOptions.IsReduceTransparency(), - rPrinterOptions.GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO, + rPrinterOptions.GetReducedTransparencyMode() == PrinterTransparencyMode::Auto, rPrinterOptions.IsReduceBitmaps() && rPrinterOptions.IsReducedBitmapIncludesTransparency(), aBg ); |