diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cba_annotiterator.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_baannot.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_widget.cpp | 3 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_formfiller.cpp | 6 | ||||
-rw-r--r-- | fpdfsdk/formfiller/cffl_iformfiller.cpp | 5 | ||||
-rw-r--r-- | fpdfsdk/fpdfeditpage.cpp | 3 | ||||
-rw-r--r-- | fpdfsdk/fsdk_mgr.cpp | 6 |
7 files changed, 9 insertions, 22 deletions
diff --git a/fpdfsdk/cba_annotiterator.cpp b/fpdfsdk/cba_annotiterator.cpp index f07805e6f3..bd68997ad9 100644 --- a/fpdfsdk/cba_annotiterator.cpp +++ b/fpdfsdk/cba_annotiterator.cpp @@ -168,7 +168,5 @@ void CBA_AnnotIterator::GenerateResults() { } CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { - CFX_FloatRect rcAnnot; - pAnnot->GetPDFAnnot()->GetRect(rcAnnot); - return rcAnnot; + return pAnnot->GetPDFAnnot()->GetRect(); } diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp index 6a4ba86d94..99dd2e0538 100644 --- a/fpdfsdk/cpdfsdk_baannot.cpp +++ b/fpdfsdk/cpdfsdk_baannot.cpp @@ -35,9 +35,7 @@ void CPDFSDK_BAAnnot::SetRect(const CFX_FloatRect& rect) { } CFX_FloatRect CPDFSDK_BAAnnot::GetRect() const { - CFX_FloatRect rect; - m_pAnnot->GetRect(rect); - return rect; + return m_pAnnot->GetRect(); } CFX_ByteString CPDFSDK_BAAnnot::GetType() const { diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp index a36014c924..dcccf0ce1a 100644 --- a/fpdfsdk/cpdfsdk_widget.cpp +++ b/fpdfsdk/cpdfsdk_widget.cpp @@ -1975,8 +1975,7 @@ int32_t CPDFSDK_Widget::GetValueAge() const { FX_BOOL CPDFSDK_Widget::HitTest(FX_FLOAT pageX, FX_FLOAT pageY) { CPDF_Annot* pAnnot = GetPDFAnnot(); - CFX_FloatRect annotRect; - pAnnot->GetRect(annotRect); + CFX_FloatRect annotRect = pAnnot->GetRect(); if (!annotRect.Contains(pageX, pageY)) return FALSE; diff --git a/fpdfsdk/formfiller/cffl_formfiller.cpp b/fpdfsdk/formfiller/cffl_formfiller.cpp index 92e9282a74..0779f261a7 100644 --- a/fpdfsdk/formfiller/cffl_formfiller.cpp +++ b/fpdfsdk/formfiller/cffl_formfiller.cpp @@ -419,8 +419,7 @@ CFX_Matrix CFFL_FormFiller::GetWindowMatrix(void* pAttachedData) { CFX_Matrix CFFL_FormFiller::GetCurMatrix() { CFX_Matrix mt; - CFX_FloatRect rcDA; - m_pWidget->GetPDFAnnot()->GetRect(rcDA); + CFX_FloatRect rcDA = m_pWidget->GetPDFAnnot()->GetRect(); switch (m_pWidget->GetRotate()) { default: @@ -451,8 +450,7 @@ CFX_WideString CFFL_FormFiller::LoadPopupMenuString(int nIndex) { } CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const { - CFX_FloatRect rectAnnot; - m_pWidget->GetPDFAnnot()->GetRect(rectAnnot); + CFX_FloatRect rectAnnot = m_pWidget->GetPDFAnnot()->GetRect(); FX_FLOAT fWidth = rectAnnot.right - rectAnnot.left; FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom; diff --git a/fpdfsdk/formfiller/cffl_iformfiller.cpp b/fpdfsdk/formfiller/cffl_iformfiller.cpp index 9e252cbd41..1f638444af 100644 --- a/fpdfsdk/formfiller/cffl_iformfiller.cpp +++ b/fpdfsdk/formfiller/cffl_iformfiller.cpp @@ -45,10 +45,7 @@ FX_RECT CFFL_IFormFiller::GetViewBBox(CPDFSDK_PageView* pPageView, ASSERT(pPageView); CPDF_Annot* pPDFAnnot = pAnnot->GetPDFAnnot(); - CFX_FloatRect rcAnnot; - pPDFAnnot->GetRect(rcAnnot); - - CFX_FloatRect rcWin = CPWL_Utils::InflateRect(rcAnnot, 1); + CFX_FloatRect rcWin = CPWL_Utils::InflateRect(pPDFAnnot->GetRect(), 1); return rcWin.GetOuterRect(); } diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp index 0daa459037..1301018709 100644 --- a/fpdfsdk/fpdfeditpage.cpp +++ b/fpdfsdk/fpdfeditpage.cpp @@ -295,8 +295,7 @@ DLLEXPORT void STDCALL FPDFPage_TransformAnnots(FPDF_PAGE page, for (size_t i = 0; i < AnnotList.Count(); ++i) { CPDF_Annot* pAnnot = AnnotList.GetAt(i); // transformAnnots Rectangle - CFX_FloatRect rect; - pAnnot->GetRect(rect); + CFX_FloatRect rect = pAnnot->GetRect(); CFX_Matrix matrix((FX_FLOAT)a, (FX_FLOAT)b, (FX_FLOAT)c, (FX_FLOAT)d, (FX_FLOAT)e, (FX_FLOAT)f); rect.Transform(&matrix); diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp index 24efd4077d..9017e20b32 100644 --- a/fpdfsdk/fsdk_mgr.cpp +++ b/fpdfsdk/fsdk_mgr.cpp @@ -576,8 +576,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, const CPDF_Annot* CPDFSDK_PageView::GetPDFAnnotAtPoint(FX_FLOAT pageX, FX_FLOAT pageY) { for (const auto& pAnnot : m_pAnnotList->All()) { - CFX_FloatRect annotRect; - pAnnot->GetRect(annotRect); + CFX_FloatRect annotRect = pAnnot->GetRect(); if (annotRect.Contains(pageX, pageY)) return pAnnot.get(); } @@ -588,8 +587,7 @@ const CPDF_Annot* CPDFSDK_PageView::GetPDFWidgetAtPoint(FX_FLOAT pageX, FX_FLOAT pageY) { for (const auto& pAnnot : m_pAnnotList->All()) { if (pAnnot->GetSubType() == "Widget") { - CFX_FloatRect annotRect; - pAnnot->GetRect(annotRect); + CFX_FloatRect annotRect = pAnnot->GetRect(); if (annotRect.Contains(pageX, pageY)) return pAnnot.get(); } |