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