summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_editimg.cpp10
-rw-r--r--fpdfsdk/fpdf_editpage.cpp8
-rw-r--r--fpdfsdk/fpdf_editpath.cpp8
-rw-r--r--fpdfsdk/fpdf_edittext.cpp9
4 files changed, 7 insertions, 28 deletions
diff --git a/fpdfsdk/fpdf_editimg.cpp b/fpdfsdk/fpdf_editimg.cpp
index 21ed434d7f..8282eebdc1 100644
--- a/fpdfsdk/fpdf_editimg.cpp
+++ b/fpdfsdk/fpdf_editimg.cpp
@@ -6,6 +6,8 @@
#include "public/fpdf_edit.h"
+#include <utility>
+
#include "core/fpdfapi/cpdf_modulemgr.h"
#include "core/fpdfapi/page/cpdf_image.h"
#include "core/fpdfapi/page/cpdf_imageobject.h"
@@ -129,13 +131,7 @@ FPDFImageObj_GetMatrix(FPDF_PAGEOBJECT image_object,
if (!pImgObj || !a || !b || !c || !d || !e || !f)
return false;
- const CFX_Matrix& matrix = pImgObj->matrix();
- *a = matrix.a;
- *b = matrix.b;
- *c = matrix.c;
- *d = matrix.d;
- *e = matrix.e;
- *f = matrix.f;
+ std::tie(*a, *b, *c, *d, *e, *f) = pImgObj->matrix().AsTuple();
return true;
}
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 9026c72a4e..981baec70a 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -873,12 +873,6 @@ FPDFFormObj_GetMatrix(FPDF_PAGEOBJECT form_object,
if (!pFormObj || !a || !b || !c || !d || !e || !f)
return false;
- const CFX_Matrix& matrix = pFormObj->form_matrix();
- *a = matrix.a;
- *b = matrix.b;
- *c = matrix.c;
- *d = matrix.d;
- *e = matrix.e;
- *f = matrix.f;
+ std::tie(*a, *b, *c, *d, *e, *f) = pFormObj->form_matrix().AsTuple();
return true;
}
diff --git a/fpdfsdk/fpdf_editpath.cpp b/fpdfsdk/fpdf_editpath.cpp
index 83662aa8b5..8601a60508 100644
--- a/fpdfsdk/fpdf_editpath.cpp
+++ b/fpdfsdk/fpdf_editpath.cpp
@@ -4,6 +4,7 @@
#include "public/fpdf_edit.h"
+#include <utility>
#include <vector>
#include "core/fpdfapi/page/cpdf_path.h"
@@ -251,12 +252,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetMatrix(FPDF_PAGEOBJECT path,
if (!pPathObj)
return false;
- *a = pPathObj->m_Matrix.a;
- *b = pPathObj->m_Matrix.b;
- *c = pPathObj->m_Matrix.c;
- *d = pPathObj->m_Matrix.d;
- *e = pPathObj->m_Matrix.e;
- *f = pPathObj->m_Matrix.f;
+ std::tie(*a, *b, *c, *d, *e, *f) = pPathObj->m_Matrix.AsTuple();
return true;
}
diff --git a/fpdfsdk/fpdf_edittext.cpp b/fpdfsdk/fpdf_edittext.cpp
index 1c6709f915..3e1067dff8 100644
--- a/fpdfsdk/fpdf_edittext.cpp
+++ b/fpdfsdk/fpdf_edittext.cpp
@@ -524,14 +524,7 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetMatrix(FPDF_PAGEOBJECT text,
if (!pTextObj)
return false;
- CFX_Matrix text_matrix = pTextObj->GetTextMatrix();
- *a = text_matrix.a;
- *b = text_matrix.b;
- *c = text_matrix.c;
- *d = text_matrix.d;
- *e = text_matrix.e;
- *f = text_matrix.f;
-
+ std::tie(*a, *b, *c, *d, *e, *f) = pTextObj->GetTextMatrix().AsTuple();
return true;
}