[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 16 07:43:24 UTC 2020
sc/inc/charthelper.hxx | 2 +-
sc/source/core/tool/charthelper.cxx | 6 +++---
sc/source/ui/app/drwtrans.cxx | 2 +-
sc/source/ui/view/viewfun3.cxx | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit 8ef82d25fc806885b42ac9cafe45eb41bd3e1b7b
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 15 09:46:42 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 16 09:42:34 2020 +0200
FillProtectedChartRangesVector never passed a null ScDocument*
Change-Id: If090786c7e5834ea3cf990b0b4e9dbd2ec2a56a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102786
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/charthelper.hxx b/sc/inc/charthelper.hxx
index 1dc55ffd312a..4889c9de8eff 100644
--- a/sc/inc/charthelper.hxx
+++ b/sc/inc/charthelper.hxx
@@ -46,7 +46,7 @@ public:
const css::uno::Sequence< OUString >& rRanges );
static void AddRangesIfProtectedChart( ScRangeListVector& rRangesVector, const ScDocument* pDocument, SdrObject* pObject );
- static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument* pDocument, const SdrPage* pPage );
+ static void FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument& rDocument, const SdrPage* pPage );
static void GetChartNames( ::std::vector< OUString >& rChartNames, const SdrPage* pPage );
static void CreateProtectedChartListenersAndNotify( ScDocument& rDoc, const SdrPage* pPage, ScModelObj* pModelObj, SCTAB nTab,
const ScRangeListVector& rRangesVector, const ::std::vector< OUString >& rExcludedChartNames, bool bSameDoc = true );
diff --git a/sc/source/core/tool/charthelper.cxx b/sc/source/core/tool/charthelper.cxx
index 13bb73b86f8a..669a622f02ff 100644
--- a/sc/source/core/tool/charthelper.cxx
+++ b/sc/source/core/tool/charthelper.cxx
@@ -323,15 +323,15 @@ void ScChartHelper::AddRangesIfProtectedChart( ScRangeListVector& rRangesVector,
}
}
-void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument* pDocument, const SdrPage* pPage )
+void ScChartHelper::FillProtectedChartRangesVector( ScRangeListVector& rRangesVector, const ScDocument& rDocument, const SdrPage* pPage )
{
- if ( pDocument && pPage )
+ if ( pPage )
{
SdrObjListIter aIter( pPage, SdrIterMode::DeepNoGroups );
SdrObject* pObject = aIter.Next();
while ( pObject )
{
- AddRangesIfProtectedChart( rRangesVector, pDocument, pObject );
+ AddRangesIfProtectedChart( rRangesVector, &rDocument, pObject );
pObject = aIter.Next();
}
}
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 2c3c11ca6b9b..246c549c6105 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -201,7 +201,7 @@ ScDrawTransferObj::ScDrawTransferObj( std::unique_ptr<SdrModel> pClipModel, ScDo
ScDocument& rDoc = pContainerShell->GetDocument();
if ( pPage )
{
- ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, &rDoc, pPage );
+ ScChartHelper::FillProtectedChartRangesVector( m_aProtectedChartRangesVector, rDoc, pPage );
}
}
}
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 989037bc6369..407c10782fc2 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -269,7 +269,7 @@ bool ScViewFunc::CopyToClipSingleRange( ScDocument* pClipDoc, const ScRangeList&
SdrPage* pPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
if ( pPage )
{
- ScChartHelper::FillProtectedChartRangesVector( rRangesVector, &rDoc, pPage );
+ ScChartHelper::FillProtectedChartRangesVector( rRangesVector, rDoc, pPage );
}
}
}
More information about the Libreoffice-commits
mailing list