| 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 "fpdfsdk/include/formfiller/FFL_IFormFiller.h" |
| 8 |
| 7 #include "fpdfsdk/include/formfiller/FFL_CheckBox.h" | 9 #include "fpdfsdk/include/formfiller/FFL_CheckBox.h" |
| 8 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" | 10 #include "fpdfsdk/include/formfiller/FFL_ComboBox.h" |
| 9 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" | 11 #include "fpdfsdk/include/formfiller/FFL_FormFiller.h" |
| 10 #include "fpdfsdk/include/formfiller/FFL_IFormFiller.h" | |
| 11 #include "fpdfsdk/include/formfiller/FFL_ListBox.h" | 12 #include "fpdfsdk/include/formfiller/FFL_ListBox.h" |
| 12 #include "fpdfsdk/include/formfiller/FFL_PushButton.h" | 13 #include "fpdfsdk/include/formfiller/FFL_PushButton.h" |
| 13 #include "fpdfsdk/include/formfiller/FFL_RadioButton.h" | 14 #include "fpdfsdk/include/formfiller/FFL_RadioButton.h" |
| 14 #include "fpdfsdk/include/formfiller/FFL_TextField.h" | 15 #include "fpdfsdk/include/formfiller/FFL_TextField.h" |
| 16 #include "fpdfsdk/include/fsdk_mgr.h" |
| 17 #include "fpdfsdk/include/pdfwindow/PWL_Utils.h" |
| 15 | 18 |
| 16 #define FFL_MAXLISTBOXHEIGHT 140.0f | 19 #define FFL_MAXLISTBOXHEIGHT 140.0f |
| 17 | 20 |
| 18 CFFL_IFormFiller::CFFL_IFormFiller(CPDFDoc_Environment* pApp) | 21 CFFL_IFormFiller::CFFL_IFormFiller(CPDFDoc_Environment* pApp) |
| 19 : m_pApp(pApp), m_bNotifying(FALSE) {} | 22 : m_pApp(pApp), m_bNotifying(FALSE) {} |
| 20 | 23 |
| 21 CFFL_IFormFiller::~CFFL_IFormFiller() { | 24 CFFL_IFormFiller::~CFFL_IFormFiller() { |
| 22 for (auto& it : m_Maps) | 25 for (auto& it : m_Maps) |
| 23 delete it.second; | 26 delete it.second; |
| 24 m_Maps.clear(); | 27 m_Maps.clear(); |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 | 603 |
| 601 FX_FLOAT fFactHeight = 0; | 604 FX_FLOAT fFactHeight = 0; |
| 602 FX_BOOL bBottom = TRUE; | 605 FX_BOOL bBottom = TRUE; |
| 603 FX_FLOAT fMaxListBoxHeight = 0; | 606 FX_FLOAT fMaxListBoxHeight = 0; |
| 604 if (fPopupMax > FFL_MAXLISTBOXHEIGHT) { | 607 if (fPopupMax > FFL_MAXLISTBOXHEIGHT) { |
| 605 if (fPopupMin > FFL_MAXLISTBOXHEIGHT) { | 608 if (fPopupMin > FFL_MAXLISTBOXHEIGHT) { |
| 606 fMaxListBoxHeight = fPopupMin; | 609 fMaxListBoxHeight = fPopupMin; |
| 607 } else { | 610 } else { |
| 608 fMaxListBoxHeight = FFL_MAXLISTBOXHEIGHT; | 611 fMaxListBoxHeight = FFL_MAXLISTBOXHEIGHT; |
| 609 } | 612 } |
| 610 } else | 613 } else { |
| 611 fMaxListBoxHeight = fPopupMax; | 614 fMaxListBoxHeight = fPopupMax; |
| 615 } |
| 612 | 616 |
| 613 if (fBottom > fMaxListBoxHeight) { | 617 if (fBottom > fMaxListBoxHeight) { |
| 614 fFactHeight = fMaxListBoxHeight; | 618 fFactHeight = fMaxListBoxHeight; |
| 615 bBottom = TRUE; | 619 bBottom = TRUE; |
| 616 } else { | 620 } else { |
| 617 if (fTop > fMaxListBoxHeight) { | 621 if (fTop > fMaxListBoxHeight) { |
| 618 fFactHeight = fMaxListBoxHeight; | 622 fFactHeight = fMaxListBoxHeight; |
| 619 bBottom = FALSE; | 623 bBottom = FALSE; |
| 620 } else { | 624 } else { |
| 621 if (fTop > fBottom) { | 625 if (fTop > fBottom) { |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 bExit = TRUE; | 1015 bExit = TRUE; |
| 1012 m_bNotifying = FALSE; | 1016 m_bNotifying = FALSE; |
| 1013 return; | 1017 return; |
| 1014 } | 1018 } |
| 1015 } | 1019 } |
| 1016 | 1020 |
| 1017 m_bNotifying = FALSE; | 1021 m_bNotifying = FALSE; |
| 1018 } | 1022 } |
| 1019 } | 1023 } |
| 1020 } | 1024 } |
| OLD | NEW |