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

Side by Side Diff: xfa/fwl/basewidget/fwl_comboboximp.cpp

Issue 2027273002: Fix all the code which has duplicate variable declarations (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 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 | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/basewidget/fwl_datetimepickerimp.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 "xfa/fwl/basewidget/fwl_comboboximp.h" 7 #include "xfa/fwl/basewidget/fwl_comboboximp.h"
8 8
9 #include "xfa/fde/cfde_txtedtengine.h" 9 #include "xfa/fde/cfde_txtedtengine.h"
10 #include "xfa/fde/tto/fde_textout.h" 10 #include "xfa/fde/tto/fde_textout.h"
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 pTheme->DrawBackground(&param); 653 pTheme->DrawBackground(&param);
654 if (m_iCurSel >= 0) { 654 if (m_iCurSel >= 0) {
655 if (!m_pListBox) 655 if (!m_pListBox)
656 return FWL_Error::Indefinite; 656 return FWL_Error::Indefinite;
657 CFX_WideString wsText; 657 CFX_WideString wsText;
658 IFWL_ComboBoxDP* pData = 658 IFWL_ComboBoxDP* pData =
659 static_cast<IFWL_ComboBoxDP*>(m_pProperties->m_pDataProvider); 659 static_cast<IFWL_ComboBoxDP*>(m_pProperties->m_pDataProvider);
660 IFWL_ListItem* hItem = pData->GetItem(m_pInterface, m_iCurSel); 660 IFWL_ListItem* hItem = pData->GetItem(m_pInterface, m_iCurSel);
661 static_cast<CFWL_ComboListImp*>(m_pListBox->GetImpl()) 661 static_cast<CFWL_ComboListImp*>(m_pListBox->GetImpl())
662 ->GetItemText(hItem, wsText); 662 ->GetItemText(hItem, wsText);
663 CFWL_ThemeText param; 663 CFWL_ThemeText theme_text;
664 param.m_pWidget = m_pInterface; 664 theme_text.m_pWidget = m_pInterface;
665 param.m_iPart = CFWL_Part::Caption; 665 theme_text.m_iPart = CFWL_Part::Caption;
666 param.m_dwStates = m_iBtnState; 666 theme_text.m_dwStates = m_iBtnState;
667 param.m_pGraphics = pGraphics; 667 theme_text.m_pGraphics = pGraphics;
668 param.m_matrix.Concat(*pMatrix); 668 theme_text.m_matrix.Concat(*pMatrix);
669 param.m_rtPart = rtTextBk; 669 theme_text.m_rtPart = rtTextBk;
670 param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused) 670 theme_text.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused)
671 ? CFWL_PartState_Selected 671 ? CFWL_PartState_Selected
672 : CFWL_PartState_Normal; 672 : CFWL_PartState_Normal;
673 param.m_wsText = wsText; 673 theme_text.m_wsText = wsText;
674 param.m_dwTTOStyles = FDE_TTOSTYLE_SingleLine; 674 theme_text.m_dwTTOStyles = FDE_TTOSTYLE_SingleLine;
675 param.m_iTTOAlign = FDE_TTOALIGNMENT_CenterLeft; 675 theme_text.m_iTTOAlign = FDE_TTOALIGNMENT_CenterLeft;
676 pTheme->DrawText(&param); 676 pTheme->DrawText(&theme_text);
677 } 677 }
678 } 678 }
679 { 679 {
680 CFWL_ThemeBackground param; 680 CFWL_ThemeBackground param;
681 param.m_pWidget = m_pInterface; 681 param.m_pWidget = m_pInterface;
682 param.m_iPart = CFWL_Part::DropDownButton; 682 param.m_iPart = CFWL_Part::DropDownButton;
683 param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled) 683 param.m_dwStates = (m_pProperties->m_dwStates & FWL_WGTSTATE_Disabled)
684 ? CFWL_PartState_Disabled 684 ? CFWL_PartState_Disabled
685 : m_iBtnState; 685 : m_iBtnState;
686 param.m_pGraphics = pGraphics; 686 param.m_pGraphics = pGraphics;
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1850 m_pComboBox->ShowDropList(FALSE); 1850 m_pComboBox->ShowDropList(FALSE);
1851 } 1851 }
1852 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg, 1852 void CFWL_ComboProxyImpDelegate::OnFocusChanged(CFWL_MsgKillFocus* pMsg,
1853 FX_BOOL bSet) { 1853 FX_BOOL bSet) {
1854 if (!bSet) { 1854 if (!bSet) {
1855 if (pMsg->m_pSetFocus == NULL) { 1855 if (pMsg->m_pSetFocus == NULL) {
1856 m_pComboBox->ShowDropList(FALSE); 1856 m_pComboBox->ShowDropList(FALSE);
1857 } 1857 }
1858 } 1858 }
1859 } 1859 }
OLDNEW
« no previous file with comments | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/basewidget/fwl_datetimepickerimp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698