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

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

Issue 1921853006: More FWL interface cleanup. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 7 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
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/app/xfa_fffield.h" 7 #include "xfa/fxfa/app/xfa_fffield.h"
8 8
9 #include "xfa/fwl/basewidget/ifwl_edit.h" 9 #include "xfa/fwl/basewidget/ifwl_edit.h"
10 #include "xfa/fwl/core/cfwl_message.h" 10 #include "xfa/fwl/core/cfwl_message.h"
11 #include "xfa/fwl/core/ifwl_widgetmgrdelegate.h" 11 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
12 #include "xfa/fwl/lightwidget/cfwl_edit.h" 12 #include "xfa/fwl/lightwidget/cfwl_edit.h"
13 #include "xfa/fwl/lightwidget/cfwl_picturebox.h" 13 #include "xfa/fwl/lightwidget/cfwl_picturebox.h"
14 #include "xfa/fxfa/app/xfa_fwltheme.h" 14 #include "xfa/fxfa/app/xfa_fwltheme.h"
15 #include "xfa/fxfa/app/xfa_textlayout.h" 15 #include "xfa/fxfa/app/xfa_textlayout.h"
16 #include "xfa/fxfa/include/xfa_ffapp.h" 16 #include "xfa/fxfa/include/xfa_ffapp.h"
17 #include "xfa/fxfa/include/xfa_ffdoc.h" 17 #include "xfa/fxfa/include/xfa_ffdoc.h"
18 #include "xfa/fxfa/include/xfa_ffdocview.h" 18 #include "xfa/fxfa/include/xfa_ffdocview.h"
19 #include "xfa/fxfa/include/xfa_ffpageview.h" 19 #include "xfa/fxfa/include/xfa_ffpageview.h"
20 #include "xfa/fxfa/include/xfa_ffwidget.h" 20 #include "xfa/fxfa/include/xfa_ffwidget.h"
21 #include "xfa/fxgraphics/cfx_color.h" 21 #include "xfa/fxgraphics/cfx_color.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 dwStyle = FWL_STYLEEXT_EDT_ReadOnly; 328 dwStyle = FWL_STYLEEXT_EDT_ReadOnly;
329 } 329 }
330 return dwStyle; 330 return dwStyle;
331 } 331 }
332 void CXFA_FFField::SetFWLRect() { 332 void CXFA_FFField::SetFWLRect() {
333 if (!m_pNormalWidget) { 333 if (!m_pNormalWidget) {
334 return; 334 return;
335 } 335 }
336 CFX_RectF rtUi = m_rtUI; 336 CFX_RectF rtUi = m_rtUI;
337 if (rtUi.width < 1.0) { 337 if (rtUi.width < 1.0) {
338 ASSERT(rtUi.width < 1.0); 338 ASSERT(rtUi.width < 1.0);
Tom Sepez 2016/04/28 16:59:29 nit: captain obvious?
dsinclair 2016/04/28 18:00:59 Done.
339 rtUi.width = 1.0; 339 rtUi.width = 1.0;
340 } 340 }
341 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) { 341 if (!m_pDataAcc->GetDoc()->GetXFADoc()->IsInteractive()) {
342 FX_FLOAT fFontSize = m_pDataAcc->GetFontSize(); 342 FX_FLOAT fFontSize = m_pDataAcc->GetFontSize();
343 if (rtUi.height < fFontSize) { 343 if (rtUi.height < fFontSize) {
344 rtUi.height = fFontSize; 344 rtUi.height = fFontSize;
345 } 345 }
346 } 346 }
347 m_pNormalWidget->SetWidgetRect(rtUi); 347 m_pNormalWidget->SetWidgetRect(rtUi);
348 } 348 }
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 default: 832 default:
833 break; 833 break;
834 } 834 }
835 return FWL_ERR_Succeeded; 835 return FWL_ERR_Succeeded;
836 } 836 }
837 837
838 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics, 838 FWL_ERR CXFA_FFField::OnDrawWidget(CFX_Graphics* pGraphics,
839 const CFX_Matrix* pMatrix) { 839 const CFX_Matrix* pMatrix) {
840 return FWL_ERR_Succeeded; 840 return FWL_ERR_Succeeded;
841 } 841 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698