Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
2a677e83
Kaydet (Commit)
2a677e83
authored
Kas 01, 2013
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix keynote format detection
Change-Id: Iadc1fe4efe891ef33f85086cfe0b811ebeb6e767
üst
57a00083
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
0 deletions
+66
-0
0001-impl.-XML-format-detection.patch
external/libetonyek/0001-impl.-XML-format-detection.patch
+65
-0
UnpackedTarball_libetonyek.mk
external/libetonyek/UnpackedTarball_libetonyek.mk
+1
-0
No files found.
external/libetonyek/0001-impl.-XML-format-detection.patch
0 → 100644
Dosyayı görüntüle @
2a677e83
From 28a3b93cc8b0050582c54722df5ac372530ff0a4 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@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
external/libetonyek/UnpackedTarball_libetonyek.mk
Dosyayı görüntüle @
2a677e83
...
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libetonyek,1))
...
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libetonyek,1))
$(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
$(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
external/libetonyek/0001-fix-windows-build.patch \
external/libetonyek/0001-fix-windows-build.patch \
external/libetonyek/libetonyek-doubledelete.patch.0 \
external/libetonyek/libetonyek-doubledelete.patch.0 \
external/libetonyek/0001-impl.-XML-format-detection.patch \
))
))
# vim: set noet sw=4 ts=4:
# vim: set noet sw=4 ts=4:
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment