LibreOffice Module oox (master)  1
axfontdata.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_OOX_OLE_AXFONTDATA_HXX
21 #define INCLUDED_OOX_OLE_AXFONTDATA_HXX
22 
23 #include <oox/dllapi.h>
24 #include <rtl/ustring.hxx>
25 #include <sal/types.h>
26 #include <o3tl/typed_flags_set.hxx>
27 
28 namespace oox {
29  class BinaryInputStream;
30  class BinaryOutputStream;
31 }
32 
33 enum class AxFontFlags {
34  NONE = 0x00000000,
35  Bold = 0x00000001,
36  Italic = 0x00000002,
37  Underline = 0x00000004,
38  Strikeout = 0x00000008,
39  Disabled = 0x00002000,
40  AutoColor = 0x40000000,
41 };
42 namespace o3tl {
43  template<> struct typed_flags<AxFontFlags> : is_typed_flags<AxFontFlags, 0x4000200f> {};
44 }
45 
46 namespace oox::ole {
47 
48 enum class AxHorizontalAlign {
49  Left = 1, Right = 2, Center = 3
50 };
51 
54 {
55  OUString maFontName;
57  sal_Int32 mnFontHeight;
58  sal_Int32 mnFontCharSet;
61 
62  explicit AxFontData();
63 
65  sal_Int16 getHeightPoints() const;
67  void setHeightPoints( sal_Int16 nPoints );
68 
70  bool importBinaryModel( BinaryInputStream& rInStrm );
71 
72  void exportBinaryModel( BinaryOutputStream& rOutStrm );
75  bool importStdFont( BinaryInputStream& rInStrm );
78  bool importGuidAndFont( BinaryInputStream& rInStrm );
79 };
80 
81 
82 } // namespace oox::ole
83 
84 #endif
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 mnFontHeight
Height of the font (not really twips, see code).
Definition: axfontdata.hxx:57
OOX_DLLPUBLIC bool importStdFont(StdFontInfo &orFontInfo, BinaryInputStream &rInStrm, bool bWithGuid)
Imports an OLE StdFont font structure from the current position of the passed binary stream...
Definition: olehelper.cxx:279
Interface for binary output stream classes.
bool mbDblUnderline
True = double underline style (legacy VML drawing controls only).
Definition: axfontdata.hxx:60
All entries of a font property.
Definition: axfontdata.hxx:53
AxHorizontalAlign mnHorAlign
Horizontal text alignment.
Definition: axfontdata.hxx:59
OUString maFontName
Name of the used font.
Definition: axfontdata.hxx:55
Interface for binary input stream classes.
AxFontFlags mnFontEffects
Font effect flags.
Definition: axfontdata.hxx:56
sal_Int32 mnFontCharSet
Windows character set of the font.
Definition: axfontdata.hxx:58
#define OOX_DLLPUBLIC
Definition: dllapi.h:28
AxFontFlags
Definition: axfontdata.hxx:33