summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit/fxet_edit.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-29 14:07:28 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-29 14:07:28 -0700
commitadbd32950006075fc04ff2cbb01bf3a099f0e010 (patch)
tree62ad8839a0190a8cf5e2b0823276e4ba2dbd99a2 /fpdfsdk/fxedit/fxet_edit.cpp
parentdda2c0dc502b50d4de66b80305441bfb612ec6c1 (diff)
downloadpdfium-adbd32950006075fc04ff2cbb01bf3a099f0e010.tar.xz
Revert "Use ->() in CPDF_ColorState"
This reverts commit 91ddd3f7501429222f648b986a99f3959a398889. Reason for revert: may introduce sublte bugs, more thought required. TBR=dsinclair@chromium.org Review-Url: https://codereview.chromium.org/2294553002
Diffstat (limited to 'fpdfsdk/fxedit/fxet_edit.cpp')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 97debe1764..c744958e5e 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -145,8 +145,7 @@ void AddRectToPageObjects(CPDF_PageObjectHolder* pObjectHolder,
rgb[0] = FXARGB_R(crFill) / 255.0f;
rgb[1] = FXARGB_G(crFill) / 255.0f;
rgb[2] = FXARGB_B(crFill) / 255.0f;
- pPathObj->m_ColorState.MakePrivateCopy();
- pPathObj->m_ColorState->SetFillColor(
+ pPathObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
pPathObj->m_FillType = FXFILL_ALTERNATE;
@@ -178,11 +177,9 @@ CPDF_TextObject* AddTextObjToPageObjects(CPDF_PageObjectHolder* pObjectHolder,
rgb[0] = FXARGB_R(crText) / 255.0f;
rgb[1] = FXARGB_G(crText) / 255.0f;
rgb[2] = FXARGB_B(crText) / 255.0f;
-
- pTxtObj->m_ColorState.MakePrivateCopy();
- pTxtObj->m_ColorState->SetFillColor(
+ pTxtObj->m_ColorState.SetFillColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
- pTxtObj->m_ColorState->SetStrokeColor(
+ pTxtObj->m_ColorState.SetStrokeColor(
CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB), rgb, 3);
pTxtObj->SetPosition(point.x, point.y);