summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_annot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_annot.cpp')
-rw-r--r--core/fpdfdoc/cpdf_annot.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp
index dc2e8acfdf..5734e192e3 100644
--- a/core/fpdfdoc/cpdf_annot.cpp
+++ b/core/fpdfdoc/cpdf_annot.cpp
@@ -64,7 +64,7 @@ CPDF_Form* AnnotGetMatrix(const CPDF_Page* pPage,
CPDF_Stream* FPDFDOC_GetAnnotAPInternal(const CPDF_Dictionary* pAnnotDict,
CPDF_Annot::AppearanceMode eMode,
bool bFallbackToNormal) {
- CPDF_Dictionary* pAP = pAnnotDict->GetDictFor("AP");
+ const CPDF_Dictionary* pAP = pAnnotDict->GetDictFor("AP");
if (!pAP)
return nullptr;
@@ -90,7 +90,7 @@ CPDF_Stream* FPDFDOC_GetAnnotAPInternal(const CPDF_Dictionary* pAnnotDict,
if (as.IsEmpty()) {
ByteString value = pAnnotDict->GetStringFor("V");
if (value.IsEmpty()) {
- CPDF_Dictionary* pParentDict = pAnnotDict->GetDictFor("Parent");
+ const CPDF_Dictionary* pParentDict = pAnnotDict->GetDictFor("Parent");
value = pParentDict ? pParentDict->GetStringFor("V") : ByteString();
}
as = (!value.IsEmpty() && pDict->KeyExist(value)) ? value : "Off";
@@ -230,11 +230,12 @@ CFX_FloatRect CPDF_Annot::RectFromQuadPointsArray(const CPDF_Array* pArray,
// static
CFX_FloatRect CPDF_Annot::BoundingRectFromQuadPoints(
const CPDF_Dictionary* pAnnotDict) {
- CPDF_Array* pArray = pAnnotDict->GetArrayFor("QuadPoints");
+ CFX_FloatRect ret;
+ const CPDF_Array* pArray = pAnnotDict->GetArrayFor("QuadPoints");
if (!pArray)
- return CFX_FloatRect();
+ return ret;
- CFX_FloatRect ret = RectFromQuadPointsArray(pArray, 0);
+ ret = RectFromQuadPointsArray(pArray, 0);
size_t nQuadPointCount = QuadPointCount(pArray);
for (size_t i = 1; i < nQuadPointCount; ++i) {
CFX_FloatRect rect = RectFromQuadPointsArray(pArray, i);