summaryrefslogtreecommitdiff
path: root/chart2/source/view/axes/VAxisBase.hxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-05-22 18:09:43 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-05-22 18:09:43 +0000
commit96be31370180e7bb29f54d7cfc553a221e8b6658 (patch)
treeb8c3009847f09e944e6d745da911b774308a0762 /chart2/source/view/axes/VAxisBase.hxx
parent2f3250e072788fa670aa98b60c192c011aba7b80 (diff)
INTEGRATION: CWS chart2mst3 (1.1.2); FILE ADDED
2006/09/24 09:12:56 iha 1.1.2.6: #i61970# correct implementation of axis at 2006/08/29 12:26:22 iha 1.1.2.5: correct overlap detection for rotated axis labels 2006/08/25 17:16:47 iha 1.1.2.4: text- and diagram-size dependent auto main step width 2006/08/23 17:07:26 iha 1.1.2.3: enable axis to estimate the maximum automatic MainIncrementCount, reduce count to 2 for net charts 2006/08/22 19:46:36 iha 1.1.2.2: some axes cleanup 2006/08/10 15:46:25 iha 1.1.2.1: Axis Label Layout - Font&Diagram Size
Diffstat (limited to 'chart2/source/view/axes/VAxisBase.hxx')
-rw-r--r--chart2/source/view/axes/VAxisBase.hxx117
1 files changed, 117 insertions, 0 deletions
diff --git a/chart2/source/view/axes/VAxisBase.hxx b/chart2/source/view/axes/VAxisBase.hxx
new file mode 100644
index 000000000..b21c4c868
--- /dev/null
+++ b/chart2/source/view/axes/VAxisBase.hxx
@@ -0,0 +1,117 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: VAxisBase.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: vg $ $Date: 2007-05-22 19:09:43 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef _CHART2_VAXISBASE_HXX
+#define _CHART2_VAXISBASE_HXX
+
+#include "VAxisOrGridBase.hxx"
+#include "VAxisProperties.hxx"
+#include "TickmarkHelper.hxx"
+
+#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+#endif
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+class VAxisBase : public VAxisOrGridBase
+{
+public:
+ VAxisBase( sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount
+ , const AxisProperties& rAxisProperties
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
+ virtual ~VAxisBase();
+
+ sal_Int32 getDimensionCount();
+
+ virtual void SAL_CALL createMaximumLabels()=0;
+ virtual void SAL_CALL createLabels()=0;
+ virtual void SAL_CALL updatePositions()=0;
+
+ virtual sal_Bool SAL_CALL isAnythingToDraw();
+ virtual void SAL_CALL initAxisLabelProperties(
+ const ::com::sun::star::awt::Size& rFontReferenceSize
+ , const ::com::sun::star::awt::Rectangle& rMaximumSpaceForLabels );
+
+ virtual void SAL_CALL setExplicitScaleAndIncrement(
+ const ::com::sun::star::chart2::ExplicitScaleData& rScale
+ , const ::com::sun::star::chart2::ExplicitIncrementData& rIncrement )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ virtual sal_Int32 estimateMaximumAutoMainIncrementCount();
+
+ void setExrtaLinePositionAtOtherAxis( const double& fCrossingAt );
+
+ //-------------------------------------------------------------------------
+ //-------------------------------------------------------------------------
+protected: //methods
+ sal_Int32 getIndexOfLongestLabel( const ::com::sun::star::uno::Sequence< rtl::OUString >& rLabels );
+ void removeTextShapesFromTicks( TickIter& rIter, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget );
+ void updateUnscaledValuesAtTicks( TickIter& rIter );
+
+ virtual bool prepareShapeCreation();
+ void recordMaximumTextSize( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape
+ , double fRotationAngleDegree );
+
+protected: //member
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier;
+ AxisProperties m_aAxisProperties;
+ AxisLabelProperties m_aAxisLabelProperties;
+ ::com::sun::star::uno::Sequence< rtl::OUString > m_aTextLabels;
+ bool m_bUseTextLabels;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > m_xGroupShape_Shapes;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > m_xTextTarget;
+
+ ::std::vector< ::std::vector< TickInfo > > m_aAllTickInfos;
+ bool m_bReCreateAllTickInfos;
+
+ bool m_bRecordMaximumTextSize;
+ sal_Int32 m_nMaximumTextWidthSoFar;
+ sal_Int32 m_nMaximumTextHeightSoFar;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif