summaryrefslogtreecommitdiff
path: root/sw/source/core/fields
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-11-21 13:24:56 +0000
committerjp <jp@openoffice.org>2000-11-21 13:24:56 +0000
commitfa05fff1347f9427a7fc362c8e062fb9608a8f78 (patch)
tree6acff2c43cf67db535e2f760f5aaab992313bead /sw/source/core/fields
parent77da25c56d9efa0f899c1cdf475c7d713daa1dc6 (diff)
Bug #79951#: Str2Double - new method with doc
Diffstat (limited to 'sw/source/core/fields')
-rw-r--r--sw/source/core/fields/fldbas.cxx35
1 files changed, 12 insertions, 23 deletions
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index 2c3fe357fb98..84d4f9bec99f 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: fldbas.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-11-20 09:14:45 $
+ * last change: $Author: jp $ $Date: 2000-11-21 14:23:59 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,18 +65,14 @@
#pragma hdrstop
-
#include <math.h>
#ifdef MAC
#include <stdlib.h>
#endif
#include <float.h>
-#ifndef _SV_SVAPP_HXX //autogen
-#include <vcl/svapp.hxx>
-#endif
-#ifndef _SV_SYSTEM_HXX //autogen
-#include <vcl/system.hxx>
+#ifndef _TOOLS_SOLMATH_HXX
+#include <tools/solmath.hxx>
#endif
#ifndef _ZFORLIST_HXX //autogen
#include <svtools/zforlist.hxx>
@@ -84,9 +80,6 @@
#ifndef _ZFORMAT_HXX //autogen
#include <svtools/zformat.hxx>
#endif
-#ifndef _TOOLS_SOLMATH_HXX //autogen wg. SolarMath
-#include <tools/solmath.hxx>
-#endif
#ifndef _UNOTOOLS_LOCALEDATAWRAPPER_HXX
#include <unotools/localedatawrapper.hxx>
#endif
@@ -139,6 +132,11 @@
#ifndef _SHELLRES_HXX
#include <shellres.hxx>
#endif
+#ifndef _CALC_HXX
+#include <calc.hxx>
+#endif
+
+
using namespace ::com::sun::star;
USHORT lcl_GetLanguageOfFormat( USHORT nLng, ULONG nFmt,
@@ -953,18 +951,9 @@ void SwFormulaField::SetFormula(const String& rStr)
if( nFmt && ULONG_MAX != nFmt )
{
- // String muss im Systemformat vorliegen!
- // Geht bei Import/Export mit unterschiedlichen Systemformaten
- // voll in die Hose. Ist aber nicht anders moeglich, da der Kalkulator
- // nur im Systemformat rechnen kann und es keine Konvertierungsroutine
- // gibt.
- const LocaleDataWrapper& rLclD = GetAppLocaleData();
- int nErrno;
- double fValue = SolarMath::StringToDouble( rStr.GetBuffer(),
- rLclD.getNumThousandSep().GetChar(0),
- rLclD.getNumDecimalSep().GetChar(0),
- nErrno );
- if( !nErrno )
+ xub_StrLen nPos = 0;
+ double fValue;
+ if( SwCalc::Str2Double( rStr, nPos, fValue, GetDoc() ) )
SwValueField::SetValue( fValue );
}
}