LibreOffice Module i18nutil (master)
1
include
i18nutil
paper.hxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#ifndef INCLUDED_I18NUTIL_PAPER_HXX
21
#define INCLUDED_I18NUTIL_PAPER_HXX
22
23
#include <
i18nutil/i18nutildllapi.h
>
24
#include <rtl/string.hxx>
25
#include <
tools/long.hxx
>
26
27
namespace
com::sun::star::lang
28
{
29
struct
Locale
;
30
}
31
35
39
enum
Paper
:
unsigned
40
{
41
PAPER_A0
,
42
PAPER_A1
,
43
PAPER_A2
,
44
PAPER_A3
,
45
PAPER_A4
,
46
PAPER_A5
,
47
PAPER_B4_ISO
,
48
PAPER_B5_ISO
,
49
PAPER_LETTER
,
50
PAPER_LEGAL
,
51
PAPER_TABLOID
,
52
PAPER_USER
,
53
PAPER_B6_ISO
,
54
PAPER_ENV_C4
,
55
PAPER_ENV_C5
,
56
PAPER_ENV_C6
,
57
PAPER_ENV_C65
,
58
PAPER_ENV_DL
,
59
PAPER_SLIDE_DIA
,
60
PAPER_SCREEN_4_3
,
61
PAPER_C
,
62
PAPER_D
,
63
PAPER_E
,
64
PAPER_EXECUTIVE
,
65
PAPER_FANFOLD_LEGAL_DE
,
66
PAPER_ENV_MONARCH
,
67
PAPER_ENV_PERSONAL
,
68
PAPER_ENV_9
,
69
PAPER_ENV_10
,
70
PAPER_ENV_11
,
71
PAPER_ENV_12
,
72
PAPER_KAI16
,
73
PAPER_KAI32
,
74
PAPER_KAI32BIG
,
75
PAPER_B4_JIS
,
76
PAPER_B5_JIS
,
77
PAPER_B6_JIS
,
78
PAPER_LEDGER
,
79
PAPER_STATEMENT
,
80
PAPER_QUARTO
,
81
PAPER_10x14
,
82
PAPER_ENV_14
,
83
PAPER_ENV_C3
,
84
PAPER_ENV_ITALY
,
85
PAPER_FANFOLD_US
,
86
PAPER_FANFOLD_DE
,
87
PAPER_POSTCARD_JP
,
88
PAPER_9x11
,
89
PAPER_10x11
,
90
PAPER_15x11
,
91
PAPER_ENV_INVITE
,
92
PAPER_A_PLUS
,
93
PAPER_B_PLUS
,
94
PAPER_LETTER_PLUS
,
95
PAPER_A4_PLUS
,
96
PAPER_DOUBLEPOSTCARD_JP
,
97
PAPER_A6
,
98
PAPER_12x11
,
99
PAPER_A7
,
100
PAPER_A8
,
101
PAPER_A9
,
102
PAPER_A10
,
103
PAPER_B0_ISO
,
104
PAPER_B1_ISO
,
105
PAPER_B2_ISO
,
106
PAPER_B3_ISO
,
107
PAPER_B7_ISO
,
108
PAPER_B8_ISO
,
109
PAPER_B9_ISO
,
110
PAPER_B10_ISO
,
111
PAPER_ENV_C2
,
112
PAPER_ENV_C7
,
113
PAPER_ENV_C8
,
114
PAPER_ARCHA
,
115
PAPER_ARCHB
,
116
PAPER_ARCHC
,
117
PAPER_ARCHD
,
118
PAPER_ARCHE
,
119
PAPER_SCREEN_16_9
,
120
PAPER_SCREEN_16_10
,
121
PAPER_16K_195x270
,
122
PAPER_16K_197x273
,
123
PAPER_WIDESCREEN
,
//PowerPoint Widescreen
124
PAPER_ONSCREENSHOW_4_3
,
//PowerPoint On-screen Show (4:3)
125
PAPER_ONSCREENSHOW_16_9
,
//PowerPoint On-screen Show (16:9)
126
PAPER_ONSCREENSHOW_16_10
//PowerPoint On-screen Show (16:10)
127
};
128
129
// defined for 'equal size' test with the implementation array
130
#define NUM_PAPER_ENTRIES (PAPER_ONSCREENSHOW_16_10 - PAPER_A0 + 1)
131
132
class
I18NUTIL_DLLPUBLIC
PaperInfo
133
{
134
Paper
m_eType
;
135
tools::Long
m_nPaperWidth;
// width in 100thMM
136
tools::Long
m_nPaperHeight;
// height in 100thMM
137
public
:
138
PaperInfo
(
Paper
eType
);
139
PaperInfo
(
tools::Long
nPaperWidth,
tools::Long
nPaperHeight);
140
141
Paper
getPaper()
const
{
return
m_eType
; }
142
tools::Long
getWidth()
const
{
return
m_nPaperWidth; }
143
tools::Long
getHeight()
const
{
return
m_nPaperHeight; }
144
bool
sloppyEqual(
const
PaperInfo
& rOther)
const
;
145
void
doSloppyFit(
bool
bAlsoTryRotated =
false
);
146
147
static
PaperInfo
getSystemDefaultPaper();
148
static
PaperInfo
getDefaultPaperForLocale(
const
css::lang::Locale& rLocale);
149
150
static
Paper
fromPSName(
const
OString& rName);
151
static
OString toPSName(
Paper
eType
);
152
153
static
tools::Long
sloppyFitPageDimension(
tools::Long
nDimension);
154
};
155
156
#endif
// INCLUDED_I18NUTIL_PAPER_HXX
157
158
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
m_eType
const EnumerationType m_eType
eType
DocumentType eType
i18nutildllapi.h
I18NUTIL_DLLPUBLIC
#define I18NUTIL_DLLPUBLIC
Definition:
i18nutildllapi.h:28
long.hxx
com::sun::star::lang
tools::Long
long Long
ConfigurationHints::Locale
@ Locale
Paper
Paper
! The values of the following enumerators must correspond to the array position ! of the respective p...
Definition:
paper.hxx:40
PAPER_QUARTO
@ PAPER_QUARTO
Definition:
paper.hxx:80
PAPER_A9
@ PAPER_A9
Definition:
paper.hxx:101
PAPER_ENV_C3
@ PAPER_ENV_C3
Definition:
paper.hxx:83
PAPER_ENV_9
@ PAPER_ENV_9
Definition:
paper.hxx:68
PAPER_ENV_MONARCH
@ PAPER_ENV_MONARCH
Definition:
paper.hxx:66
PAPER_B9_ISO
@ PAPER_B9_ISO
Definition:
paper.hxx:109
PAPER_ENV_C7
@ PAPER_ENV_C7
Definition:
paper.hxx:112
PAPER_POSTCARD_JP
@ PAPER_POSTCARD_JP
Definition:
paper.hxx:87
PAPER_ARCHD
@ PAPER_ARCHD
Definition:
paper.hxx:117
PAPER_LETTER
@ PAPER_LETTER
Definition:
paper.hxx:49
PAPER_B0_ISO
@ PAPER_B0_ISO
Definition:
paper.hxx:103
PAPER_A0
@ PAPER_A0
Definition:
paper.hxx:41
PAPER_ENV_DL
@ PAPER_ENV_DL
Definition:
paper.hxx:58
PAPER_ENV_12
@ PAPER_ENV_12
Definition:
paper.hxx:71
PAPER_ENV_11
@ PAPER_ENV_11
Definition:
paper.hxx:70
PAPER_SLIDE_DIA
@ PAPER_SLIDE_DIA
Definition:
paper.hxx:59
PAPER_ENV_C4
@ PAPER_ENV_C4
Definition:
paper.hxx:54
PAPER_ENV_10
@ PAPER_ENV_10
Definition:
paper.hxx:69
PAPER_A5
@ PAPER_A5
Definition:
paper.hxx:46
PAPER_SCREEN_16_9
@ PAPER_SCREEN_16_9
Definition:
paper.hxx:119
PAPER_B5_JIS
@ PAPER_B5_JIS
Definition:
paper.hxx:76
PAPER_A4
@ PAPER_A4
Definition:
paper.hxx:45
PAPER_B3_ISO
@ PAPER_B3_ISO
Definition:
paper.hxx:106
PAPER_ENV_PERSONAL
@ PAPER_ENV_PERSONAL
Definition:
paper.hxx:67
PAPER_LETTER_PLUS
@ PAPER_LETTER_PLUS
Definition:
paper.hxx:94
PAPER_ENV_14
@ PAPER_ENV_14
Definition:
paper.hxx:82
PAPER_ENV_C2
@ PAPER_ENV_C2
Definition:
paper.hxx:111
PAPER_A4_PLUS
@ PAPER_A4_PLUS
Definition:
paper.hxx:95
PAPER_ONSCREENSHOW_16_9
@ PAPER_ONSCREENSHOW_16_9
Definition:
paper.hxx:125
PAPER_B2_ISO
@ PAPER_B2_ISO
Definition:
paper.hxx:105
PAPER_16K_197x273
@ PAPER_16K_197x273
Definition:
paper.hxx:122
PAPER_10x11
@ PAPER_10x11
Definition:
paper.hxx:89
PAPER_B_PLUS
@ PAPER_B_PLUS
Definition:
paper.hxx:93
PAPER_USER
@ PAPER_USER
Definition:
paper.hxx:52
PAPER_SCREEN_4_3
@ PAPER_SCREEN_4_3
Definition:
paper.hxx:60
PAPER_KAI32
@ PAPER_KAI32
Definition:
paper.hxx:73
PAPER_B1_ISO
@ PAPER_B1_ISO
Definition:
paper.hxx:104
PAPER_B6_ISO
@ PAPER_B6_ISO
Definition:
paper.hxx:53
PAPER_ARCHB
@ PAPER_ARCHB
Definition:
paper.hxx:115
PAPER_B5_ISO
@ PAPER_B5_ISO
Definition:
paper.hxx:48
PAPER_DOUBLEPOSTCARD_JP
@ PAPER_DOUBLEPOSTCARD_JP
Definition:
paper.hxx:96
PAPER_WIDESCREEN
@ PAPER_WIDESCREEN
Definition:
paper.hxx:123
PAPER_KAI32BIG
@ PAPER_KAI32BIG
Definition:
paper.hxx:74
PAPER_FANFOLD_US
@ PAPER_FANFOLD_US
Definition:
paper.hxx:85
PAPER_ONSCREENSHOW_16_10
@ PAPER_ONSCREENSHOW_16_10
Definition:
paper.hxx:126
PAPER_A10
@ PAPER_A10
Definition:
paper.hxx:102
PAPER_STATEMENT
@ PAPER_STATEMENT
Definition:
paper.hxx:79
PAPER_A3
@ PAPER_A3
Definition:
paper.hxx:44
PAPER_16K_195x270
@ PAPER_16K_195x270
Definition:
paper.hxx:121
PAPER_SCREEN_16_10
@ PAPER_SCREEN_16_10
Definition:
paper.hxx:120
PAPER_LEGAL
@ PAPER_LEGAL
Definition:
paper.hxx:50
PAPER_ARCHC
@ PAPER_ARCHC
Definition:
paper.hxx:116
PAPER_10x14
@ PAPER_10x14
Definition:
paper.hxx:81
PAPER_B6_JIS
@ PAPER_B6_JIS
Definition:
paper.hxx:77
PAPER_9x11
@ PAPER_9x11
Definition:
paper.hxx:88
PAPER_FANFOLD_DE
@ PAPER_FANFOLD_DE
Definition:
paper.hxx:86
PAPER_E
@ PAPER_E
Definition:
paper.hxx:63
PAPER_A_PLUS
@ PAPER_A_PLUS
Definition:
paper.hxx:92
PAPER_EXECUTIVE
@ PAPER_EXECUTIVE
Definition:
paper.hxx:64
PAPER_B10_ISO
@ PAPER_B10_ISO
Definition:
paper.hxx:110
PAPER_A6
@ PAPER_A6
Definition:
paper.hxx:97
PAPER_A1
@ PAPER_A1
Definition:
paper.hxx:42
PAPER_D
@ PAPER_D
Definition:
paper.hxx:62
PAPER_ENV_C8
@ PAPER_ENV_C8
Definition:
paper.hxx:113
PAPER_A8
@ PAPER_A8
Definition:
paper.hxx:100
PAPER_B8_ISO
@ PAPER_B8_ISO
Definition:
paper.hxx:108
PAPER_KAI16
@ PAPER_KAI16
Definition:
paper.hxx:72
PAPER_15x11
@ PAPER_15x11
Definition:
paper.hxx:90
PAPER_B7_ISO
@ PAPER_B7_ISO
Definition:
paper.hxx:107
PAPER_TABLOID
@ PAPER_TABLOID
Definition:
paper.hxx:51
PAPER_ENV_ITALY
@ PAPER_ENV_ITALY
Definition:
paper.hxx:84
PAPER_B4_ISO
@ PAPER_B4_ISO
Definition:
paper.hxx:47
PAPER_ENV_C65
@ PAPER_ENV_C65
Definition:
paper.hxx:57
PAPER_ARCHE
@ PAPER_ARCHE
Definition:
paper.hxx:118
PAPER_ENV_C6
@ PAPER_ENV_C6
Definition:
paper.hxx:56
PAPER_ENV_C5
@ PAPER_ENV_C5
Definition:
paper.hxx:55
PAPER_ONSCREENSHOW_4_3
@ PAPER_ONSCREENSHOW_4_3
Definition:
paper.hxx:124
PAPER_A2
@ PAPER_A2
Definition:
paper.hxx:43
PAPER_C
@ PAPER_C
Definition:
paper.hxx:61
PAPER_B4_JIS
@ PAPER_B4_JIS
Definition:
paper.hxx:75
PAPER_A7
@ PAPER_A7
Definition:
paper.hxx:99
PAPER_12x11
@ PAPER_12x11
Definition:
paper.hxx:98
PAPER_ENV_INVITE
@ PAPER_ENV_INVITE
Definition:
paper.hxx:91
PAPER_FANFOLD_LEGAL_DE
@ PAPER_FANFOLD_LEGAL_DE
Definition:
paper.hxx:65
PAPER_ARCHA
@ PAPER_ARCHA
Definition:
paper.hxx:114
PAPER_LEDGER
@ PAPER_LEDGER
Definition:
paper.hxx:78
PaperInfo
Generated on Sun Jul 30 2023 04:26:31 for LibreOffice Module i18nutil (master) by
1.9.3