Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / oox / inc / drawingml / lineproperties.hxx
blobb0d27a278373998cbf011399e76c653e18fd33b4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_OOX_INC_DRAWINGML_LINEPROPERTIES_HXX
21 #define INCLUDED_OOX_INC_DRAWINGML_LINEPROPERTIES_HXX
23 #include <utility>
24 #include <vector>
26 #include <com/sun/star/drawing/LineCap.hpp>
27 #include <com/sun/star/drawing/LineJoint.hpp>
28 #include <com/sun/star/drawing/LineStyle.hpp>
29 #include <oox/dllapi.h>
30 #include <oox/helper/helper.hxx>
31 #include <sal/types.h>
33 #include <drawingml/fillproperties.hxx>
35 namespace oox { class GraphicHelper; }
37 namespace oox {
38 namespace drawingml {
40 class ShapePropertyMap;
42 struct LineArrowProperties
44 OptValue< sal_Int32 > moArrowType;
45 OptValue< sal_Int32 > moArrowWidth;
46 OptValue< sal_Int32 > moArrowLength;
48 /** Overwrites all members that are explicitly set in rSourceProps. */
49 void assignUsed( const LineArrowProperties& rSourceProps );
52 struct OOX_DLLPUBLIC LineProperties
54 typedef ::std::pair< sal_Int32, sal_Int32 > DashStop;
55 typedef ::std::vector< DashStop > DashStopVector;
57 LineArrowProperties maStartArrow; /// Start line arrow style.
58 LineArrowProperties maEndArrow; /// End line arrow style.
59 FillProperties maLineFill; /// Line fill (solid, gradient, ...).
60 DashStopVector maCustomDash; /// User-defined line dash style.
61 OptValue< sal_Int32 > moLineWidth; /// Line width (EMUs).
62 OptValue< sal_Int32 > moPresetDash; /// Preset dash (OOXML token).
63 OptValue< sal_Int32 > moLineCompound; /// Line compound type (OOXML token).
64 OptValue< sal_Int32 > moLineCap; /// Line cap (OOXML token).
65 OptValue< sal_Int32 > moLineJoint; /// Line joint type (OOXML token).
67 /** Overwrites all members that are explicitly set in rSourceProps. */
68 void assignUsed( const LineProperties& rSourceProps );
70 /** Writes the properties to the passed property map. */
71 void pushToPropMap(
72 ShapePropertyMap& rPropMap,
73 const GraphicHelper& rGraphicHelper,
74 ::Color nPhClr = API_RGB_TRANSPARENT ) const;
76 /** Calculates the line style attribute from the internal state of the object */
77 css::drawing::LineStyle getLineStyle() const;
78 /** Calculates the line cap attribute from the internal state of the object */
79 css::drawing::LineCap getLineCap() const;
80 /** Calculates the line joint attribute from the internal state of the object */
81 css::drawing::LineJoint getLineJoint() const;
82 /** Calculates the line width attribute from the internal state of the object */
83 sal_Int32 getLineWidth() const;
86 } // namespace drawingml
87 } // namespace oox
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */