From 4118cfa23d2e251278a55f7fd44c246c84c41ab5 Mon Sep 17 00:00:00 2001 From: Aleksas Pantechovskis Date: Sun, 27 Aug 2017 19:39:37 +0300 Subject: [PATCH] don't use RVNGStringStream in the main lib librevenge-stream is not used in libreoffice --- src/lib/QXP4Parser.cpp | 4 ++-- src/lib/QXPBlockParser.cpp | 6 +++--- src/lib/QXPParser.cpp | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/lib/QXP4Parser.cpp b/src/lib/QXP4Parser.cpp index c748e3e..3e31951 100644 --- a/src/lib/QXP4Parser.cpp +++ b/src/lib/QXP4Parser.cpp @@ -15,11 +15,11 @@ #include "QXP4Deobfuscator.h" #include "QXP4Header.h" #include "QXPCollector.h" +#include "QXPMemoryStream.h" namespace libqxp { -using librevenge::RVNGStringStream; using std::make_shared; using std::shared_ptr; @@ -123,7 +123,7 @@ bool QXP4Parser::parsePages(const std::shared_ptr & void QXP4Parser::parseColors(const std::shared_ptr &docStream) { unsigned length = readU32(docStream, be); - auto stream = make_shared(readNBytes(docStream, length), length); + auto stream = make_shared(readNBytes(docStream, length), length); try { diff --git a/src/lib/QXPBlockParser.cpp b/src/lib/QXPBlockParser.cpp index 58cecb9..a9a8c9b 100644 --- a/src/lib/QXPBlockParser.cpp +++ b/src/lib/QXPBlockParser.cpp @@ -15,12 +15,12 @@ #include #include "QXPHeader.h" +#include "QXPMemoryStream.h" namespace libqxp { using librevenge::RVNGInputStream; -using librevenge::RVNGStringStream; using std::make_shared; using std::vector; @@ -36,7 +36,7 @@ std::shared_ptr QXPBlockParser::getBlock(const uint32_t index) { seek(m_input, (index - 1) * m_blockLength); auto block = readNBytes(m_input, m_blockLength); - return make_shared(block, m_blockLength); + return make_shared(block, m_blockLength); } std::shared_ptr QXPBlockParser::getChain(const uint32_t index) @@ -59,7 +59,7 @@ std::shared_ptr QXPBlockParser::getChain(const uint32_t index) isBig = nextVal < 0; next = abs(nextVal); } - return make_shared(chain.data(), chain.size()); + return make_shared(chain.data(), chain.size()); } } diff --git a/src/lib/QXPParser.cpp b/src/lib/QXPParser.cpp index 54abd7e..9dd90a8 100644 --- a/src/lib/QXPParser.cpp +++ b/src/lib/QXPParser.cpp @@ -18,7 +18,6 @@ namespace libqxp { -using librevenge::RVNGStringStream; using std::make_shared; QXPParser::QXPParser(const std::shared_ptr &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr &header) -- 2.7.4