summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/sbx/sbxdate.cxx25
1 files changed, 22 insertions, 3 deletions
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 4a9749a28b74..e59c9214a90b 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -26,6 +26,8 @@
#include <basic/sbx.hxx>
#include <basic/sberrors.hxx>
#include "sbxconv.hxx"
+#include <runtime.hxx>
+#include <sbintern.hxx>
#include <math.h>
#include <comphelper/processfactory.hxx>
#include <memory>
@@ -101,8 +103,16 @@ double ImpGetDate( const SbxValues* p )
else
{
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
-
- std::unique_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType ));
+ std::shared_ptr<SvNumberFormatter> pFormatter;
+ if (GetSbData()->pInst)
+ {
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
+ }
+ else
+ {
+ sal_uInt32 nDummy;
+ pFormatter = SbiInstance::PrepareNumberFormatter( nDummy, nDummy, nDummy );
+ }
sal_uInt32 nIndex;
sal_Int32 nCheckPos = 0;
@@ -269,7 +279,16 @@ start:
Color* pColor;
LanguageType eLangType = Application::GetSettings().GetLanguageTag().getLanguageType();
- std::unique_ptr<SvNumberFormatter> pFormatter(new SvNumberFormatter( comphelper::getProcessComponentContext(), eLangType ));
+ std::shared_ptr<SvNumberFormatter> pFormatter;
+ if (GetSbData()->pInst)
+ {
+ pFormatter = GetSbData()->pInst->GetNumberFormatter();
+ }
+ else
+ {
+ sal_uInt32 nDummy;
+ pFormatter = SbiInstance::PrepareNumberFormatter( nDummy, nDummy, nDummy );
+ }
sal_uInt32 nIndex;
sal_Int32 nCheckPos = 0;
_CONSTASCII_USTRINGPARAM for quoted OUStringsThomas Arnhold 2013-03-14remove legacy build.pl prj/build.lst files.Michael Meeks 2013-03-09fdo#43460: use isEmpty()Thomas Arnhold 2013-03-02remove minor.mkMatúš Kukan 2013-02-28remove all d.lstMichael Stahl 2013-02-28bin PATCH_SO_NAME crackAndras Timar 2013-02-13fix translation of crash reporterDavid Tardon 2013-02-13let's split this for easier cherry-pickingDavid Tardon 2013-02-13fdo#60386 fix l10n of windows shell extensionDavid Tardon 2013-01-26gbuild: do not copy boost headers aroundMichael Stahl 2013-01-26crashrep: fix conditionals: it used to be built in non-pro tooMichael Stahl 2013-01-22convert crashrep to gbuild and add to tail_buildPeter Foley 2013-01-07fix misleading comment.Michael Meeks 2012-12-27Some cppcheck cleaningJulien Nabet 2012-11-28We only support MSVC 2008 (_MSC_VER 1500) or laterTor Lillqvist 2012-10-01translations is a source-only moduleAndras Timar 2012-10-01use "LibreOffice" as the default value of ProductKey for crashrepTakeshi Abe 2012-08-11Remove unused local varsJulien Nabet 2012-07-02Remove unused definesThomas Arnhold 2012-07-01Remove unused definesThomas Arnhold