summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpage.cpp
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-08-22 10:50:06 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-08-22 16:42:55 +0000
commit878b27de2fa8e5bdc3b910c98846f4b43185d4aa (patch)
treef21a9528354ebf533a637f5ea0e8edaa44be7427 /fpdfsdk/fpdfeditpage.cpp
parentaac59a0e59052366e260396165a759b5b0e80188 (diff)
downloadpdfium-878b27de2fa8e5bdc3b910c98846f4b43185d4aa.tar.xz
Converted CFX_Matrix::TransformRect() to take in consts
Currently, all three of CFX_Matrix::TransformRect() take in rect values and modify them in place. This CL converts them to take in constant values and return the transformed values instead, and fixes all the call sites. Bug=pdfium:874 Change-Id: I9c274df3b14e9d88c100ba0530068e06e8fec32b Reviewed-on: https://pdfium-review.googlesource.com/11550 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'fpdfsdk/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/fpdfeditpage.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 489053080c..79155e52d5 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -299,10 +299,9 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_TransformAnnots(FPDF_PAGE page,
CPDF_AnnotList AnnotList(pPage);
for (size_t i = 0; i < AnnotList.Count(); ++i) {
CPDF_Annot* pAnnot = AnnotList.GetAt(i);
- CFX_FloatRect rect = pAnnot->GetRect(); // transformAnnots Rectangle
CFX_Matrix matrix((float)a, (float)b, (float)c, (float)d, (float)e,
(float)f);
- matrix.TransformRect(rect);
+ CFX_FloatRect rect = matrix.TransformRect(pAnnot->GetRect());
CPDF_Dictionary* pAnnotDict = pAnnot->GetAnnotDict();
CPDF_Array* pRectArray = pAnnotDict->GetArrayFor("Rect");