summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/bencont.cxx14
-rw-r--r--lotuswordpro/source/filter/lwpgrfobj.cxx5
2 files changed, 3 insertions, 16 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index cb2f97f9d924..06be40c8a614 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -246,16 +246,6 @@ LtcUtBenValueStream * LtcBenContainer::FindValueStreamWithPropertyName(const cha
return FindNextValueStreamWithPropertyName(sPropertyName);
}
-static sal_uInt64 GetSvStreamSize(SvStream * pStream)
-{
- sal_uInt64 nCurPos = pStream->Tell();
- pStream->Seek(STREAM_SEEK_TO_END);
- sal_uInt64 ulLength = pStream->Tell();
- pStream->Seek(nCurPos);
-
- return ulLength;
-}
-
namespace
{
void readDataInBlocks(SvStream& rSt, sal_uInt64 nDLen, std::vector<sal_uInt8>& rData)
@@ -303,12 +293,12 @@ std::vector<sal_uInt8> LtcBenContainer::GetGraphicData(const char *pObjectName)
sal_uInt64 nDLen = 0;
if (xD)
{
- nDLen = GetSvStreamSize(xD.get());
+ nDLen = xD->TellEnd();
}
sal_uInt64 nSLen = 0;
if (xS)
{
- nSLen = GetSvStreamSize(xS.get()) ;
+ nSLen = xS->TellEnd();
}
sal_uInt64 nLen = nDLen + nSLen;
diff --git a/lotuswordpro/source/filter/lwpgrfobj.cxx b/lotuswordpro/source/filter/lwpgrfobj.cxx
index 2fc8d2ee3380..61f35d0879e4 100644
--- a/lotuswordpro/source/filter/lwpgrfobj.cxx
+++ b/lotuswordpro/source/filter/lwpgrfobj.cxx
@@ -384,10 +384,7 @@ sal_uInt32 LwpGraphicObject::GetGrafData(sal_uInt8*& pGrafData)
if (pMemGrafStream)
{
// read image data
- sal_uInt32 nPos = pGrafStream->Tell();
- pGrafStream->Seek(STREAM_SEEK_TO_END);
- sal_uInt32 nDataLen = pGrafStream->Tell();
- pGrafStream->Seek(nPos);
+ sal_uInt32 nDataLen = pGrafStream->TellEnd();
pGrafData = new sal_uInt8 [nDataLen];
pMemGrafStream->ReadBytes(pGrafData, nDataLen);