diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2021-09-01 02:19:27 +1000 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-09-07 17:59:47 +0200 |
commit | 7228a2dbfa11cd846678aaacd248c68adcda5f34 (patch) | |
tree | 5a81fa7d3f225952747c2982d4a8baf2bd17817d /svtools | |
parent | b42516b433c1d71487db061a058887f6dd76dd74 (diff) |
vcl: rename PrinterOptions to vcl::printer::Options
Move Options to own source and header files. Options moved to own
source and header files, however also put Options into vcl::printer
namespace.
I have renamed and moved PrinterOptions into the vcl::printer namespace
because the word "Printer" is redundant, and we want to organize the vcl
namespace better.
Change-Id: I2ef188af381dd65907d48f7b190e4ab69417606d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121389
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/printoptions.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx index 4dd889186e6c..a81a62c3fb0f 100644 --- a/svtools/source/config/printoptions.cxx +++ b/svtools/source/config/printoptions.cxx @@ -19,6 +19,7 @@ #include <svtools/printoptions.hxx> #include <vcl/print.hxx> +#include <vcl/printer/Options.hxx> #include <officecfg/Office/Common.hxx> #include <sal/macros.h> #include <tools/diagnose_ex.h> @@ -33,19 +34,19 @@ using namespace ::com::sun::star::uno; namespace svtools { -void GetPrinterOptions( PrinterOptions& rOptions, bool bFile ) +void GetPrinterOptions( vcl::printer::Options& rOptions, bool bFile ) { if (bFile) { rOptions.SetReduceTransparency( officecfg::Office::Common::Print::Option::File::ReduceTransparency::get() ); - rOptions.SetReducedTransparencyMode( static_cast<PrinterTransparencyMode>( + rOptions.SetReducedTransparencyMode( static_cast<vcl::printer::TransparencyMode>( officecfg::Office::Common::Print::Option::File::ReducedTransparencyMode::get() ) ); rOptions.SetReduceGradients( officecfg::Office::Common::Print::Option::File::ReduceGradients::get() ); - rOptions.SetReducedGradientMode( static_cast<PrinterGradientMode>( + rOptions.SetReducedGradientMode( static_cast<vcl::printer::GradientMode>( officecfg::Office::Common::Print::Option::File::ReducedGradientMode::get()) ); rOptions.SetReducedGradientStepCount( officecfg::Office::Common::Print::Option::File::ReducedGradientStepCount::get() ); rOptions.SetReduceBitmaps( officecfg::Office::Common::Print::Option::File::ReduceBitmaps::get() ); - rOptions.SetReducedBitmapMode( static_cast<PrinterBitmapMode>( + rOptions.SetReducedBitmapMode( static_cast<vcl::printer::BitmapMode>( officecfg::Office::Common::Print::Option::File::ReducedBitmapMode::get()) ); rOptions.SetReducedBitmapResolution( aDPIArray[ std::min( static_cast<sal_uInt16>( officecfg::Office::Common::Print::Option::File::ReducedBitmapResolution::get()), sal_uInt16( DPI_COUNT - 1 ) ) ] ); @@ -57,14 +58,14 @@ void GetPrinterOptions( PrinterOptions& rOptions, bool bFile ) else { rOptions.SetReduceTransparency( officecfg::Office::Common::Print::Option::Printer::ReduceTransparency::get() ); - rOptions.SetReducedTransparencyMode( static_cast<PrinterTransparencyMode>( + rOptions.SetReducedTransparencyMode( static_cast<vcl::printer::TransparencyMode>( officecfg::Office::Common::Print::Option::Printer::ReducedTransparencyMode::get() ) ); rOptions.SetReduceGradients( officecfg::Office::Common::Print::Option::Printer::ReduceGradients::get() ); - rOptions.SetReducedGradientMode( static_cast<PrinterGradientMode>( + rOptions.SetReducedGradientMode( static_cast<vcl::printer::GradientMode>( officecfg::Office::Common::Print::Option::Printer::ReducedGradientMode::get()) ); rOptions.SetReducedGradientStepCount( officecfg::Office::Common::Print::Option::Printer::ReducedGradientStepCount::get() ); rOptions.SetReduceBitmaps( officecfg::Office::Common::Print::Option::Printer::ReduceBitmaps::get() ); - rOptions.SetReducedBitmapMode( static_cast<PrinterBitmapMode>( + rOptions.SetReducedBitmapMode( static_cast<vcl::printer::BitmapMode>( officecfg::Office::Common::Print::Option::Printer::ReducedBitmapMode::get()) ); rOptions.SetReducedBitmapResolution( aDPIArray[ std::min( static_cast<sal_uInt16>( officecfg::Office::Common::Print::Option::Printer::ReducedBitmapResolution::get()), sal_uInt16( DPI_COUNT - 1 ) ) ] ); @@ -75,7 +76,7 @@ void GetPrinterOptions( PrinterOptions& rOptions, bool bFile ) } } -void SetPrinterOptions( const PrinterOptions& rOptions, bool bFile ) +void SetPrinterOptions( const vcl::printer::Options& rOptions, bool bFile ) { std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); if (bFile) |