[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 14 07:43:59 UTC 2020
sc/inc/filter.hxx | 2 +-
sc/source/filter/lotus/filter.cxx | 5 ++---
sc/source/filter/lotus/lotread.cxx | 2 +-
sc/source/filter/lotus/lotus.cxx | 3 ++-
4 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit ab6c29af8e3e4a35985aac1e2cee086ee5f13bea
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 19:05:38 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 09:43:17 2020 +0200
LotusContext context is already set to use the ScDocument arg
Change-Id: Ife89028b69ba818b53a2e1e351ec97272324f3de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index f9201d01951c..3d416eefb8f5 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -101,7 +101,7 @@ class ScFormatFilter {
struct LotusContext;
-ErrCode ScImportLotus123old(LotusContext& rContext, SvStream&, ScDocument*, rtl_TextEncoding eSrc);
+ErrCode ScImportLotus123old(LotusContext& rContext, SvStream&, rtl_TextEncoding eSrc);
#endif
diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx
index e80686f9aa0b..2e8ad776082e 100644
--- a/sc/source/filter/lotus/filter.cxx
+++ b/sc/source/filter/lotus/filter.cxx
@@ -182,12 +182,11 @@ static WKTYP ScanVersion(SvStream& aStream)
return eWK_UNKNOWN;
}
-ErrCode ScImportLotus123old(LotusContext& rContext, SvStream& aStream, ScDocument* pDocument, rtl_TextEncoding eSrc )
+ErrCode ScImportLotus123old(LotusContext& rContext, SvStream& aStream, rtl_TextEncoding eSrc )
{
aStream.Seek( 0 );
// make document pointer global
- rContext.pDoc = pDocument;
rContext.bEOF = false;
rContext.eCharset = eSrc;
@@ -200,7 +199,7 @@ ErrCode ScImportLotus123old(LotusContext& rContext, SvStream& aStream, ScDocumen
//scGetPageFormat( 0, &aPage );
// start progressbar
- ScfStreamProgressBar aPrgrsBar( aStream, pDocument->GetDocumentShell() );
+ ScfStreamProgressBar aPrgrsBar( aStream, rContext.pDoc->GetDocumentShell() );
// detect file type
rContext.eTyp = ScanVersion(aStream);
diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx
index 5212b0355441..85dad7b210c5 100644
--- a/sc/source/filter/lotus/lotread.cxx
+++ b/sc/source/filter/lotus/lotread.cxx
@@ -328,7 +328,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportWKS(SvStream& rStream)
if (eRet == ErrCode(0xFFFFFFFF))
{
rStream.Seek(0);
- eRet = ScImportLotus123old(aContext, rStream, &aDocument, RTL_TEXTENCODING_ASCII_US);
+ eRet = ScImportLotus123old(aContext, rStream, RTL_TEXTENCODING_ASCII_US);
}
return eRet == ERRCODE_NONE;
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index cbdb43e6be33..bc0adc44da89 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -53,7 +53,8 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume
{
pStream->Seek( 0 );
pStream->SetBufferSize( 32768 );
- eRet = ScImportLotus123old(aContext, *pStream, pDocument, eSrc);
+ assert(pDocument == aContext.pDoc);
+ eRet = ScImportLotus123old(aContext, *pStream, eSrc);
pStream->SetBufferSize( 0 );
return eRet;
}
More information about the Libreoffice-commits
mailing list