1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #ifndef OOX_DRAWINGML_LINEPROPERTIES_HXX 25 #define OOX_DRAWINGML_LINEPROPERTIES_HXX 26 27 #include "oox/drawingml/fillproperties.hxx" 28 29 namespace oox { 30 namespace drawingml { 31 32 // ============================================================================ 33 34 struct LineArrowProperties 35 { 36 OptValue< sal_Int32 > moArrowType; 37 OptValue< sal_Int32 > moArrowWidth; 38 OptValue< sal_Int32 > moArrowLength; 39 40 /** Overwrites all members that are explicitly set in rSourceProps. */ 41 void assignUsed( const LineArrowProperties& rSourceProps ); 42 }; 43 44 // ============================================================================ 45 46 struct LineProperties 47 { 48 typedef ::std::pair< sal_Int32, sal_Int32 > DashStop; 49 typedef ::std::vector< DashStop > DashStopVector; 50 51 LineArrowProperties maStartArrow; /// Start line arrow style. 52 LineArrowProperties maEndArrow; /// End line arrow style. 53 FillProperties maLineFill; /// Line fill (solid, gradient, ...). 54 DashStopVector maCustomDash; /// User-defined line dash style. 55 OptValue< sal_Int32 > moLineWidth; /// Line width (EMUs). 56 OptValue< sal_Int32 > moPresetDash; /// Preset dash (OOXML token). 57 OptValue< sal_Int32 > moLineCompound; /// Line compound type (OOXML token). 58 OptValue< sal_Int32 > moLineCap; /// Line cap (OOXML token). 59 OptValue< sal_Int32 > moLineJoint; /// Line joint type (OOXML token). 60 61 /** Overwrites all members that are explicitly set in rSourceProps. */ 62 void assignUsed( const LineProperties& rSourceProps ); 63 64 /** Writes the properties to the passed property map. */ 65 void pushToPropMap( 66 ShapePropertyMap& rPropMap, 67 const GraphicHelper& rGraphicHelper, 68 sal_Int32 nPhClr = API_RGB_TRANSPARENT ) const; 69 }; 70 71 // ============================================================================ 72 73 } // namespace drawingml 74 } // namespace oox 75 76 #endif 77 78