For bug 73947

This commit is contained in:
Svetlana Kulikova
2025-05-16 17:02:02 +03:00
parent 41e0b5fe83
commit 3963f1fcef
8 changed files with 13 additions and 13 deletions

View File

@ -2635,8 +2635,10 @@ bool CPdfEditor::DeleteAnnot(int nID, Object* oAnnots)
pObj = pKids->Get(i);
if (pObj == pAnnot)
{
pKids->Remove(i);
pOpt->Remove(i);
pObj = pKids->Remove(i);
delete pObj;
pObj = pOpt->Remove(i);
delete pObj;
--i;
}
else

View File

@ -68,7 +68,7 @@ public:
m_nCMapDataLength = 0;
m_bDrawFormField = false;
}
~GlobalParamsAdaptor()
virtual ~GlobalParamsAdaptor()
{
RELEASEARRAYOBJECTS(m_bCMapData);
}

View File

@ -321,10 +321,7 @@ namespace PdfWriter
for (int nIndex = 0, nCount = m_arrList.size(); nIndex < nCount; nIndex++)
{
CObjectBase* pObjectItem = m_arrList.at(nIndex);
if (object_type_PROXY == pObjectItem->GetType())
pObjectItem = ((CProxyObject*)pObjectItem)->Get();
if (pObjectItem == pTarget)
if (pObjectItem == pTarget || (object_type_PROXY == pObjectItem->GetType() && ((CProxyObject*)pObjectItem)->Get() == pTarget))
{
if (bReplace)
{

View File

@ -1547,10 +1547,6 @@ namespace PdfWriter
Add("Contents", m_pContents);
AddContents(pXref);
}
CDictObject* CPage::GetContent() const
{
return (CDictObject*)m_pContents->Remove(0);
}
int CPage::GetRotate()
{
CNumberObject* pRotate = (CNumberObject*)GetRotateItem();

View File

@ -179,7 +179,6 @@ namespace PdfWriter
void SetRotate(int nRotate);
int GetRotate();
void ClearContent(CXref* pXref);
CDictObject* GetContent() const;
CResourcesDict* GetResourcesItem();
private:

View File

@ -239,7 +239,7 @@ public:
// file.
GlobalParams(const char *cfgFileName);
~GlobalParams();
virtual ~GlobalParams();
void setBaseDir(const char *dir);
void setupBaseFonts(const char *dir);