summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/fpdfeditpage.cpp15
1 files changed, 1 insertions, 14 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 511b7f5b4b..739723f6ee 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -133,20 +133,7 @@ DLLEXPORT int STDCALL FPDFPage_GetRotation(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!IsPageObject(pPage))
return -1;
-
- CPDF_Dictionary* pDict = pPage->m_pFormDict;
- while (pDict) {
- if (pDict->KeyExist("Rotate")) {
- CPDF_Object* pRotateObj = pDict->GetObjectFor("Rotate")->GetDirect();
- return pRotateObj ? pRotateObj->GetInteger() / 90 : 0;
- }
- if (!pDict->KeyExist("Parent"))
- break;
-
- pDict = ToDictionary(pDict->GetObjectFor("Parent")->GetDirect());
- }
-
- return 0;
+ return pPage->GetPageRotation();
}
DLLEXPORT void STDCALL FPDFPage_InsertObject(FPDF_PAGE page,