sw/inc/docstyle.hxx | 6 +++--- sw/source/uibase/app/docstyle.cxx | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit 8ab0f754b4daa127cd2cbcc7a431438050ebce8a Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jul 22 11:59:06 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jul 22 16:18:35 2019 +0200 cid#1448361 silence Explicit null dereferenced Change-Id: I70d5f91d9f4f66e7fdfee67c7d9398d5435e2374 Reviewed-on: https://gerrit.libreoffice.org/76115 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/inc/docstyle.hxx b/sw/inc/docstyle.hxx index 0e159ac881ca..472ba6cd6c18 100644 --- a/sw/inc/docstyle.hxx +++ b/sw/inc/docstyle.hxx @@ -78,7 +78,7 @@ protected: public: SwDocStyleSheet( SwDoc& rDoc, - SwDocStyleSheetPool* pPool); + SwDocStyleSheetPool& rPool); SwDocStyleSheet( const SwDocStyleSheet& ); @@ -174,8 +174,8 @@ class SwStyleSheetIterator : public SfxStyleSheetIterator, public SfxListener char cType); public: - SwStyleSheetIterator( SwDocStyleSheetPool* pBase, - SfxStyleFamily eFam, SfxStyleSearchBits n ); + SwStyleSheetIterator(SwDocStyleSheetPool& rBase, + SfxStyleFamily eFam, SfxStyleSearchBits n); virtual ~SwStyleSheetIterator() override; virtual sal_uInt16 Count() override; diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index cc1b8121faca..6d4032e57a8f 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -451,9 +451,9 @@ void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& // UI-sided implementation of StyleSheets // uses the Core-Engine SwDocStyleSheet::SwDocStyleSheet( SwDoc& rDocument, - SwDocStyleSheetPool* _rPool) : + SwDocStyleSheetPool& rPool) : - SfxStyleSheetBase( OUString(), _rPool, SfxStyleFamily::Char, SfxStyleSearchBits::Auto ), + SfxStyleSheetBase( OUString(), &rPool, SfxStyleFamily::Char, SfxStyleSearchBits::Auto ), pCharFormat(nullptr), pColl(nullptr), pFrameFormat(nullptr), @@ -2394,14 +2394,14 @@ void SwDocStyleSheet::SetHelpId( const OUString& r, sal_uLong nId ) // methods for DocStyleSheetPool SwDocStyleSheetPool::SwDocStyleSheetPool( SwDoc& rDocument, bool bOrg ) -: SfxStyleSheetBasePool( rDocument.GetAttrPool() ) -, mxStyleSheet( new SwDocStyleSheet( rDocument, this ) ) -, rDoc( rDocument ) + : SfxStyleSheetBasePool(rDocument.GetAttrPool()) + , mxStyleSheet(new SwDocStyleSheet(rDocument, *this)) + , rDoc(rDocument) { bOrganizer = bOrg; } - SwDocStyleSheetPool::~SwDocStyleSheetPool() +SwDocStyleSheetPool::~SwDocStyleSheetPool() { } @@ -2435,7 +2435,7 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Create( const OUString &, std::unique_ptr<SfxStyleSheetIterator> SwDocStyleSheetPool::CreateIterator( SfxStyleFamily eFam, SfxStyleSearchBits _nMask ) { - return std::make_unique<SwStyleSheetIterator>( this, eFam, _nMask ); + return std::make_unique<SwStyleSheetIterator>(*this, eFam, _nMask); } void SwDocStyleSheetPool::dispose() @@ -2640,15 +2640,15 @@ SfxStyleSheetBase* SwDocStyleSheetPool::Find( const OUString& rName, return bFnd ? mxStyleSheet.get() : nullptr; } -SwStyleSheetIterator::SwStyleSheetIterator( SwDocStyleSheetPool* pBase, +SwStyleSheetIterator::SwStyleSheetIterator(SwDocStyleSheetPool& rBase, SfxStyleFamily eFam, SfxStyleSearchBits n ) - : SfxStyleSheetIterator( pBase, eFam, n ), - mxIterSheet( new SwDocStyleSheet( pBase->GetDoc(), pBase ) ), - mxStyleSheet( new SwDocStyleSheet( pBase->GetDoc(), pBase ) ) + : SfxStyleSheetIterator(&rBase, eFam, n) + , mxIterSheet(new SwDocStyleSheet(rBase.GetDoc(), rBase)) + , mxStyleSheet(new SwDocStyleSheet(rBase.GetDoc(), rBase)) { bFirstCalled = false; nLastPos = 0; - StartListening( *pBase ); + StartListening(rBase); } SwStyleSheetIterator::~SwStyleSheetIterator() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits