diff options
Diffstat (limited to 'basic/source/sbx/sbxdate.cxx')
-rw-r--r-- | basic/source/sbx/sbxdate.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 054373ac9113..ed151a79679f 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -95,7 +95,7 @@ double ImpGetDate( const SbxValues* p ) LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); SvNumberFormatter* pFormatter; - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); pFormatter = new SvNumberFormatter( xFactory, eLangType ); @@ -125,13 +125,13 @@ double ImpGetDate( const SbxValues* p ) String aStr( aDateStr ); aStr.AppendAscii( " HH:MM:SS" ); - pFormatter->PutandConvertEntry( aStr, nCheckPos, nType, + pFormatter->PutandConvertEntry( aStr, nCheckPos, nType, nIndex, LANGUAGE_GERMAN, eLangType ); BOOL bSuccess = pFormatter->IsNumberFormat( *p->pOUString, nIndex, nRes ); if ( bSuccess ) { short nType_ = pFormatter->GetType( nIndex ); - if(!(nType_ & ( NUMBERFORMAT_DATETIME | NUMBERFORMAT_DATE | + if(!(nType_ & ( NUMBERFORMAT_DATETIME | NUMBERFORMAT_DATE | NUMBERFORMAT_TIME | NUMBERFORMAT_DEFINED ))) bSuccess = FALSE; } @@ -237,7 +237,7 @@ start: { SbxDecimal* pDec = ImpCreateDecimal( p ); if( !pDec->setDouble( n ) ) - SbxBase::SetError( SbxERR_OVERFLOW ); + SbxBase::SetError( SbxERR_OVERFLOW ); break; } direct: @@ -255,7 +255,7 @@ start: LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); SvNumberFormatter* pFormatter; - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); pFormatter = new SvNumberFormatter( xFactory, eLangType ); |