e59b5b1fc7
Change-Id: Ic7479b82d09c1e36d28267434a77bf4bc158adfa Reviewed-on: https://gerrit.libreoffice.org/41612 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
89 lines
2.7 KiB
Groff
89 lines
2.7 KiB
Groff
From 4118cfa23d2e251278a55f7fd44c246c84c41ab5 Mon Sep 17 00:00:00 2001
|
|
From: Aleksas Pantechovskis <alex.pantec@gmail.com>
|
|
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<librevenge::RVNGInputStream> &
|
|
void QXP4Parser::parseColors(const std::shared_ptr<librevenge::RVNGInputStream> &docStream)
|
|
{
|
|
unsigned length = readU32(docStream, be);
|
|
- auto stream = make_shared<RVNGStringStream>(readNBytes(docStream, length), length);
|
|
+ auto stream = make_shared<QXPMemoryStream>(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 <vector>
|
|
|
|
#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<RVNGInputStream> QXPBlockParser::getBlock(const uint32_t index)
|
|
{
|
|
seek(m_input, (index - 1) * m_blockLength);
|
|
auto block = readNBytes(m_input, m_blockLength);
|
|
- return make_shared<RVNGStringStream>(block, m_blockLength);
|
|
+ return make_shared<QXPMemoryStream>(block, m_blockLength);
|
|
}
|
|
|
|
std::shared_ptr<RVNGInputStream> QXPBlockParser::getChain(const uint32_t index)
|
|
@@ -59,7 +59,7 @@ std::shared_ptr<RVNGInputStream> QXPBlockParser::getChain(const uint32_t index)
|
|
isBig = nextVal < 0;
|
|
next = abs(nextVal);
|
|
}
|
|
- return make_shared<RVNGStringStream>(chain.data(), chain.size());
|
|
+ return make_shared<QXPMemoryStream>(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<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr<QXPHeader> &header)
|
|
--
|
|
2.7.4
|
|
|