summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-03-20 19:34:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-22 12:35:07 +0100
commit64aa51cb2fcfb6cfb325ffdc2567b0a2f0661007 (patch)
tree160b4e3abce54656f98ebe6265beb3706e8f5bbf /sw
parent437161094d6e19f7cc222b1029801a481ad15618 (diff)
remove unnecessary code
SwTextFootnote has a start node member, no need to search for it again Add an assert in case I'm wrong. Looks like it has been this way since commit 6bff13645223e2a2701acc1b6f7d579671c97e06 Author: Oliver Specht <os@openoffice.org> Date: Fri Jan 12 15:15:41 2001 +0000 new: Redline container Change-Id: Ic9e48d051c9da14be860907cceaf38aee5a0c794 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165153 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unoobj2.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 9e67f927db54..f343bd9c3e75 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1327,9 +1327,10 @@ CreateParentXText(SwDoc & rDoc, const SwPosition& rPos)
const SwTextFootnote* pTextFootnote = rDoc.GetFootnoteIdxs()[ n ];
const SwFormatFootnote& rFormatFootnote = pTextFootnote->GetFootnote();
assert(pTextFootnote == rFormatFootnote.GetTextFootnote());
+ assert(&pTextFootnote->GetStartNode()->GetNode() == pTextFootnote->GetStartNode()->GetNode().
+ FindSttNodeByType(SwFootnoteStartNode));
- if (pSttNode == pTextFootnote->GetStartNode()->GetNode().
- FindSttNodeByType(SwFootnoteStartNode))
+ if (pSttNode == &pTextFootnote->GetStartNode()->GetNode())
{
xParentText = SwXFootnote::CreateXFootnote(rDoc,
&const_cast<SwFormatFootnote&>(rFormatFootnote));