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-30 12:36:33 +0100
commit804f9278451b50daae82618cacbeb8931e773caa (patch)
treed99011cdf67e11493653075afcd4fd93b05c9b00 /external/libwps
parente95cfd12f0c1edfbe88f0b5aa50bb689b7ed520b (diff)
tdf#114000 always use user-selected charset
Change-Id: I45b9632724f46deb97bc79e364bf775aaaf0b85f (cherry picked from commit 54ec0aec1308bbbb8c9ab36fc76fe993bb23e5fb) Signed-off-by: David Tardon <dtardon@redhat.com>
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: