summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-06-08 19:18:37 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-08 19:18:37 +0000
commit280862f53a182928c5a9702784bb25f60a6eff08 (patch)
tree0ffa93696254c4a8bb6db4fee8a362be17dcfc90 /core/fpdfapi/edit
parentc268464fffb9b38b65d5392b69bd80a43bba189a (diff)
downloadpdfium-280862f53a182928c5a9702784bb25f60a6eff08.tar.xz
Remove CPDF_Creator::InitOldObjNumOffsets(). It does nothing.
This method is called, but it returns void and has no side effects: all called methods are const, and no member or static variable is modified. Change-Id: I12084000621728b9994fe7b487852928e7b1180e Reviewed-on: https://pdfium-review.googlesource.com/34690 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp25
-rw-r--r--core/fpdfapi/edit/cpdf_creator.h1
2 files changed, 0 insertions, 26 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index d386217f23..1935c7362f 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -346,27 +346,6 @@ bool CPDF_Creator::WriteNewObjs() {
return true;
}
-void CPDF_Creator::InitOldObjNumOffsets() {
- if (!m_pParser)
- return;
-
- uint32_t dwStart = 0;
- uint32_t dwEnd = m_pParser->GetLastObjNum();
- while (dwStart <= dwEnd) {
- while (dwStart <= dwEnd && m_pParser->IsObjectFreeOrNull(dwStart))
- dwStart++;
-
- if (dwStart > dwEnd)
- break;
-
- uint32_t j = dwStart;
- while (j <= dwEnd && !m_pParser->IsObjectFreeOrNull(j))
- j++;
-
- dwStart = j;
- }
-}
-
void CPDF_Creator::InitNewObjNumOffsets() {
for (const auto& pair : *m_pDocument) {
const uint32_t objnum = pair.first;
@@ -411,8 +390,6 @@ int32_t CPDF_Creator::WriteDoc_Stage1() {
!m_Archive->WriteString("\r\n%\xA1\xB3\xC5\xD7\r\n")) {
return -1;
}
-
- InitOldObjNumOffsets();
m_iStage = 20;
} else {
m_SavedOffset = m_pParser->GetFileAccess()->GetSize();
@@ -438,8 +415,6 @@ int32_t CPDF_Creator::WriteDoc_Stage1() {
}
}
if (IsOriginal() && m_pParser->GetLastXRefOffset() == 0) {
- InitOldObjNumOffsets();
-
for (uint32_t num = 0; num <= m_pParser->GetLastObjNum(); ++num) {
if (m_pParser->IsObjectFreeOrNull(num))
continue;
diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h
index f95cab44eb..2b36fdd136 100644
--- a/core/fpdfapi/edit/cpdf_creator.h
+++ b/core/fpdfapi/edit/cpdf_creator.h
@@ -61,7 +61,6 @@ class CPDF_Creator {
private:
void Clear();
- void InitOldObjNumOffsets();
void InitNewObjNumOffsets();
void InitID();