diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 15:41:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 20:25:47 +0200 |
commit | c0d3b50213ffbed1cd58226a35e325fb7c769ec0 (patch) | |
tree | e68d4aaa7d0e4ac074301547ce73ec90afae2335 /sw/source | |
parent | 5652ecbf8bf9bf8b3c15764c38d26fe4b449cb64 (diff) |
pointer is always dereferenced make it a reference
Change-Id: I77c5dc3a4d4f290f5020019f3f455b1fec2497ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150350
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/inc/unofield.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/inc/unofield.hxx b/sw/source/core/inc/unofield.hxx index 4a8138bf8df9..55214020c038 100644 --- a/sw/source/core/inc/unofield.hxx +++ b/sw/source/core/inc/unofield.hxx @@ -54,7 +54,7 @@ private: SwXFieldMaster(SwFieldType& rType, SwDoc * pDoc); /// descriptor - SwXFieldMaster(SwDoc* pDoc, SwFieldIds nResId); + SwXFieldMaster(SwDoc& rDoc, SwFieldIds nResId); public: diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 226a595d0aaf..03761b0f28b3 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -506,8 +506,8 @@ SwXFieldMaster::getSupportedServiceNames() return { "com.sun.star.text.TextFieldMaster", getServiceName(m_pImpl->m_nResTypeId) }; } -SwXFieldMaster::SwXFieldMaster(SwDoc *const pDoc, SwFieldIds const nResId) - : m_pImpl(new Impl(pDoc->getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD), pDoc, nResId)) +SwXFieldMaster::SwXFieldMaster(SwDoc& rDoc, SwFieldIds const nResId) + : m_pImpl(new Impl(rDoc.getIDocumentStylePoolAccess().GetPageDescFromPool(RES_POOLPAGE_STANDARD), &rDoc, nResId)) { } @@ -534,7 +534,7 @@ SwXFieldMaster::CreateXFieldMaster(SwDoc * pDoc, SwFieldType *const pType, { SwXFieldMaster *const pFM( pType ? new SwXFieldMaster(*pType, pDoc) - : new SwXFieldMaster(pDoc, nResId)); + : new SwXFieldMaster(*pDoc, nResId)); xFM.set(pFM); if (pType) { |