summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-06-05 18:56:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 18:56:52 +0000
commit354ed202ccd4d6b9d408789a30517ebb1633570b (patch)
tree0d960f1b1c79d11d1c148aaa06c17e4c9a6bfca8 /core/fpdfapi/edit
parenta9f327580558a96f659e96157731f21c6abbb951 (diff)
downloadpdfium-354ed202ccd4d6b9d408789a30517ebb1633570b.tar.xz
Revert "Create m_ContentStream field in CPDF_PageObject."
This reverts commit d3d8287e143daf12a602a919c120b4e0c656abf8. Reason for revert: Need to revert https://pdfium-review.googlesource.com/c/pdfium/+/33595 that this depends on. Original change's description: > Create m_ContentStream field in CPDF_PageObject. > > Content streams are now split and can set nonzero values to identify > each parsed content stream. > > Bug: pdfium:1051 > Change-Id: Ia2cb1e0997db5264d468043af31f9b41e8d0d349 > Reviewed-on: https://pdfium-review.googlesource.com/33591 > Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> > Reviewed-by: Ryan Harrison <rharrison@chromium.org> TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: I5046b6a76508fccc0ff04cb7393cae6485dd091f No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: pdfium:1051 Reviewed-on: https://pdfium-review.googlesource.com/33990 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r--core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
index f1dbffeccf..1244b12331 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp
@@ -49,7 +49,7 @@ class CPDF_PageContentGeneratorTest : public testing::Test {
};
TEST_F(CPDF_PageContentGeneratorTest, ProcessRect) {
- auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(-1);
+ auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendRect(10, 5, 13, 30);
pPathObj->m_FillType = FXFILL_ALTERNATE;
pPathObj->m_bStroke = true;
@@ -60,7 +60,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessRect) {
TestProcessPath(&generator, &buf, pPathObj.get());
EXPECT_EQ("q 1 0 0 1 0 0 cm 10 5 3 25 re B* Q\n", ByteString(buf));
- pPathObj = pdfium::MakeUnique<CPDF_PathObject>(-1);
+ pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendPoint(CFX_PointF(0, 0), FXPT_TYPE::MoveTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(5.2f, 0), FXPT_TYPE::LineTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(5.2f, 3.78f), FXPT_TYPE::LineTo,
@@ -75,7 +75,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessRect) {
}
TEST_F(CPDF_PageContentGeneratorTest, ProcessPath) {
- auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(-1);
+ auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendPoint(CFX_PointF(3.102f, 4.67f), FXPT_TYPE::MoveTo,
false);
pPathObj->m_Path.AppendPoint(CFX_PointF(5.45f, 0.29f), FXPT_TYPE::LineTo,
@@ -110,7 +110,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessPath) {
}
TEST_F(CPDF_PageContentGeneratorTest, ProcessGraphics) {
- auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>(-1);
+ auto pPathObj = pdfium::MakeUnique<CPDF_PathObject>();
pPathObj->m_Path.AppendPoint(CFX_PointF(1, 2), FXPT_TYPE::MoveTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(3, 4), FXPT_TYPE::LineTo, false);
pPathObj->m_Path.AppendPoint(CFX_PointF(5, 6), FXPT_TYPE::LineTo, true);
@@ -170,7 +170,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessStandardText) {
CPDF_Dictionary* pPageDict = pDoc->CreateNewPage(0);
auto pTestPage = pdfium::MakeRetain<CPDF_Page>(pDoc.get(), pPageDict, false);
CPDF_PageContentGenerator generator(pTestPage.Get());
- auto pTextObj = pdfium::MakeUnique<CPDF_TextObject>(-1);
+ auto pTextObj = pdfium::MakeUnique<CPDF_TextObject>();
CPDF_Font* pFont = CPDF_Font::GetStockFont(pDoc.get(), "Times-Roman");
pTextObj->m_TextState.SetFont(pFont);
pTextObj->m_TextState.SetFontSize(10.0f);
@@ -237,7 +237,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessText) {
std::ostringstream buf;
{
// Set the text object font and text
- auto pTextObj = pdfium::MakeUnique<CPDF_TextObject>(-1);
+ auto pTextObj = pdfium::MakeUnique<CPDF_TextObject>();
CPDF_Dictionary* pDict = pDoc->NewIndirect<CPDF_Dictionary>();
pDict->SetNewFor<CPDF_Name>("Type", "Font");
pDict->SetNewFor<CPDF_Name>("Subtype", "TrueType");