summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-08 12:36:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-05-10 12:02:44 +0200
commit366d08f2f6d4de922f6099c62bb81b49d89e0a68 (patch)
treeb232884af6e844c2f0994859e4b42efbc1ce654c /sc/source/core/data
parent75a2257a5bd716a9f937abe5e53f305c983afd5d (diff)
new loplugin:simplifypointertobool
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/documen3.cxx4
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/data/postit.cxx2
-rw-r--r--sc/source/core/data/table5.cxx2
4 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 83a80871e9ef..33c9a2b5665b 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -613,7 +613,7 @@ ScExternalRefManager* ScDocument::GetExternalRefManager() const
bool ScDocument::IsInExternalReferenceMarking() const
{
- return pExternalRefMgr.get() && pExternalRefMgr->isInReferenceMarking();
+ return pExternalRefMgr && pExternalRefMgr->isInReferenceMarking();
}
void ScDocument::MarkUsedExternalReferences()
@@ -1860,7 +1860,7 @@ void ScDocument::SetDocProtection(const ScDocProtection* pProtect)
bool ScDocument::IsDocProtected() const
{
- return pDocProtection.get() && pDocProtection->isProtected();
+ return pDocProtection && pDocProtection->isProtected();
}
bool ScDocument::IsDocEditable() const
diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx
index a2e4171a3be9..0b9dd891e1d1 100644
--- a/sc/source/core/data/dptabsrc.cxx
+++ b/sc/source/core/data/dptabsrc.cxx
@@ -2358,7 +2358,7 @@ ScDPMember* ScDPMembers::getByIndex(long nIndex) const
if (maMembers.empty())
maMembers.resize(nMbrCount);
- if (!maMembers[nIndex].get())
+ if (!maMembers[nIndex])
{
rtl::Reference<ScDPMember> pNew;
long nSrcDim = pSource->GetSourceDim( nDim );
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index e063f6a83da1..dd9a36b71763 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -1049,7 +1049,7 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const
maNoteData.mxCaption->getSdrModelFromSdrObject().setLock(true);
// transfer ownership of outliner object to caption, or set simple text
- OSL_ENSURE( xInitData->mxOutlinerObj.get() || !xInitData->maSimpleText.isEmpty(),
+ OSL_ENSURE( xInitData->mxOutlinerObj || !xInitData->maSimpleText.isEmpty(),
"ScPostIt::CreateCaptionFromInitData - need either outliner para object or simple text" );
if (xInitData->mxOutlinerObj)
maNoteData.mxCaption->SetOutlinerParaObject( std::move(xInitData->mxOutlinerObj) );
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index d33ccf6ddf0d..189cad4c7328 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -1039,7 +1039,7 @@ void ScTable::SetPageSize( const Size& rSize )
bool ScTable::IsProtected() const
{
- return pTabProtection.get() && pTabProtection->isProtected();
+ return pTabProtection && pTabProtection->isProtected();
}
void ScTable::SetProtection(const ScTableProtection* pProtect)