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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user