Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: fpdfsdk/formfiller/cffl_formfiller.cpp

Issue 2278153005: CPDF_Annot::GetRect() should return CFX_FloatRect. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/cpdfsdk_widget.cpp ('k') | fpdfsdk/formfiller/cffl_iformfiller.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "fpdfsdk/formfiller/cffl_formfiller.h" 7 #include "fpdfsdk/formfiller/cffl_formfiller.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
10 #include "core/fxge/include/cfx_renderdevice.h" 10 #include "core/fxge/include/cfx_renderdevice.h"
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 412
413 return mt; 413 return mt;
414 } 414 }
415 } 415 }
416 return CFX_Matrix(1, 0, 0, 1, 0, 0); 416 return CFX_Matrix(1, 0, 0, 1, 0, 0);
417 } 417 }
418 418
419 CFX_Matrix CFFL_FormFiller::GetCurMatrix() { 419 CFX_Matrix CFFL_FormFiller::GetCurMatrix() {
420 CFX_Matrix mt; 420 CFX_Matrix mt;
421 421
422 CFX_FloatRect rcDA; 422 CFX_FloatRect rcDA = m_pWidget->GetPDFAnnot()->GetRect();
423 m_pWidget->GetPDFAnnot()->GetRect(rcDA);
424 423
425 switch (m_pWidget->GetRotate()) { 424 switch (m_pWidget->GetRotate()) {
426 default: 425 default:
427 case 0: 426 case 0:
428 mt = CFX_Matrix(1, 0, 0, 1, 0, 0); 427 mt = CFX_Matrix(1, 0, 0, 1, 0, 0);
429 break; 428 break;
430 case 90: 429 case 90:
431 mt = CFX_Matrix(0, 1, -1, 0, rcDA.right - rcDA.left, 0); 430 mt = CFX_Matrix(0, 1, -1, 0, rcDA.right - rcDA.left, 0);
432 break; 431 break;
433 case 180: 432 case 180:
(...skipping 10 matching lines...) Expand all
444 return mt; 443 return mt;
445 } 444 }
446 445
447 CFX_WideString CFFL_FormFiller::LoadPopupMenuString(int nIndex) { 446 CFX_WideString CFFL_FormFiller::LoadPopupMenuString(int nIndex) {
448 ASSERT(m_pApp); 447 ASSERT(m_pApp);
449 448
450 return L""; 449 return L"";
451 } 450 }
452 451
453 CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const { 452 CFX_FloatRect CFFL_FormFiller::GetPDFWindowRect() const {
454 CFX_FloatRect rectAnnot; 453 CFX_FloatRect rectAnnot = m_pWidget->GetPDFAnnot()->GetRect();
455 m_pWidget->GetPDFAnnot()->GetRect(rectAnnot);
456 454
457 FX_FLOAT fWidth = rectAnnot.right - rectAnnot.left; 455 FX_FLOAT fWidth = rectAnnot.right - rectAnnot.left;
458 FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom; 456 FX_FLOAT fHeight = rectAnnot.top - rectAnnot.bottom;
459 if ((m_pWidget->GetRotate() / 90) & 0x01) 457 if ((m_pWidget->GetRotate() / 90) & 0x01)
460 return CFX_FloatRect(0, 0, fHeight, fWidth); 458 return CFX_FloatRect(0, 0, fHeight, fWidth);
461 459
462 return CFX_FloatRect(0, 0, fWidth, fHeight); 460 return CFX_FloatRect(0, 0, fWidth, fHeight);
463 } 461 }
464 462
465 CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) { 463 CPDFSDK_PageView* CFFL_FormFiller::GetCurPageView(bool renew) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 717 }
720 } 718 }
721 719
722 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView, 720 void CFFL_Button::OnDrawDeactive(CPDFSDK_PageView* pPageView,
723 CPDFSDK_Annot* pAnnot, 721 CPDFSDK_Annot* pAnnot,
724 CFX_RenderDevice* pDevice, 722 CFX_RenderDevice* pDevice,
725 CFX_Matrix* pUser2Device, 723 CFX_Matrix* pUser2Device,
726 uint32_t dwFlags) { 724 uint32_t dwFlags) {
727 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); 725 OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags);
728 } 726 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_widget.cpp ('k') | fpdfsdk/formfiller/cffl_iformfiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698