[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - libvisio/libvisio-0.0.29-remove_whitespace.patch.1
Fridrich Å trba
fridrich.strba at bluewin.ch
Sat Jul 6 06:21:05 PDT 2013
libvisio/libvisio-0.0.29-remove_whitespace.patch.1 | 36 ++++++++++++++-------
1 file changed, 24 insertions(+), 12 deletions(-)
New commits:
commit 23ac92b79220109b2e7c2ac9aad8b36cc2899788
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Sat Jul 6 15:09:57 2013 +0200
Proper fix for remove_whitespace iterator and older boost
The previous "fix" was resulting in exceptions in some vdx files.
Change-Id: I961560b66bc29660daca54e39f14f612bbb50e34
(cherry picked from commit c4475946b3171353d0eaefe72ba24e13744458a3)
Reviewed-on: https://gerrit.libreoffice.org/4749
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1 b/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
index b8f1eb4..61dc118 100644
--- a/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
+++ b/libvisio/libvisio-0.0.29-remove_whitespace.patch.1
@@ -1,20 +1,32 @@
--- a/src/lib/libvisio_utils.cpp
+++ b/src/lib/libvisio_utils.cpp
-@@ -33,7 +33,6 @@
- #include "libvisio_utils.h"
+@@ -123,14 +123,15 @@ double libvisio::readDouble(WPXInputStream *input)
+ return tmpUnion.d;
+ }
- #include <boost/archive/iterators/binary_from_base64.hpp>
--#include <boost/archive/iterators/remove_whitespace.hpp>
- #include <boost/archive/iterators/transform_width.hpp>
-
- uint8_t libvisio::readU8(WPXInputStream *input)
-@@ -126,8 +125,7 @@ double libvisio::readDouble(WPXInputStream *input)
- void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, size_t base64StringLength)
+-void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, size_t base64StringLength)
++void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, size_t base64DataLength)
{
++ std::string base64String((const char*)base64Data, base64DataLength);
typedef boost::archive::iterators::transform_width<
-- boost::archive::iterators::binary_from_base64<
+ boost::archive::iterators::binary_from_base64<
- boost::archive::iterators::remove_whitespace< const char * > >, 8, 6 > base64_decoder;
-+ boost::archive::iterators::binary_from_base64< const char * >, 8, 6 > base64_decoder;
++ boost::archive::iterators::remove_whitespace< std::string::const_iterator > >, 8, 6 > base64_decoder;
std::vector<unsigned char> buffer;
- std::copy(base64_decoder(base64String), base64_decoder(base64String + base64StringLength), std::back_inserter(buffer));
+- std::copy(base64_decoder(base64String), base64_decoder(base64String + base64StringLength), std::back_inserter(buffer));
++ std::copy(base64_decoder(base64String.begin()), base64_decoder(base64String.end()), std::back_inserter(buffer));
+
+ if (!buffer.empty())
+ data.append(&buffer[0], buffer.size());
+--- a/src/lib/libvisio_utils.h
++++ b/src/lib/libvisio_utils.h
+@@ -98,7 +98,7 @@ uint64_t readU64(WPXInputStream *input);
+
+ double readDouble(WPXInputStream *input);
+
+-void appendFromBase64(WPXBinaryData &data, const unsigned char *base64String, size_t base64StringLength);
++void appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, size_t base64DataLength);
+
+ const ::WPXString getColourString(const Colour &c);
+
More information about the Libreoffice-commits
mailing list