| 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/fsdk_baseform.h" | 7 #include "fpdfsdk/include/fsdk_baseform.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 << "ET\n" | 1403 << "ET\n" |
| 1404 << "Q\nEMC\n"; | 1404 << "Q\nEMC\n"; |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 IFX_Edit::DelEdit(pEdit); | 1407 IFX_Edit::DelEdit(pEdit); |
| 1408 } | 1408 } |
| 1409 | 1409 |
| 1410 sBody << CPWL_Utils::GetDropButtonAppStream(rcButton); | 1410 sBody << CPWL_Utils::GetDropButtonAppStream(rcButton); |
| 1411 | 1411 |
| 1412 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + | 1412 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + |
| 1413 sLines.GetByteString() + sBody.GetByteString(); | 1413 sLines.AsStringC() + sBody.AsStringC(); |
| 1414 | 1414 |
| 1415 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); | 1415 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); |
| 1416 } | 1416 } |
| 1417 | 1417 |
| 1418 void CPDFSDK_Widget::ResetAppearance_ListBox() { | 1418 void CPDFSDK_Widget::ResetAppearance_ListBox() { |
| 1419 CPDF_FormControl* pControl = GetFormControl(); | 1419 CPDF_FormControl* pControl = GetFormControl(); |
| 1420 CPDF_FormField* pField = pControl->GetField(); | 1420 CPDF_FormField* pField = pControl->GetField(); |
| 1421 CFX_FloatRect rcClient = GetClientRect(); | 1421 CFX_FloatRect rcClient = GetClientRect(); |
| 1422 CFX_ByteTextBuf sBody, sLines; | 1422 CFX_ByteTextBuf sBody, sLines; |
| 1423 | 1423 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 sBody << "/Tx BMC\n" | 1492 sBody << "/Tx BMC\n" |
| 1493 << "q\n" << rcClient.left << " " << rcClient.bottom << " " | 1493 << "q\n" << rcClient.left << " " << rcClient.bottom << " " |
| 1494 << rcClient.Width() << " " << rcClient.Height() << " re\nW\nn\n"; | 1494 << rcClient.Width() << " " << rcClient.Height() << " re\nW\nn\n"; |
| 1495 sBody << sList << "Q\nEMC\n"; | 1495 sBody << sList << "Q\nEMC\n"; |
| 1496 } | 1496 } |
| 1497 | 1497 |
| 1498 IFX_Edit::DelEdit(pEdit); | 1498 IFX_Edit::DelEdit(pEdit); |
| 1499 } | 1499 } |
| 1500 | 1500 |
| 1501 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + | 1501 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + |
| 1502 sLines.GetByteString() + sBody.GetByteString(); | 1502 sLines.AsStringC() + sBody.AsStringC(); |
| 1503 | 1503 |
| 1504 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); | 1504 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); |
| 1505 } | 1505 } |
| 1506 | 1506 |
| 1507 void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) { | 1507 void CPDFSDK_Widget::ResetAppearance_TextField(const FX_WCHAR* sValue) { |
| 1508 CPDF_FormControl* pControl = GetFormControl(); | 1508 CPDF_FormControl* pControl = GetFormControl(); |
| 1509 CPDF_FormField* pField = pControl->GetField(); | 1509 CPDF_FormField* pField = pControl->GetField(); |
| 1510 CFX_ByteTextBuf sBody, sLines; | 1510 CFX_ByteTextBuf sBody, sLines; |
| 1511 | 1511 |
| 1512 if (IFX_Edit* pEdit = IFX_Edit::NewEdit()) { | 1512 if (IFX_Edit* pEdit = IFX_Edit::NewEdit()) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1641 sLines << "Q\n"; | 1641 sLines << "Q\n"; |
| 1642 } | 1642 } |
| 1643 } break; | 1643 } break; |
| 1644 } | 1644 } |
| 1645 } | 1645 } |
| 1646 | 1646 |
| 1647 IFX_Edit::DelEdit(pEdit); | 1647 IFX_Edit::DelEdit(pEdit); |
| 1648 } | 1648 } |
| 1649 | 1649 |
| 1650 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + | 1650 CFX_ByteString sAP = GetBackgroundAppStream() + GetBorderAppStream() + |
| 1651 sLines.GetByteString() + sBody.GetByteString(); | 1651 sLines.AsStringC() + sBody.AsStringC(); |
| 1652 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); | 1652 WriteAppearance("N", GetRotatedRect(), GetMatrix(), sAP); |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 CFX_FloatRect CPDFSDK_Widget::GetClientRect() const { | 1655 CFX_FloatRect CPDFSDK_Widget::GetClientRect() const { |
| 1656 CFX_FloatRect rcWindow = GetRotatedRect(); | 1656 CFX_FloatRect rcWindow = GetRotatedRect(); |
| 1657 FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth(); | 1657 FX_FLOAT fBorderWidth = (FX_FLOAT)GetBorderWidth(); |
| 1658 switch (GetBorderStyle()) { | 1658 switch (GetBorderStyle()) { |
| 1659 case BBS_BEVELED: | 1659 case BBS_BEVELED: |
| 1660 case BBS_INSET: | 1660 case BBS_INSET: |
| 1661 fBorderWidth *= 2.0f; | 1661 fBorderWidth *= 2.0f; |
| (...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2824 break; | 2824 break; |
| 2825 } | 2825 } |
| 2826 } | 2826 } |
| 2827 } | 2827 } |
| 2828 | 2828 |
| 2829 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { | 2829 CFX_FloatRect CBA_AnnotIterator::GetAnnotRect(const CPDFSDK_Annot* pAnnot) { |
| 2830 CFX_FloatRect rcAnnot; | 2830 CFX_FloatRect rcAnnot; |
| 2831 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); | 2831 pAnnot->GetPDFAnnot()->GetRect(rcAnnot); |
| 2832 return rcAnnot; | 2832 return rcAnnot; |
| 2833 } | 2833 } |
| OLD | NEW |