Branch data Line data Source code
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 : : #ifndef INCLUDED_SVTOOLS_PRINTOPTIONS_HXX
21 : : #define INCLUDED_SVTOOLS_PRINTOPTIONS_HXX
22 : :
23 : : #include "svtools/svtdllapi.h"
24 : : #include <sal/types.h>
25 : : #include <osl/mutex.hxx>
26 : : #include <rtl/ustring.hxx>
27 : : #include <unotools/options.hxx>
28 : :
29 : : class SvtPrintOptions_Impl;
30 : :
31 : : // -----------------------
32 : : // - SvtBasePrintOptions -
33 : : // -----------------------
34 : :
35 : : class PrinterOptions;
36 : :
37 : : class SVT_DLLPUBLIC SvtBasePrintOptions: public utl::detail::Options
38 : : {
39 : : protected:
40 : :
41 : : SvtPrintOptions_Impl* m_pDataContainer;
42 : :
43 : 0 : void SetDataContainer( SvtPrintOptions_Impl* pDataContainer ) { m_pDataContainer = pDataContainer; }
44 : :
45 : : public:
46 : :
47 : : static ::osl::Mutex& GetOwnStaticMutex();
48 : :
49 : : public:
50 : :
51 : : SvtBasePrintOptions();
52 : : virtual ~SvtBasePrintOptions();
53 : :
54 : : sal_Bool IsReduceTransparency() const;
55 : : sal_Int16 GetReducedTransparencyMode() const;
56 : : sal_Bool IsReduceGradients() const;
57 : : sal_Int16 GetReducedGradientMode() const;
58 : : sal_Int16 GetReducedGradientStepCount() const;
59 : : sal_Bool IsReduceBitmaps() const;
60 : : sal_Int16 GetReducedBitmapMode() const;
61 : : sal_Int16 GetReducedBitmapResolution() const;
62 : : sal_Bool IsReducedBitmapIncludesTransparency() const;
63 : : sal_Bool IsConvertToGreyscales() const;
64 : :
65 : : void SetReduceTransparency( sal_Bool bState );
66 : : void SetReducedTransparencyMode( sal_Int16 nMode );
67 : : void SetReduceGradients( sal_Bool bState );
68 : : void SetReducedGradientMode( sal_Int16 nMode );
69 : : void SetReducedGradientStepCount( sal_Int16 nStepCount );
70 : : void SetReduceBitmaps( sal_Bool bState );
71 : : void SetReducedBitmapMode( sal_Int16 bState );
72 : : void SetReducedBitmapResolution( sal_Int16 nResolution );
73 : : void SetReducedBitmapIncludesTransparency( sal_Bool bState );
74 : : void SetConvertToGreyscales( sal_Bool bState );
75 : :
76 : : public:
77 : :
78 : : void GetPrinterOptions( PrinterOptions& rOptions ) const;
79 : : void SetPrinterOptions( const PrinterOptions& rOptions );
80 : : };
81 : :
82 : : // ---------------------
83 : : // - SvtPrinterOptions -
84 : : // ---------------------
85 : :
86 : : class SVT_DLLPUBLIC SvtPrinterOptions : public SvtBasePrintOptions
87 : : {
88 : : private:
89 : :
90 : : static SvtPrintOptions_Impl* m_pStaticDataContainer; /// impl. data container as dynamic pointer for smaller memory requirements!
91 : : static sal_Int32 m_nRefCount; /// internal ref count mechanism
92 : :
93 : : public:
94 : :
95 : : SvtPrinterOptions();
96 : : virtual ~SvtPrinterOptions();
97 : : };
98 : :
99 : : // -----------------------
100 : : // - SvtPrintFileOptions -
101 : : // -----------------------
102 : :
103 : : class SVT_DLLPUBLIC SvtPrintFileOptions : public SvtBasePrintOptions
104 : : {
105 : : private:
106 : :
107 : : static SvtPrintOptions_Impl* m_pStaticDataContainer; /// impl. data container as dynamic pointer for smaller memory requirements!
108 : : static sal_Int32 m_nRefCount; /// internal ref count mechanism
109 : :
110 : : public:
111 : :
112 : : SvtPrintFileOptions();
113 : : virtual ~SvtPrintFileOptions();
114 : : };
115 : :
116 : : #endif // INCLUDED_SVTOOLS_PRINTOPTIONS_HXX
117 : :
118 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|