LibreOffice Module i18nutil (master) 1
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
24#include <rtl/string.hxx>
25#include <tools/long.hxx>
26
28{
29struct Locale;
30}
31
35
39enum Paper : unsigned
40{
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)
128
129// defined for 'equal size' test with the implementation array
130#define NUM_PAPER_ENTRIES (PAPER_ONSCREENSHOW_16_10 - PAPER_A0 + 1)
131
133{
135 tools::Long m_nPaperWidth; // width in 100thMM
136 tools::Long m_nPaperHeight; // height in 100thMM
137public:
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: */
const EnumerationType m_eType
DocumentType eType
#define I18NUTIL_DLLPUBLIC
long Long
Paper
! The values of the following enumerators must correspond to the array position ! of the respective p...
Definition: paper.hxx:40
@ PAPER_QUARTO
Definition: paper.hxx:80
@ PAPER_A9
Definition: paper.hxx:101
@ PAPER_ENV_C3
Definition: paper.hxx:83
@ PAPER_ENV_9
Definition: paper.hxx:68
@ PAPER_ENV_MONARCH
Definition: paper.hxx:66
@ PAPER_B9_ISO
Definition: paper.hxx:109
@ PAPER_ENV_C7
Definition: paper.hxx:112
@ PAPER_POSTCARD_JP
Definition: paper.hxx:87
@ PAPER_ARCHD
Definition: paper.hxx:117
@ PAPER_LETTER
Definition: paper.hxx:49
@ PAPER_B0_ISO
Definition: paper.hxx:103
@ PAPER_A0
Definition: paper.hxx:41
@ PAPER_ENV_DL
Definition: paper.hxx:58
@ PAPER_ENV_12
Definition: paper.hxx:71
@ PAPER_ENV_11
Definition: paper.hxx:70
@ PAPER_SLIDE_DIA
Definition: paper.hxx:59
@ PAPER_ENV_C4
Definition: paper.hxx:54
@ PAPER_ENV_10
Definition: paper.hxx:69
@ PAPER_A5
Definition: paper.hxx:46
@ PAPER_SCREEN_16_9
Definition: paper.hxx:119
@ PAPER_B5_JIS
Definition: paper.hxx:76
@ PAPER_A4
Definition: paper.hxx:45
@ PAPER_B3_ISO
Definition: paper.hxx:106
@ PAPER_ENV_PERSONAL
Definition: paper.hxx:67
@ PAPER_LETTER_PLUS
Definition: paper.hxx:94
@ PAPER_ENV_14
Definition: paper.hxx:82
@ PAPER_ENV_C2
Definition: paper.hxx:111
@ PAPER_A4_PLUS
Definition: paper.hxx:95
@ PAPER_ONSCREENSHOW_16_9
Definition: paper.hxx:125
@ PAPER_B2_ISO
Definition: paper.hxx:105
@ PAPER_16K_197x273
Definition: paper.hxx:122
@ PAPER_10x11
Definition: paper.hxx:89
@ PAPER_B_PLUS
Definition: paper.hxx:93
@ PAPER_USER
Definition: paper.hxx:52
@ PAPER_SCREEN_4_3
Definition: paper.hxx:60
@ PAPER_KAI32
Definition: paper.hxx:73
@ PAPER_B1_ISO
Definition: paper.hxx:104
@ PAPER_B6_ISO
Definition: paper.hxx:53
@ PAPER_ARCHB
Definition: paper.hxx:115
@ PAPER_B5_ISO
Definition: paper.hxx:48
@ PAPER_DOUBLEPOSTCARD_JP
Definition: paper.hxx:96
@ PAPER_WIDESCREEN
Definition: paper.hxx:123
@ PAPER_KAI32BIG
Definition: paper.hxx:74
@ PAPER_FANFOLD_US
Definition: paper.hxx:85
@ PAPER_ONSCREENSHOW_16_10
Definition: paper.hxx:126
@ PAPER_A10
Definition: paper.hxx:102
@ PAPER_STATEMENT
Definition: paper.hxx:79
@ PAPER_A3
Definition: paper.hxx:44
@ PAPER_16K_195x270
Definition: paper.hxx:121
@ PAPER_SCREEN_16_10
Definition: paper.hxx:120
@ PAPER_LEGAL
Definition: paper.hxx:50
@ PAPER_ARCHC
Definition: paper.hxx:116
@ PAPER_10x14
Definition: paper.hxx:81
@ PAPER_B6_JIS
Definition: paper.hxx:77
@ PAPER_9x11
Definition: paper.hxx:88
@ PAPER_FANFOLD_DE
Definition: paper.hxx:86
@ PAPER_E
Definition: paper.hxx:63
@ PAPER_A_PLUS
Definition: paper.hxx:92
@ PAPER_EXECUTIVE
Definition: paper.hxx:64
@ PAPER_B10_ISO
Definition: paper.hxx:110
@ PAPER_A6
Definition: paper.hxx:97
@ PAPER_A1
Definition: paper.hxx:42
@ PAPER_D
Definition: paper.hxx:62
@ PAPER_ENV_C8
Definition: paper.hxx:113
@ PAPER_A8
Definition: paper.hxx:100
@ PAPER_B8_ISO
Definition: paper.hxx:108
@ PAPER_KAI16
Definition: paper.hxx:72
@ PAPER_15x11
Definition: paper.hxx:90
@ PAPER_B7_ISO
Definition: paper.hxx:107
@ PAPER_TABLOID
Definition: paper.hxx:51
@ PAPER_ENV_ITALY
Definition: paper.hxx:84
@ PAPER_B4_ISO
Definition: paper.hxx:47
@ PAPER_ENV_C65
Definition: paper.hxx:57
@ PAPER_ARCHE
Definition: paper.hxx:118
@ PAPER_ENV_C6
Definition: paper.hxx:56
@ PAPER_ENV_C5
Definition: paper.hxx:55
@ PAPER_ONSCREENSHOW_4_3
Definition: paper.hxx:124
@ PAPER_A2
Definition: paper.hxx:43
@ PAPER_C
Definition: paper.hxx:61
@ PAPER_B4_JIS
Definition: paper.hxx:75
@ PAPER_A7
Definition: paper.hxx:99
@ PAPER_12x11
Definition: paper.hxx:98
@ PAPER_ENV_INVITE
Definition: paper.hxx:91
@ PAPER_FANFOLD_LEGAL_DE
Definition: paper.hxx:65
@ PAPER_ARCHA
Definition: paper.hxx:114
@ PAPER_LEDGER
Definition: paper.hxx:78