diff options
Diffstat (limited to 'core/src/fpdfdoc')
-rw-r--r-- | core/src/fpdfdoc/doc_annot.cpp | 6 | ||||
-rw-r--r-- | core/src/fpdfdoc/doc_ap.cpp | 76 | ||||
-rw-r--r-- | core/src/fpdfdoc/doc_link.cpp | 4 | ||||
-rw-r--r-- | core/src/fpdfdoc/doc_vt.cpp | 26 | ||||
-rw-r--r-- | core/src/fpdfdoc/pdf_vt.h | 58 |
5 files changed, 87 insertions, 83 deletions
diff --git a/core/src/fpdfdoc/doc_annot.cpp b/core/src/fpdfdoc/doc_annot.cpp index 4b0b2b54bc..dcd21be66e 100644 --- a/core/src/fpdfdoc/doc_annot.cpp +++ b/core/src/fpdfdoc/doc_annot.cpp @@ -77,7 +77,7 @@ void CPDF_AnnotList::DisplayPass(CPDF_Page* pPage, continue; } } - CPDF_Rect annot_rect_f; + CFX_FloatRect annot_rect_f; pAnnot->GetRect(annot_rect_f); CFX_Matrix matrix = *pMatrix; if (clip_rect) { @@ -132,7 +132,7 @@ CFX_ByteString CPDF_Annot::GetSubType() const { return m_sSubtype; } -void CPDF_Annot::GetRect(CPDF_Rect& rect) const { +void CPDF_Annot::GetRect(CFX_FloatRect& rect) const { if (!m_pAnnotDict) { return; } @@ -210,7 +210,7 @@ static CPDF_Form* FPDFDOC_Annot_GetMatrix(const CPDF_Page* pPage, CFX_FloatRect form_bbox = pForm->m_pFormDict->GetRectBy("BBox"); CFX_Matrix form_matrix = pForm->m_pFormDict->GetMatrixBy("Matrix"); form_matrix.TransformRect(form_bbox); - CPDF_Rect arect; + CFX_FloatRect arect; pAnnot->GetRect(arect); matrix.MatchRect(arect, form_bbox); matrix.Concat(*pUser2Device); diff --git a/core/src/fpdfdoc/doc_ap.cpp b/core/src/fpdfdoc/doc_ap.cpp index 3ccf4c44d1..7fe06e2b5d 100644 --- a/core/src/fpdfdoc/doc_ap.cpp +++ b/core/src/fpdfdoc/doc_ap.cpp @@ -327,33 +327,33 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, if (!pDefFont) { return FALSE; } - CPDF_Rect rcAnnot = pAnnotDict->GetRectBy("Rect"); + CFX_FloatRect rcAnnot = pAnnotDict->GetRectBy("Rect"); int32_t nRotate = 0; if (CPDF_Dictionary* pMKDict = pAnnotDict->GetDictBy("MK")) { nRotate = pMKDict->GetIntegerBy("R"); } - CPDF_Rect rcBBox; + CFX_FloatRect rcBBox; CFX_Matrix matrix; switch (nRotate % 360) { case 0: - rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left, - rcAnnot.top - rcAnnot.bottom); + rcBBox = CFX_FloatRect(0, 0, rcAnnot.right - rcAnnot.left, + rcAnnot.top - rcAnnot.bottom); break; case 90: matrix = CFX_Matrix(0, 1, -1, 0, rcAnnot.right - rcAnnot.left, 0); - rcBBox = CPDF_Rect(0, 0, rcAnnot.top - rcAnnot.bottom, - rcAnnot.right - rcAnnot.left); + rcBBox = CFX_FloatRect(0, 0, rcAnnot.top - rcAnnot.bottom, + rcAnnot.right - rcAnnot.left); break; case 180: matrix = CFX_Matrix(-1, 0, 0, -1, rcAnnot.right - rcAnnot.left, rcAnnot.top - rcAnnot.bottom); - rcBBox = CPDF_Rect(0, 0, rcAnnot.right - rcAnnot.left, - rcAnnot.top - rcAnnot.bottom); + rcBBox = CFX_FloatRect(0, 0, rcAnnot.right - rcAnnot.left, + rcAnnot.top - rcAnnot.bottom); break; case 270: matrix = CFX_Matrix(0, -1, 1, 0, 0, rcAnnot.top - rcAnnot.bottom); - rcBBox = CPDF_Rect(0, 0, rcAnnot.top - rcAnnot.bottom, - rcAnnot.right - rcAnnot.left); + rcBBox = CFX_FloatRect(0, 0, rcAnnot.top - rcAnnot.bottom, + rcAnnot.right - rcAnnot.left); break; } int32_t nBorderStyle = PBS_SOLID; @@ -414,9 +414,9 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, if (sBorderStream.GetLength() > 0) { sAppStream << "q\n" << sBorderStream << "Q\n"; } - CPDF_Rect rcBody = - CPDF_Rect(rcBBox.left + fBorderWidth, rcBBox.bottom + fBorderWidth, - rcBBox.right - fBorderWidth, rcBBox.top - fBorderWidth); + CFX_FloatRect rcBody = + CFX_FloatRect(rcBBox.left + fBorderWidth, rcBBox.bottom + fBorderWidth, + rcBBox.right - fBorderWidth, rcBBox.top - fBorderWidth); rcBody.Normalize(); CPDF_Dictionary* pAPDict = pAnnotDict->GetDictBy("AP"); if (!pAPDict) { @@ -496,11 +496,11 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, vt.Initialize(); vt.SetText(swValue.c_str()); vt.RearrangeAll(); - CPDF_Rect rcContent = vt.GetContentRect(); - CPDF_Point ptOffset(0.0f, 0.0f); + CFX_FloatRect rcContent = vt.GetContentRect(); + CFX_FloatPoint ptOffset(0.0f, 0.0f); if (!bMultiLine) { ptOffset = - CPDF_Point(0.0f, (rcContent.Height() - rcBody.Height()) / 2.0f); + CFX_FloatPoint(0.0f, (rcContent.Height() - rcBody.Height()) / 2.0f); } CFX_ByteString sBody = CPVT_GenerateAP::GenerateEditAP( &map, vt.GetIterator(), ptOffset, !bCharArray, subWord); @@ -529,10 +529,10 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, CPVT_Provider prd(&map); CPDF_VariableText vt; vt.SetProvider(&prd); - CPDF_Rect rcButton = rcBody; + CFX_FloatRect rcButton = rcBody; rcButton.left = rcButton.right - 13; rcButton.Normalize(); - CPDF_Rect rcEdit = rcBody; + CFX_FloatRect rcEdit = rcBody; rcEdit.right = rcButton.left; rcEdit.Normalize(); vt.SetPlateRect(rcEdit); @@ -544,9 +544,9 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, vt.Initialize(); vt.SetText(swValue.c_str()); vt.RearrangeAll(); - CPDF_Rect rcContent = vt.GetContentRect(); - CPDF_Point ptOffset = - CPDF_Point(0.0f, (rcContent.Height() - rcEdit.Height()) / 2.0f); + CFX_FloatRect rcContent = vt.GetContentRect(); + CFX_FloatPoint ptOffset = + CFX_FloatPoint(0.0f, (rcContent.Height() - rcEdit.Height()) / 2.0f); CFX_ByteString sEdit = CPVT_GenerateAP::GenerateEditAP( &map, vt.GetIterator(), ptOffset, TRUE, 0); if (sEdit.GetLength() > 0) { @@ -575,8 +575,9 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, if (sButtonBorder.GetLength() > 0) { sAppStream << "q\n" << sButtonBorder << "Q\n"; } - CPDF_Point ptCenter = CPDF_Point((rcButton.left + rcButton.right) / 2, - (rcButton.top + rcButton.bottom) / 2); + CFX_FloatPoint ptCenter = + CFX_FloatPoint((rcButton.left + rcButton.right) / 2, + (rcButton.top + rcButton.bottom) / 2); if (IsFloatBigger(rcButton.Width(), 6) && IsFloatBigger(rcButton.Height(), 6)) { sAppStream << "q\n" @@ -628,7 +629,8 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, } CPDF_VariableText vt; vt.SetProvider(&prd); - vt.SetPlateRect(CPDF_Rect(rcBody.left, 0.0f, rcBody.right, 0.0f)); + vt.SetPlateRect( + CFX_FloatRect(rcBody.left, 0.0f, rcBody.right, 0.0f)); if (IsFloatZero(fFontSize)) { vt.SetFontSize(12.0f); } else { @@ -639,8 +641,8 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, vt.RearrangeAll(); FX_FLOAT fItemHeight = vt.GetContentRect().Height(); if (bSelected) { - CPDF_Rect rcItem = - CPDF_Rect(rcBody.left, fy - fItemHeight, rcBody.right, fy); + CFX_FloatRect rcItem = CFX_FloatRect( + rcBody.left, fy - fItemHeight, rcBody.right, fy); sBody << "q\n" << CPVT_GenerateAP::GenerateColorAP( CPVT_Color(CPVT_Color::kRGB, 0, 51.0f / 255.0f, 113.0f / 255.0f), @@ -651,13 +653,13 @@ static FX_BOOL GenerateWidgetAP(CPDF_Document* pDoc, sBody << "BT\n" << CPVT_GenerateAP::GenerateColorAP( CPVT_Color(CPVT_Color::kGray, 1), TRUE) << CPVT_GenerateAP::GenerateEditAP(&map, vt.GetIterator(), - CPDF_Point(0.0f, fy), + CFX_FloatPoint(0.0f, fy), TRUE, 0) << "ET\n"; } else { sBody << "BT\n" << CPVT_GenerateAP::GenerateColorAP(crText, TRUE) << CPVT_GenerateAP::GenerateEditAP(&map, vt.GetIterator(), - CPDF_Point(0.0f, fy), + CFX_FloatPoint(0.0f, fy), TRUE, 0) << "ET\n"; } @@ -714,12 +716,12 @@ FX_BOOL CPVT_GenerateAP::GenerateListBoxAP(CPDF_Document* pDoc, CFX_ByteString CPVT_GenerateAP::GenerateEditAP( IPVT_FontMap* pFontMap, IPDF_VariableText_Iterator* pIterator, - const CPDF_Point& ptOffset, + const CFX_FloatPoint& ptOffset, FX_BOOL bContinuous, FX_WORD SubWord, const CPVT_WordRange* pVisible) { CFX_ByteTextBuf sEditStream, sLineStream, sWords; - CPDF_Point ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); + CFX_FloatPoint ptOld(0.0f, 0.0f), ptNew(0.0f, 0.0f); int32_t nCurFontIndex = -1; if (pIterator) { if (pVisible) { @@ -743,13 +745,13 @@ CFX_ByteString CPVT_GenerateAP::GenerateEditAP( } CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CFX_FloatPoint(word.ptWord.x + ptOffset.x, + word.ptWord.y + ptOffset.y); } else { CPVT_Line line; pIterator->GetLine(line); - ptNew = CPDF_Point(line.ptLine.x + ptOffset.x, - line.ptLine.y + ptOffset.y); + ptNew = CFX_FloatPoint(line.ptLine.x + ptOffset.x, + line.ptLine.y + ptOffset.y); } if (ptNew.x != ptOld.x || ptNew.y != ptOld.y) { sLineStream << ptNew.x - ptOld.x << " " << ptNew.y - ptOld.y @@ -775,8 +777,8 @@ CFX_ByteString CPVT_GenerateAP::GenerateEditAP( } else { CPVT_Word word; if (pIterator->GetWord(word)) { - ptNew = CPDF_Point(word.ptWord.x + ptOffset.x, - word.ptWord.y + ptOffset.y); + ptNew = CFX_FloatPoint(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 << " Td\n"; @@ -801,7 +803,7 @@ CFX_ByteString CPVT_GenerateAP::GenerateEditAP( return sEditStream.GetByteString(); } CFX_ByteString CPVT_GenerateAP::GenerateBorderAP( - const CPDF_Rect& rect, + const CFX_FloatRect& rect, FX_FLOAT fWidth, const CPVT_Color& color, const CPVT_Color& crLeftTop, diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp index 6617e85cd4..7da29e0954 100644 --- a/core/src/fpdfdoc/doc_link.cpp +++ b/core/src/fpdfdoc/doc_link.cpp @@ -43,7 +43,7 @@ CPDF_Link CPDF_LinkList::GetLinkAtPoint(CPDF_Page* pPage, continue; CPDF_Link link(pAnnot); - CPDF_Rect rect = link.GetRect(); + CFX_FloatRect rect = link.GetRect(); if (!rect.Contains(pdf_x, pdf_y)) continue; @@ -68,7 +68,7 @@ void CPDF_LinkList::LoadPageLinks(CPDF_Page* pPage, } } -CPDF_Rect CPDF_Link::GetRect() { +CFX_FloatRect CPDF_Link::GetRect() { return m_pDict->GetRectBy("Rect"); } CPDF_Dest CPDF_Link::GetDest(CPDF_Document* pDoc) { diff --git a/core/src/fpdfdoc/doc_vt.cpp b/core/src/fpdfdoc/doc_vt.cpp index 0f8a4e5320..477df25a14 100644 --- a/core/src/fpdfdoc/doc_vt.cpp +++ b/core/src/fpdfdoc/doc_vt.cpp @@ -166,7 +166,7 @@ void CSection::UpdateWordPlace(CPVT_WordPlace& place) const { } } } -CPVT_WordPlace CSection::SearchWordPlace(const CPDF_Point& point) const { +CPVT_WordPlace CSection::SearchWordPlace(const CFX_FloatPoint& point) const { ASSERT(m_pVT); CPVT_WordPlace place = GetBeginWordPlace(); FX_BOOL bUp = TRUE; @@ -1135,8 +1135,8 @@ CPVT_WordPlace CPDF_VariableText::GetNextWordPlace( return place; } CPVT_WordPlace CPDF_VariableText::SearchWordPlace( - const CPDF_Point& point) const { - CPDF_Point pt = OutToIn(point); + const CFX_FloatPoint& point) const { + CFX_FloatPoint pt = OutToIn(point); CPVT_WordPlace place = GetBeginWordPlace(); int32_t nLeft = 0; int32_t nRight = m_SectionArray.GetSize() - 1; @@ -1161,8 +1161,8 @@ CPVT_WordPlace CPDF_VariableText::SearchWordPlace( continue; } else { place = pSection->SearchWordPlace( - CPDF_Point(pt.x - pSection->m_SecInfo.rcSection.left, - pt.y - pSection->m_SecInfo.rcSection.top)); + CFX_FloatPoint(pt.x - pSection->m_SecInfo.rcSection.left, + pt.y - pSection->m_SecInfo.rcSection.top)); place.nSecIndex = nMid; return place; } @@ -1180,10 +1180,10 @@ CPVT_WordPlace CPDF_VariableText::SearchWordPlace( } CPVT_WordPlace CPDF_VariableText::GetUpWordPlace( const CPVT_WordPlace& place, - const CPDF_Point& point) const { + const CFX_FloatPoint& point) const { if (CSection* pSection = m_SectionArray.GetAt(place.nSecIndex)) { CPVT_WordPlace temp = place; - CPDF_Point pt = OutToIn(point); + CFX_FloatPoint pt = OutToIn(point); if (temp.nLineIndex-- > 0) { return pSection->SearchWordPlace( pt.x - pSection->m_SecInfo.rcSection.left, temp); @@ -1200,10 +1200,10 @@ CPVT_WordPlace CPDF_VariableText::GetUpWordPlace( } CPVT_WordPlace CPDF_VariableText::GetDownWordPlace( const CPVT_WordPlace& place, - const CPDF_Point& point) const { + const CFX_FloatPoint& point) const { if (CSection* pSection = m_SectionArray.GetAt(place.nSecIndex)) { CPVT_WordPlace temp = place; - CPDF_Point pt = OutToIn(point); + CFX_FloatPoint pt = OutToIn(point); if (temp.nLineIndex++ < pSection->m_LineArray.GetSize() - 1) { return pSection->SearchWordPlace( pt.x - pSection->m_SecInfo.rcSection.left, temp); @@ -1333,7 +1333,7 @@ FX_BOOL CPDF_VariableText::GetSectionInfo(const CPVT_WordPlace& place, } return FALSE; } -CPDF_Rect CPDF_VariableText::GetContentRect() const { +CFX_FloatRect CPDF_VariableText::GetContentRect() const { return InToOut(CPVT_FloatRect(CPDF_EditContainer::GetContentRect())); } FX_FLOAT CPDF_VariableText::GetWordFontSize(const CPVT_WordInfo& WordInfo, @@ -1753,8 +1753,8 @@ FX_BOOL CPDF_VariableText_Iterator::GetWord(CPVT_Word& word) const { word.nCharset = pWord->nCharset; word.fWidth = m_pVT->GetWordWidth(*pWord); word.ptWord = m_pVT->InToOut( - CPDF_Point(pWord->fWordX + pSection->m_SecInfo.rcSection.left, - pWord->fWordY + pSection->m_SecInfo.rcSection.top)); + CFX_FloatPoint(pWord->fWordX + pSection->m_SecInfo.rcSection.left, + pWord->fWordY + pSection->m_SecInfo.rcSection.top)); word.fAscent = m_pVT->GetWordAscent(*pWord); word.fDescent = m_pVT->GetWordDescent(*pWord); if (pWord->pWordProps) { @@ -1785,7 +1785,7 @@ FX_BOOL CPDF_VariableText_Iterator::GetLine(CPVT_Line& line) const { line.lineplace = CPVT_WordPlace(m_CurPos.nSecIndex, m_CurPos.nLineIndex, -1); if (CSection* pSection = m_pVT->m_SectionArray.GetAt(m_CurPos.nSecIndex)) { if (CLine* pLine = pSection->m_LineArray.GetAt(m_CurPos.nLineIndex)) { - line.ptLine = m_pVT->InToOut(CPDF_Point( + line.ptLine = m_pVT->InToOut(CFX_FloatPoint( pLine->m_LineInfo.fLineX + pSection->m_SecInfo.rcSection.left, pLine->m_LineInfo.fLineY + pSection->m_SecInfo.rcSection.top)); line.fLineWidth = pLine->m_LineInfo.fLineWidth; diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h index 286fad5772..13ec71a125 100644 --- a/core/src/fpdfdoc/pdf_vt.h +++ b/core/src/fpdfdoc/pdf_vt.h @@ -44,7 +44,7 @@ class CPVT_FloatRect : public CFX_FloatRect { right = other_right; bottom = other_bottom; } - explicit CPVT_FloatRect(const CPDF_Rect& rect) { + explicit CPVT_FloatRect(const CFX_FloatRect& rect) { left = rect.left; top = rect.top; right = rect.right; @@ -257,7 +257,7 @@ class CSection { CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const; CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const; void UpdateWordPlace(CPVT_WordPlace& place) const; - CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const; + CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const; CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, const CPVT_WordPlace& lineplace) const; CPVT_WordPlace SearchWordPlace(FX_FLOAT fx, @@ -296,44 +296,46 @@ class CPDF_EditContainer { public: CPDF_EditContainer() : m_rcPlate(0, 0, 0, 0), m_rcContent(0, 0, 0, 0) {} virtual ~CPDF_EditContainer() {} - virtual void SetPlateRect(const CPDF_Rect& rect) { m_rcPlate = rect; } - virtual const CPDF_Rect& GetPlateRect() const { return m_rcPlate; } + virtual void SetPlateRect(const CFX_FloatRect& rect) { m_rcPlate = rect; } + virtual const CFX_FloatRect& GetPlateRect() const { return m_rcPlate; } virtual void SetContentRect(const CPVT_FloatRect& rect) { m_rcContent = rect; } - virtual CPDF_Rect GetContentRect() const { return m_rcContent; } + virtual CFX_FloatRect GetContentRect() const { return m_rcContent; } FX_FLOAT GetPlateWidth() const { return m_rcPlate.right - m_rcPlate.left; } FX_FLOAT GetPlateHeight() const { return m_rcPlate.top - m_rcPlate.bottom; } CPVT_Size GetPlateSize() const { return CPVT_Size(GetPlateWidth(), GetPlateHeight()); } - CPDF_Point GetBTPoint() const { - return CPDF_Point(m_rcPlate.left, m_rcPlate.top); + CFX_FloatPoint GetBTPoint() const { + return CFX_FloatPoint(m_rcPlate.left, m_rcPlate.top); } - CPDF_Point GetETPoint() const { - return CPDF_Point(m_rcPlate.right, m_rcPlate.bottom); + CFX_FloatPoint GetETPoint() const { + return CFX_FloatPoint(m_rcPlate.right, m_rcPlate.bottom); } - inline CPDF_Point InToOut(const CPDF_Point& point) const { - return CPDF_Point(point.x + GetBTPoint().x, GetBTPoint().y - point.y); + inline CFX_FloatPoint InToOut(const CFX_FloatPoint& point) const { + return CFX_FloatPoint(point.x + GetBTPoint().x, GetBTPoint().y - point.y); } - inline CPDF_Point OutToIn(const CPDF_Point& point) const { - return CPDF_Point(point.x - GetBTPoint().x, GetBTPoint().y - point.y); + inline CFX_FloatPoint OutToIn(const CFX_FloatPoint& point) const { + return CFX_FloatPoint(point.x - GetBTPoint().x, GetBTPoint().y - point.y); } - inline CPDF_Rect InToOut(const CPVT_FloatRect& rect) const { - CPDF_Point ptLeftTop = InToOut(CPDF_Point(rect.left, rect.top)); - CPDF_Point ptRightBottom = InToOut(CPDF_Point(rect.right, rect.bottom)); - return CPDF_Rect(ptLeftTop.x, ptRightBottom.y, ptRightBottom.x, - ptLeftTop.y); + inline CFX_FloatRect InToOut(const CPVT_FloatRect& rect) const { + CFX_FloatPoint ptLeftTop = InToOut(CFX_FloatPoint(rect.left, rect.top)); + CFX_FloatPoint ptRightBottom = + InToOut(CFX_FloatPoint(rect.right, rect.bottom)); + return CFX_FloatRect(ptLeftTop.x, ptRightBottom.y, ptRightBottom.x, + ptLeftTop.y); } - inline CPVT_FloatRect OutToIn(const CPDF_Rect& rect) const { - CPDF_Point ptLeftTop = OutToIn(CPDF_Point(rect.left, rect.top)); - CPDF_Point ptRightBottom = OutToIn(CPDF_Point(rect.right, rect.bottom)); + inline CPVT_FloatRect OutToIn(const CFX_FloatRect& rect) const { + CFX_FloatPoint ptLeftTop = OutToIn(CFX_FloatPoint(rect.left, rect.top)); + CFX_FloatPoint ptRightBottom = + OutToIn(CFX_FloatPoint(rect.right, rect.bottom)); return CPVT_FloatRect(ptLeftTop.x, ptLeftTop.y, ptRightBottom.x, ptRightBottom.y); } private: - CPDF_Rect m_rcPlate; + CFX_FloatRect m_rcPlate; CPVT_FloatRect m_rcContent; }; @@ -350,7 +352,7 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer { IPDF_VariableText_Provider* SetProvider( IPDF_VariableText_Provider* pProvider) override; IPDF_VariableText_Iterator* GetIterator() override; - void SetPlateRect(const CPDF_Rect& rect) override { + void SetPlateRect(const CFX_FloatRect& rect) override { CPDF_EditContainer::SetPlateRect(rect); } void SetAlignment(int32_t nFormat = 0) override { m_nAlignment = nFormat; } @@ -407,10 +409,10 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer { CPVT_WordPlace DeleteWords(const CPVT_WordRange& PlaceRange) override; CPVT_WordPlace DeleteWord(const CPVT_WordPlace& place) override; CPVT_WordPlace BackSpaceWord(const CPVT_WordPlace& place) override; - const CPDF_Rect& GetPlateRect() const override { + const CFX_FloatRect& GetPlateRect() const override { return CPDF_EditContainer::GetPlateRect(); } - CPDF_Rect GetContentRect() const override; + CFX_FloatRect GetContentRect() const override; int32_t GetTotalWords() const override; FX_FLOAT GetFontSize() const override { return m_fFontSize; } int32_t GetAlignment() const override { return m_nAlignment; } @@ -424,11 +426,11 @@ class CPDF_VariableText : public IPDF_VariableText, private CPDF_EditContainer { CPVT_WordPlace GetEndWordPlace() const override; CPVT_WordPlace GetPrevWordPlace(const CPVT_WordPlace& place) const override; CPVT_WordPlace GetNextWordPlace(const CPVT_WordPlace& place) const override; - CPVT_WordPlace SearchWordPlace(const CPDF_Point& point) const override; + CPVT_WordPlace SearchWordPlace(const CFX_FloatPoint& point) const override; CPVT_WordPlace GetUpWordPlace(const CPVT_WordPlace& place, - const CPDF_Point& point) const override; + const CFX_FloatPoint& point) const override; CPVT_WordPlace GetDownWordPlace(const CPVT_WordPlace& place, - const CPDF_Point& point) const override; + const CFX_FloatPoint& point) const override; CPVT_WordPlace GetLineBeginPlace(const CPVT_WordPlace& place) const override; CPVT_WordPlace GetLineEndPlace(const CPVT_WordPlace& place) const override; CPVT_WordPlace GetSectionBeginPlace( |