summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-09-18 11:26:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-09-19 11:24:38 +0200
commit55afdf6d1748edd50be3fa6a67a5e36e74013815 (patch)
tree22224ebd85413e5fca9a05e020d2742e072f0d50 /writerperfect
parentf850458af4b09f6f860223254c95b2d3fb24fa49 (diff)
loplugin:unusedfields
Change-Id: Ic102ae992fc2fbfd187149b9d20bf1d2202ba5c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157042 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/inc/WPXSvInputStream.hxx2
-rw-r--r--writerperfect/source/common/WPXSvInputStream.cxx27
2 files changed, 0 insertions, 29 deletions
diff --git a/writerperfect/inc/WPXSvInputStream.hxx b/writerperfect/inc/WPXSvInputStream.hxx
index 9370e655fd2f..f49fc11976d3 100644
--- a/writerperfect/inc/WPXSvInputStream.hxx
+++ b/writerperfect/inc/WPXSvInputStream.hxx
@@ -52,7 +52,6 @@ public:
private:
tools::Long tellImpl();
int seek(tools::Long offset);
- void invalidateReadBuffer();
bool isOLE();
void ensureOLEIsInitialized();
bool isZip();
@@ -68,7 +67,6 @@ private:
std::unique_ptr<OLEStorageImpl> mpOLEStorage;
std::unique_ptr<ZipStorageImpl> mpZipStorage;
sal_Int64 mnLength;
- const unsigned char* mpReadBuffer;
unsigned long mnReadBufferLength;
unsigned long mnReadBufferPos;
bool mbCheckedOLE;
diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx
index c7bbd12ddb2e..9ad72fcc9887 100644
--- a/writerperfect/source/common/WPXSvInputStream.cxx
+++ b/writerperfect/source/common/WPXSvInputStream.cxx
@@ -391,7 +391,6 @@ WPXSvInputStream::WPXSvInputStream(Reference<XInputStream> const& xStream)
, mxSeekable(xStream, UNO_QUERY)
, maData(0)
, mnLength(0)
- , mpReadBuffer(nullptr)
, mnReadBufferLength(0)
, mnReadBufferPos(0)
, mbCheckedOLE(false)
@@ -475,8 +474,6 @@ int WPXSvInputStream::seek(tools::Long offset)
bool WPXSvInputStream::isStructured()
{
- invalidateReadBuffer();
-
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return false;
@@ -493,8 +490,6 @@ bool WPXSvInputStream::isStructured()
unsigned WPXSvInputStream::subStreamCount()
{
- invalidateReadBuffer();
-
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return 0;
@@ -522,8 +517,6 @@ unsigned WPXSvInputStream::subStreamCount()
const char* WPXSvInputStream::subStreamName(const unsigned id)
{
- invalidateReadBuffer();
-
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return nullptr;
@@ -557,8 +550,6 @@ const char* WPXSvInputStream::subStreamName(const unsigned id)
bool WPXSvInputStream::existsSubStream(const char* const name)
{
- invalidateReadBuffer();
-
if (!name)
return false;
@@ -589,8 +580,6 @@ bool WPXSvInputStream::existsSubStream(const char* const name)
librevenge::RVNGInputStream* WPXSvInputStream::getSubStreamByName(const char* const name)
{
- invalidateReadBuffer();
-
if (!name)
return nullptr;
@@ -629,8 +618,6 @@ librevenge::RVNGInputStream* WPXSvInputStream::getSubStreamByName(const char* co
librevenge::RVNGInputStream* WPXSvInputStream::getSubStreamById(const unsigned id)
{
- invalidateReadBuffer();
-
if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is())
return nullptr;
@@ -668,18 +655,6 @@ librevenge::RVNGInputStream* WPXSvInputStream::getSubStreamById(const unsigned i
return nullptr;
}
-void WPXSvInputStream::invalidateReadBuffer()
-{
- if (mpReadBuffer)
- {
- seek(tell() + static_cast<tools::Long>(mnReadBufferPos)
- - static_cast<tools::Long>(mnReadBufferLength));
- mpReadBuffer = nullptr;
- mnReadBufferPos = 0;
- mnReadBufferLength = 0;
- }
-}
-
librevenge::RVNGInputStream*
WPXSvInputStream::createWPXStream(const tools::SvRef<SotStorageStream>& rxStorage)
{
@@ -797,8 +772,6 @@ int WPXSvInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
return retVal;
}
- invalidateReadBuffer();
-
if (seek(tmpOffset))
return -1;
return retVal;