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: paperinf.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 ************************************************************************/
30 #ifndef _SVX_PAPERINF_HXX
31 #define _SVX_PAPERINF_HXX
33 // INCLUDE ---------------------------------------------------------------
35 #ifndef _PRINT_HXX //autogen
36 #include <vcl/print.hxx>
38 #ifndef _MAPMOD_HXX //autogen
39 #include <vcl/mapmod.hxx>
41 #ifndef _SVX_SVXENUM_HXX
42 #include <bf_svx/svxenum.hxx>
49 // forward ---------------------------------------------------------------
53 // class SvxPaperInfo -----------------------------------------------------
58 static Size
GetPaperSize( const Printer
* );
59 static Size
GetPaperSize( SvxPaper ePaper
,
60 MapUnit eUnit
= MAP_TWIP
);
63 // INLINE -----------------------------------------------------------------
65 inline Size
&Swap(Size
&rSize
)
67 const long lVal
= rSize
.Width();
68 rSize
.Width() = rSize
.Height();
69 rSize
.Height() = lVal
;
73 inline Size
&LandscapeSwap(Size
&rSize
)
75 if ( rSize
.Height() > rSize
.Width() )
80 // Masze f"ur Standard- Papiergr"ossen:
81 // Berechnungsformel: X twips = Y mm * 14400 / 254 (ungerundet!)
83 const long lA0Width
= 47678; // A0 841mm
84 const long lA0Height
= 67407; // A0 1189mm
85 const long lA1Width
= 33675; // A1 594mm
86 const long lA1Height
= lA0Width
; // A1
87 const long lA2Width
= 23811; // A2 420mm
88 const long lA2Height
= lA1Width
; // A2
89 const long lA3Width
= 16837; // A3 297mm
90 const long lA3Height
= lA2Width
; // A3 420mm
91 const long lA4Width
= 11905; // A4 210mm
92 const long lA4Height
= lA3Width
; // A4
93 const long lA5Width
= 8390; // A5 148mm
94 const long lA5Height
= lA4Width
; // A5
96 const long lB4Width
= 14173; // B4 250mm
97 const long lB4Height
= 20012; // B4 353mm
98 const long lB5Width
= 9977; // B5 176mm
99 const long lB5Height
= lB4Width
; // B5
100 const long lB6Width
= 7086;
101 const long lB6Height
= lB5Width
;
103 const long lC4Width
= 12983;
104 const long lC4Height
= 18368;
105 const long lC5Width
= 9184;
106 const long lC5Height
= lC4Width
;
107 const long lC6Width
= 6463;
108 const long lC6Height
= lC5Width
;
109 const long lC65Width
= 6463;
110 const long lC65Height
= 12870;
111 const long lDLWidth
= 6236;
112 const long lDLHeight
= 12472;
114 const long lJISB4Width
= 14570;
115 const long lJISB4Height
= 20636;
116 const long lJISB5Width
= 10318;
117 const long lJISB5Height
= lJISB4Width
;
118 const long lJISB6Width
= 7256;
119 const long lJISB6Height
= lJISB5Width
;
121 // Die folgenden Daten stammen vom WinWord und sind noch
122 // nicht nach der obigen Formel,
123 // sondern per 1cm = 567 twips oder 1 Zoll = 1440 twips berechnet worden:
125 const long lLetterWidth
= 12240; // LETTER
126 const long lLetterHeight
= 15840; // LETTER
127 const long lLegalWidth
= lLetterWidth
; // LEGAL
128 const long lLegalHeight
= 20163; // LEGAL
129 const long lTabloidWidth
= 15850; // TABLOID
130 const long lTabloidHeight
= 24450; // TABLOID
132 const long lDiaWidth
= 10206; // DIA
133 const long lDiaHeight
= 15309; // DIA
134 const long lScreenWidth
= 11905; // SCREEN
135 const long lScreenHeight
= 15874; // SCREEN
137 const long lAWidth
= 12240; // A 8,5 Zoll
138 const long lAHeight
= 15840; // A 11 Zoll
139 const long lBWidth
= lAHeight
; // B
140 const long lBHeight
= 24480; // B 17 Zoll
141 const long lCWidth
= lBHeight
; // C
142 const long lCHeight
= 31680; // C 22 Zoll
143 const long lDWidth
= lCHeight
; // D
144 const long lDHeight
= 48960; // D 34 Zoll
145 const long lEWidth
= lDHeight
; // E
146 const long lEHeight
= 63360; // E 44 Zoll
148 const long lExeWidth
= 10440; // Executive 7,25 Zoll
149 const long lExeHeight
= 15120; // Executive 10,5 Zoll
150 const long lLegal2Width
= 12240; // Legal2 8,5 Zoll
151 const long lLegal2Height
= 18720; // Legal2 13 Zoll
152 const long lCom675Width
= 5220; // COM-6 3/4 3,625 Zoll
153 const long lCom675Height
= 9360; // COM-6 3/4 6,5 Zoll
154 const long lCom9Width
= 5580; // COM-9 3,875 Zoll
155 const long lCom9Height
= 12780; // COM-9 8,875 Zoll
156 const long lCom10Width
= 5940; // COM-10 4,125 Zoll
157 const long lCom10Height
= 13680; // COM-10 9,5 Zoll
158 const long lCom11Width
= 6480; // COM-11 4,5 Zoll
159 const long lCom11Height
= 14940; // COM-11 10,375 Zoll
160 const long lCom12Width
= 6840; // COM-12 4,75 Zoll
161 const long lCom12Height
= lAHeight
; // COM-12 11 Zoll
162 const long lMonarchWidth
= lCom9Width
; // Monarch 3,875 Zoll
163 const long lMonarchHeight
= 10800; // Monarch 7,5 Zoll
165 const long lKai16Width
= 10433; // 16 kai 18,4 cm
166 const long lKai16Height
= 14742; // 16 kai 26 cm
167 const long lKai32Width
= 7371; // 32 kai 13 cm
168 const long lKai32Height
= lKai16Width
; // 32 kai 18,4 cm
169 const long lKai32BigWidth
= 7938; // 32 kai gross 14 cm
170 const long lKai32BigHeight
= 11510; // 32 kai gross 20,3 cm
172 }//end of namespace binfilter