summaryrefslogtreecommitdiff
path: root/chart2/source/tools
diff options
context:
space:
mode:
authorIngrid Halama [iha] <Ingrid.Halama@oracle.com>2011-01-19 17:50:04 +0100
committerIngrid Halama [iha] <Ingrid.Halama@oracle.com>2011-01-19 17:50:04 +0100
commit796dfe2205b9a7735e7fb908b3b4fe7d74d76170 (patch)
tree3306a227322e6f3b9abcfc89fb3fd787289fe2ea /chart2/source/tools
parentb86301a3311c67e4e322331295b04f6a1a9c765a (diff)
chart46: #i25706# implement date axis - #i116467# change behaviour of own data table
Diffstat (limited to 'chart2/source/tools')
-rwxr-xr-xchart2/source/tools/DiagramHelper.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 58460c0749a5..d442797d8ce1 100755
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -42,6 +42,7 @@
#include "ChartModelHelper.hxx"
#include "RelativePositionHelper.hxx"
#include "ControllerLockGuard.hxx"
+#include "NumberFormatterWrapper.hxx"
#include <com/sun/star/chart/MissingValueTreatment.hpp>
#include <com/sun/star/chart/XChartDocument.hpp>
@@ -64,7 +65,7 @@
#include <unotools/saveopt.hxx>
#include <rtl/math.hxx>
-
+#include <svl/zformat.hxx>
// header for class Application
#include <vcl/svapp.hxx>
@@ -1192,6 +1193,16 @@ sal_Int32 DiagramHelper::getDateNumberFormat( const Reference< util::XNumberForm
nRet = aKeySeq[0];
}
}
+
+ //try to get a date format with full year display
+ NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
+ SvNumberFormatter* pNumFormatter = aNumberFormatterWrapper.getSvNumberFormatter();
+ if( pNumFormatter )
+ {
+ const SvNumberformat* pFormat = pNumFormatter->GetEntry( nRet );
+ if( pFormat )
+ nRet = pNumFormatter->GetFormatIndex( NF_DATE_SYS_DDMMYYYY, pFormat->GetLanguage() );
+ }
return nRet;
}