coverity#1158084 Unchecked dynamic_cast
Change-Id: Ia800e45166b0206377fa9e138c4e444e476e3863
This commit is contained in:
@@ -1906,19 +1906,25 @@ void _RestoreCntntIdx(std::vector<sal_uLong> &rSaveArr,
|
|||||||
case 0x8000:
|
case 0x8000:
|
||||||
{
|
{
|
||||||
MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aSave.GetCount()].get());
|
MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aSave.GetCount()].get());
|
||||||
SwPosition aNewPos(pMark->GetMarkPos());
|
if (pMark)
|
||||||
aNewPos.nNode = rNd;
|
{
|
||||||
aNewPos.nContent.Assign(pCNd, std::min(aSave.GetContent(), nLen));
|
SwPosition aNewPos(pMark->GetMarkPos());
|
||||||
pMark->SetMarkPos(aNewPos);
|
aNewPos.nNode = rNd;
|
||||||
|
aNewPos.nContent.Assign(pCNd, std::min(aSave.GetContent(), nLen));
|
||||||
|
pMark->SetMarkPos(aNewPos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x8001:
|
case 0x8001:
|
||||||
{
|
{
|
||||||
MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aSave.GetCount()].get());
|
MarkBase* pMark = dynamic_cast<MarkBase*>(pMarkAccess->getAllMarksBegin()[aSave.GetCount()].get());
|
||||||
SwPosition aNewPos(pMark->GetOtherMarkPos());
|
if (pMark)
|
||||||
aNewPos.nNode = rNd;
|
{
|
||||||
aNewPos.nContent.Assign(pCNd, std::min(aSave.GetContent(), nLen));
|
SwPosition aNewPos(pMark->GetOtherMarkPos());
|
||||||
pMark->SetOtherMarkPos(aNewPos);
|
aNewPos.nNode = rNd;
|
||||||
|
aNewPos.nContent.Assign(pCNd, std::min(aSave.GetContent(), nLen));
|
||||||
|
pMark->SetOtherMarkPos(aNewPos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0x1001:
|
case 0x1001:
|
||||||
|
Reference in New Issue
Block a user