summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}