forked from pool/libvisio
1bf09bf503
- Performance regression fix * Add patch to unconditionally use WPX_SEEK_END * Depend on libwpd-devel >= 0.9.5 that has WPX_SEEK_END OBS-URL: https://build.opensuse.org/request/show/184376 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libvisio?expand=0&rev=14
20 lines
949 B
Diff
20 lines
949 B
Diff
--- a/src/lib/libvisio_utils.cpp
|
|
+++ b/src/lib/libvisio_utils.cpp
|
|
@@ -35,6 +35,7 @@
|
|
#include <boost/archive/iterators/binary_from_base64.hpp>
|
|
#include <boost/archive/iterators/remove_whitespace.hpp>
|
|
#include <boost/archive/iterators/transform_width.hpp>
|
|
+#include <boost/range/iterator_range.hpp>
|
|
|
|
uint8_t libvisio::readU8(WPXInputStream *input)
|
|
{
|
|
@@ -125,7 +126,7 @@ double libvisio::readDouble(WPXInputStream *input)
|
|
|
|
void libvisio::appendFromBase64(WPXBinaryData &data, const unsigned char *base64Data, size_t base64DataLength)
|
|
{
|
|
- std::string base64String((const char *)base64Data, base64DataLength);
|
|
+ boost::iterator_range<const char *> base64String((const char *)base64Data, (const char *)base64Data + base64DataLength);
|
|
typedef boost::archive::iterators::transform_width<
|
|
boost::archive::iterators::binary_from_base64<
|
|
boost::archive::iterators::remove_whitespace< std::string::const_iterator > >, 8, 6 > base64_decoder;
|