LibreOffice Module drawinglayer (master) 1
emfpstringformat.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#pragma once
21
22#include "emfphelperdata.hxx"
23
24namespace emfplushelper
25{
26 const sal_uInt32 StringFormatDirectionRightToLeft = 0x00000001;
27 const sal_uInt32 StringFormatDirectionVertical = 0x00000002;
28 const sal_uInt32 StringFormatNoFitBlackBox = 0x00000004;
29 const sal_uInt32 StringFormatDisplayFormatControl = 0x00000020;
30 const sal_uInt32 StringFormatNoFontFallback = 0x00000400;
31 const sal_uInt32 StringFormatMeasureTrailingSpaces = 0x00000800;
32 const sal_uInt32 StringFormatNoWrap = 0x00001000;
33 const sal_uInt32 StringFormatLineLimit = 0x00002000;
34 const sal_uInt32 StringFormatNoClip = 0x00004000;
35 const sal_uInt32 StringFormatBypassGDI = 0x80000000;
36
38 {
39 StringAlignmentNear = 0x00000000,
41 StringAlignmentFar = 0x00000002
42 };
43
45 {
50 };
51
53 {
54 HotkeyPrefixNone = 0x00000000,
55 HotkeyPrefixShow = 0x00000001,
56 HotkeyPrefixHide = 0x00000002
57 };
58
60 {
61 StringTrimmingNone = 0x00000000,
63 StringTrimmingWord = 0x00000002,
67 };
68
70 {
71 sal_uInt32 header;
73 sal_uInt32 language;
74 sal_uInt32 stringAlignment; // Horizontal alignment
75 sal_uInt32 lineAlign; // Vertical alignment
77 sal_uInt32 digitLanguage;
79 sal_Int32 hotkeyPrefix;
80 float leadingMargin; // Length of the space to add to the starting position of a string.
81 float trailingMargin; // Length of the space to leave following a string.
82 float tracking;
83 sal_Int32 trimming;
84 sal_Int32 tabStopCount;
85 sal_Int32 rangeCount;
86
88 void Read(SvMemoryStream &s);
89
90 // flags table from MS-EMFPLUS doc
91 bool DirectionRightToLeft() const { return stringFormatFlags & 0x00000001;}
92 bool DirectionVertical() const { return stringFormatFlags & 0x00000002;}
93 bool NoFitBlackBox() const { return stringFormatFlags & 0x00000004;}
94 bool DisplayFormatControl() const { return stringFormatFlags & 0x00000020;}
95 bool NoFontFallback() const { return stringFormatFlags & 0x00000400;}
96 bool MeasureTrailingSpaces() const { return stringFormatFlags & 0x00000800;}
97 bool NoWrap() const { return stringFormatFlags & 0x00001000;}
98 bool LineLimit() const { return stringFormatFlags & 0x00002000;}
99 bool NoClip() const { return stringFormatFlags & 0x00004000;}
100 bool BypassGDI() const { return stringFormatFlags & 0x80000000;}
101 };
102}
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const sal_uInt32 StringFormatNoClip
const sal_uInt32 StringFormatNoFitBlackBox
const sal_uInt32 StringFormatDirectionVertical
const sal_uInt32 StringFormatBypassGDI
@ StringDigitSubstitutionTraditional
const sal_uInt32 StringFormatMeasureTrailingSpaces
const sal_uInt32 StringFormatLineLimit
const sal_uInt32 StringFormatDisplayFormatControl
const sal_uInt32 StringFormatNoWrap
const sal_uInt32 StringFormatDirectionRightToLeft
const sal_uInt32 StringFormatNoFontFallback