From 93099409f3e9894b7a40182f775d76757fa2fb5b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 30 Sep 2020 10:10:08 +0100 Subject: SwPaM::GetDoc can return a reference instead MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and remove discovered redundant null checks Change-Id: Iac8ad7821d9acfcc9550a96402c02ac248f16f2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103672 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sw/source/filter/writer/writer.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw/source/filter/writer') diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 743ce8bd1ebb..8319f5181024 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -256,7 +256,7 @@ ErrCode Writer::Write( SwPaM& rPaM, SvStream& rStrm, const OUString* pFName ) return nResult; } - m_pDoc = rPaM.GetDoc(); + m_pDoc = &rPaM.GetDoc(); m_pOrigFileName = pFName; m_pImpl->m_pStream = &rStrm; @@ -495,7 +495,7 @@ ErrCode StgWriter::Write( SwPaM& rPaM, SotStorage& rStg, const OUString* pFName { SetStream(nullptr); m_pStg = &rStg; - m_pDoc = rPaM.GetDoc(); + m_pDoc = &rPaM.GetDoc(); m_pOrigFileName = pFName; // Copy PaM, so that it can be modified @@ -518,7 +518,7 @@ ErrCode StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& SetStream(nullptr); m_pStg = nullptr; m_xStg = rStg; - m_pDoc = rPaM.GetDoc(); + m_pDoc = &rPaM.GetDoc(); m_pOrigFileName = pFName; // Copy PaM, so that it can be modified -- cgit ffice-6-1'>distro/cib/libreoffice-6-1 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2019-04-11Fix typoAndrea Gelmini
2019-02-21loplugin:indentation (macOS)Stephan Bergmann
2019-02-06Fix typoAndrea Gelmini
2017-10-12Following tdf#111561: no need to autorelease "elements" (apple_remote)Julien Nabet
2017-10-11tdf#111561: try to fix leak in HIDRemoteControlDevice (apple_remote)Julien Nabet
2017-08-21Typo notifcation->notificationJulien Nabet
2017-08-07loplugin:oncevarStephan Bergmann
2017-03-30loplugin:loopvartoosmallStephan Bergmann
2017-03-26Fix typosAndrea Gelmini
2017-01-09loplugin:externvarStephan Bergmann
2016-10-05SAL_WNODEPRECATED_DECLARATIONS_PUSH/POP around new macOS 10.12 deprecationsStephan Bergmann