diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:33:40 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-03-18 15:33:40 +0100 |
commit | e6064484fae8aa2797f86c68e9a8d23d2e213367 (patch) | |
tree | db2f4d140efca43ab01dee4fc053fff0829d106b /chart2/source/view/inc/ScaleAutomatism.hxx | |
parent | 9e0a09e89c38774dd1af902387a8b25de158b634 (diff) | |
parent | 378c75a798c8baa34cb26e7f07fe28cb5ee2a85f (diff) |
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts:
chart2/source/controller/main/UndoManager.cxx
chart2/source/tools/RegressionCurveHelper.cxx
sc/inc/address.hxx
sc/inc/attrib.hxx
sc/inc/bigrange.hxx
sc/inc/callform.hxx
sc/inc/cell.hxx
sc/inc/chartarr.hxx
sc/inc/chartlis.hxx
sc/inc/chgtrack.hxx
sc/inc/collect.hxx
sc/inc/compiler.hxx
sc/inc/detdata.hxx
sc/inc/document.hxx
sc/inc/fillinfo.hxx
sc/inc/olinetab.hxx
sc/inc/prnsave.hxx
sc/inc/queryparam.hxx
sc/inc/sc.hrc
sc/inc/scabstdlg.hxx
sc/inc/table.hxx
sc/inc/validat.hxx
sc/inc/zforauto.hxx
sc/source/core/data/documen2.cxx
sc/source/core/data/document.cxx
sc/source/core/data/table1.cxx
sc/source/core/tool/address.cxx
sc/source/core/tool/token.cxx
sc/source/filter/excel/frmbase.cxx
sc/source/filter/excel/impop.cxx
sc/source/filter/excel/xename.cxx
sc/source/filter/inc/formel.hxx
sc/source/filter/inc/xename.hxx
sc/source/filter/xml/xmlexprt.cxx
sc/source/filter/xml/xmlnexpi.cxx
sc/source/filter/xml/xmlnexpi.hxx
sc/source/ui/dbgui/filtdlg.cxx
sc/source/ui/inc/docfunc.hxx
sc/source/ui/inc/namedlg.hxx
sc/source/ui/namedlg/namedlg.cxx
sc/source/ui/src/namedlg.src
Diffstat (limited to 'chart2/source/view/inc/ScaleAutomatism.hxx')
-rw-r--r-- | chart2/source/view/inc/ScaleAutomatism.hxx | 37 |
1 files changed, 26 insertions, 11 deletions
diff --git a/chart2/source/view/inc/ScaleAutomatism.hxx b/chart2/source/view/inc/ScaleAutomatism.hxx index 83cd0a9e15da..2ebe000c932c 100644 --- a/chart2/source/view/inc/ScaleAutomatism.hxx +++ b/chart2/source/view/inc/ScaleAutomatism.hxx @@ -28,10 +28,11 @@ #ifndef _CHART2_SCALEAUTOMATISM_HXX #define _CHART2_SCALEAUTOMATISM_HXX -#include <com/sun/star/chart2/ExplicitIncrementData.hpp> -#include <com/sun/star/chart2/ExplicitScaleData.hpp> +#include "chartview/ExplicitScaleValues.hxx" #include <com/sun/star/chart2/ScaleData.hpp> +#include <tools/date.hxx> + //............................................................................. namespace chart { @@ -45,7 +46,7 @@ class ScaleAutomatism { public: explicit ScaleAutomatism( - const ::com::sun::star::chart2::ScaleData& rSourceScale ); + const ::com::sun::star::chart2::ScaleData& rSourceScale, const Date& rNullDate ); virtual ~ScaleAutomatism(); /** Expands own value range with the passed minimum and maximum. */ @@ -76,30 +77,41 @@ public: of the axis and the font size of the axis caption text. */ void setMaximumAutoMainIncrementCount( sal_Int32 nMaximumAutoMainIncrementCount ); + /** Sets the time resolution to be used in case it is not set explicitly within the scale + */ + void setAutomaticTimeResolution( sal_Int32 nTimeResolution ); + /** Fills the passed scale data and increment data according to the own settings. */ void calculateExplicitScaleAndIncrement( - ::com::sun::star::chart2::ExplicitScaleData& rExplicitScale, - ::com::sun::star::chart2::ExplicitIncrementData& rExplicitIncrement ) const; + ExplicitScaleData& rExplicitScale, + ExplicitIncrementData& rExplicitIncrement ) const; ::com::sun::star::chart2::ScaleData getScale() const; + Date getNullDate() const; private: /** Fills the passed scale data and increment data for category scaling. */ void calculateExplicitIncrementAndScaleForCategory( - ::com::sun::star::chart2::ExplicitScaleData& rExplicitScale, - ::com::sun::star::chart2::ExplicitIncrementData& rExplicitIncrement, + ExplicitScaleData& rExplicitScale, + ExplicitIncrementData& rExplicitIncrement, bool bAutoMinimum, bool bAutoMaximum ) const; /** Fills the passed scale data and increment data for logarithmic scaling. */ void calculateExplicitIncrementAndScaleForLogarithmic( - ::com::sun::star::chart2::ExplicitScaleData& rExplicitScale, - ::com::sun::star::chart2::ExplicitIncrementData& rExplicitIncrement, + ExplicitScaleData& rExplicitScale, + ExplicitIncrementData& rExplicitIncrement, bool bAutoMinimum, bool bAutoMaximum ) const; /** Fills the passed scale data and increment data for linear scaling. */ void calculateExplicitIncrementAndScaleForLinear( - ::com::sun::star::chart2::ExplicitScaleData& rExplicitScale, - ::com::sun::star::chart2::ExplicitIncrementData& rExplicitIncrement, + ExplicitScaleData& rExplicitScale, + ExplicitIncrementData& rExplicitIncrement, + bool bAutoMinimum, bool bAutoMaximum ) const; + + /** Fills the passed scale data and increment data for date-time axis. */ + void calculateExplicitIncrementAndScaleForDateTimeAxis( + ExplicitScaleData& rExplicitScale, + ExplicitIncrementData& rExplicitIncrement, bool bAutoMinimum, bool bAutoMaximum ) const; private: @@ -112,6 +124,9 @@ private: bool m_bExpandIfValuesCloseToBorder; /// true = Expand if values are too close to the borders. bool m_bExpandWideValuesToZero; /// true = Expand wide spread values to zero. bool m_bExpandNarrowValuesTowardZero; /// true = Expand narrow range toward zero (add half of range). + sal_Int32 m_nTimeResolution;// a constant out of ::com::sun::star::chart::TimeUnit + + Date m_aNullDate; }; //............................................................................. |