[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] LibreOffice packaging repository branch, debian-experimental-3.6, updated. libreoffice_3.6.4_rc1-1-22-g53292fd



The following commit has been merged in the debian-experimental-3.6 branch:
commit 53292fd52bd067fda7a2d03fc1bf5d58c4760e4a
Author: Rene Engelhard <rene@debian.org>
Date:   Wed Nov 28 19:37:12 2012 +0100

    fix ooxml regression test failure (backport from libreoffice-3-6)

diff --git a/changelog b/changelog
index 54d9d69..71dbfcb 100644
--- a/changelog
+++ b/changelog
@@ -4,6 +4,8 @@ libreoffice (1:3.6.4~rc3-1) UNRELEASED; urgency=low
 
   * debian/patches/poppler_0_21_x.diff: moove from poppler_0_21_0.diff; fix
     build with 0.21.1 again
+  * debian/patches/bigendian-utext-mixup.diff: backport from libreoffice-3-6
+    branch to fix ooxml regression test failure
 
   * debian/rules:
     - don't rely on dictionaries submodule. unused.
diff --git a/patches/bigendian-utext-mixup.diff b/patches/bigendian-utext-mixup.diff
new file mode 100644
index 0000000..bd6ea9e
--- /dev/null
+++ b/patches/bigendian-utext-mixup.diff
@@ -0,0 +1,181 @@
+From 41459013f8ffed4cbfd6e7c4a59b5d9a7d90fb74 Mon Sep 17 00:00:00 2001
+From: Caolán McNamara <caolanm@redhat.com>
+Date: Wed, 28 Nov 2012 11:15:56 +0000
+Subject: bigendian utext mixup triggering regression test failure
+
+text takes a pointer to a sal_uInt8 buffer but
+utext takes a pointer to a sal_Unicode buffer
+
+passing a sal_uInt8 sequence of e.g. "\x0D\x00" to utext only happens
+to work on little endian machines to represent 0x000D, its 0x0D00 on
+bigendian.
+
+for more excitement text and utext do not share the same logic!
+Various special chars are treated different in text vs utext so
+we can't simply blindly change utext() calls to text() calls and
+get the same behaviour without reworking those.
+
+So keep the text()/utext() calls as they are, but change what's
+passed to be the right thing.
+
+Change-Id: I66696530c4a9482690c461146bdcf0a507b39b68
+(cherry picked from commit 49f2a69fa7d8eaa23d77519ac29748f4dc3e4c5a)
+Reviewed-on: https://gerrit.libreoffice.org/1188
+Reviewed-by: Michael Stahl <mstahl@redhat.com>
+Tested-by: Michael Stahl <mstahl@redhat.com>
+---
+diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+index f062a26..9667c79 100644
+--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
++++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+@@ -48,19 +48,18 @@
+ #include "Handler.hxx"
+ #include "ooxmlLoggers.hxx"
+ 
+-static const sal_uInt8 s0x7[] = { 0x7, 0x0 };
+-static const sal_uInt8 s0xd[] = { 0xd, 0x0 };
+-static const sal_uInt8 sCR[] = { 0xd, 0x0 };
+-static const sal_uInt8 sFtnEdnRef[] = { 0x2, 0x0 };
+-static const sal_uInt8 sFtnEdnSep[] = { 0x3, 0x0 };
+-static const sal_uInt8 sFtnEdnCont[] = { 0x4, 0x0 };
+-static const sal_uInt8 sTab[] = { 0x9, 0x0 };
+-static const sal_uInt8 sPgNum[] = { 0x0, 0x0 };
+-static const sal_uInt8 sFieldStart[] = { 0x13  };
+-static const sal_uInt8 sFieldSep[] = { 0x14 };
+-static const sal_uInt8 sFieldEnd[] = { 0x15 };
+-static const sal_uInt8 sNoBreakHyphen[] = { 0x1e, 0x0 };
+-static const sal_uInt8 sSoftHyphen[] = { 0x1f, 0x0 };
++static const sal_Unicode uCR = 0xd;
++static const sal_Unicode uFtnEdnRef = 0x2;
++static const sal_Unicode uFtnEdnSep = 0x3;
++static const sal_Unicode uTab = 0x9;
++static const sal_Unicode uPgNum = 0x0;
++static const sal_Unicode uNoBreakHyphen = 0x1e;
++static const sal_Unicode uSoftHyphen = 0x1f;
++
++static const sal_uInt8 cFtnEdnCont = 0x4;
++static const sal_uInt8 cFieldStart = 0x13;
++static const sal_uInt8 cFieldSep = 0x14;
++static const sal_uInt8 cFieldEnd = 0x15;
+ 
+ namespace writerfilter {
+ namespace ooxml
+@@ -693,7 +692,7 @@ void OOXMLFastContextHandler::startField()
+ #endif
+     startCharacterGroup();
+     if (isForwardEvents())
+-        mpStream->text(sFieldStart, 1);
++        mpStream->text(&cFieldStart, 1);
+     endCharacterGroup();
+ }
+ 
+@@ -704,7 +703,7 @@ void OOXMLFastContextHandler::fieldSeparator()
+ #endif
+     startCharacterGroup();
+     if (isForwardEvents())
+-        mpStream->text(sFieldSep, 1);
++        mpStream->text(&cFieldSep, 1);
+     endCharacterGroup();
+ }
+ 
+@@ -715,7 +714,7 @@ void OOXMLFastContextHandler::endField()
+ #endif
+     startCharacterGroup();
+     if (isForwardEvents())
+-        mpStream->text(sFieldEnd, 1);
++        mpStream->text(&cFieldEnd, 1);
+     endCharacterGroup();
+ }
+ 
+@@ -725,7 +724,7 @@ void OOXMLFastContextHandler::ftnednref()
+     debug_logger->element("contexthandler.ftnednref");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext(sFtnEdnRef, 1);
++        mpStream->utext((const sal_uInt8*)&uFtnEdnRef, 1);
+ }
+ 
+ void OOXMLFastContextHandler::ftnednsep()
+@@ -734,7 +733,7 @@ void OOXMLFastContextHandler::ftnednsep()
+     debug_logger->element("contexthandler.ftnednsep");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext(sFtnEdnSep, 1);
++        mpStream->utext((const sal_uInt8*)&uFtnEdnSep, 1);
+ }
+ 
+ void OOXMLFastContextHandler::ftnedncont()
+@@ -743,7 +742,7 @@ void OOXMLFastContextHandler::ftnedncont()
+     debug_logger->element("contexthandler.ftnedncont");
+ #endif
+     if (isForwardEvents())
+-        mpStream->text(sFtnEdnCont, 1);
++        mpStream->text(&cFtnEdnCont, 1);
+ }
+ 
+ void OOXMLFastContextHandler::pgNum()
+@@ -752,7 +751,7 @@ void OOXMLFastContextHandler::pgNum()
+     debug_logger->element("contexthandler.pgNum");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sPgNum, 1);
++        mpStream->utext((const sal_uInt8*)&uPgNum, 1);
+ }
+ 
+ void OOXMLFastContextHandler::tab()
+@@ -761,7 +760,7 @@ void OOXMLFastContextHandler::tab()
+     debug_logger->element("contexthandler.tab");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sTab, 1);
++        mpStream->utext((const sal_uInt8*)&uTab, 1);
+ }
+ 
+ void OOXMLFastContextHandler::cr()
+@@ -770,7 +769,7 @@ void OOXMLFastContextHandler::cr()
+     debug_logger->element("contexthandler.cr");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sCR, 1);
++        mpStream->utext((const sal_uInt8*)&uCR, 1);
+ }
+ 
+ void OOXMLFastContextHandler::noBreakHyphen()
+@@ -779,7 +778,7 @@ void OOXMLFastContextHandler::noBreakHyphen()
+     debug_logger->element("contexthandler.noBreakHyphen");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sNoBreakHyphen, 1);
++        mpStream->utext((const sal_uInt8*)&uNoBreakHyphen, 1);
+ }
+ 
+ void OOXMLFastContextHandler::softHyphen()
+@@ -788,7 +787,7 @@ void OOXMLFastContextHandler::softHyphen()
+     debug_logger->element("contexthandler.softHyphen");
+ #endif
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sSoftHyphen, 1);
++        mpStream->utext((const sal_uInt8*)&uSoftHyphen, 1);
+ }
+ 
+ void OOXMLFastContextHandler::handleLastParagraphInSection()
+@@ -812,7 +811,7 @@ void OOXMLFastContextHandler::endOfParagraph()
+     if (! mpParserState->isInCharacterGroup())
+         startCharacterGroup();
+     if (isForwardEvents())
+-        mpStream->utext((const sal_uInt8*)sCR, 1);
++        mpStream->utext((const sal_uInt8*)&uCR, 1);
+ }
+ 
+ void OOXMLFastContextHandler::startTxbxContent()
+@@ -1852,7 +1851,7 @@ void OOXMLFastContextHandlerTextTableRow::endRow()
+     startCharacterGroup();
+ 
+     if (isForwardEvents())
+-        mpStream->utext(s0xd, 1);
++        mpStream->utext((const sal_uInt8*)&uCR, 1);
+ 
+     endCharacterGroup();
+     endParagraphGroup();
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/patches/series b/patches/series
index 733856d..a612510 100644
--- a/patches/series
+++ b/patches/series
@@ -28,3 +28,4 @@ build-dont-run-checks.diff
 disable-flaky-unoapi-tests.diff
 ure-no-etc-opt-ure.diff
 poppler_0_21_x.diff
+bigendian-utext-mixup.diff

-- 
LibreOffice packaging repository


Reply to: