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_CHART_AXISMODEL_HXX 25 #define OOX_DRAWINGML_CHART_AXISMODEL_HXX 26 27 #include "oox/drawingml/shape.hxx" 28 #include "oox/drawingml/chart/titlemodel.hxx" 29 30 namespace oox { 31 namespace drawingml { 32 namespace chart { 33 34 // ============================================================================ 35 36 struct AxisDispUnitsModel 37 { 38 typedef ModelRef< Shape > ShapeRef; 39 typedef ModelRef< TextBody > TextBodyRef; 40 typedef ModelRef< LayoutModel > LayoutRef; 41 typedef ModelRef< TextModel > TextRef; 42 43 ShapeRef mxShapeProp; /// Label frame formatting. 44 TextBodyRef mxTextProp; /// Label text formatting. 45 LayoutRef mxLayout; /// Layout/position of the axis units label. 46 TextRef mxText; /// Text source of the axis units label. 47 double mfCustomUnit; /// Custom unit size on value axis. 48 sal_Int32 mnBuiltInUnit; /// Built-in unit on value axis. 49 50 explicit AxisDispUnitsModel(); 51 ~AxisDispUnitsModel(); 52 }; 53 54 // ============================================================================ 55 56 struct AxisModel 57 { 58 typedef ModelRef< Shape > ShapeRef; 59 typedef ModelRef< TextBody > TextBodyRef; 60 typedef ModelRef< TitleModel > TitleRef; 61 typedef ModelRef< AxisDispUnitsModel > AxisDispUnitsRef; 62 63 ShapeRef mxShapeProp; /// Axis line formatting. 64 TextBodyRef mxTextProp; /// Axis label text formatting. 65 TitleRef mxTitle; /// Axis title. 66 AxisDispUnitsRef mxDispUnits; /// Axis units label. 67 ShapeRef mxMajorGridLines; /// Major grid lines formatting. 68 ShapeRef mxMinorGridLines; /// Minor grid lines formatting. 69 NumberFormat maNumberFormat; /// Number format for axis tick labels. 70 OptValue< double > mofCrossesAt; /// Position on this axis where another axis crosses. 71 OptValue< double > mofMajorUnit; /// Unit for major tick marks on date/value axis. 72 OptValue< double > mofMinorUnit; /// Unit for minor tick marks on date/value axis. 73 OptValue< double > mofLogBase; /// Logarithmic base for logarithmic axes. 74 OptValue< double > mofMax; /// Maximum axis value. 75 OptValue< double > mofMin; /// Minimum axis value. 76 OptValue< sal_Int32 > monBaseTimeUnit; /// Base time unit shown on a date axis. 77 sal_Int32 mnAxisId; /// Unique axis identifier. 78 sal_Int32 mnAxisPos; /// Position of the axis (top/bottom/left/right). 79 sal_Int32 mnCrossAxisId; /// Identifier of a crossing axis. 80 sal_Int32 mnCrossBetween; /// This value axis crosses between or inside category. 81 sal_Int32 mnCrossMode; /// Mode this axis crosses another axis (min, max, auto). 82 sal_Int32 mnLabelAlign; /// Tick mark label alignment. 83 sal_Int32 mnLabelOffset; /// Tick mark label distance from axis. 84 sal_Int32 mnMajorTickMark; /// Major tick mark style. 85 sal_Int32 mnMajorTimeUnit; /// Time unit for major tick marks on date axis. 86 sal_Int32 mnMinorTickMark; /// Mainor tick mark style. 87 sal_Int32 mnMinorTimeUnit; /// Time unit for minor tick marks on date axis. 88 sal_Int32 mnOrientation; /// Axis orientation (value order min to max, or max to min). 89 sal_Int32 mnTickLabelPos; /// Position of tick mark labels relative to the axis. 90 sal_Int32 mnTickLabelSkip; /// Number of tick mark labels to skip. 91 sal_Int32 mnTickMarkSkip; /// Number of tick marks to skip. 92 sal_Int32 mnTypeId; /// Type identifier of this axis. 93 bool mbAuto; /// True = automatic selection of text/date axis type. 94 bool mbDeleted; /// True = axis has been deleted manually. 95 bool mbNoMultiLevel; /// True = no multi-level categories supported. 96 97 explicit AxisModel( sal_Int32 nTypeId ); 98 ~AxisModel(); 99 }; 100 101 // ============================================================================ 102 103 } // namespace chart 104 } // namespace drawingml 105 } // namespace oox 106 107 #endif 108