summaryrefslogtreecommitdiff
path: root/external/libwps
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-11-28 11:51:38 +0100
committerDavid Tardon <dtardon@redhat.com>2017-11-28 11:55:31 +0100
commit54ec0aec1308bbbb8c9ab36fc76fe993bb23e5fb (patch)
treeb87414963be4e453a7ef831bf1ab66454ac963ad /external/libwps
parent082cdbc991a2e31556bab53a5b8214cb89138354 (diff)
tdf#114000 always use user-selected charset
Change-Id: I45b9632724f46deb97bc79e364bf775aaaf0b85f
Diffstat (limited to 'external/libwps')
-rw-r--r--external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.127
-rw-r--r--external/libwps/UnpackedTarball_libwps.mk1
2 files changed, 28 insertions, 0 deletions
diff --git a/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1 b/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
new file mode 100644
index 000000000000..40c929ab8ea0
--- /dev/null
+++ b/external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1
@@ -0,0 +1,27 @@
+From 2a3465442d1305c7fec55e986c9793a86e571baa Mon Sep 17 00:00:00 2001
+From: osnola <alonso@loria.fr>
+Date: Fri, 24 Nov 2017 12:32:30 +0100
+Subject: [PATCH] Lotus .123: do no assume that a file containing a fdc's
+ structure is a Mac file :-~
+
+---
+ src/lib/Lotus.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/lib/Lotus.cpp b/src/lib/Lotus.cpp
+index d145014..514faad 100644
+--- a/src/lib/Lotus.cpp
++++ b/src/lib/Lotus.cpp
+@@ -3046,8 +3046,7 @@ bool LotusParser::readMacFontName(std::shared_ptr<WPSStream> stream, long endPos
+ }
+ else if (nameOk && !name.empty())
+ {
+- auto encoding=name!="Symbol" ? libwps_tools_win::Font::MAC_ROMAN : libwps_tools_win::Font::MAC_SYMBOL;
+- LotusParserInternal::Font font(encoding);
++ LotusParserInternal::Font font(getDefaultFontType());
+ font.m_name=name;
+ m_state->m_fontsMap.insert(std::map<int, LotusParserInternal::Font>::value_type(id,font));
+ }
+--
+2.14.3
+
diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk
index 58c3710d9e03..742392b2b346 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -37,6 +37,7 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,libwps,\
external/libwps/0001-drop-unneeded-include.patch.1 \
+ external/libwps/0001-Lotus-.123-do-no-assume-that-a-file-containing-a-fdc.patch.1 \
))
# vim: set noet sw=4 ts=4: