On Thu, Sep 22, 2011 at 17:14:32 -0600, Andreas Guelzow wrote:
> The patch has been committed upstream.

Specifically, it's given by 
git diff 
086505a3d84b7d2efe33056de97c33536ce4bc90..652a2f1929e0519e56be5d8f684c9018e966432b
as attached.
-- 
It's like Jung said, the unconscious is revealed through the imagery of our
dreams which express our innermost fears and our desires.
Jung said that?
Yeah, I think it was Jung. Either that or Vincent Price. (NX 1.8)
diff --git a/NEWS b/NEWS
index 48f8943..2d520fd 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,9 @@ Jean:
        * Fixed labels vertical alignment in preferences dialog. [#658639]
        * Fixed autofilter user interface issues. [#657036]
 
+Mikko Rasa:
+        * Fix ODF import of certain percentage formats. [Debian #642135]
+
 Morten:
        * Fix crash.  [#658140]
        * Fix stf import crash.  [#658982]
diff --git a/plugins/openoffice/ChangeLog b/plugins/openoffice/ChangeLog
index 6077007..d2f7ac7 100644
--- a/plugins/openoffice/ChangeLog
+++ b/plugins/openoffice/ChangeLog
@@ -1,3 +1,13 @@
+2011-09-22  Andreas J. Guelzow <aguel...@pyrshep.ca>
+
+       * openoffice-read.c (oo_date_text_end): avoid duplicate percent signs
+
+2011-09-22  Andreas J. Guelzow <aguel...@pyrshep.ca>
+       for Mikko Rasa <t...@tdb.fi>:
+
+       * openoffice-read.c (oo_date_text_end): fix potential for
+       infinite loop
+
 2011-09-06  Jean Brefort  <jean.bref...@normalesup.org>
 
        * openoffice-write.c (odf_write_regression_curve): fixed criticals.
diff --git a/plugins/openoffice/openoffice-read.c 
b/plugins/openoffice/openoffice-read.c
index d1531f6..041facd 100644
--- a/plugins/openoffice/openoffice-read.c
+++ b/plugins/openoffice/openoffice-read.c
@@ -3849,7 +3849,7 @@ oo_date_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob 
*blob)
                        int len = xin->content->len;
                        char const *text = xin->content->str;
                        char const *percent_sign;
-                       while ((percent_sign = strchr (xin->content->str, '%')) 
!= NULL) {
+                       while ((percent_sign = strchr (text, '%')) != NULL) {
                                if (percent_sign > text) {
                                        oo_date_text_end_append
                                                (state->cur_format.accum, text,
@@ -3859,6 +3859,7 @@ oo_date_text_end (GsfXMLIn *xin, G_GNUC_UNUSED GsfXMLBlob 
*blob)
                                text = percent_sign + 1;
                                len--;
                                g_string_append_c (state->cur_format.accum, 
'%');
+                               state->cur_format.percent_sign_seen = TRUE;
                        }
                        if (len > 0)
                                oo_date_text_end_append 
(state->cur_format.accum, text, len);

Reply via email to