fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / view / axes / VAxisBase.hxx
blob998f0da4e9bc4783097d342c7cbf530bb3493fb2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_VIEW_AXES_VAXISBASE_HXX
20 #define INCLUDED_CHART2_SOURCE_VIEW_AXES_VAXISBASE_HXX
22 #include "VAxisOrGridBase.hxx"
23 #include "VAxisProperties.hxx"
24 #include "Tickmarks.hxx"
25 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
27 namespace chart
30 /**
33 class VAxisBase : public VAxisOrGridBase
35 public:
36 VAxisBase( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
37 , const AxisProperties& rAxisProperties
38 , const ::com::sun::star::uno::Reference<
39 ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
40 virtual ~VAxisBase();
42 /**
43 * Return the number of dimensions the diagram has. 2 for x and y, and 3
44 * for x, y, and z.
46 sal_Int32 getDimensionCount() const;
48 virtual void createMaximumLabels()=0;
49 virtual void createLabels()=0;
50 virtual void updatePositions()=0;
52 virtual bool isAnythingToDraw();
53 virtual void initAxisLabelProperties(
54 const ::com::sun::star::awt::Size& rFontReferenceSize
55 , const ::com::sun::star::awt::Rectangle& rMaximumSpaceForLabels );
57 virtual void setExplicitScaleAndIncrement(
58 const ExplicitScaleData& rScale
59 , const ExplicitIncrementData& rIncrement )
60 throw (::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
62 virtual sal_Int32 estimateMaximumAutoMainIncrementCount();
63 virtual void createAllTickInfos( TickInfoArraysType& rAllTickInfos );
65 void setExtraLinePositionAtOtherAxis( double fCrossingAt );
67 protected: //methods
68 static size_t getIndexOfLongestLabel( const css::uno::Sequence<OUString>& rLabels );
69 void removeTextShapesFromTicks();
70 void updateUnscaledValuesAtTicks( TickIter& rIter );
72 virtual bool prepareShapeCreation();
73 void recordMaximumTextSize( const ::com::sun::star::uno::Reference<
74 ::com::sun::star::drawing::XShape >& xShape
75 , double fRotationAngleDegree );
77 bool isDateAxis() const;
78 bool isComplexCategoryAxis() const;
80 protected: //member
81 ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier;
82 AxisProperties m_aAxisProperties;
83 AxisLabelProperties m_aAxisLabelProperties;
84 ::com::sun::star::uno::Sequence< OUString > m_aTextLabels;
85 bool m_bUseTextLabels;
87 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > m_xGroupShape_Shapes;
88 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > m_xTextTarget;
90 /**
91 * This typically consists of 2 TickInfo vectors (i.e. the outer vector
92 * has 2 child vector elements) for normal axis. The first vector
93 * corresponds with the major ticks while the second corresponds with the
94 * minor ticks.
96 * It may have more than 2 TickInfo vectors for complex category axis
97 * which has multi-level axis labels.
99 TickInfoArraysType m_aAllTickInfos;
100 bool m_bReCreateAllTickInfos;
102 bool m_bRecordMaximumTextSize;
103 sal_Int32 m_nMaximumTextWidthSoFar;
104 sal_Int32 m_nMaximumTextHeightSoFar;
107 } //namespace chart
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */