diff options
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_caret.cpp | 34 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_caret.h | 3 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_combo_box.cpp | 28 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_combo_box.h | 1 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_edit.cpp | 138 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_edit.h | 3 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_list_box.cpp | 48 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_list_box.h | 1 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_scroll_bar.cpp | 72 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_scroll_bar.h | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_wnd.cpp | 33 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/cpwl_wnd.h | 3 |
12 files changed, 0 insertions, 366 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_caret.cpp b/fpdfsdk/pdfwindow/cpwl_caret.cpp index def479a4df..2e56450fb3 100644 --- a/fpdfsdk/pdfwindow/cpwl_caret.cpp +++ b/fpdfsdk/pdfwindow/cpwl_caret.cpp @@ -24,10 +24,6 @@ CFX_ByteString CPWL_Caret::GetClassName() const { return "CPWL_Caret"; } -void CPWL_Caret::GetThisAppearanceStream(std::ostringstream* psAppStream) { - GetCaretApp(CFX_PointF(), psAppStream); -} - void CPWL_Caret::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { if (!IsVisible() || !m_bFlash) @@ -58,36 +54,6 @@ void CPWL_Caret::DrawThisAppearance(CFX_RenderDevice* pDevice, FXFILL_ALTERNATE); } -void CPWL_Caret::GetCaretApp(const CFX_PointF& ptOffset, - std::ostringstream* psAppStream) { - if (!IsVisible() || !m_bFlash) - return; - - CFX_FloatRect rcRect = GetCaretRect(); - CFX_FloatRect rcClip = GetClipRect(); - - rcRect.Translate(ptOffset.x, ptOffset.y); - rcClip.Translate(ptOffset.x, ptOffset.y); - - *psAppStream << "q\n"; - if (!rcClip.IsEmpty()) { - *psAppStream << rcClip.left << " " << rcClip.bottom + 2.5f << " " - << rcClip.right - rcClip.left << " " - << rcClip.top - rcClip.bottom - 4.5f << " re W n\n"; - } - *psAppStream << m_fWidth << " w\n0 G\n" - << rcRect.left + m_fWidth / 2 << " " << rcRect.bottom << " m\n" - << rcRect.left + m_fWidth / 2 << " " << rcRect.top - << " l S\nQ\n"; -} - -CFX_ByteString CPWL_Caret::GetCaretAppearanceStream( - const CFX_PointF& ptOffset) { - std::ostringstream sCaret; - GetCaretApp(ptOffset, &sCaret); - return CFX_ByteString(sCaret); -} - void CPWL_Caret::TimerProc() { if (m_nDelay > 0) { m_nDelay--; diff --git a/fpdfsdk/pdfwindow/cpwl_caret.h b/fpdfsdk/pdfwindow/cpwl_caret.h index 0d9c1cdfd1..6d6dcd557e 100644 --- a/fpdfsdk/pdfwindow/cpwl_caret.h +++ b/fpdfsdk/pdfwindow/cpwl_caret.h @@ -16,7 +16,6 @@ class CPWL_Caret : public CPWL_Wnd { // CPWL_Wnd CFX_ByteString GetClassName() const override; - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; void InvalidateRect(CFX_FloatRect* pRect = nullptr) override; @@ -26,11 +25,9 @@ class CPWL_Caret : public CPWL_Wnd { void SetCaret(bool bVisible, const CFX_PointF& ptHead, const CFX_PointF& ptFoot); - CFX_ByteString GetCaretAppearanceStream(const CFX_PointF& ptOffset); void SetInvalidRect(CFX_FloatRect rc) { m_rcInvalid = rc; } private: - void GetCaretApp(const CFX_PointF& ptOffset, std::ostringstream* psAppStream); CFX_FloatRect GetCaretRect() const; bool m_bFlash; diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp index d2afa3e8aa..97ac318982 100644 --- a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp +++ b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp @@ -94,34 +94,6 @@ bool CPWL_CBListBox::OnCharNotify(uint16_t nChar, uint32_t nFlag) { return OnNotifySelectionChanged(true, nFlag); } -void CPWL_CBButton::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CPWL_Wnd::GetThisAppearanceStream(psAppStream); - - CFX_FloatRect rectWnd = CPWL_Wnd::GetWindowRect(); - - if (!IsVisible() || rectWnd.IsEmpty()) - return; - - CFX_PointF ptCenter = GetCenterPoint(); - - CFX_PointF pt1(ptCenter.x - kTriangleHalfLength, - ptCenter.y + kTriangleHalfLength * 0.5f); - CFX_PointF pt2(ptCenter.x + kTriangleHalfLength, - ptCenter.y + kTriangleHalfLength * 0.5f); - CFX_PointF pt3(ptCenter.x, ptCenter.y - kTriangleHalfLength * 0.5f); - - if (IsFloatBigger(rectWnd.right - rectWnd.left, kTriangleHalfLength * 2) && - IsFloatBigger(rectWnd.top - rectWnd.bottom, kTriangleHalfLength)) { - *psAppStream << "q\n" - << "0 g\n" - << pt1.x << " " << pt1.y << " m\n" - << pt2.x << " " << pt2.y << " l\n" - << pt3.x << " " << pt3.y << " l\n" - << pt1.x << " " << pt1.y << " l f\n" - << "Q\n"; - } -} - void CPWL_CBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box.h b/fpdfsdk/pdfwindow/cpwl_combo_box.h index 37b3eb5a4e..7dc348a711 100644 --- a/fpdfsdk/pdfwindow/cpwl_combo_box.h +++ b/fpdfsdk/pdfwindow/cpwl_combo_box.h @@ -36,7 +36,6 @@ class CPWL_CBButton : public CPWL_Wnd { ~CPWL_CBButton() override {} // CPWL_Wnd - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override; diff --git a/fpdfsdk/pdfwindow/cpwl_edit.cpp b/fpdfsdk/pdfwindow/cpwl_edit.cpp index 7d75bc693d..a5105c1a74 100644 --- a/fpdfsdk/pdfwindow/cpwl_edit.cpp +++ b/fpdfsdk/pdfwindow/cpwl_edit.cpp @@ -199,125 +199,6 @@ void CPWL_Edit::SetParamByFlag() { } } -void CPWL_Edit::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CPWL_Wnd::GetThisAppearanceStream(psAppStream); - - CFX_FloatRect rcClient = GetClientRect(); - - int32_t nCharArray = m_pEdit->GetCharArray(); - - if (nCharArray > 0) { - switch (GetBorderStyle()) { - case BorderStyle::SOLID: { - *psAppStream << "q\n" - << GetBorderWidth() << " w\n" - << CPWL_Utils::GetColorAppStream(GetBorderColor(), false) - << " 2 J 0 j\n"; - - for (int32_t i = 1; i < nCharArray; i++) { - *psAppStream << rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * - i - << " " << rcClient.bottom << " m\n" - << rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * - i - << " " << rcClient.top << " l S\n"; - } - - *psAppStream << "Q\n"; - break; - } - case BorderStyle::DASH: { - *psAppStream << "q\n" - << GetBorderWidth() << " w\n" - << CPWL_Utils::GetColorAppStream(GetBorderColor(), false) - << " 2 J 0 j\n" - << "[" << GetBorderDash().nDash << " " - << GetBorderDash().nGap << "] " << GetBorderDash().nPhase - << " d\n"; - - for (int32_t i = 1; i < nCharArray; i++) { - *psAppStream << rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * - i - << " " << rcClient.bottom << " m\n" - << rcClient.left + - ((rcClient.right - rcClient.left) / nCharArray) * - i - << " " << rcClient.top << " l S\n"; - } - - *psAppStream << "Q\n"; - break; - } - default: - break; - } - } - - std::ostringstream sText; - CFX_PointF ptOffset; - CPVT_WordRange wrWhole = m_pEdit->GetWholeWordRange(); - CPVT_WordRange wrSelect = GetSelectWordRange(); - CPVT_WordRange wrVisible = - HasFlag(PES_TEXTOVERFLOW) ? wrWhole : m_pEdit->GetVisibleWordRange(); - - CPVT_WordRange wrSelBefore(wrWhole.BeginPos, wrSelect.BeginPos); - CPVT_WordRange wrSelAfter(wrSelect.EndPos, wrWhole.EndPos); - CPVT_WordRange wrTemp = GetSelectWordRange().Intersect(wrVisible); - CFX_ByteString sEditSel = - CPWL_Utils::GetEditSelAppStream(m_pEdit.get(), ptOffset, &wrTemp); - - if (sEditSel.GetLength() > 0) - sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR) - << sEditSel; - - wrTemp = wrVisible.Intersect(wrSelBefore); - CFX_ByteString sEditBefore = CPWL_Utils::GetEditAppStream( - m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), - m_pEdit->GetPasswordChar()); - - if (sEditBefore.GetLength() > 0) - sText << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()) << sEditBefore - << "ET\n"; - - wrTemp = wrVisible.Intersect(wrSelect); - CFX_ByteString sEditMid = CPWL_Utils::GetEditAppStream( - m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), - m_pEdit->GetPasswordChar()); - - if (sEditMid.GetLength() > 0) - sText << "BT\n" - << CPWL_Utils::GetColorAppStream(CFX_Color(COLORTYPE_GRAY, 1)) - << sEditMid << "ET\n"; - - wrTemp = wrVisible.Intersect(wrSelAfter); - CFX_ByteString sEditAfter = CPWL_Utils::GetEditAppStream( - m_pEdit.get(), ptOffset, &wrTemp, !HasFlag(PES_CHARARRAY), - m_pEdit->GetPasswordChar()); - - if (sEditAfter.GetLength() > 0) - sText << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()) << sEditAfter - << "ET\n"; - - if (sText.tellp() > 0) { - CFX_FloatRect rect = GetClientRect(); - *psAppStream << "q\n/Tx BMC\n"; - - if (!HasFlag(PES_TEXTOVERFLOW)) - *psAppStream << rect.left << " " << rect.bottom << " " - << rect.right - rect.left << " " << rect.top - rect.bottom - << " re W n\n"; - - *psAppStream << sText.str(); - - *psAppStream << "EMC\nQ\n"; - } -} - void CPWL_Edit::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); @@ -498,25 +379,6 @@ CPVT_WordRange CPWL_Edit::GetSelectWordRange() const { return CPVT_WordRange(); } -CFX_ByteString CPWL_Edit::GetTextAppearanceStream( - const CFX_PointF& ptOffset) const { - std::ostringstream sRet; - CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit.get(), ptOffset); - if (sEdit.GetLength() > 0) { - sRet << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()) << sEdit << "ET\n"; - } - return CFX_ByteString(sRet); -} - -CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( - const CFX_PointF& ptOffset) const { - if (m_pEditCaret) - return m_pEditCaret->GetCaretAppearanceStream(ptOffset); - - return CFX_ByteString(); -} - CFX_PointF CPWL_Edit::GetWordRightBottomPoint(const CPVT_WordPlace& wpWord) { CFX_Edit_Iterator* pIterator = m_pEdit->GetIterator(); CPVT_WordPlace wpOld = pIterator->GetAt(); diff --git a/fpdfsdk/pdfwindow/cpwl_edit.h b/fpdfsdk/pdfwindow/cpwl_edit.h index ebf556ad71..e3382ffd6f 100644 --- a/fpdfsdk/pdfwindow/cpwl_edit.h +++ b/fpdfsdk/pdfwindow/cpwl_edit.h @@ -48,7 +48,6 @@ class CPWL_Edit : public CPWL_EditCtrl { void OnCreated() override; void RePosChildWnd() override; CFX_FloatRect GetClientRect() const override; - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override; @@ -81,8 +80,6 @@ class CPWL_Edit : public CPWL_EditCtrl { void SetText(const CFX_WideString& csText); void ReplaceSel(const CFX_WideString& csText); - CFX_ByteString GetTextAppearanceStream(const CFX_PointF& ptOffset) const; - CFX_ByteString GetCaretAppearanceStream(const CFX_PointF& ptOffset) const; CFX_ByteString GetSelectAppearanceStream(const CFX_PointF& ptOffset) const; bool IsTextFull() const; diff --git a/fpdfsdk/pdfwindow/cpwl_list_box.cpp b/fpdfsdk/pdfwindow/cpwl_list_box.cpp index f9fdef0663..05aef01d99 100644 --- a/fpdfsdk/pdfwindow/cpwl_list_box.cpp +++ b/fpdfsdk/pdfwindow/cpwl_list_box.cpp @@ -94,54 +94,6 @@ void CPWL_ListBox::OnDestroy() { m_pListNotify.reset(); } -void CPWL_ListBox::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CPWL_Wnd::GetThisAppearanceStream(psAppStream); - - std::ostringstream sListItems; - - CFX_FloatRect rcPlate = m_pList->GetPlateRect(); - for (int32_t i = 0, sz = m_pList->GetCount(); i < sz; i++) { - CFX_FloatRect rcItem = m_pList->GetItemRect(i); - - if (rcItem.bottom > rcPlate.top || rcItem.top < rcPlate.bottom) - continue; - - CFX_PointF ptOffset(rcItem.left, (rcItem.top + rcItem.bottom) * 0.5f); - if (m_pList->IsItemSelected(i)) { - sListItems << CPWL_Utils::GetRectFillAppStream(rcItem, - PWL_DEFAULT_SELBACKCOLOR); - CFX_ByteString sItem = - CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset); - if (sItem.GetLength() > 0) { - sListItems << "BT\n" - << CPWL_Utils::GetColorAppStream( - CFX_Color(COLORTYPE_RGB, 1, 1, 1)) - << sItem << "ET\n"; - } - } else { - CFX_ByteString sItem = - CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset); - if (sItem.GetLength() > 0) { - sListItems << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()) << sItem - << "ET\n"; - } - } - } - - if (sListItems.tellp() <= 0) - return; - - CFX_FloatRect rcClient = GetClientRect(); - *psAppStream << "/Tx BMC\n" - << "q\n" - << rcClient.left << " " << rcClient.bottom << " " - << rcClient.right - rcClient.left << " " - << rcClient.top - rcClient.bottom << " re W n\n" - << sListItems.str() << "Q\n" - << "EMC\n"; -} - void CPWL_ListBox::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { CPWL_Wnd::DrawThisAppearance(pDevice, pUser2Device); diff --git a/fpdfsdk/pdfwindow/cpwl_list_box.h b/fpdfsdk/pdfwindow/cpwl_list_box.h index f5835a1d9c..8bc7651ada 100644 --- a/fpdfsdk/pdfwindow/cpwl_list_box.h +++ b/fpdfsdk/pdfwindow/cpwl_list_box.h @@ -48,7 +48,6 @@ class CPWL_ListBox : public CPWL_Wnd { CFX_ByteString GetClassName() const override; void OnCreated() override; void OnDestroy() override; - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; bool OnKeyDown(uint16_t nChar, uint32_t nFlag) override; diff --git a/fpdfsdk/pdfwindow/cpwl_scroll_bar.cpp b/fpdfsdk/pdfwindow/cpwl_scroll_bar.cpp index ca637600f7..537e51c010 100644 --- a/fpdfsdk/pdfwindow/cpwl_scroll_bar.cpp +++ b/fpdfsdk/pdfwindow/cpwl_scroll_bar.cpp @@ -136,64 +136,6 @@ void CPWL_SBButton::OnCreate(PWL_CREATEPARAM& cp) { cp.eCursorType = FXCT_ARROW; } -void CPWL_SBButton::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CPWL_Wnd::GetThisAppearanceStream(psAppStream); - - if (!IsVisible()) - return; - - CFX_FloatRect rectWnd = GetWindowRect(); - if (rectWnd.IsEmpty()) - return; - - CFX_PointF ptCenter = GetCenterPoint(); - CFX_PointF pt1; - CFX_PointF pt2; - CFX_PointF pt3; - if (m_eScrollBarType == SBT_HSCROLL) { - if (m_eSBButtonType == PSBT_MIN) { - pt1 = CFX_PointF(ptCenter.x - kTriangleHalfLength * 0.5f, ptCenter.y); - pt2 = CFX_PointF(ptCenter.x + kTriangleHalfLength * 0.5f, - ptCenter.y + kTriangleHalfLength); - pt3 = CFX_PointF(ptCenter.x + kTriangleHalfLength * 0.5f, - ptCenter.y - kTriangleHalfLength); - } else if (m_eSBButtonType == PSBT_MAX) { - pt1 = CFX_PointF(ptCenter.x + kTriangleHalfLength * 0.5f, ptCenter.y); - pt2 = CFX_PointF(ptCenter.x - kTriangleHalfLength * 0.5f, - ptCenter.y + kTriangleHalfLength); - pt3 = CFX_PointF(ptCenter.x - kTriangleHalfLength * 0.5f, - ptCenter.y - kTriangleHalfLength); - } - } else { - if (m_eSBButtonType == PSBT_MIN) { - pt1 = CFX_PointF(ptCenter.x - kTriangleHalfLength, - ptCenter.y - kTriangleHalfLength * 0.5f); - pt2 = CFX_PointF(ptCenter.x + kTriangleHalfLength, - ptCenter.y - kTriangleHalfLength * 0.5f); - pt3 = CFX_PointF(ptCenter.x, ptCenter.y + kTriangleHalfLength * 0.5f); - } else if (m_eSBButtonType == PSBT_MAX) { - pt1 = CFX_PointF(ptCenter.x - kTriangleHalfLength, - ptCenter.y + kTriangleHalfLength * 0.5f); - pt2 = CFX_PointF(ptCenter.x + kTriangleHalfLength, - ptCenter.y + kTriangleHalfLength * 0.5f); - pt3 = CFX_PointF(ptCenter.x, ptCenter.y - kTriangleHalfLength * 0.5f); - } - } - - *psAppStream << "q\n"; - if (m_eSBButtonType != PSBT_POS) { - if (rectWnd.right - rectWnd.left > kTriangleHalfLength * 2 && - rectWnd.top - rectWnd.bottom > kTriangleHalfLength) { - *psAppStream << "0 g\n" - << pt1.x << " " << pt1.y << " m\n" - << pt2.x << " " << pt2.y << " l\n" - << pt3.x << " " << pt3.y << " l\n" - << pt1.x << " " << pt1.y << " l f\n"; - } - } - *psAppStream << "Q\n"; -} - void CPWL_SBButton::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { if (!IsVisible()) @@ -461,20 +403,6 @@ void CPWL_ScrollBar::RePosChildWnd() { MovePosButton(false); } -void CPWL_ScrollBar::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CFX_FloatRect rectWnd = GetWindowRect(); - - if (!IsVisible() || rectWnd.IsEmpty()) - return; - - *psAppStream << "q\n" - << "0 w\n" - << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), true) - << rectWnd.left << " " << rectWnd.bottom << " " - << rectWnd.right - rectWnd.left << " " - << rectWnd.top - rectWnd.bottom << " re b Q\n"; -} - void CPWL_ScrollBar::DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { CFX_FloatRect rectWnd = GetWindowRect(); diff --git a/fpdfsdk/pdfwindow/cpwl_scroll_bar.h b/fpdfsdk/pdfwindow/cpwl_scroll_bar.h index d9bf835669..f9887e5610 100644 --- a/fpdfsdk/pdfwindow/cpwl_scroll_bar.h +++ b/fpdfsdk/pdfwindow/cpwl_scroll_bar.h @@ -51,7 +51,6 @@ class CPWL_SBButton : public CPWL_Wnd { // CPWL_Wnd CFX_ByteString GetClassName() const override; void OnCreate(PWL_CREATEPARAM& cp) override; - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override; @@ -126,7 +125,6 @@ class CPWL_ScrollBar : public CPWL_Wnd { void OnCreate(PWL_CREATEPARAM& cp) override; void OnDestroy() override; void RePosChildWnd() override; - void GetThisAppearanceStream(std::ostringstream* psAppStream) override; void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) override; bool OnLButtonDown(const CFX_PointF& point, uint32_t nFlag) override; diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.cpp b/fpdfsdk/pdfwindow/cpwl_wnd.cpp index d3ff2a5743..8862fc4c8b 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.cpp +++ b/fpdfsdk/pdfwindow/cpwl_wnd.cpp @@ -245,39 +245,6 @@ void CPWL_Wnd::InvalidateRectMove(const CFX_FloatRect& rcOld, InvalidateRect(&rcUnion); } -void CPWL_Wnd::GetAppearanceStream(std::ostringstream* psAppStream) { - if (IsValid() && IsVisible()) { - GetThisAppearanceStream(psAppStream); - GetChildAppearanceStream(psAppStream); - } -} - -// if don't set,Get default apperance stream -void CPWL_Wnd::GetThisAppearanceStream(std::ostringstream* psAppStream) { - CFX_FloatRect rectWnd = GetWindowRect(); - if (rectWnd.IsEmpty()) - return; - - if (HasFlag(PWS_BACKGROUND)) - *psAppStream << CPWL_Utils::GetRectFillAppStream(rectWnd, - GetBackgroundColor()); - - if (HasFlag(PWS_BORDER)) { - *psAppStream << CPWL_Utils::GetBorderAppStream( - rectWnd, (float)GetBorderWidth(), GetBorderColor(), - GetBorderLeftTopColor(GetBorderStyle()), - GetBorderRightBottomColor(GetBorderStyle()), GetBorderStyle(), - GetBorderDash()); - } -} - -void CPWL_Wnd::GetChildAppearanceStream(std::ostringstream* psAppStream) { - for (CPWL_Wnd* pChild : m_Children) { - if (pChild) - pChild->GetAppearanceStream(psAppStream); - } -} - void CPWL_Wnd::DrawAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device) { if (IsValid() && IsVisible()) { diff --git a/fpdfsdk/pdfwindow/cpwl_wnd.h b/fpdfsdk/pdfwindow/cpwl_wnd.h index 2b76a058fe..dfe5dc0ab0 100644 --- a/fpdfsdk/pdfwindow/cpwl_wnd.h +++ b/fpdfsdk/pdfwindow/cpwl_wnd.h @@ -274,7 +274,6 @@ class CPWL_Wnd : public CPWL_TimerHandler { virtual void CreateChildWnd(const PWL_CREATEPARAM& cp); virtual void RePosChildWnd(); - virtual void GetThisAppearanceStream(std::ostringstream* psAppStream); virtual void DrawThisAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); @@ -286,7 +285,6 @@ class CPWL_Wnd : public CPWL_TimerHandler { virtual void OnSetFocus(); virtual void OnKillFocus(); - void GetAppearanceStream(std::ostringstream* psAppStream); void SetNotifyFlag(bool bNotifying = true) { m_bNotifying = bNotifying; } bool IsValid() const; @@ -308,7 +306,6 @@ class CPWL_Wnd : public CPWL_TimerHandler { CFX_PointF ParentToChild(const CFX_PointF& point) const; CFX_FloatRect ParentToChild(const CFX_FloatRect& rect) const; - void GetChildAppearanceStream(std::ostringstream* psAppStream); void DrawChildAppearance(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device); FX_RECT PWLtoWnd(const CFX_FloatRect& rect) const; |