[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 14 07:46:32 UTC 2020
sc/inc/filter.hxx | 2 +-
sc/source/filter/inc/ftools.hxx | 2 +-
sc/source/filter/lotus/lotus.cxx | 6 +++---
sc/source/ui/docshell/docsh.cxx | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit e44039e6fe58d2768f9e97ef786c8500952e785d
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sun Sep 13 19:30:44 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Sep 14 09:45:45 2020 +0200
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 at redhat.com>
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)
{
More information about the Libreoffice-commits
mailing list