summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/include/fpdfapi/fpdf_serial.h6
-rw-r--r--core/include/fxcrt/fx_basic.h3
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp13
3 files changed, 3 insertions, 19 deletions
diff --git a/core/include/fpdfapi/fpdf_serial.h b/core/include/fpdfapi/fpdf_serial.h
index 4a325341cb..b0989f7f35 100644
--- a/core/include/fpdfapi/fpdf_serial.h
+++ b/core/include/fpdfapi/fpdf_serial.h
@@ -91,15 +91,11 @@ class CPDF_Creator {
FX_DWORD m_dwFlags;
FX_POSITION m_Pos;
FX_FILESIZE m_XrefStart;
-
CFX_FileSizeListArray m_ObjectOffset;
-
- CFX_DWordListArray m_ObjectSize;
CFX_DWordArray m_NewObjNumArray;
-
CPDF_Array* m_pIDArray;
-
int32_t m_FileVersion;
+
friend class CPDF_ObjectStream;
friend class CPDF_XRefStream;
};
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h
index bb34e2bc15..fd35de906d 100644
--- a/core/include/fxcrt/fx_basic.h
+++ b/core/include/fxcrt/fx_basic.h
@@ -1082,8 +1082,7 @@ class CFX_ListArrayTemplate {
};
typedef CFX_ListArrayTemplate<CFX_SortListArray<sizeof(FX_FILESIZE)>,
FX_FILESIZE> CFX_FileSizeListArray;
-typedef CFX_ListArrayTemplate<CFX_SortListArray<sizeof(FX_DWORD)>, FX_DWORD>
- CFX_DWordListArray;
+
typedef enum {
Ready,
ToBeContinued,
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 8c3defde83..3fb5818543 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -654,7 +654,6 @@ int32_t CPDF_XRefStream::EndObjectStream(CPDF_Creator* pCreator, FX_BOOL bEOF) {
}
if (iSize > 0 && bEOF) {
pCreator->m_ObjectOffset.Add(dwObjStmNum, 1);
- pCreator->m_ObjectSize.Add(dwObjStmNum, 1);
pCreator->m_ObjectOffset[dwObjStmNum] = objOffset;
}
m_iSeg = iSeg;
@@ -1265,7 +1264,6 @@ int32_t CPDF_Creator::WriteOldIndirectObject(FX_DWORD objnum) {
CPDF_Object* pObj = m_pDocument->GetIndirectObject(objnum);
if (!pObj) {
m_ObjectOffset[objnum] = 0;
- m_ObjectSize[objnum] = 0;
return 0;
}
if (WriteIndirectObj(pObj)) {
@@ -1332,7 +1330,6 @@ int32_t CPDF_Creator::WriteOldObjs(IFX_Pause* pPause) {
if (!iRet)
continue;
- m_ObjectSize[objnum] = (FX_DWORD)(m_Offset - m_ObjectOffset[objnum]);
if (pPause && pPause->NeedToPauseNow()) {
m_Pos = (void*)(uintptr_t)(objnum + 1);
return 1;
@@ -1355,7 +1352,6 @@ int32_t CPDF_Creator::WriteNewObjs(FX_BOOL bIncremental, IFX_Pause* pPause) {
if (WriteIndirectObj(pObj)) {
return -1;
}
- m_ObjectSize[objnum] = (FX_DWORD)(m_Offset - m_ObjectOffset[objnum]);
index++;
if (pPause && pPause->NeedToPauseNow()) {
m_Pos = (FX_POSITION)(uintptr_t)index;
@@ -1385,7 +1381,6 @@ void CPDF_Creator::InitOldObjNumOffsets() {
j++;
}
m_ObjectOffset.Add(dwStart, j - dwStart);
- m_ObjectSize.Add(dwStart, j - dwStart);
dwStart = j;
}
}
@@ -1437,10 +1432,8 @@ void CPDF_Creator::InitNewObjNumOffsets() {
bool bExist = m_pParser && m_pParser->IsValidObjectNumber(dwCurObjNum) &&
m_ObjectOffset.GetPtrAt(dwCurObjNum);
if (bExist || dwCurObjNum - dwLastObjNum > 1) {
- if (!bNewStart) {
+ if (!bNewStart)
m_ObjectOffset.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
- m_ObjectSize.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
- }
dwStartObjNum = dwCurObjNum;
}
if (bNewStart) {
@@ -1450,7 +1443,6 @@ void CPDF_Creator::InitNewObjNumOffsets() {
dwLastObjNum = dwCurObjNum;
}
m_ObjectOffset.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
- m_ObjectSize.Add(dwStartObjNum, dwLastObjNum - dwStartObjNum + 1);
}
void CPDF_Creator::AppendNewObjNum(FX_DWORD objbum) {
int32_t iStart = 0, iFind = 0;
@@ -1609,8 +1601,6 @@ int32_t CPDF_Creator::WriteDoc_Stage2(IFX_Pause* pPause) {
}
m_ObjectOffset.Add(m_dwLastObjNum, 1);
m_ObjectOffset[m_dwLastObjNum] = saveOffset;
- m_ObjectSize.Add(m_dwLastObjNum, 1);
- m_ObjectSize[m_dwLastObjNum] = m_Offset - saveOffset;
m_dwEnryptObjNum = m_dwLastObjNum;
if (m_dwFlags & FPDFCREATE_INCREMENTAL) {
m_NewObjNumArray.Add(m_dwLastObjNum);
@@ -1998,7 +1988,6 @@ FX_BOOL CPDF_Creator::Create(FX_DWORD flags) {
m_Offset = 0;
m_dwLastObjNum = m_pDocument->GetLastObjNum();
m_ObjectOffset.Clear();
- m_ObjectSize.Clear();
m_NewObjNumArray.RemoveAll();
InitID();
if (flags & FPDFCREATE_PROGRESSIVE) {