22#include <officecfg/Office/Common.hxx>
26const sal_uInt16
aDPIArray[] = { 72, 96, 150, 200, 300, 600 };
28#define DPI_COUNT (SAL_N_ELEMENTS(aDPIArray))
40 rOptions.SetReduceTransparency( officecfg::Office::Common::Print::Option::File::ReduceTransparency::get() );
42 officecfg::Office::Common::Print::Option::File::ReducedTransparencyMode::get() ) );
43 rOptions.SetReduceGradients( officecfg::Office::Common::Print::Option::File::ReduceGradients::get() );
45 officecfg::Office::Common::Print::Option::File::ReducedGradientMode::get()) );
46 rOptions.SetReducedGradientStepCount( officecfg::Office::Common::Print::Option::File::ReducedGradientStepCount::get() );
47 rOptions.SetReduceBitmaps( officecfg::Office::Common::Print::Option::File::ReduceBitmaps::get() );
49 officecfg::Office::Common::Print::Option::File::ReducedBitmapMode::get()) );
50 rOptions.SetReducedBitmapResolution(
aDPIArray[ std::min(
static_cast<sal_uInt16
>(
51 officecfg::Office::Common::Print::Option::File::ReducedBitmapResolution::get()), sal_uInt16(
DPI_COUNT - 1 ) ) ] );
52 rOptions.SetReducedBitmapIncludesTransparency(
53 officecfg::Office::Common::Print::Option::File::ReducedBitmapIncludesTransparency::get() );
54 rOptions.SetConvertToGreyscales( officecfg::Office::Common::Print::Option::File::ConvertToGreyscales::get() );
55 rOptions.SetPDFAsStandardPrintJobFormat( officecfg::Office::Common::Print::Option::File::PDFAsStandardPrintJobFormat::get() );
59 rOptions.SetReduceTransparency( officecfg::Office::Common::Print::Option::Printer::ReduceTransparency::get() );
61 officecfg::Office::Common::Print::Option::Printer::ReducedTransparencyMode::get() ) );
62 rOptions.SetReduceGradients( officecfg::Office::Common::Print::Option::Printer::ReduceGradients::get() );
64 officecfg::Office::Common::Print::Option::Printer::ReducedGradientMode::get()) );
65 rOptions.SetReducedGradientStepCount( officecfg::Office::Common::Print::Option::Printer::ReducedGradientStepCount::get() );
66 rOptions.SetReduceBitmaps( officecfg::Office::Common::Print::Option::Printer::ReduceBitmaps::get() );
68 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapMode::get()) );
69 rOptions.SetReducedBitmapResolution(
aDPIArray[ std::min(
static_cast<sal_uInt16
>(
70 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapResolution::get()), sal_uInt16(
DPI_COUNT - 1 ) ) ] );
71 rOptions.SetReducedBitmapIncludesTransparency(
72 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapIncludesTransparency::get() );
73 rOptions.SetConvertToGreyscales( officecfg::Office::Common::Print::Option::Printer::ConvertToGreyscales::get() );
74 rOptions.SetPDFAsStandardPrintJobFormat( officecfg::Office::Common::Print::Option::Printer::PDFAsStandardPrintJobFormat::get() );
83 officecfg::Office::Common::Print::Option::File::ReduceTransparency::set(
84 rOptions.IsReduceTransparency(), batch );
85 officecfg::Office::Common::Print::Option::File::ReducedTransparencyMode::set(
86 static_cast<sal_Int16
>(rOptions.GetReducedTransparencyMode()), batch );
87 officecfg::Office::Common::Print::Option::File::ReduceGradients::set(
88 rOptions.IsReduceGradients(), batch );
89 officecfg::Office::Common::Print::Option::File::ReducedGradientMode::set(
90 static_cast<sal_Int16
>(rOptions.GetReducedGradientMode()), batch );
91 officecfg::Office::Common::Print::Option::File::ReducedGradientStepCount::set(
92 rOptions.GetReducedGradientStepCount(), batch );
93 officecfg::Office::Common::Print::Option::File::ReduceBitmaps::set(
94 rOptions.IsReduceBitmaps(), batch );
95 officecfg::Office::Common::Print::Option::File::ReducedBitmapMode::set(
96 static_cast<sal_Int16
>(rOptions.GetReducedBitmapMode()), batch );
97 officecfg::Office::Common::Print::Option::File::ReducedBitmapIncludesTransparency::set(
98 rOptions.IsReducedBitmapIncludesTransparency(), batch );
99 officecfg::Office::Common::Print::Option::File::ConvertToGreyscales::set(
100 rOptions.IsConvertToGreyscales(), batch );
101 officecfg::Office::Common::Print::Option::File::PDFAsStandardPrintJobFormat::set(
102 rOptions.IsPDFAsStandardPrintJobFormat(), batch );
104 const sal_uInt16 nDPI = rOptions.GetReducedBitmapResolution();
107 officecfg::Office::Common::Print::Option::File::ReducedBitmapResolution::set( 0, batch );
114 officecfg::Office::Common::Print::Option::File::ReducedBitmapResolution::set(
115 static_cast<sal_Int16
>(
i), batch );
123 officecfg::Office::Common::Print::Option::Printer::ReduceTransparency::set(
124 rOptions.IsReduceTransparency(), batch );
125 officecfg::Office::Common::Print::Option::Printer::ReducedTransparencyMode::set(
126 static_cast<sal_Int16
>(rOptions.GetReducedTransparencyMode()), batch );
127 officecfg::Office::Common::Print::Option::Printer::ReduceGradients::set(
128 rOptions.IsReduceGradients(), batch );
129 officecfg::Office::Common::Print::Option::Printer::ReducedGradientMode::set(
130 static_cast<sal_Int16
>(rOptions.GetReducedGradientMode()), batch );
131 officecfg::Office::Common::Print::Option::Printer::ReducedGradientStepCount::set(
132 rOptions.GetReducedGradientStepCount(), batch );
133 officecfg::Office::Common::Print::Option::Printer::ReduceBitmaps::set(
134 rOptions.IsReduceBitmaps(), batch );
135 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapMode::set(
136 static_cast<sal_Int16
>(rOptions.GetReducedBitmapMode()), batch );
137 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapIncludesTransparency::set(
138 rOptions.IsReducedBitmapIncludesTransparency(), batch );
139 officecfg::Office::Common::Print::Option::Printer::ConvertToGreyscales::set(
140 rOptions.IsConvertToGreyscales(), batch );
141 officecfg::Office::Common::Print::Option::Printer::PDFAsStandardPrintJobFormat::set(
142 rOptions.IsPDFAsStandardPrintJobFormat(), batch );
144 const sal_uInt16 nDPI = rOptions.GetReducedBitmapResolution();
147 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapResolution::set( 0, batch );
154 officecfg::Office::Common::Print::Option::Printer::ReducedBitmapResolution::set(
155 static_cast<sal_Int16
>(
i), batch );
static std::shared_ptr< ConfigurationChanges > create()
const sal_uInt16 aDPIArray[]