1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: IDocumentDeviceAccess.hxx,v $
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
40 /** Provides access to the formatting devices of a document
42 class IDocumentDeviceAccess
46 /** Return the printer set at the document.
49 [in] if set, a printer will be created if not already done.
52 the printer set at the document.
54 virtual SfxPrinter
* getPrinter(/*[in]*/ bool bCreate
) const = 0;
56 /** Set the printer at the document.
59 [in] the new printer or 0.
62 [in] if set, the old printer will be deleted.
64 @param bCallPrtDataChanged
65 [in] if set, triggers all necessary invalidations.
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.
75 [in] if set, a virtual device will be created if not already done.
78 the virtual device set at the document.
80 virtual VirtualDevice
* getVirtualDevice(/*[in]*/ bool bCreate
) const = 0;
82 /** Sets the current virtual device
85 [in] the new virtual device.
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
98 [in] if set, the reference device will be created if not already done.
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
108 [in] if set, the reference device will be a virtual device, otherwise
109 the printer is used for formatting the document
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
121 virtual const JobSetup
* getJobsetup() const = 0;
123 /** Sets the Jobsetup
126 [in] the new Jobsetup.
128 virtual void setJobsetup(/*[in]*/ const JobSetup
& rJobSetup
) = 0;
130 /** Returns the PrintData
133 the current PrintData
135 virtual SwPrintData
* getPrintData() const = 0;
137 /** Sets the PrintData
140 [in] the new PrintData.
142 virtual void setPrintData(/*[in]*/ const SwPrintData
& rPrtData
) = 0;
145 virtual ~IDocumentDeviceAccess() {};
148 #endif // IDOCUMENTDEVICEACCESS_HXX_INCLUDED