X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=src%2Fxo-file.c;h=81ce1569453295f2658c307c21bfd0344b7e87dc;hb=1858c4feaa24e40cea4b1b5ea39a60fb6670f33b;hp=e26bcd1fe321b538fedb5a59f3c5a1a8d8a59e47;hpb=9d890e28d12f05dcc9e301d5ba6c665009c8e5d8;p=xournal.git
diff --git a/src/xo-file.c b/src/xo-file.c
index e26bcd1..81ce156 100644
--- a/src/xo-file.c
+++ b/src/xo-file.c
@@ -1,3 +1,18 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
#ifdef HAVE_CONFIG_H
# include
#endif
@@ -237,10 +252,16 @@ gboolean close_journal(void)
}
// sanitize a string containing floats, in case it may have , instead of .
+// also replace Windows-produced 1.#J by inf
void cleanup_numeric(char *s)
{
- while (*s!=0) { if (*s==',') *s='.'; s++; }
+ while (*s!=0) {
+ if (*s==',') *s='.';
+ if (*s=='1' && s[1]=='.' && s[2]=='#' && s[3]=='J')
+ { *s='i'; s[1]='n'; s[2]='f'; s[3]=' '; }
+ s++;
+ }
}
// the XML parser functions for open_journal()
@@ -635,7 +656,7 @@ void xoj_parser_text(GMarkupParseContext *context,
if (ptr == text) break;
text_len -= (ptr - text);
text = ptr;
- if (!finite(ui.cur_path.coords[n])) {
+ if (!finite_sized(ui.cur_path.coords[n])) {
if (n>=2) ui.cur_path.coords[n] = ui.cur_path.coords[n-2];
else ui.cur_path.coords[n] = 0;
}
@@ -1031,7 +1052,7 @@ gboolean bgpdf_scheduler_callback(gpointer data)
else { // directly poppler -> pixbuf: faster, but bitmap font bug
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB,
FALSE, 8, scaled_width, scaled_height);
- poppler_page_render_to_pixbuf(
+ wrapper_poppler_page_render_to_pixbuf(
pdfpage, 0, 0, scaled_width, scaled_height,
req->dpi/72, 0, pixbuf);
}