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

Side by Side Diff: xfa/fxfa/app/xfa_ffwidget.cpp

Issue 2436103002: Remove FWL globals. (Closed)
Patch Set: Review feedback Created 4 years, 1 month 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 | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/xfa_ffapp.h » ('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 "xfa/fxfa/xfa_ffwidget.h" 7 #include "xfa/fxfa/xfa_ffwidget.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 26 matching lines...) Expand all
37 m_pDataAcc(pDataAcc) { 37 m_pDataAcc(pDataAcc) {
38 m_rtWidget.Set(0, 0, 0, 0); 38 m_rtWidget.Set(0, 0, 0, 0);
39 } 39 }
40 CXFA_FFWidget::~CXFA_FFWidget() {} 40 CXFA_FFWidget::~CXFA_FFWidget() {}
41 CXFA_FFPageView* CXFA_FFWidget::GetPageView() { 41 CXFA_FFPageView* CXFA_FFWidget::GetPageView() {
42 return m_pPageView; 42 return m_pPageView;
43 } 43 }
44 void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) { 44 void CXFA_FFWidget::SetPageView(CXFA_FFPageView* pPageView) {
45 m_pPageView = pPageView; 45 m_pPageView = pPageView;
46 } 46 }
47
48 const IFWL_App* CXFA_FFWidget::GetFWLApp() {
49 return GetPageView()->GetDocView()->GetDoc()->GetApp()->GetFWLApp();
50 }
51
47 void CXFA_FFWidget::GetWidgetRect(CFX_RectF& rtWidget) { 52 void CXFA_FFWidget::GetWidgetRect(CFX_RectF& rtWidget) {
48 if ((m_dwStatus & XFA_WidgetStatus_RectCached) == 0) { 53 if ((m_dwStatus & XFA_WidgetStatus_RectCached) == 0) {
49 m_dwStatus |= XFA_WidgetStatus_RectCached; 54 m_dwStatus |= XFA_WidgetStatus_RectCached;
50 GetRect(m_rtWidget); 55 GetRect(m_rtWidget);
51 } 56 }
52 rtWidget = m_rtWidget; 57 rtWidget = m_rtWidget;
53 } 58 }
54 CFX_RectF CXFA_FFWidget::ReCacheWidgetRect() { 59 CFX_RectF CXFA_FFWidget::ReCacheWidgetRect() {
55 m_dwStatus |= XFA_WidgetStatus_RectCached; 60 m_dwStatus |= XFA_WidgetStatus_RectCached;
56 GetRect(m_rtWidget); 61 GetRect(m_rtWidget);
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 } 2050 }
2046 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags); 2051 XFA_BOX_Fill(box, strokes, pGS, rtWidget, pMatrix, dwFlags);
2047 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags); 2052 XFA_BOX_Stroke(box, strokes, pGS, rtWidget, pMatrix, dwFlags);
2048 } 2053 }
2049 2054
2050 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {} 2055 CXFA_CalcData::CXFA_CalcData() : m_iRefCount(0) {}
2051 2056
2052 CXFA_CalcData::~CXFA_CalcData() { 2057 CXFA_CalcData::~CXFA_CalcData() {
2053 m_Globals.RemoveAll(); 2058 m_Globals.RemoveAll();
2054 } 2059 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_fftextedit.cpp ('k') | xfa/fxfa/xfa_ffapp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698