diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-02-26 13:17:56 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-02-26 13:17:56 -0800 |
commit | 566b974287ce0e81a963138152b8898f22480f52 (patch) | |
tree | b85991aee92475549d84e8cb68702960b85d1252 /fpdfsdk/src/fxedit | |
parent | 3b8fdd34bdf57ec45291b77008a43249f838efcb (diff) | |
download | pdfium-566b974287ce0e81a963138152b8898f22480f52.tar.xz |
Revert "Replace CPDF_Rect and CPDF_Point with CFX types."
This reverts commit 3b8fdd34bdf57ec45291b77008a43249f838efcb.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1743753002 .
Diffstat (limited to 'fpdfsdk/src/fxedit')
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_ap.cpp | 18 | ||||
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_edit.cpp | 142 | ||||
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_list.cpp | 88 | ||||
-rw-r--r-- | fpdfsdk/src/fxedit/fxet_pageobjs.cpp | 110 |
4 files changed, 176 insertions, 182 deletions
diff --git a/fpdfsdk/src/fxedit/fxet_ap.cpp b/fpdfsdk/src/fxedit/fxet_ap.cpp index 562f566edb..2803b60d72 100644 --- a/fpdfsdk/src/fxedit/fxet_ap.cpp +++ b/fpdfsdk/src/fxedit/fxet_ap.cpp @@ -60,13 +60,13 @@ static CFX_ByteString GetFontSetString(IFX_Edit_FontMap* pFontMap, CFX_ByteString IFX_Edit::GetEditAppearanceStream( IFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange /* = NULL*/, FX_BOOL bContinuous /* = TRUE*/, FX_WORD SubWord /* = 0*/) { CFX_ByteTextBuf sEditStream, sWords; - CFX_FloatPoint ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); + CPDF_Point ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); int32_t nCurFontIndex = -1; if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) { @@ -92,13 +92,13 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CFX_FloatPoint(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y); } else { CPVT_Line line; pIterator->GetLine(line); - ptNew = CFX_FloatPoint(line.ptLine.x + ptOffset.x, - line.ptLine.y + ptOffset.y); + ptNew = CPDF_Point(line.ptLine.x + ptOffset.x, + line.ptLine.y + ptOffset.y); } if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) { @@ -129,8 +129,8 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( } else { CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CFX_FloatPoint(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y); if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) { sEditStream << ptNew.x - ptOld.x << " " << ptNew.y - ptOld.y @@ -176,7 +176,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( CFX_ByteString IFX_Edit::GetSelectAppearanceStream( IFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange) { CFX_ByteTextBuf sRet; diff --git a/fpdfsdk/src/fxedit/fxet_edit.cpp b/fpdfsdk/src/fxedit/fxet_edit.cpp index 1b68dc0510..0e66b0e3b5 100644 --- a/fpdfsdk/src/fxedit/fxet_edit.cpp +++ b/fpdfsdk/src/fxedit/fxet_edit.cpp @@ -155,7 +155,7 @@ void CFX_Edit_Refresh::BeginRefresh() { } void CFX_Edit_Refresh::Push(const CPVT_WordRange& linerange, - const CFX_FloatRect& rect) { + const CPDF_Rect& rect) { m_NewLineRects.Add(linerange, rect); } @@ -175,7 +175,7 @@ void CFX_Edit_Refresh::NoAnalyse() { void CFX_Edit_Refresh::Analyse(int32_t nAlignment) { FX_BOOL bLineTopChanged = FALSE; - CFX_FloatRect rcResult; + CPDF_Rect rcResult; FX_FLOAT fWidthDiff; int32_t szMax = std::max(m_OldLineRects.GetSize(), m_NewLineRects.GetSize()); @@ -240,7 +240,7 @@ void CFX_Edit_Refresh::Analyse(int32_t nAlignment) { } } -void CFX_Edit_Refresh::AddRefresh(const CFX_FloatRect& rect) { +void CFX_Edit_Refresh::AddRefresh(const CPDF_Rect& rect) { m_RefreshRects.Add(rect); } @@ -814,9 +814,9 @@ IFX_Edit_FontMap* CFX_Edit::GetFontMap() { return NULL; } -void CFX_Edit::SetPlateRect(const CFX_FloatRect& rect, FX_BOOL bPaint) { +void CFX_Edit::SetPlateRect(const CPDF_Rect& rect, FX_BOOL bPaint) { m_pVT->SetPlateRect(rect); - m_ptScrollPos = CFX_FloatPoint(rect.left, rect.top); + m_ptScrollPos = CPDF_Point(rect.left, rect.top); if (bPaint) Paint(); } @@ -1631,11 +1631,11 @@ int32_t CFX_Edit::GetCharArray() const { return m_pVT->GetCharArray(); } -CFX_FloatRect CFX_Edit::GetPlateRect() const { +CPDF_Rect CFX_Edit::GetPlateRect() const { return m_pVT->GetPlateRect(); } -CFX_FloatRect CFX_Edit::GetContentRect() const { +CPDF_Rect CFX_Edit::GetContentRect() const { return VTToEdit(m_pVT->GetContentRect()); } @@ -1659,12 +1659,12 @@ CPVT_WordRange CFX_Edit::GetVisibleWordRange() const { return GetWholeWordRange(); if (m_pVT->IsValid()) { - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); - CPVT_WordPlace place1 = m_pVT->SearchWordPlace( - EditToVT(CFX_FloatPoint(rcPlate.left, rcPlate.top))); + CPVT_WordPlace place1 = + m_pVT->SearchWordPlace(EditToVT(CPDF_Point(rcPlate.left, rcPlate.top))); CPVT_WordPlace place2 = m_pVT->SearchWordPlace( - EditToVT(CFX_FloatPoint(rcPlate.right, rcPlate.bottom))); + EditToVT(CPDF_Point(rcPlate.right, rcPlate.bottom))); return CPVT_WordRange(place1, place2); } @@ -1672,7 +1672,7 @@ CPVT_WordRange CFX_Edit::GetVisibleWordRange() const { return CPVT_WordRange(); } -CPVT_WordPlace CFX_Edit::SearchWordPlace(const CFX_FloatPoint& point) const { +CPVT_WordPlace CFX_Edit::SearchWordPlace(const CPDF_Point& point) const { if (m_pVT->IsValid()) { return m_pVT->SearchWordPlace(EditToVT(point)); } @@ -1712,7 +1712,7 @@ void CFX_Edit::RearrangePart(const CPVT_WordRange& range) { void CFX_Edit::SetContentChanged() { if (m_bNotify && m_pNotify) { - CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcContent = m_pVT->GetContentRect(); if (rcContent.Width() != m_rcOldContent.Width() || rcContent.Height() != m_rcOldContent.Height()) { if (!m_bNotifyFlag) { @@ -1751,9 +1751,9 @@ FX_BOOL CFX_Edit::IsSelected() const { return m_SelState.IsExist(); } -CFX_FloatPoint CFX_Edit::VTToEdit(const CFX_FloatPoint& point) const { - CFX_FloatRect rcContent = m_pVT->GetContentRect(); - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); +CPDF_Point CFX_Edit::VTToEdit(const CPDF_Point& point) const { + CPDF_Rect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); FX_FLOAT fPadding = 0.0f; @@ -1769,13 +1769,13 @@ CFX_FloatPoint CFX_Edit::VTToEdit(const CFX_FloatPoint& point) const { break; } - return CFX_FloatPoint(point.x - (m_ptScrollPos.x - rcPlate.left), - point.y - (m_ptScrollPos.y + fPadding - rcPlate.top)); + return CPDF_Point(point.x - (m_ptScrollPos.x - rcPlate.left), + point.y - (m_ptScrollPos.y + fPadding - rcPlate.top)); } -CFX_FloatPoint CFX_Edit::EditToVT(const CFX_FloatPoint& point) const { - CFX_FloatRect rcContent = m_pVT->GetContentRect(); - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); +CPDF_Point CFX_Edit::EditToVT(const CPDF_Point& point) const { + CPDF_Rect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); FX_FLOAT fPadding = 0.0f; @@ -1791,32 +1791,28 @@ CFX_FloatPoint CFX_Edit::EditToVT(const CFX_FloatPoint& point) const { break; } - return CFX_FloatPoint(point.x + (m_ptScrollPos.x - rcPlate.left), - point.y + (m_ptScrollPos.y + fPadding - rcPlate.top)); + return CPDF_Point(point.x + (m_ptScrollPos.x - rcPlate.left), + point.y + (m_ptScrollPos.y + fPadding - rcPlate.top)); } -CFX_FloatRect CFX_Edit::VTToEdit(const CFX_FloatRect& rect) const { - CFX_FloatPoint ptLeftBottom = - VTToEdit(CFX_FloatPoint(rect.left, rect.bottom)); - CFX_FloatPoint ptRightTop = VTToEdit(CFX_FloatPoint(rect.right, rect.top)); +CPDF_Rect CFX_Edit::VTToEdit(const CPDF_Rect& rect) const { + CPDF_Point ptLeftBottom = VTToEdit(CPDF_Point(rect.left, rect.bottom)); + CPDF_Point ptRightTop = VTToEdit(CPDF_Point(rect.right, rect.top)); - return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, - ptRightTop.y); + return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); } -CFX_FloatRect CFX_Edit::EditToVT(const CFX_FloatRect& rect) const { - CFX_FloatPoint ptLeftBottom = - EditToVT(CFX_FloatPoint(rect.left, rect.bottom)); - CFX_FloatPoint ptRightTop = EditToVT(CFX_FloatPoint(rect.right, rect.top)); +CPDF_Rect CFX_Edit::EditToVT(const CPDF_Rect& rect) const { + CPDF_Point ptLeftBottom = EditToVT(CPDF_Point(rect.left, rect.bottom)); + CPDF_Point ptRightTop = EditToVT(CPDF_Point(rect.right, rect.top)); - return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, - ptRightTop.y); + return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); } void CFX_Edit::SetScrollInfo() { if (m_bNotify && m_pNotify) { - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); - CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); + CPDF_Rect rcContent = m_pVT->GetContentRect(); if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; @@ -1872,21 +1868,21 @@ void CFX_Edit::SetScrollPosY(FX_FLOAT fy) { } } -void CFX_Edit::SetScrollPos(const CFX_FloatPoint& point) { +void CFX_Edit::SetScrollPos(const CPDF_Point& point) { SetScrollPosX(point.x); SetScrollPosY(point.y); SetScrollLimit(); SetCaretInfo(); } -CFX_FloatPoint CFX_Edit::GetScrollPos() const { +CPDF_Point CFX_Edit::GetScrollPos() const { return m_ptScrollPos; } void CFX_Edit::SetScrollLimit() { if (m_pVT->IsValid()) { - CFX_FloatRect rcContent = m_pVT->GetContentRect(); - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); + CPDF_Rect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); if (rcPlate.Width() > rcContent.Width()) { SetScrollPosX(rcPlate.left); @@ -1916,8 +1912,8 @@ void CFX_Edit::ScrollToCaret() { SetScrollLimit(); if (m_pVT->IsValid()) { - CFX_FloatPoint ptHead(0, 0); - CFX_FloatPoint ptFoot(0, 0); + CPDF_Point ptHead(0, 0); + CPDF_Point ptFoot(0, 0); if (IPDF_VariableText_Iterator* pIterator = m_pVT->GetIterator()) { pIterator->SetAt(m_wpCaret); @@ -1937,10 +1933,10 @@ void CFX_Edit::ScrollToCaret() { } } - CFX_FloatPoint ptHeadEdit = VTToEdit(ptHead); - CFX_FloatPoint ptFootEdit = VTToEdit(ptFoot); + CPDF_Point ptHeadEdit = VTToEdit(ptHead); + CPDF_Point ptFootEdit = VTToEdit(ptFoot); - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); if (!FX_EDIT_IsFloatEqual(rcPlate.left, rcPlate.right)) { if (FX_EDIT_IsFloatSmaller(ptHeadEdit.x, rcPlate.left) || @@ -2007,10 +2003,10 @@ void CFX_Edit::RefreshPushLineRects(const CPVT_WordRange& wr) { if (lineinfo.lineplace.LineCmp(wpEnd) > 0) break; - CFX_FloatRect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CPDF_Rect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.Push(CPVT_WordRange(lineinfo.lineplace, lineinfo.lineEnd), VTToEdit(rcLine)); @@ -2042,17 +2038,17 @@ void CFX_Edit::RefreshPushRandomRects(const CPVT_WordRange& wr) { if (place.LineCmp(wrTemp.BeginPos) == 0 || place.LineCmp(wrTemp.EndPos) == 0) { - CFX_FloatRect rcWord(wordinfo.ptWord.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - wordinfo.ptWord.x + wordinfo.fWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CPDF_Rect rcWord(wordinfo.ptWord.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + wordinfo.ptWord.x + wordinfo.fWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.AddRefresh(VTToEdit(rcWord)); } else { - CFX_FloatRect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CPDF_Rect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); m_Refresh.AddRefresh(VTToEdit(rcLine)); @@ -2085,29 +2081,29 @@ void CFX_Edit::RefreshWordRange(const CPVT_WordRange& wr) { if (place.LineCmp(wrTemp.BeginPos) == 0 || place.LineCmp(wrTemp.EndPos) == 0) { - CFX_FloatRect rcWord(wordinfo.ptWord.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - wordinfo.ptWord.x + wordinfo.fWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CPDF_Rect rcWord(wordinfo.ptWord.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + wordinfo.ptWord.x + wordinfo.fWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CFX_FloatRect rcRefresh = VTToEdit(rcWord); + CPDF_Rect rcRefresh = VTToEdit(rcWord); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } } } else { - CFX_FloatRect rcLine(lineinfo.ptLine.x, - lineinfo.ptLine.y + lineinfo.fLineDescent, - lineinfo.ptLine.x + lineinfo.fLineWidth, - lineinfo.ptLine.y + lineinfo.fLineAscent); + CPDF_Rect rcLine(lineinfo.ptLine.x, + lineinfo.ptLine.y + lineinfo.fLineDescent, + lineinfo.ptLine.x + lineinfo.fLineWidth, + lineinfo.ptLine.y + lineinfo.fLineAscent); if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CFX_FloatRect rcRefresh = VTToEdit(rcLine); + CPDF_Rect rcRefresh = VTToEdit(rcLine); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } @@ -2127,7 +2123,7 @@ void CFX_Edit::SetCaret(const CPVT_WordPlace& place) { void CFX_Edit::SetCaretInfo() { if (m_bNotify && m_pNotify) { if (!m_bNotifyFlag) { - CFX_FloatPoint ptHead(0.0f, 0.0f), ptFoot(0.0f, 0.0f); + CPDF_Point ptHead(0.0f, 0.0f), ptFoot(0.0f, 0.0f); if (IPDF_VariableText_Iterator* pIterator = m_pVT->GetIterator()) { pIterator->SetAt(m_wpCaret); @@ -2199,7 +2195,7 @@ void CFX_Edit::SetCaret(int32_t nPos) { } } -void CFX_Edit::OnMouseDown(const CFX_FloatPoint& point, +void CFX_Edit::OnMouseDown(const CPDF_Point& point, FX_BOOL bShift, FX_BOOL bCtrl) { if (m_pVT->IsValid()) { @@ -2213,7 +2209,7 @@ void CFX_Edit::OnMouseDown(const CFX_FloatPoint& point, } } -void CFX_Edit::OnMouseMove(const CFX_FloatPoint& point, +void CFX_Edit::OnMouseMove(const CPDF_Point& point, FX_BOOL bShift, FX_BOOL bCtrl) { if (m_pVT->IsValid()) { @@ -2857,8 +2853,8 @@ FX_BOOL CFX_Edit::IsTextFull() const { FX_BOOL CFX_Edit::IsTextOverflow() const { if (!m_bEnableScroll && !m_bEnableOverflow) { - CFX_FloatRect rcPlate = m_pVT->GetPlateRect(); - CFX_FloatRect rcContent = m_pVT->GetContentRect(); + CPDF_Rect rcPlate = m_pVT->GetPlateRect(); + CPDF_Rect rcContent = m_pVT->GetContentRect(); if (m_pVT->IsMultiLine() && GetTotalLines() > 1) { if (FX_EDIT_IsFloatBigger(rcContent.Height(), rcPlate.Height())) diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp index 313cc481b3..4e8ae0cb8e 100644 --- a/fpdfsdk/src/fxedit/fxet_list.cpp +++ b/fpdfsdk/src/fxedit/fxet_list.cpp @@ -155,11 +155,11 @@ int32_t CFX_List::GetCount() const { return m_aListItems.GetSize(); } -CFX_FloatRect CFX_List::GetPlateRect() const { +CPDF_Rect CFX_List::GetPlateRect() const { return CFX_ListContainer::GetPlateRect(); } -CFX_FloatRect CFX_List::GetContentRect() const { +CPDF_Rect CFX_List::GetContentRect() const { return InnerToOuter(CFX_ListContainer::GetContentRect()); } @@ -167,8 +167,8 @@ FX_FLOAT CFX_List::GetFontSize() const { return m_fFontSize; } -int32_t CFX_List::GetItemIndex(const CFX_FloatPoint& point) const { - CFX_FloatPoint pt = OuterToInner(point); +int32_t CFX_List::GetItemIndex(const CPDF_Point& point) const { + CPDF_Point pt = OuterToInner(point); FX_BOOL bFirst = TRUE; FX_BOOL bLast = TRUE; @@ -250,15 +250,15 @@ int32_t CFX_List::FindNext(int32_t nIndex, FX_WCHAR nChar) const { return nCircleIndex; } -CFX_FloatRect CFX_List::GetItemRect(int32_t nIndex) const { +CPDF_Rect CFX_List::GetItemRect(int32_t nIndex) const { if (CFX_ListItem* pListItem = m_aListItems.GetAt(nIndex)) { - CFX_FloatRect rcItem = pListItem->GetRect(); + CPDF_Rect rcItem = pListItem->GetRect(); rcItem.left = 0.0f; rcItem.right = GetPlateRect().Width(); return InnerToOuter(rcItem); } - return CFX_FloatRect(); + return CPDF_Rect(); } FX_BOOL CFX_List::IsItemSelected(int32_t nIndex) const { @@ -423,37 +423,35 @@ void CFX_ListCtrl::SetNotify(IFX_List_Notify* pNotify) { m_pNotify = pNotify; } -CFX_FloatPoint CFX_ListCtrl::InToOut(const CFX_FloatPoint& point) const { - CFX_FloatRect rcPlate = GetPlateRect(); +CPDF_Point CFX_ListCtrl::InToOut(const CPDF_Point& point) const { + CPDF_Rect rcPlate = GetPlateRect(); - return CFX_FloatPoint(point.x - (m_ptScrollPos.x - rcPlate.left), - point.y - (m_ptScrollPos.y - rcPlate.top)); + return CPDF_Point(point.x - (m_ptScrollPos.x - rcPlate.left), + point.y - (m_ptScrollPos.y - rcPlate.top)); } -CFX_FloatPoint CFX_ListCtrl::OutToIn(const CFX_FloatPoint& point) const { - CFX_FloatRect rcPlate = GetPlateRect(); +CPDF_Point CFX_ListCtrl::OutToIn(const CPDF_Point& point) const { + CPDF_Rect rcPlate = GetPlateRect(); - return CFX_FloatPoint(point.x + (m_ptScrollPos.x - rcPlate.left), - point.y + (m_ptScrollPos.y - rcPlate.top)); + return CPDF_Point(point.x + (m_ptScrollPos.x - rcPlate.left), + point.y + (m_ptScrollPos.y - rcPlate.top)); } -CFX_FloatRect CFX_ListCtrl::InToOut(const CFX_FloatRect& rect) const { - CFX_FloatPoint ptLeftBottom = InToOut(CFX_FloatPoint(rect.left, rect.bottom)); - CFX_FloatPoint ptRightTop = InToOut(CFX_FloatPoint(rect.right, rect.top)); +CPDF_Rect CFX_ListCtrl::InToOut(const CPDF_Rect& rect) const { + CPDF_Point ptLeftBottom = InToOut(CPDF_Point(rect.left, rect.bottom)); + CPDF_Point ptRightTop = InToOut(CPDF_Point(rect.right, rect.top)); - return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, - ptRightTop.y); + return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); } -CFX_FloatRect CFX_ListCtrl::OutToIn(const CFX_FloatRect& rect) const { - CFX_FloatPoint ptLeftBottom = OutToIn(CFX_FloatPoint(rect.left, rect.bottom)); - CFX_FloatPoint ptRightTop = OutToIn(CFX_FloatPoint(rect.right, rect.top)); +CPDF_Rect CFX_ListCtrl::OutToIn(const CPDF_Rect& rect) const { + CPDF_Point ptLeftBottom = OutToIn(CPDF_Point(rect.left, rect.bottom)); + CPDF_Point ptRightTop = OutToIn(CPDF_Point(rect.right, rect.top)); - return CFX_FloatRect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, - ptRightTop.y); + return CPDF_Rect(ptLeftBottom.x, ptLeftBottom.y, ptRightTop.x, ptRightTop.y); } -void CFX_ListCtrl::OnMouseDown(const CFX_FloatPoint& point, +void CFX_ListCtrl::OnMouseDown(const CPDF_Point& point, FX_BOOL bShift, FX_BOOL bCtrl) { int32_t nHitIndex = GetItemIndex(point); @@ -492,7 +490,7 @@ void CFX_ListCtrl::OnMouseDown(const CFX_FloatPoint& point, ScrollToListItem(nHitIndex); } -void CFX_ListCtrl::OnMouseMove(const CFX_FloatPoint& point, +void CFX_ListCtrl::OnMouseMove(const CPDF_Point& point, FX_BOOL bShift, FX_BOOL bCtrl) { int32_t nHitIndex = GetItemIndex(point); @@ -580,15 +578,15 @@ FX_BOOL CFX_ListCtrl::OnChar(FX_WORD nChar, FX_BOOL bShift, FX_BOOL bCtrl) { return FALSE; } -void CFX_ListCtrl::SetPlateRect(const CFX_FloatRect& rect) { +void CFX_ListCtrl::SetPlateRect(const CPDF_Rect& rect) { CFX_ListContainer::SetPlateRect(rect); m_ptScrollPos.x = rect.left; - SetScrollPos(CFX_FloatPoint(rect.left, rect.top)); + SetScrollPos(CPDF_Point(rect.left, rect.top)); ReArrange(0); InvalidateItem(-1); } -CFX_FloatRect CFX_ListCtrl::GetItemRect(int32_t nIndex) const { +CPDF_Rect CFX_ListCtrl::GetItemRect(int32_t nIndex) const { return InToOut(CFX_List::GetItemRect(nIndex)); } @@ -652,14 +650,14 @@ void CFX_ListCtrl::InvalidateItem(int32_t nItemIndex) { if (nItemIndex == -1) { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CFX_FloatRect rcRefresh = GetPlateRect(); + CPDF_Rect rcRefresh = GetPlateRect(); m_pNotify->IOnInvalidateRect(&rcRefresh); m_bNotifyFlag = FALSE; } } else { if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; - CFX_FloatRect rcRefresh = GetItemRect(nItemIndex); + CPDF_Rect rcRefresh = GetItemRect(nItemIndex); rcRefresh.left -= 1.0f; rcRefresh.right += 1.0f; rcRefresh.bottom -= 1.0f; @@ -703,8 +701,8 @@ void CFX_ListCtrl::Select(int32_t nItemIndex) { } FX_BOOL CFX_ListCtrl::IsItemVisible(int32_t nItemIndex) const { - CFX_FloatRect rcPlate = GetPlateRect(); - CFX_FloatRect rcItem = GetItemRect(nItemIndex); + CPDF_Rect rcPlate = GetPlateRect(); + CPDF_Rect rcItem = GetItemRect(nItemIndex); return rcItem.bottom >= rcPlate.bottom && rcItem.top <= rcPlate.top; } @@ -713,9 +711,9 @@ void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex) { if (!IsValid(nItemIndex)) return; - CFX_FloatRect rcPlate = GetPlateRect(); - CFX_FloatRect rcItem = CFX_List::GetItemRect(nItemIndex); - CFX_FloatRect rcItemCtrl = GetItemRect(nItemIndex); + CPDF_Rect rcPlate = GetPlateRect(); + CPDF_Rect rcItem = CFX_List::GetItemRect(nItemIndex); + CPDF_Rect rcItemCtrl = GetItemRect(nItemIndex); if (FX_EDIT_IsFloatSmaller(rcItemCtrl.bottom, rcPlate.bottom)) { if (FX_EDIT_IsFloatSmaller(rcItemCtrl.top, rcPlate.top)) { @@ -730,8 +728,8 @@ void CFX_ListCtrl::ScrollToListItem(int32_t nItemIndex) { void CFX_ListCtrl::SetScrollInfo() { if (m_pNotify) { - CFX_FloatRect rcPlate = GetPlateRect(); - CFX_FloatRect rcContent = CFX_List::GetContentRect(); + CPDF_Rect rcPlate = GetPlateRect(); + CPDF_Rect rcContent = CFX_List::GetContentRect(); if (!m_bNotifyFlag) { m_bNotifyFlag = TRUE; @@ -743,14 +741,14 @@ void CFX_ListCtrl::SetScrollInfo() { } } -void CFX_ListCtrl::SetScrollPos(const CFX_FloatPoint& point) { +void CFX_ListCtrl::SetScrollPos(const CPDF_Point& point) { SetScrollPosY(point.y); } void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy) { if (!FX_EDIT_IsFloatEqual(m_ptScrollPos.y, fy)) { - CFX_FloatRect rcPlate = GetPlateRect(); - CFX_FloatRect rcContent = CFX_List::GetContentRect(); + CPDF_Rect rcPlate = GetPlateRect(); + CPDF_Rect rcContent = CFX_List::GetContentRect(); if (rcPlate.Height() > rcContent.Height()) { fy = rcPlate.top; @@ -775,7 +773,7 @@ void CFX_ListCtrl::SetScrollPosY(FX_FLOAT fy) { } } -CFX_FloatRect CFX_ListCtrl::GetContentRect() const { +CPDF_Rect CFX_ListCtrl::GetContentRect() const { return InToOut(CFX_List::GetContentRect()); } @@ -787,7 +785,7 @@ void CFX_ListCtrl::ReArrange(int32_t nItemIndex) { void CFX_ListCtrl::SetTopItem(int32_t nIndex) { if (IsValid(nIndex)) { GetPlateRect(); - CFX_FloatRect rcItem = CFX_List::GetItemRect(nIndex); + CPDF_Rect rcItem = CFX_List::GetItemRect(nIndex); SetScrollPosY(rcItem.top); } } @@ -810,7 +808,7 @@ void CFX_ListCtrl::Cancel() { m_aSelItems.DeselectAll(); } -int32_t CFX_ListCtrl::GetItemIndex(const CFX_FloatPoint& point) const { +int32_t CFX_ListCtrl::GetItemIndex(const CPDF_Point& point) const { return CFX_List::GetItemIndex(OutToIn(point)); } diff --git a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp index 752e537099..ed96b96654 100644 --- a/fpdfsdk/src/fxedit/fxet_pageobjs.cpp +++ b/fpdfsdk/src/fxedit/fxet_pageobjs.cpp @@ -13,22 +13,22 @@ #define FX_EDIT_UNDERLINEHALFWIDTH 0.5f #define FX_EDIT_CROSSOUTHALFWIDTH 0.5f -CFX_FloatRect GetUnderLineRect(const CPVT_Word& word) { - return CFX_FloatRect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, - word.ptWord.x + word.fWidth, - word.ptWord.y + word.fDescent * 0.25f); +CPDF_Rect GetUnderLineRect(const CPVT_Word& word) { + return CPDF_Rect(word.ptWord.x, word.ptWord.y + word.fDescent * 0.5f, + word.ptWord.x + word.fWidth, + word.ptWord.y + word.fDescent * 0.25f); } -CFX_FloatRect GetCrossoutRect(const CPVT_Word& word) { - return CFX_FloatRect(word.ptWord.x, - word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + - word.fDescent * 0.25f, - word.ptWord.x + word.fWidth, - word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f); +CPDF_Rect GetCrossoutRect(const CPVT_Word& word) { + return CPDF_Rect(word.ptWord.x, + word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f + + word.fDescent * 0.25f, + word.ptWord.x + word.fWidth, + word.ptWord.y + (word.fAscent + word.fDescent) * 0.5f); } static void DrawTextString(CFX_RenderDevice* pDevice, - const CFX_FloatPoint& pt, + const CPDF_Point& pt, CPDF_Font* pFont, FX_FLOAT fFontSize, CFX_Matrix* pUser2Device, @@ -49,7 +49,7 @@ static void DrawTextString(CFX_RenderDevice* pDevice, ro.m_ColorMode = RENDER_COLOR_NORMAL; if (crTextStroke != 0) { - CFX_FloatPoint pt1(0, 0), pt2(1, 0); + CPDF_Point pt1(0, 0), pt2(1, 0); pUser2Device->Transform(pt1.x, pt1.y); pUser2Device->Transform(pt2.x, pt2.y); CFX_GraphStateData gsd; @@ -69,7 +69,7 @@ static void DrawTextString(CFX_RenderDevice* pDevice, ro.m_ColorMode = RENDER_COLOR_NORMAL; if (crTextStroke != 0) { - CFX_FloatPoint pt1(0, 0), pt2(1, 0); + CPDF_Point pt1(0, 0), pt2(1, 0); pUser2Device->Transform(pt1.x, pt1.y); pUser2Device->Transform(pt2.x, pt2.y); CFX_GraphStateData gsd; @@ -92,13 +92,13 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, IFX_Edit* pEdit, FX_COLORREF color, - const CFX_FloatRect& rcClip, - const CFX_FloatPoint& ptOffset, + const CPDF_Rect& rcClip, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange) { pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CFX_FloatRect rcTemp = rcClip; + CPDF_Rect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -123,7 +123,7 @@ void IFX_Edit::DrawUnderline(CFX_RenderDevice* pDevice, CPVT_Word word; if (pIterator->GetWord(word)) { CFX_PathData pathUnderline; - CFX_FloatRect rcUnderline = GetUnderLineRect(word); + CPDF_Rect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; @@ -146,8 +146,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, IFX_Edit* pEdit, FX_COLORREF crTextFill, FX_COLORREF crTextStroke, - const CFX_FloatRect& rcClip, - const CFX_FloatPoint& ptOffset, + const CPDF_Rect& rcClip, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, IFX_SystemHandler* pSystemHandler, void* pFFLData) { @@ -169,12 +169,12 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, CFX_ByteTextBuf sTextBuf; int32_t nFontIndex = -1; - CFX_FloatPoint ptBT(0.0f, 0.0f); + CPDF_Point ptBT(0.0f, 0.0f); pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CFX_FloatRect rcTemp = rcClip; + CPDF_Rect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -218,9 +218,9 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, pIterator->GetLine(line); if (pSystemHandler && pSystemHandler->IsSelectionImplemented()) { - CFX_FloatRect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent, - word.ptWord.x + word.fWidth, - line.ptLine.y + line.fLineAscent); + CPDF_Rect rc(word.ptWord.x, line.ptLine.y + line.fLineDescent, + word.ptWord.x + word.fWidth, + line.ptLine.y + line.fLineAscent); rc.Intersect(rcClip); pSystemHandler->OutputSelectedRect(pFFLData, rc); } else { @@ -239,8 +239,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, if (place.LineCmp(oldplace) != 0 || word.nFontIndex != nFontIndex || crOldFill != crCurFill) { if (sTextBuf.GetLength() > 0) { - DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, - ptBT.y + ptOffset.y), + DrawTextString(pDevice, CPDF_Point(ptBT.x + ptOffset.x, + ptBT.y + ptOffset.y), pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale); @@ -256,8 +256,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, SubWord); } else { DrawTextString( - pDevice, CFX_FloatPoint(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y), + pDevice, CPDF_Point(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y), pFontMap->GetPDFFont(word.nFontIndex), fFontSize, pUser2Device, GetPDFWordString(pFontMap, word.nFontIndex, word.Word, SubWord), crCurFill, crTextStroke, nHorzScale); @@ -268,7 +268,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, if (sTextBuf.GetLength() > 0) { DrawTextString( - pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale); } @@ -281,8 +281,8 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CFX_Matrix* pUser2Device, IFX_Edit* pEdit, - const CFX_FloatRect& rcClip, - const CFX_FloatPoint& ptOffset, + const CPDF_Rect& rcClip, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange) { CPVT_WordRange wrSelect = pEdit->GetSelectWordRange(); @@ -294,12 +294,12 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, CFX_ByteTextBuf sTextBuf; CPVT_WordProps wp; - CFX_FloatPoint ptBT(0.0f, 0.0f); + CPDF_Point ptBT(0.0f, 0.0f); pDevice->SaveState(); if (!rcClip.IsEmpty()) { - CFX_FloatRect rcTemp = rcClip; + CPDF_Rect rcTemp = rcClip; pUser2Device->TransformRect(rcTemp); FX_RECT rcDevClip; rcDevClip.left = (int32_t)rcTemp.left; @@ -357,11 +357,11 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, FXSYS_memcmp(&word.WordProps, &wp, sizeof(CPVT_WordProps)) != 0 || crOld != crCurText) { if (sTextBuf.GetLength() > 0) { - DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, - ptBT.y + ptOffset.y), - pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, - pUser2Device, sTextBuf.GetByteString(), crOld, 0, - wp.nHorzScale); + DrawTextString( + pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, + pUser2Device, sTextBuf.GetByteString(), crOld, 0, + wp.nHorzScale); sTextBuf.Clear(); } @@ -375,7 +375,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) { CFX_PathData pathUnderline; - CFX_FloatRect rcUnderline = GetUnderLineRect(word); + CPDF_Rect rcUnderline = GetUnderLineRect(word); pathUnderline.AppendRect(rcUnderline.left, rcUnderline.bottom, rcUnderline.right, rcUnderline.top); @@ -385,7 +385,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (word.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) { CFX_PathData pathCrossout; - CFX_FloatRect rcCrossout = GetCrossoutRect(word); + CPDF_Rect rcCrossout = GetCrossoutRect(word); pathCrossout.AppendRect(rcCrossout.left, rcCrossout.bottom, rcCrossout.right, rcCrossout.top); @@ -399,7 +399,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, if (sTextBuf.GetLength() > 0) { DrawTextString( - pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pDevice, CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, pUser2Device, sTextBuf.GetByteString(), crOld, 0, wp.nHorzScale); } @@ -411,7 +411,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, static void AddRectToPageObjects(CPDF_PageObjectHolder* pObjectHolder, FX_COLORREF crFill, - const CFX_FloatRect& rcFill) { + const CPDF_Rect& rcFill) { std::unique_ptr<CPDF_PathObject> pPathObj(new CPDF_PathObject); CFX_PathData* pPathData = pPathObj->m_Path.GetModify(); pPathData->AppendRect(rcFill.left, rcFill.bottom, rcFill.right, rcFill.top); @@ -435,7 +435,7 @@ static CPDF_TextObject* AddTextObjToPageObjects( FX_FLOAT fFontSize, FX_FLOAT fCharSpace, int32_t nHorzScale, - const CFX_FloatPoint& point, + const CPDF_Point& point, const CFX_ByteString& text) { std::unique_ptr<CPDF_TextObject> pTxtObj(new CPDF_TextObject); CPDF_TextStateData* pTextStateData = pTxtObj->m_TextState.GetModify(); @@ -469,7 +469,7 @@ static CPDF_TextObject* AddTextObjToPageObjects( void IFX_Edit::GeneratePageObjects( CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF crText, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) { @@ -478,7 +478,7 @@ void IFX_Edit::GeneratePageObjects( int32_t nOldFontIndex = -1; CFX_ByteTextBuf sTextBuf; - CFX_FloatPoint ptBT(0.0f, 0.0f); + CPDF_Point ptBT(0.0f, 0.0f); ObjArray.RemoveAll(); @@ -504,7 +504,7 @@ void IFX_Edit::GeneratePageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100, - CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); sTextBuf.Clear(); @@ -523,7 +523,7 @@ void IFX_Edit::GeneratePageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100, - CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); } } @@ -533,7 +533,7 @@ void IFX_Edit::GeneratePageObjects( void IFX_Edit::GenerateRichPageObjects( CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, CFX_ArrayTemplate<CPDF_TextObject*>& ObjArray) { FX_COLORREF crCurText = ArgbEncode(255, 0, 0, 0); @@ -541,7 +541,7 @@ void IFX_Edit::GenerateRichPageObjects( CFX_ByteTextBuf sTextBuf; CPVT_WordProps wp; - CFX_FloatPoint ptBT(0.0f, 0.0f); + CPDF_Point ptBT(0.0f, 0.0f); ObjArray.RemoveAll(); @@ -574,7 +574,7 @@ void IFX_Edit::GenerateRichPageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, - CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); sTextBuf.Clear(); @@ -589,7 +589,7 @@ void IFX_Edit::GenerateRichPageObjects( word.Word, 0); if (word.WordProps.nWordStyle & PVTWORD_STYLE_UNDERLINE) { - CFX_FloatRect rcUnderline = GetUnderLineRect(word); + CPDF_Rect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; @@ -599,7 +599,7 @@ void IFX_Edit::GenerateRichPageObjects( } if (word.WordProps.nWordStyle & PVTWORD_STYLE_CROSSOUT) { - CFX_FloatRect rcCrossout = GetCrossoutRect(word); + CPDF_Rect rcCrossout = GetCrossoutRect(word); rcCrossout.left += ptOffset.x; rcCrossout.right += ptOffset.x; rcCrossout.top += ptOffset.y; @@ -616,7 +616,7 @@ void IFX_Edit::GenerateRichPageObjects( ObjArray.Add(AddTextObjToPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, - CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + CPDF_Point(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), sTextBuf.GetByteString())); } } @@ -625,7 +625,7 @@ void IFX_Edit::GenerateRichPageObjects( void IFX_Edit::GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder, IFX_Edit* pEdit, - const CFX_FloatPoint& ptOffset, + const CPDF_Point& ptOffset, const CPVT_WordRange* pRange, FX_COLORREF color) { if (IFX_Edit_Iterator* pIterator = pEdit->GetIterator()) { @@ -644,7 +644,7 @@ void IFX_Edit::GenerateUnderlineObjects(CPDF_PageObjectHolder* pObjectHolder, CPVT_Word word; if (pIterator->GetWord(word)) { - CFX_FloatRect rcUnderline = GetUnderLineRect(word); + CPDF_Rect rcUnderline = GetUnderLineRect(word); rcUnderline.left += ptOffset.x; rcUnderline.right += ptOffset.x; rcUnderline.top += ptOffset.y; |