[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra] tables: Revert "Fix bug introduced in optimization work"
From: Thorsten Zachmann <t.zachmann () zagge ! de>
Date: 2012-01-08 6:31:54
Message-ID: 20120108063154.C3DB1A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 62220691ec611b6a6198bb1d7a662ca195f4da17 by Thorsten Zachmann.
Committed on 08/01/2012 at 07:30.
Pushed by zachmann into branch 'master'.
Revert "Fix bug introduced in optimization work"
This reverts commit fd7367102ad47296dbaec2168bcb835f5692d341. And adds a fix
that does not break it.
M +7 -5 tables/Region.cpp
M +6 -6 tables/Util.cpp
http://commits.kde.org/calligra/62220691ec611b6a6198bb1d7a662ca195f4da17
diff --git a/tables/Region.cpp b/tables/Region.cpp
index 3decd22..960230e 100644
--- a/tables/Region.cpp
+++ b/tables/Region.cpp
@@ -853,14 +853,16 @@ void Region::loadOdf(const QChar *&data, const QChar *&end, QChar *&out)
case ':': { // cell separator
isRange = true;
append(pos, data, &out);
- *out++ = *data++; // append :
- if (!data->isNull()) {
- const QChar * next = data + 1;
- if (!next->isNull() && *data == QChar('$', 0) && *next != QChar('.', 0)) {
+ *out = *data; // append :
+ ++out;
+ const QChar * next = data + 1;
+ if (!next->isNull()) {
+ const QChar * nextnext = next + 1;
+ if (!nextnext->isNull() && *next == QChar('$', 0) && *nextnext != QChar('.', 0)) {
++data;
}
}
- pos = data;
+ pos = data + 1;
} break;
case ' ': // range separator
append(pos, data, &out);
diff --git a/tables/Util.cpp b/tables/Util.cpp
index ddc88ae..e7a4118 100644
--- a/tables/Util.cpp
+++ b/tables/Util.cpp
@@ -446,6 +446,12 @@ QString Calligra::Tables::Odf::decodeFormula(const QString& expression_, const K
state = InNumber;
*out++ = *data++;
}
+ else if (*data == QChar('.', 0)) {
+ state = InNumber;
+ *out = decimal[0];
+ ++out;
+ ++data;
+ }
else if (isIdentifier(*data)) {
// beginning with alphanumeric ?
// could be identifier, cell, range, or function...
@@ -496,12 +502,6 @@ QString Calligra::Tables::Odf::decodeFormula(const QString& expression_, const K
state = InString;
*out++ = *data++;
break;
- case '.': // decimal dot ?
- state = InNumber;
- *out = decimal[0];
- ++out;
- ++data;
- break;
case '[': // [ marks sheet name for 3-d cell, e.g ['Sales Q3'.A4]
state = InReference;
++data;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic