summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/datastream.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-12-17 21:51:43 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-12-18 10:13:31 -0500
commit9c369f71830099e583946a90158aa3838c056f98 (patch)
treec9f415ad172fdc1e186b12a1b624cb5ef755b81e /sc/source/ui/docshell/datastream.cxx
parentecc884e9b8afbdaaa917774471d71060ff96cc74 (diff)
Detect numbers which are to be inserted as numeric cells.
Also, disable automatic scrolling. Change-Id: I2f3facfd91b9b4e3f86b9685a546a094180bf1ee
Diffstat (limited to 'sc/source/ui/docshell/datastream.cxx')
-rw-r--r--sc/source/ui/docshell/datastream.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/datastream.cxx b/sc/source/ui/docshell/datastream.cxx
index a798b84b9362..af60412e984c 100644
--- a/sc/source/ui/docshell/datastream.cxx
+++ b/sc/source/ui/docshell/datastream.cxx
@@ -27,6 +27,7 @@
#include <rangelst.hxx>
#include <tabvwsh.hxx>
#include <viewdata.hxx>
+#include <stringutil.hxx>
#include <config_orcus.h>
@@ -438,7 +439,12 @@ public:
{
if (maPos.Col() <= mnEndCol)
{
- mrDoc.setStringCell(maPos, OUString(p, n, RTL_TEXTENCODING_UTF8));
+ OUString aStr(p, n, RTL_TEXTENCODING_UTF8);
+ double fVal;
+ if (ScStringUtil::parseSimpleNumber(aStr, '.', ',', fVal))
+ mrDoc.setNumericCell(maPos, fVal);
+ else
+ mrDoc.setStringCell(maPos, aStr);
}
maPos.IncCol();
}
@@ -511,11 +517,11 @@ bool DataStream::ImportData()
if (meMove == RANGE_DOWN)
{
++mnCurRow;
- mpDocShell->GetViewData()->GetView()->AlignToCursor(
- maStartRange.aStart.Col(), mnCurRow, SC_FOLLOW_JUMP);
+// mpDocShell->GetViewData()->GetView()->AlignToCursor(
+// maStartRange.aStart.Col(), mnCurRow, SC_FOLLOW_JUMP);
}
- if (mnRepaintCounter > 100)
+ if (mnRepaintCounter > 200)
Repaint();
return mbRunning;