Update ooo320-m1
[ooovba.git] / sw / source / core / inc / setmapvirtdev.hxx
blob2db1e229fdcb17ea5909620c98d1098796aa6462
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: setmapvirtdev.hxx,v $
10 * $Revision: 1.3 $
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 ************************************************************************/
30 #ifndef _SETMAPVIRTDEV_HXX
31 #define _SETMAPVIRTDEV_HXX
33 class OutputDevice;
34 class VirtualDevice;
35 class MapMode;
36 class Point;
38 /** method to set mapping/pixel offset for virtual output device
40 OD 12.11.2002 #96272# - method implements two solutions for the mapping of
41 the virtual output device:
42 The old solution set the origin of the mapping mode, which will be used in
43 the virtual output device. This causes several paint errors, because of the
44 different roundings in the virtual output device and the original output device.
45 The new solution avoids the rounding differences between virtual and original
46 output device by setting a pixel offset at the virtual output device.
47 A local boolean controls, which solution is used, in order to switch in
48 escalation back to old solution.
50 @author OD
52 @param _pOrgOutDev
53 input parameter - constant instance of the original output device, for which
54 the virtual output device is created.
56 @param _pVirDev
57 input/output parameter - instance of the virtual output device.
59 @param _pMapMode
60 input/output parameter - instance of the mapping mode, which will be set
61 at the virtual output device.
63 @param _rNewOrigin
64 input parameter - constant instance of the origin, which will be used in
65 the virtual output device
67 void SetMappingForVirtDev( const Point& _rNewOrigin,
68 MapMode* _pMapMode,
69 const OutputDevice* _pOrgOutDev,
70 VirtualDevice* _pVirDev );
73 #endif