1*e3508121SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*e3508121SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*e3508121SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*e3508121SAndrew Rist  * distributed with this work for additional information
6*e3508121SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*e3508121SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*e3508121SAndrew Rist  * "License"); you may not use this file except in compliance
9*e3508121SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*e3508121SAndrew Rist  *
11*e3508121SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*e3508121SAndrew Rist  *
13*e3508121SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*e3508121SAndrew Rist  * software distributed under the License is distributed on an
15*e3508121SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*e3508121SAndrew Rist  * KIND, either express or implied.  See the License for the
17*e3508121SAndrew Rist  * specific language governing permissions and limitations
18*e3508121SAndrew Rist  * under the License.
19*e3508121SAndrew Rist  *
20*e3508121SAndrew Rist  *************************************************************/
21*e3508121SAndrew Rist 
22*e3508121SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef OOX_DRAWINGML_CHART_AXISMODEL_HXX
25cdf0e10cSrcweir #define OOX_DRAWINGML_CHART_AXISMODEL_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "oox/drawingml/shape.hxx"
28cdf0e10cSrcweir #include "oox/drawingml/chart/titlemodel.hxx"
29cdf0e10cSrcweir 
30cdf0e10cSrcweir namespace oox {
31cdf0e10cSrcweir namespace drawingml {
32cdf0e10cSrcweir namespace chart {
33cdf0e10cSrcweir 
34cdf0e10cSrcweir // ============================================================================
35cdf0e10cSrcweir 
36cdf0e10cSrcweir struct AxisDispUnitsModel
37cdf0e10cSrcweir {
38cdf0e10cSrcweir     typedef ModelRef< Shape >       ShapeRef;
39cdf0e10cSrcweir     typedef ModelRef< TextBody >    TextBodyRef;
40cdf0e10cSrcweir     typedef ModelRef< LayoutModel > LayoutRef;
41cdf0e10cSrcweir     typedef ModelRef< TextModel >   TextRef;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir     ShapeRef            mxShapeProp;        /// Label frame formatting.
44cdf0e10cSrcweir     TextBodyRef         mxTextProp;         /// Label text formatting.
45cdf0e10cSrcweir     LayoutRef           mxLayout;           /// Layout/position of the axis units label.
46cdf0e10cSrcweir     TextRef             mxText;             /// Text source of the axis units label.
47cdf0e10cSrcweir     double              mfCustomUnit;       /// Custom unit size on value axis.
48cdf0e10cSrcweir     sal_Int32           mnBuiltInUnit;      /// Built-in unit on value axis.
49cdf0e10cSrcweir 
50cdf0e10cSrcweir     explicit            AxisDispUnitsModel();
51cdf0e10cSrcweir                         ~AxisDispUnitsModel();
52cdf0e10cSrcweir };
53cdf0e10cSrcweir 
54cdf0e10cSrcweir // ============================================================================
55cdf0e10cSrcweir 
56cdf0e10cSrcweir struct AxisModel
57cdf0e10cSrcweir {
58cdf0e10cSrcweir     typedef ModelRef< Shape >               ShapeRef;
59cdf0e10cSrcweir     typedef ModelRef< TextBody >            TextBodyRef;
60cdf0e10cSrcweir     typedef ModelRef< TitleModel >          TitleRef;
61cdf0e10cSrcweir     typedef ModelRef< AxisDispUnitsModel >  AxisDispUnitsRef;
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     ShapeRef            mxShapeProp;        /// Axis line formatting.
64cdf0e10cSrcweir     TextBodyRef         mxTextProp;         /// Axis label text formatting.
65cdf0e10cSrcweir     TitleRef            mxTitle;            /// Axis title.
66cdf0e10cSrcweir     AxisDispUnitsRef    mxDispUnits;        /// Axis units label.
67cdf0e10cSrcweir     ShapeRef            mxMajorGridLines;   /// Major grid lines formatting.
68cdf0e10cSrcweir     ShapeRef            mxMinorGridLines;   /// Minor grid lines formatting.
69cdf0e10cSrcweir     NumberFormat        maNumberFormat;     /// Number format for axis tick labels.
70cdf0e10cSrcweir     OptValue< double >  mofCrossesAt;       /// Position on this axis where another axis crosses.
71cdf0e10cSrcweir     OptValue< double >  mofMajorUnit;       /// Unit for major tick marks on date/value axis.
72cdf0e10cSrcweir     OptValue< double >  mofMinorUnit;       /// Unit for minor tick marks on date/value axis.
73cdf0e10cSrcweir     OptValue< double >  mofLogBase;         /// Logarithmic base for logarithmic axes.
74cdf0e10cSrcweir     OptValue< double >  mofMax;             /// Maximum axis value.
75cdf0e10cSrcweir     OptValue< double >  mofMin;             /// Minimum axis value.
76cdf0e10cSrcweir     OptValue< sal_Int32 > monBaseTimeUnit;  /// Base time unit shown on a date axis.
77cdf0e10cSrcweir     sal_Int32           mnAxisId;           /// Unique axis identifier.
78cdf0e10cSrcweir     sal_Int32           mnAxisPos;          /// Position of the axis (top/bottom/left/right).
79cdf0e10cSrcweir     sal_Int32           mnCrossAxisId;      /// Identifier of a crossing axis.
80cdf0e10cSrcweir     sal_Int32           mnCrossBetween;     /// This value axis crosses between or inside category.
81cdf0e10cSrcweir     sal_Int32           mnCrossMode;        /// Mode this axis crosses another axis (min, max, auto).
82cdf0e10cSrcweir     sal_Int32           mnLabelAlign;       /// Tick mark label alignment.
83cdf0e10cSrcweir     sal_Int32           mnLabelOffset;      /// Tick mark label distance from axis.
84cdf0e10cSrcweir     sal_Int32           mnMajorTickMark;    /// Major tick mark style.
85cdf0e10cSrcweir     sal_Int32           mnMajorTimeUnit;    /// Time unit for major tick marks on date axis.
86cdf0e10cSrcweir     sal_Int32           mnMinorTickMark;    /// Mainor tick mark style.
87cdf0e10cSrcweir     sal_Int32           mnMinorTimeUnit;    /// Time unit for minor tick marks on date axis.
88cdf0e10cSrcweir     sal_Int32           mnOrientation;      /// Axis orientation (value order min to max, or max to min).
89cdf0e10cSrcweir     sal_Int32           mnTickLabelPos;     /// Position of tick mark labels relative to the axis.
90cdf0e10cSrcweir     sal_Int32           mnTickLabelSkip;    /// Number of tick mark labels to skip.
91cdf0e10cSrcweir     sal_Int32           mnTickMarkSkip;     /// Number of tick marks to skip.
92cdf0e10cSrcweir     sal_Int32           mnTypeId;           /// Type identifier of this axis.
93cdf0e10cSrcweir     bool                mbAuto;             /// True = automatic selection of text/date axis type.
94cdf0e10cSrcweir     bool                mbDeleted;          /// True = axis has been deleted manually.
95cdf0e10cSrcweir     bool                mbNoMultiLevel;     /// True = no multi-level categories supported.
96cdf0e10cSrcweir 
97cdf0e10cSrcweir     explicit            AxisModel( sal_Int32 nTypeId );
98cdf0e10cSrcweir                         ~AxisModel();
99cdf0e10cSrcweir };
100cdf0e10cSrcweir 
101cdf0e10cSrcweir // ============================================================================
102cdf0e10cSrcweir 
103cdf0e10cSrcweir } // namespace chart
104cdf0e10cSrcweir } // namespace drawingml
105cdf0e10cSrcweir } // namespace oox
106cdf0e10cSrcweir 
107cdf0e10cSrcweir #endif
108