Revert "sw: fix warning C6011: Dereferencing NULL pointer 'pDelNd'."

This reverts commit d86ee6d211.

Change-Id: I54eb454097e388f45d6e77ed74eb6d728cec4f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209247
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
This commit is contained in:
Xisco Fauli
2026-08-18 13:23:52 +02:00
parent c26599741c
commit 1182b28b15
+11 -15
View File
@@ -710,23 +710,19 @@ void Reader::EndPaste(SwPasteInfo& rPasteInfo)
{
aPam.GetPoint()->Assign(*pTextNode, pTextNode->GetText().getLength());
}
if (pDelNd)
// If the first new node isn't empty, convert the node's text
// attributes into hints. Otherwise, set the new node's
// paragraph style at the previous (empty) node.
if (pTextNode->GetText().getLength())
pDelNd->FormatToTextAttr(pTextNode);
else
{
// If the first new node isn't empty, convert the node's text
// attributes into hints. Otherwise, set the new node's
// paragraph style at the previous (empty) node.
if (pTextNode->GetText().getLength())
pDelNd->FormatToTextAttr(pTextNode);
else
pTextNode->ChgFormatColl(pDelNd->GetTextColl());
if (!pDelNd->GetNoCondAttr(RES_PARATR_LIST_ID, /*bInParents=*/false))
{
pTextNode->ChgFormatColl(pDelNd->GetTextColl());
if (!pDelNd->GetNoCondAttr(RES_PARATR_LIST_ID, /*bInParents=*/false))
{
// Lists would need manual merging, but copy paragraph direct formatting
// otherwise.
pDelNd->CopyCollFormat(*pTextNode);
}
// Lists would need manual merging, but copy paragraph direct formatting
// otherwise.
pDelNd->CopyCollFormat(*pTextNode);
}
}
pTextNode->JoinNext();