LibreOffice Module vcl (master) 1
Options.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <config_options.h>
25
26#include <sal/types.h>
27
28#include <vcl/dllapi.h>
29
30namespace vcl::printer
31{
33{
34 Auto = 0,
35 NONE = 1
36};
37
38enum class GradientMode
39{
40 Stripes = 0,
41 Color = 1
42};
43
44enum class BitmapMode
45{
46 Optimal = 0,
47 Normal = 1,
48 Resolution = 2
49};
50
51class UNLESS_MERGELIBS(VCL_DLLPUBLIC) Options
52{
53private:
54 bool mbReduceTransparency = false;
55 TransparencyMode meReducedTransparencyMode = TransparencyMode::Auto;
56 bool mbReduceGradients = false;
57 GradientMode meReducedGradientsMode = GradientMode::Stripes;
58 sal_uInt16 mnReducedGradientStepCount = 64;
59 bool mbReduceBitmaps = false;
60 BitmapMode meReducedBitmapMode = BitmapMode::Normal;
61 sal_uInt16 mnReducedBitmapResolution = 200;
62 bool mbReducedBitmapsIncludeTransparency = true;
63 bool mbConvertToGreyscales = false;
64 bool mbPDFAsStandardPrintJobFormat = false;
65
66public:
67 Options() = default;
68
69 bool IsReduceTransparency() const { return mbReduceTransparency; }
70 void SetReduceTransparency(bool bSet) { mbReduceTransparency = bSet; }
71
72 TransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; }
73 void SetReducedTransparencyMode(TransparencyMode eMode) { meReducedTransparencyMode = eMode; }
74
75 bool IsReduceGradients() const { return mbReduceGradients; }
76 void SetReduceGradients(bool bSet) { mbReduceGradients = bSet; }
77
78 GradientMode GetReducedGradientMode() const { return meReducedGradientsMode; }
79 void SetReducedGradientMode(GradientMode eMode) { meReducedGradientsMode = eMode; }
80
81 sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; }
82 void SetReducedGradientStepCount(sal_uInt16 nStepCount)
83 {
84 mnReducedGradientStepCount = nStepCount;
85 }
86
87 bool IsReduceBitmaps() const { return mbReduceBitmaps; }
88 void SetReduceBitmaps(bool bSet) { mbReduceBitmaps = bSet; }
89
90 BitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; }
91 void SetReducedBitmapMode(BitmapMode eMode) { meReducedBitmapMode = eMode; }
92
93 sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; }
94 void SetReducedBitmapResolution(sal_uInt16 nResolution)
95 {
96 mnReducedBitmapResolution = nResolution;
97 }
98
99 bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; }
100 void SetReducedBitmapIncludesTransparency(bool bSet)
101 {
102 mbReducedBitmapsIncludeTransparency = bSet;
103 }
104
105 bool IsConvertToGreyscales() const { return mbConvertToGreyscales; }
106 void SetConvertToGreyscales(bool bSet) { mbConvertToGreyscales = bSet; }
107
108 bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; }
109 void SetPDFAsStandardPrintJobFormat(bool bSet) { mbPDFAsStandardPrintJobFormat = bSet; }
110
116 void ReadFromConfig(bool bFile);
117};
118}
119
120/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Mode eMode
NONE
BitmapMode