1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include "emfphelperdata.hxx"
24 namespace emfplushelper
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;
39 StringAlignmentNear
= 0x00000000,
40 StringAlignmentCenter
= 0x00000001,
41 StringAlignmentFar
= 0x00000002
44 enum StringDigitSubstitution
46 StringDigitSubstitutionUser
= 0x00000000,
47 StringDigitSubstitutionNone
= 0x00000001,
48 StringDigitSubstitutionNational
= 0x00000002,
49 StringDigitSubstitutionTraditional
= 0x00000003
54 HotkeyPrefixNone
= 0x00000000,
55 HotkeyPrefixShow
= 0x00000001,
56 HotkeyPrefixHide
= 0x00000002
61 StringTrimmingNone
= 0x00000000,
62 StringTrimmingCharacter
= 0x00000001,
63 StringTrimmingWord
= 0x00000002,
64 StringTrimmingEllipsisCharacter
= 0x00000003,
65 StringTrimmingEllipsisWord
= 0x00000004,
66 StringTrimmingEllipsisPath
= 0x00000005
69 struct EMFPStringFormat
: public EMFPObject
72 sal_uInt32 stringFormatFlags
;
74 sal_uInt32 stringAlignment
; // Horizontal alignment
75 sal_uInt32 lineAlign
; // Vertical alignment
76 sal_uInt32 digitSubstitution
;
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.
84 sal_Int32 tabStopCount
;
88 void Read(SvMemoryStream
&s
);
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;}
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */