merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / IDocumentDeviceAccess.hxx
blob271bdbcc2204d1bca9db1f8f7f53bd0b535b9da4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IDocumentDeviceAccess.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef IDOCUMENTDEVICEACCESS_HXX_INCLUDED
32 #define IDOCUMENTDEVICEACCESS_HXX_INCLUDED
34 class SfxPrinter;
35 class JobSetup;
36 struct SwPrintData;
37 class VirtualDevice;
38 class OutputDevice;
40 /** Provides access to the formatting devices of a document
42 class IDocumentDeviceAccess
44 public:
46 /** Return the printer set at the document.
48 @param bCreate
49 [in] if set, a printer will be created if not already done.
51 @returns
52 the printer set at the document.
54 virtual SfxPrinter* getPrinter(/*[in]*/ bool bCreate ) const = 0;
56 /** Set the printer at the document.
58 @param pP
59 [in] the new printer or 0.
61 @param bDeleteOld
62 [in] if set, the old printer will be deleted.
64 @param bCallPrtDataChanged
65 [in] if set, triggers all necessary invalidations.
67 @returns
68 the printer set at the document.
70 virtual void setPrinter(/*[in]*/ SfxPrinter* pP,/*[in]*/ bool bDeleteOld,/*[in]*/ bool bCallPrtDataChanged ) = 0;
72 /** Return the virtual device set at the document.
74 @param bCreate
75 [in] if set, a virtual device will be created if not already done.
77 @returns
78 the virtual device set at the document.
80 virtual VirtualDevice* getVirtualDevice(/*[in]*/ bool bCreate ) const = 0;
82 /** Sets the current virtual device
84 @param pVd
85 [in] the new virtual device.
87 @param bDeleteOld
88 [in] if set, the old virtual device will be deleted.
90 @param bCallVirDevDataChanged
91 [in] if set, triggers all necessary invalidations.
93 virtual void setVirtualDevice(/*[in]*/ VirtualDevice* pVd,/*[in]*/ bool bDeleteOld, /*[in]*/ bool bCallVirDevDataChanged ) = 0;
95 /** Returns the current reference device
97 @param bCreate
98 [in] if set, the reference device will be created if not already done.
100 @returns
101 the current reference device
103 virtual OutputDevice* getReferenceDevice(/*[in]*/ bool bCreate ) const = 0;
105 /** Sets the type of the reference device used for formatting the document
107 @param bNewVirtual
108 [in] if set, the reference device will be a virtual device, otherwise
109 the printer is used for formatting the document
111 @param bNewHiRes
112 [in] if set, the virtual device will be the HiRes virtual device
114 virtual void setReferenceDeviceType(/*[in]*/ bool bNewVirtual, /*[in]*/ bool bNewHiRes ) = 0;
116 /** Returns the Jobsetup
118 @returns
119 the current Jobsetup
121 virtual const JobSetup* getJobsetup() const = 0;
123 /** Sets the Jobsetup
125 @param rJobSetup
126 [in] the new Jobsetup.
128 virtual void setJobsetup(/*[in]*/ const JobSetup& rJobSetup ) = 0;
130 /** Returns the PrintData
132 @returns
133 the current PrintData
135 virtual SwPrintData* getPrintData() const = 0;
137 /** Sets the PrintData
139 @param rPrtData
140 [in] the new PrintData.
142 virtual void setPrintData(/*[in]*/ const SwPrintData& rPrtData) = 0;
144 protected:
145 virtual ~IDocumentDeviceAccess() {};
148 #endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED