summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-13 19:30:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-14 09:45:45 +0200
commite44039e6fe58d2768f9e97ef786c8500952e785d (patch)
tree4d57eaf4c1c1f54c08185f81add779e716bcb624
parent170c2fe7131923ff9b1d93847e9413ff1d3f1d69 (diff)
ScImportLotus123 never passed a null ScDocument*
Change-Id: Ib404e7952703b8245331c1845e16ce689f399a6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102598 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sc/inc/filter.hxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx2
-rw-r--r--sc/source/filter/lotus/lotus.cxx6
-rw-r--r--sc/source/ui/docshell/docsh.cxx2
4 files changed, 6 insertions, 6 deletions
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index 3d416eefb8f5..1e7beac1184c 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -57,7 +57,7 @@ class ScEEAbsImport {
class SAL_DLLPUBLIC_RTTI ScFormatFilterPlugin {
public:
// various import filters
- virtual ErrCode ScImportLotus123( SfxMedium&, ScDocument*, rtl_TextEncoding eSrc ) = 0;
+ virtual ErrCode ScImportLotus123( SfxMedium&, ScDocument&, rtl_TextEncoding eSrc ) = 0;
virtual ErrCode ScImportQuattroPro(SvStream* pStream, ScDocument *pDoc) = 0;
virtual ErrCode ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) = 0;
// eFormat == EIF_AUTO -> matching filter is used automatically
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 4925af2aa6ee..fb0ac8ac455a 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -261,7 +261,7 @@ public:
ScFormatFilterPluginImpl();
virtual ~ScFormatFilterPluginImpl();
// various import filters
- virtual ErrCode ScImportLotus123( SfxMedium&, ScDocument*, rtl_TextEncoding eSrc ) override;
+ virtual ErrCode ScImportLotus123( SfxMedium&, ScDocument&, rtl_TextEncoding eSrc ) override;
virtual ErrCode ScImportQuattroPro(SvStream* pStream, ScDocument *pDoc) override;
virtual ErrCode ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) override;
// eFormat == EIF_AUTO -> matching filter is used automatically
diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx
index 0cef334009aa..dbb8c6730851 100644
--- a/sc/source/filter/lotus/lotus.cxx
+++ b/sc/source/filter/lotus/lotus.cxx
@@ -28,7 +28,7 @@
#include <filtopt.hxx>
#include <ftools.hxx>
-ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, rtl_TextEncoding eSrc )
+ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument& rDocument, rtl_TextEncoding eSrc )
{
SvStream* pStream = rMedium.GetInStream();
if (!pStream)
@@ -38,7 +38,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume
pStream->SetBufferSize( 32768 );
- LotusContext aContext(*pDocument, eSrc);
+ LotusContext aContext(rDocument, eSrc);
ImportLotus aLotusImport(aContext, *pStream, eSrc);
@@ -53,7 +53,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocume
{
pStream->Seek( 0 );
pStream->SetBufferSize( 32768 );
- assert(pDocument == &aContext.rDoc);
+ assert(&rDocument == &aContext.rDoc);
eRet = ScImportLotus123old(aContext, *pStream, eSrc);
pStream->SetBufferSize( 0 );
return eRet;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 3ef652c56ebe..1eb6026c4c4c 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -1192,7 +1192,7 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
sItStr = ScGlobal::GetCharsetString( RTL_TEXTENCODING_IBM_437 );
}
- ErrCode eError = ScFormatFilter::Get().ScImportLotus123( rMedium, &m_aDocument,
+ ErrCode eError = ScFormatFilter::Get().ScImportLotus123( rMedium, m_aDocument,
ScGlobal::GetCharsetValue(sItStr));
if (eError != ERRCODE_NONE)
{