1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef INCLUDED_SVTOOLS_PRINTOPTIONS_HXX 25 #define INCLUDED_SVTOOLS_PRINTOPTIONS_HXX 26 27 #include "svtools/svtdllapi.h" 28 #include <sal/types.h> 29 #include <osl/mutex.hxx> 30 #include <rtl/ustring.hxx> 31 #include <unotools/options.hxx> 32 33 class SvtPrintOptions_Impl; 34 35 // ----------------------- 36 // - SvtBasePrintOptions - 37 // ----------------------- 38 39 class PrinterOptions; 40 41 class SVT_DLLPUBLIC SvtBasePrintOptions: public utl::detail::Options 42 { 43 protected: 44 45 SvtPrintOptions_Impl* m_pDataContainer; 46 SetDataContainer(SvtPrintOptions_Impl * pDataContainer)47 void SetDataContainer( SvtPrintOptions_Impl* pDataContainer ) { m_pDataContainer = pDataContainer; } 48 49 public: 50 51 static ::osl::Mutex& GetOwnStaticMutex(); 52 53 public: 54 55 SvtBasePrintOptions(); 56 virtual ~SvtBasePrintOptions(); 57 58 sal_Bool IsReduceTransparency() const; 59 sal_Int16 GetReducedTransparencyMode() const; 60 sal_Bool IsReduceGradients() const; 61 sal_Int16 GetReducedGradientMode() const; 62 sal_Int16 GetReducedGradientStepCount() const; 63 sal_Bool IsReduceBitmaps() const; 64 sal_Int16 GetReducedBitmapMode() const; 65 sal_Int16 GetReducedBitmapResolution() const; 66 sal_Bool IsReducedBitmapIncludesTransparency() const; 67 sal_Bool IsConvertToGreyscales() const; 68 69 void SetReduceTransparency( sal_Bool bState ); 70 void SetReducedTransparencyMode( sal_Int16 nMode ); 71 void SetReduceGradients( sal_Bool bState ); 72 void SetReducedGradientMode( sal_Int16 nMode ); 73 void SetReducedGradientStepCount( sal_Int16 nStepCount ); 74 void SetReduceBitmaps( sal_Bool bState ); 75 void SetReducedBitmapMode( sal_Int16 bState ); 76 void SetReducedBitmapResolution( sal_Int16 nResolution ); 77 void SetReducedBitmapIncludesTransparency( sal_Bool bState ); 78 void SetConvertToGreyscales( sal_Bool bState ); 79 80 public: 81 82 void GetPrinterOptions( PrinterOptions& rOptions ) const; 83 void SetPrinterOptions( const PrinterOptions& rOptions ); 84 }; 85 86 // --------------------- 87 // - SvtPrinterOptions - 88 // --------------------- 89 90 class SVT_DLLPUBLIC SvtPrinterOptions : public SvtBasePrintOptions 91 { 92 private: 93 94 static SvtPrintOptions_Impl* m_pStaticDataContainer; /// impl. data container as dynamic pointer for smaller memory requirements! 95 static sal_Int32 m_nRefCount; /// internal ref count mechanism 96 97 public: 98 99 SvtPrinterOptions(); 100 virtual ~SvtPrinterOptions(); 101 }; 102 103 // ----------------------- 104 // - SvtPrintFileOptions - 105 // ----------------------- 106 107 class SVT_DLLPUBLIC SvtPrintFileOptions : public SvtBasePrintOptions 108 { 109 private: 110 111 static SvtPrintOptions_Impl* m_pStaticDataContainer; /// impl. data container as dynamic pointer for smaller memory requirements! 112 static sal_Int32 m_nRefCount; /// internal ref count mechanism 113 114 public: 115 116 SvtPrintFileOptions(); 117 virtual ~SvtPrintFileOptions(); 118 }; 119 120 #endif // INCLUDED_SVTOOLS_PRINTOPTIONS_HXX 121