Test split with changes

This commit is contained in:
Svetlana Kulikova
2025-04-29 11:02:51 +03:00
parent 4f38f17bd1
commit 2cbc83b389
2 changed files with 37 additions and 8 deletions

View File

@ -1548,10 +1548,8 @@ bool CPdfEditor::EditPage(int _nPageIndex, bool bSet, bool bActualPos)
}
bool CPdfEditor::SplitPages(const int* arrPageIndex, unsigned int unLength, PDFDoc* _pDoc, int nStartRefID)
{
if (m_nMode == Mode::WriteNew)
return false;
if (m_nMode == Mode::Unknown)
m_nMode = Mode::WriteNew;
return false;
PDFDoc* pPDFDocument = _pDoc;
XRef* xref = pPDFDocument->getXRef();
PdfWriter::CDocument* pDoc = m_pWriter->GetDocument();
@ -1913,8 +1911,10 @@ bool CPdfEditor::SplitPages(const int* arrPageIndex, unsigned int unLength, PDFD
}
bool CPdfEditor::SplitPages(const int* arrPageIndex, unsigned int unLength)
{
if (m_nMode != Mode::Unknown)
if (m_nMode == Mode::WriteNew)
return false;
if (m_nMode == Mode::Unknown)
m_nMode = Mode::WriteNew;
PdfWriter::CDocument* pDoc = m_pWriter->GetDocument();
if (!pDoc)
return false;
@ -2675,7 +2675,7 @@ bool CPdfEditor::DeleteAnnot(int nID, Object* oAnnots)
}
bool CPdfEditor::EditWidgets(IAdvancedCommand* pCommand)
{
if (m_nMode != Mode::WriteAppend && !IncrementalUpdates())
if (m_nMode == Mode::Unknown && !IncrementalUpdates())
return false;
CWidgetsInfo* pFieldInfo = (CWidgetsInfo*)pCommand;