[Libreoffice-commits] core.git: 2 commits - external/libetonyek

David Tardon dtardon at redhat.com
Fri Nov 1 19:26:09 CET 2013


 external/libetonyek/0001-impl.-XML-format-detection.patch |   65 ++++++++++++++
 external/libetonyek/README                                |    2 
 external/libetonyek/UnpackedTarball_libetonyek.mk         |    1 
 3 files changed, 67 insertions(+), 1 deletion(-)

New commits:
commit 638c2aa959f5911a81368c2a164ddb7cfd189660
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Nov 1 18:11:40 2013 +0100

    drop, remove and delete redundant words
    
    Change-Id: I1d8fd6aa28e685bed4a1a0f2e4ccd888ba109e34

diff --git a/external/libetonyek/README b/external/libetonyek/README
index 2bd3ee6..1db5831 100644
--- a/external/libetonyek/README
+++ b/external/libetonyek/README
@@ -1 +1 @@
-Library for Library for import of Apple Keynote presentations.
+Library for import of Apple Keynote presentations.
commit 2a677e831528c6e9ddd5f926217faa4737ef86a3
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Nov 1 19:25:02 2013 +0100

    fix keynote format detection
    
    Change-Id: Iadc1fe4efe891ef33f85086cfe0b811ebeb6e767

diff --git a/external/libetonyek/0001-impl.-XML-format-detection.patch b/external/libetonyek/0001-impl.-XML-format-detection.patch
new file mode 100644
index 0000000..c4e1904
--- /dev/null
+++ b/external/libetonyek/0001-impl.-XML-format-detection.patch
@@ -0,0 +1,65 @@
+From 28a3b93cc8b0050582c54722df5ac372530ff0a4 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Fri, 1 Nov 2013 18:29:40 +0100
+Subject: [PATCH] impl. XML format detection
+
+---
+ src/lib/KEYDocument.cpp | 31 ++++++++++++++++++++++++++++---
+ 1 file changed, 28 insertions(+), 3 deletions(-)
+
+diff --git a/src/lib/KEYDocument.cpp b/src/lib/KEYDocument.cpp
+index 8ca33ad..a1a5477 100644
+--- a/src/lib/KEYDocument.cpp
++++ b/src/lib/KEYDocument.cpp
+@@ -13,10 +13,12 @@
+ #include <libetonyek/KEYDocument.h>
+ 
+ #include "libetonyek_utils.h"
++#include "libetonyek_xml.h"
+ #include "KEY1Defaults.h"
+ #include "KEY1Parser.h"
+ #include "KEY2Defaults.h"
+ #include "KEY2Parser.h"
++#include "KEY2Token.h"
+ #include "KEYContentCollector.h"
+ #include "KEYDefaults.h"
+ #include "KEYDictionary.h"
+@@ -60,9 +62,32 @@ enum Source
+ 
+ Version detectVersionFromInput(const WPXInputStreamPtr_t &input)
+ {
+-  // TODO: do a real detection
+-  (void) input;
+-  return VERSION_KEYNOTE_5;
++  if (input->atEOS())
++    return VERSION_UNKNOWN;
++
++  const KEY2Tokenizer tokenizer;
++  KEYXMLReader reader(input.get(), tokenizer);
++
++  if ((KEY2Token::NS_URI_KEY | KEY2Token::presentation) == getId(reader))
++  {
++    const std::string version = readOnlyAttribute(reader, KEY2Token::version, KEY2Token::NS_URI_KEY);
++
++    switch (tokenizer(version.c_str()))
++    {
++    case KEY2Token::VERSION_STR_2 :
++      return VERSION_KEYNOTE_2;
++    case KEY2Token::VERSION_STR_3 :
++      return VERSION_KEYNOTE_3;
++    case KEY2Token::VERSION_STR_4 :
++      return VERSION_KEYNOTE_4;
++    case KEY2Token::VERSION_STR_5 :
++      return VERSION_KEYNOTE_5;
++    }
++  }
++
++  // TODO: test for v.1 and v.6
++
++  return VERSION_UNKNOWN;
+ }
+ 
+ Version detectVersion(const WPXInputStreamPtr_t &input, Source &source)
+-- 
+1.8.3.1
+
diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
index 1a6b32d..52eee68 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libetonyek,1))
 $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
 	external/libetonyek/0001-fix-windows-build.patch \
 	external/libetonyek/libetonyek-doubledelete.patch.0 \
+	external/libetonyek/0001-impl.-XML-format-detection.patch \
 ))
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list