| OLD | NEW |
| 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_editimp.h" | 7 #include "xfa/fwl/basewidget/fwl_editimp.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1006 CFX_Matrix mt; | 1006 CFX_Matrix mt; |
| 1007 mt.Set(1, 0, 0, 1, fOffSetX, fOffSetY); | 1007 mt.Set(1, 0, 0, 1, fOffSetX, fOffSetY); |
| 1008 if (pMatrix) { | 1008 if (pMatrix) { |
| 1009 pMatrix->TransformRect(rtClip); | 1009 pMatrix->TransformRect(rtClip); |
| 1010 mt.Concat(*pMatrix); | 1010 mt.Concat(*pMatrix); |
| 1011 } | 1011 } |
| 1012 FX_BOOL bShowSel = | 1012 FX_BOOL bShowSel = |
| 1013 (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoHideSel) || | 1013 (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_NoHideSel) || |
| 1014 (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused); | 1014 (m_pProperties->m_dwStates & FWL_WGTSTATE_Focused); |
| 1015 if (bShowSel) { | 1015 if (bShowSel) { |
| 1016 IFWL_Widget* pForm = | 1016 IFWL_Widget* pForm = m_pWidgetMgr->GetSystemFormWidget(m_pInterface); |
| 1017 m_pWidgetMgr->GetWidget(m_pInterface, FWL_WGTRELATION_SystemForm); | |
| 1018 if (pForm) { | 1017 if (pForm) { |
| 1019 bShowSel = (pForm->GetStates() & FWL_WGTSTATE_Deactivated) != | 1018 bShowSel = (pForm->GetStates() & FWL_WGTSTATE_Deactivated) != |
| 1020 FWL_WGTSTATE_Deactivated; | 1019 FWL_WGTSTATE_Deactivated; |
| 1021 } | 1020 } |
| 1022 } | 1021 } |
| 1023 int32_t nSelCount = m_pEdtEngine->CountSelRanges(); | 1022 int32_t nSelCount = m_pEdtEngine->CountSelRanges(); |
| 1024 if (bShowSel && nSelCount > 0) { | 1023 if (bShowSel && nSelCount > 0) { |
| 1025 int32_t nPageCharStart = pPage->GetCharStart(); | 1024 int32_t nPageCharStart = pPage->GetCharStart(); |
| 1026 int32_t nPageCharCount = pPage->GetCharCount(); | 1025 int32_t nPageCharCount = pPage->GetCharCount(); |
| 1027 int32_t nPageCharEnd = nPageCharStart + nPageCharCount - 1; | 1026 int32_t nPageCharEnd = nPageCharStart + nPageCharCount - 1; |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2187 } | 2186 } |
| 2188 CFX_RectF rect; | 2187 CFX_RectF rect; |
| 2189 m_pOwner->GetWidgetRect(rect); | 2188 m_pOwner->GetWidgetRect(rect); |
| 2190 CFX_RectF rtInvalidate; | 2189 CFX_RectF rtInvalidate; |
| 2191 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); | 2190 rtInvalidate.Set(0, 0, rect.width + 2, rect.height + 2); |
| 2192 m_pOwner->Repaint(&rtInvalidate); | 2191 m_pOwner->Repaint(&rtInvalidate); |
| 2193 } | 2192 } |
| 2194 return TRUE; | 2193 return TRUE; |
| 2195 } | 2194 } |
| 2196 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} | 2195 void CFWL_EditImpDelegate::DoCursor(CFWL_MsgMouse* pMsg) {} |
| OLD | NEW |