Merge to XFA: Remove typdefs for pointer types in fx_system.h.
[pdfium.git] / xfa / src / fxfa / src / app / xfa_textlayout.cpp
index 3043b77..75b6d3c 100644 (file)
@@ -118,11 +118,12 @@ void CXFA_TextParser::InitCSSData(IXFA_TextProvider *pTextProvider)
 }\r
 IFDE_CSSStyleSheet*    CXFA_TextParser::LoadDefaultSheetStyle()\r
 {\r
-    static const FX_LPCWSTR s_pStyle = L"html,body,ol,p,ul{display:block}"\r
-                                       L"li{display:list-item}"\r
-                                       L"ol,ul{padding-left:33px}ol{list-style-type:decimal}ol,ul{margin-top:0;margin-bottom:0}ul,ol{margin:1.12em 0}"\r
-                                       L"a{color:#0000ff;text-decoration:underline}b{font-weight:bolder}i{font-style:italic}"\r
-                                       L"sup{vertical-align:+15em;font-size:.66em}sub{vertical-align:-15em;font-size:.66em}";\r
+    static const FX_WCHAR s_pStyle[] =\r
+            L"html,body,ol,p,ul{display:block}"\r
+            L"li{display:list-item}"\r
+            L"ol,ul{padding-left:33px}ol{list-style-type:decimal}ol,ul{margin-top:0;margin-bottom:0}ul,ol{margin:1.12em 0}"\r
+            L"a{color:#0000ff;text-decoration:underline}b{font-weight:bolder}i{font-style:italic}"\r
+            L"sup{vertical-align:+15em;font-size:.66em}sub{vertical-align:-15em;font-size:.66em}";\r
     return IFDE_CSSStyleSheet::LoadFromBuffer(CFX_WideString(), s_pStyle, FXSYS_wcslen(s_pStyle), FX_CODEPAGE_UTF8);\r
 }\r
 IFDE_CSSComputedStyle* CXFA_TextParser::CreateRootStyle(IXFA_TextProvider *pTextProvider)\r
@@ -573,7 +574,7 @@ FX_BOOL CXFA_TextParser::GetTabstops(IFDE_CSSComputedStyle *pStyle, CXFA_TextTab
         return FALSE;\r
     }\r
     int32_t iLength = wsValue.GetLength();\r
-    FX_LPCWSTR pTabStops = wsValue;\r
+    const FX_WCHAR* pTabStops = wsValue;\r
     int32_t iCur = 0;\r
     int32_t iLast = 0;\r
     CFX_WideString wsAlign;\r
@@ -1408,7 +1409,7 @@ FX_BOOL    CXFA_TextLayout::LoadRichText(IFDE_XMLNode *pXMLNode, const CFX_SizeF &
                 } else if (wsName == FX_WSTRC(L"li")) {\r
                     bCurLi = TRUE;\r
                     if (bIsOl) {\r
-                        wsText.Format(FX_LPCWSTR(L"%d.  "), iLiCount);\r
+                        wsText.Format(L"%d.  ", iLiCount);\r
                     } else {\r
                         wsText = 0x00B7 + FX_WSTRC(L"  ");\r
                     }\r
@@ -1571,7 +1572,7 @@ void CXFA_TextLayout::ProcessText(CFX_WideString &wsText)
     if (iLen == 0) {\r
         return;\r
     }\r
-    FX_LPWSTR psz = wsText.GetBuffer(iLen);\r
+    FX_WCHAR* psz = wsText.GetBuffer(iLen);\r
     int32_t iTrimLeft = 0;\r
     FX_WCHAR wch = 0, wPrev = 0;\r
     for (int32_t i = 0; i < iLen; i++) {\r
@@ -1671,7 +1672,7 @@ void CXFA_TextLayout::AppendTextLine(FX_DWORD dwStatus, FX_FLOAT &fLinePos, FX_B
             }\r
             FX_FLOAT fVerScale = pPiece->m_iVerticalScale / 100.0f;\r
             XFA_LPTEXTPIECE pTP = (XFA_LPTEXTPIECE)m_pAllocator->Alloc(sizeof(XFA_TEXTPIECE));\r
-            pTP->pszText = (FX_LPWSTR)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_WCHAR));\r
+            pTP->pszText = (FX_WCHAR*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(FX_WCHAR));\r
             pTP->pWidths = (int32_t*)m_pAllocator->Alloc(pPiece->m_iChars * sizeof(int32_t));\r
             pTP->iChars = pPiece->m_iChars;\r
             pPiece->GetString(pTP->pszText);\r