1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef OOX_DRAWINGML_CHART_AXISMODEL_HXX 29 #define OOX_DRAWINGML_CHART_AXISMODEL_HXX 30 31 #include "oox/drawingml/shape.hxx" 32 #include "oox/drawingml/chart/titlemodel.hxx" 33 34 namespace oox { 35 namespace drawingml { 36 namespace chart { 37 38 // ============================================================================ 39 40 struct AxisDispUnitsModel 41 { 42 typedef ModelRef< Shape > ShapeRef; 43 typedef ModelRef< TextBody > TextBodyRef; 44 typedef ModelRef< LayoutModel > LayoutRef; 45 typedef ModelRef< TextModel > TextRef; 46 47 ShapeRef mxShapeProp; /// Label frame formatting. 48 TextBodyRef mxTextProp; /// Label text formatting. 49 LayoutRef mxLayout; /// Layout/position of the axis units label. 50 TextRef mxText; /// Text source of the axis units label. 51 double mfCustomUnit; /// Custom unit size on value axis. 52 sal_Int32 mnBuiltInUnit; /// Built-in unit on value axis. 53 54 explicit AxisDispUnitsModel(); 55 ~AxisDispUnitsModel(); 56 }; 57 58 // ============================================================================ 59 60 struct AxisModel 61 { 62 typedef ModelRef< Shape > ShapeRef; 63 typedef ModelRef< TextBody > TextBodyRef; 64 typedef ModelRef< TitleModel > TitleRef; 65 typedef ModelRef< AxisDispUnitsModel > AxisDispUnitsRef; 66 67 ShapeRef mxShapeProp; /// Axis line formatting. 68 TextBodyRef mxTextProp; /// Axis label text formatting. 69 TitleRef mxTitle; /// Axis title. 70 AxisDispUnitsRef mxDispUnits; /// Axis units label. 71 ShapeRef mxMajorGridLines; /// Major grid lines formatting. 72 ShapeRef mxMinorGridLines; /// Minor grid lines formatting. 73 NumberFormat maNumberFormat; /// Number format for axis tick labels. 74 OptValue< double > mofCrossesAt; /// Position on this axis where another axis crosses. 75 OptValue< double > mofMajorUnit; /// Unit for major tick marks on date/value axis. 76 OptValue< double > mofMinorUnit; /// Unit for minor tick marks on date/value axis. 77 OptValue< double > mofLogBase; /// Logarithmic base for logarithmic axes. 78 OptValue< double > mofMax; /// Maximum axis value. 79 OptValue< double > mofMin; /// Minimum axis value. 80 OptValue< sal_Int32 > monBaseTimeUnit; /// Base time unit shown on a date axis. 81 sal_Int32 mnAxisId; /// Unique axis identifier. 82 sal_Int32 mnAxisPos; /// Position of the axis (top/bottom/left/right). 83 sal_Int32 mnCrossAxisId; /// Identifier of a crossing axis. 84 sal_Int32 mnCrossBetween; /// This value axis crosses between or inside category. 85 sal_Int32 mnCrossMode; /// Mode this axis crosses another axis (min, max, auto). 86 sal_Int32 mnLabelAlign; /// Tick mark label alignment. 87 sal_Int32 mnLabelOffset; /// Tick mark label distance from axis. 88 sal_Int32 mnMajorTickMark; /// Major tick mark style. 89 sal_Int32 mnMajorTimeUnit; /// Time unit for major tick marks on date axis. 90 sal_Int32 mnMinorTickMark; /// Mainor tick mark style. 91 sal_Int32 mnMinorTimeUnit; /// Time unit for minor tick marks on date axis. 92 sal_Int32 mnOrientation; /// Axis orientation (value order min to max, or max to min). 93 sal_Int32 mnTickLabelPos; /// Position of tick mark labels relative to the axis. 94 sal_Int32 mnTickLabelSkip; /// Number of tick mark labels to skip. 95 sal_Int32 mnTickMarkSkip; /// Number of tick marks to skip. 96 sal_Int32 mnTypeId; /// Type identifier of this axis. 97 bool mbAuto; /// True = automatic selection of text/date axis type. 98 bool mbDeleted; /// True = axis has been deleted manually. 99 bool mbNoMultiLevel; /// True = no multi-level categories supported. 100 101 explicit AxisModel( sal_Int32 nTypeId ); 102 ~AxisModel(); 103 }; 104 105 // ============================================================================ 106 107 } // namespace chart 108 } // namespace drawingml 109 } // namespace oox 110 111 #endif 112