summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_creator.cpp12
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp6
2 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index 590229bf4f..db5bd681d4 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -556,15 +556,15 @@ int32_t CPDF_Creator::WriteDoc_Stage3() {
j++;
if (i == 1)
- str.Format("0 %d\r\n0000000000 65535 f\r\n", j);
+ str = ByteString::Format("0 %d\r\n0000000000 65535 f\r\n", j);
else
- str.Format("%d %d\r\n", i, j - i);
+ str = ByteString::Format("%d %d\r\n", i, j - i);
if (!m_Archive->WriteBlock(str.c_str(), str.GetLength()))
return -1;
while (i < j) {
- str.Format("%010d 00000 n\r\n", m_ObjectOffsets[i++]);
+ str = ByteString::Format("%010d 00000 n\r\n", m_ObjectOffsets[i++]);
if (!m_Archive->WriteBlock(str.c_str(), str.GetLength()))
return -1;
}
@@ -590,16 +590,16 @@ int32_t CPDF_Creator::WriteDoc_Stage3() {
}
objnum = m_NewObjNumArray[i];
if (objnum == 1)
- str.Format("0 %d\r\n0000000000 65535 f\r\n", j - i + 1);
+ str = ByteString::Format("0 %d\r\n0000000000 65535 f\r\n", j - i + 1);
else
- str.Format("%d %d\r\n", objnum, j - i);
+ str = ByteString::Format("%d %d\r\n", objnum, j - i);
if (!m_Archive->WriteBlock(str.c_str(), str.GetLength()))
return -1;
while (i < j) {
objnum = m_NewObjNumArray[i++];
- str.Format("%010d 00000 n\r\n", m_ObjectOffsets[objnum]);
+ str = ByteString::Format("%010d 00000 n\r\n", m_ObjectOffsets[objnum]);
if (!m_Archive->WriteBlock(str.c_str(), str.GetLength()))
return -1;
}
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index 593680e7ff..8a08a849cc 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -138,10 +138,10 @@ ByteString CPDF_PageContentGenerator::RealizeResource(
ByteString name;
int idnum = 1;
while (1) {
- name.Format("FX%c%d", bsType[0], idnum);
- if (!pResList->KeyExist(name)) {
+ name = ByteString::Format("FX%c%d", bsType[0], idnum);
+ if (!pResList->KeyExist(name))
break;
- }
+
idnum++;
}
pResList->SetNewFor<CPDF_Reference>(name, m_pDocument.Get(),