[Libreoffice-commits] core.git: sw/inc sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Oct 4 13:00:49 UTC 2020
sw/inc/dcontact.hxx | 2 +-
sw/source/core/draw/dcontact.cxx | 4 ++--
sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx | 2 +-
sw/source/uibase/lingu/sdrhhcwrap.cxx | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit df11dc76e6f085ee02d4dd7e341dbbfdc9573c42
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 2 19:50:27 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 4 15:00:02 2020 +0200
SwDrawContact::GetTextObjectsFromFormat always dereferences is SwDoc* arg
Change-Id: I3e451f0f252626abfb48222ec32a60fe346fe23b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103874
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index daec75ea300f..09fb15b6a8fd 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -404,7 +404,7 @@ class SAL_DLLPUBLIC_RTTI SwDrawContact final : public SwContact
/** get data collection of anchored objects, handled by with contact */
- static void GetTextObjectsFromFormat( std::list<SdrTextObj*>&, SwDoc* );
+ static void GetTextObjectsFromFormat( std::list<SdrTextObj*>&, SwDoc& );
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const override;
};
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 74cff2fd43bc..c4f890aba37e 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -728,9 +728,9 @@ SwDrawContact::~SwDrawContact()
}
}
-void SwDrawContact::GetTextObjectsFromFormat(std::list<SdrTextObj*>& o_rTextObjects, SwDoc* pDoc)
+void SwDrawContact::GetTextObjectsFromFormat(std::list<SdrTextObj*>& o_rTextObjects, SwDoc& rDoc)
{
- for(auto& rpFly : *pDoc->GetSpzFrameFormats())
+ for(auto& rpFly : *rDoc.GetSpzFrameFormats())
{
if(dynamic_cast<const SwDrawFrameFormat*>(rpFly))
rpFly->CallSwClientNotify(sw::CollectTextObjectsHint(o_rTextObjects));
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index ec4ce8ead6d9..58070eb13352 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -729,7 +729,7 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
if(!m_pSpellState->m_bTextObjectsCollected )
{
m_pSpellState->m_bTextObjectsCollected = true;
- SwDrawContact::GetTextObjectsFromFormat( m_pSpellState->m_aTextObjects, pDoc );
+ SwDrawContact::GetTextObjectsFromFormat(m_pSpellState->m_aTextObjects, *pDoc);
if(pCurrentTextObj)
{
m_pSpellState->m_aTextObjects.remove(pCurrentTextObj);
diff --git a/sw/source/uibase/lingu/sdrhhcwrap.cxx b/sw/source/uibase/lingu/sdrhhcwrap.cxx
index d21ffaa24209..92e4eaadbbee 100644
--- a/sw/source/uibase/lingu/sdrhhcwrap.cxx
+++ b/sw/source/uibase/lingu/sdrhhcwrap.cxx
@@ -111,7 +111,7 @@ bool SdrHHCWrapper::ConvertNextDocument()
const auto n = nDocIndex;
std::list<SdrTextObj*> aTextObjs;
- SwDrawContact::GetTextObjectsFromFormat( aTextObjs, pView->GetDocShell()->GetDoc() );
+ SwDrawContact::GetTextObjectsFromFormat(aTextObjs, *pView->GetDocShell()->GetDoc());
for (auto const& textObj : aTextObjs)
{
pTextObj = textObj;
More information about the Libreoffice-commits
mailing list