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 "../../include/fpdfapi/fpdf_resource.h" | 7 #include "../../include/fpdfapi/fpdf_resource.h" |
8 #include "../../include/fpdfapi/fpdf_pageobj.h" | 8 #include "../../include/fpdfapi/fpdf_pageobj.h" |
9 #include "../../include/fpdftext/fpdf_text.h" | 9 #include "../../include/fpdftext/fpdf_text.h" |
10 #include "../../include/fpdfapi/fpdf_page.h" | 10 #include "../../include/fpdfapi/fpdf_page.h" |
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1880 FX_INT32 i, j; | 1880 FX_INT32 i, j; |
1881 i = iCharListStartAppend; | 1881 i = iCharListStartAppend; |
1882 j = m_TempCharList.GetSize() - 1; | 1882 j = m_TempCharList.GetSize() - 1; |
1883 for (; i < j; i++, j--) { | 1883 for (; i < j; i++, j--) { |
1884 std::swap(m_TempCharList[i], m_TempCharList[j]); | 1884 std::swap(m_TempCharList[i], m_TempCharList[j]); |
1885 std::swap(m_TempCharList[i].m_Index, m_TempCharList[j].m_Index); | 1885 std::swap(m_TempCharList[i].m_Index, m_TempCharList[j].m_Index); |
1886 } | 1886 } |
1887 FX_WCHAR * pTempBuffer = m_TempTextBuf.GetBuffer(); | 1887 FX_WCHAR * pTempBuffer = m_TempTextBuf.GetBuffer(); |
1888 i = iBufStartAppend; | 1888 i = iBufStartAppend; |
1889 j = m_TempTextBuf.GetLength() - 1; | 1889 j = m_TempTextBuf.GetLength() - 1; |
1890 FX_WCHAR wTemp; | |
1891 for (; i < j; i++, j--) { | 1890 for (; i < j; i++, j--) { |
1892 std::swap(pTempBuffer[i], pTempBuffer[j]); | 1891 std::swap(pTempBuffer[i], pTempBuffer[j]); |
1893 } | 1892 } |
1894 } | 1893 } |
1895 } | 1894 } |
1896 FX_INT32 CPDF_TextPage::GetTextObjectWritingMode(const CPDF_TextObject* pTextObj
) | 1895 FX_INT32 CPDF_TextPage::GetTextObjectWritingMode(const CPDF_TextObject* pTextObj
) |
1897 { | 1896 { |
1898 FX_INT32 nChars = pTextObj->CountChars(); | 1897 FX_INT32 nChars = pTextObj->CountChars(); |
1899 if (nChars == 1) { | 1898 if (nChars == 1) { |
1900 return m_TextlineDir; | 1899 return m_TextlineDir; |
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2840 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) { | 2839 if (!m_IsParserd || index < 0 || index >= m_LinkList.GetSize()) { |
2841 return; | 2840 return; |
2842 } | 2841 } |
2843 CPDF_LinkExt* link = NULL; | 2842 CPDF_LinkExt* link = NULL; |
2844 link = m_LinkList.GetAt(index); | 2843 link = m_LinkList.GetAt(index); |
2845 if (!link) { | 2844 if (!link) { |
2846 return ; | 2845 return ; |
2847 } | 2846 } |
2848 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); | 2847 m_pTextPage->GetRectArray(link->m_Start, link->m_Count, rects); |
2849 } | 2848 } |
OLD | NEW |