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/fxfa/app/xfa_ffbarcode.h" | 7 #include "xfa/fxfa/app/xfa_ffbarcode.h" |
8 | 8 |
9 #include "core/fxcrt/fx_ext.h" | 9 #include "core/fxcrt/fx_ext.h" |
10 #include "xfa/fwl/core/cfwl_app.h" | 10 #include "xfa/fwl/core/cfwl_app.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 CFX_Matrix mtRotate; | 151 CFX_Matrix mtRotate; |
152 GetRotateMatrix(mtRotate); | 152 GetRotateMatrix(mtRotate); |
153 if (pMatrix) { | 153 if (pMatrix) { |
154 mtRotate.Concat(*pMatrix); | 154 mtRotate.Concat(*pMatrix); |
155 } | 155 } |
156 CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); | 156 CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); |
157 CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); | 157 CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); |
158 DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); | 158 DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); |
159 RenderCaption(pGS, &mtRotate); | 159 RenderCaption(pGS, &mtRotate); |
160 CFX_RectF rtWidget; | 160 CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); |
161 m_pNormalWidget->GetWidgetRect(rtWidget, false); | |
162 CFX_Matrix mt; | 161 CFX_Matrix mt; |
163 mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); | 162 mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); |
164 mt.Concat(mtRotate); | 163 mt.Concat(mtRotate); |
165 m_pNormalWidget->DrawWidget(pGS, &mt); | 164 m_pNormalWidget->DrawWidget(pGS, &mt); |
166 } | 165 } |
167 | 166 |
168 void CXFA_FFBarcode::UpdateWidgetProperty() { | 167 void CXFA_FFBarcode::UpdateWidgetProperty() { |
169 CXFA_FFTextEdit::UpdateWidgetProperty(); | 168 CXFA_FFTextEdit::UpdateWidgetProperty(); |
170 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 169 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; |
171 CFX_WideString wsType = GetDataAcc()->GetBarcodeType(); | 170 CFX_WideString wsType = GetDataAcc()->GetBarcodeType(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 233 } |
235 return CXFA_FFTextEdit::OnLButtonDown(dwFlags, fx, fy); | 234 return CXFA_FFTextEdit::OnLButtonDown(dwFlags, fx, fy); |
236 } | 235 } |
237 bool CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { | 236 bool CXFA_FFBarcode::OnRButtonDown(uint32_t dwFlags, FX_FLOAT fx, FX_FLOAT fy) { |
238 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; | 237 CFWL_Barcode* pBarCodeWidget = (CFWL_Barcode*)m_pNormalWidget; |
239 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { | 238 if (!pBarCodeWidget || pBarCodeWidget->IsProtectedType()) { |
240 return false; | 239 return false; |
241 } | 240 } |
242 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); | 241 return CXFA_FFTextEdit::OnRButtonDown(dwFlags, fx, fy); |
243 } | 242 } |
OLD | NEW |