xref: /trunk/main/sfx2/inc/sfx2/printer.hxx (revision 353d8f4d)
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 #ifndef _SFX_PRINTER_HXX
24 #define _SFX_PRINTER_HXX
25 
26 #include "sal/config.h"
27 #include "sfx2/dllapi.h"
28 #include "sal/types.h"
29 #ifndef _PRINT_HXX //autogen
30 #include <vcl/print.hxx>
31 #endif
32 
33 class SfxTabPage;
34 class SfxItemSet;
35 
36 struct SfxPrinter_Impl;
37 
38 // class SfxPrinter ------------------------------------------------------
39 
40 class SFX2_DLLPUBLIC SfxPrinter : public Printer
41 {
42 private:
43 	JobSetup				aOrigJobSetup;
44 	SfxItemSet*				pOptions;
45 	SfxPrinter_Impl*		pImpl;
46 	sal_Bool					bKnown;
47 
48     SAL_DLLPRIVATE void operator =(SfxPrinter &); // not defined
49 
50 	SAL_DLLPRIVATE void UpdateFonts_Impl();
51 
52 public:
53 							SfxPrinter( SfxItemSet *pTheOptions );
54 							SfxPrinter( SfxItemSet *pTheOptions,
55 										const String &rPrinterName );
56 							SfxPrinter( SfxItemSet *pTheOptions,
57 										const JobSetup &rTheOrigJobSetup );
58 							SfxPrinter( SfxItemSet *pTheOptions,
59 										const String &rPrinterName,
60 										const JobSetup &rTheOrigJobSetup );
61 							SfxPrinter( const SfxPrinter &rPrinter );
62 							~SfxPrinter();
63 
64 	SfxPrinter*				Clone() const;
65 
66 	static SfxPrinter*		Create( SvStream &rStream, SfxItemSet *pOptions );
67 	SvStream&				Store( SvStream &rStream ) const;
68 
GetOrigJobSetup() const69 	const JobSetup& 		GetOrigJobSetup() const	{ return aOrigJobSetup; }
70 	void					SetOrigJobSetup( const JobSetup &rNewJobSetup );
71 
GetOptions() const72 	const SfxItemSet&		GetOptions() const { return *pOptions; }
73 	void					SetOptions( const SfxItemSet &rNewOptions );
74 
IsKnown() const75 	sal_Bool					IsKnown() const { return bKnown; }
IsOriginal() const76 	sal_Bool					IsOriginal() const { return bKnown; }
77 };
78 
79 #endif
80