Line data Source code
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 OOX_DRAWINGML_LINEPROPERTIES_HXX
21 : #define OOX_DRAWINGML_LINEPROPERTIES_HXX
22 :
23 : #include "oox/drawingml/fillproperties.hxx"
24 :
25 : namespace oox {
26 : namespace drawingml {
27 :
28 : // ============================================================================
29 :
30 700 : struct LineArrowProperties
31 : {
32 : OptValue< sal_Int32 > moArrowType;
33 : OptValue< sal_Int32 > moArrowWidth;
34 : OptValue< sal_Int32 > moArrowLength;
35 :
36 : /** Overwrites all members that are explicitly set in rSourceProps. */
37 : void assignUsed( const LineArrowProperties& rSourceProps );
38 : };
39 :
40 : // ============================================================================
41 :
42 736 : struct OOX_DLLPUBLIC LineProperties
43 : {
44 : typedef ::std::pair< sal_Int32, sal_Int32 > DashStop;
45 : typedef ::std::vector< DashStop > DashStopVector;
46 :
47 : LineArrowProperties maStartArrow; /// Start line arrow style.
48 : LineArrowProperties maEndArrow; /// End line arrow style.
49 : FillProperties maLineFill; /// Line fill (solid, gradient, ...).
50 : DashStopVector maCustomDash; /// User-defined line dash style.
51 : OptValue< sal_Int32 > moLineWidth; /// Line width (EMUs).
52 : OptValue< sal_Int32 > moPresetDash; /// Preset dash (OOXML token).
53 : OptValue< sal_Int32 > moLineCompound; /// Line compound type (OOXML token).
54 : OptValue< sal_Int32 > moLineCap; /// Line cap (OOXML token).
55 : OptValue< sal_Int32 > moLineJoint; /// Line joint type (OOXML token).
56 :
57 : /** Overwrites all members that are explicitly set in rSourceProps. */
58 : void assignUsed( const LineProperties& rSourceProps );
59 :
60 : /** Writes the properties to the passed property map. */
61 : void pushToPropMap(
62 : ShapePropertyMap& rPropMap,
63 : const GraphicHelper& rGraphicHelper,
64 : sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const;
65 : };
66 :
67 : // ============================================================================
68 :
69 : } // namespace drawingml
70 : } // namespace oox
71 :
72 : #endif
73 :
74 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|