diff options
author | tsepez <tsepez@chromium.org> | 2016-04-14 13:42:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 13:42:44 -0700 |
commit | 8e4c505ff6d82263183e9f812fcc7b45c1414f15 (patch) | |
tree | 765e0f3a18f9ad60dde74431846d770fecdcdb37 /xfa/fxfa/parser | |
parent | 3bac505132235c009b4b79aa4ac238afad5366e8 (diff) | |
download | pdfium-8e4c505ff6d82263183e9f812fcc7b45c1414f15.tar.xz |
Rename CFX_ByteTextBuf::GetByteString() to AsStringC().
Do the same for CFX_WideTextBuf as well.
The name is confusing because these return CFX_ByteStringC,
not CFX_ByteString. The AsStringC naming gives parallelism with
the string types themselves, and may help to indicate that
the result is only good for the lifetime of the object being
operated upon.
Review URL: https://codereview.chromium.org/1886263003
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/xfa_document_serialize.cpp | 10 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_parser_imp.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/xfa_document_serialize.cpp b/xfa/fxfa/parser/xfa_document_serialize.cpp index 87707d84e6..3c06afaf4a 100644 --- a/xfa/fxfa/parser/xfa_document_serialize.cpp +++ b/xfa/fxfa/parser/xfa_document_serialize.cpp @@ -94,7 +94,7 @@ CFX_WideString XFA_ExportEncodeAttribute(const CFX_WideString& str) { textBuf.AppendChar(str[i]); } } - return textBuf.GetWideString(); + return textBuf.AsStringC(); } CFX_WideString XFA_ExportEncodeContent(const CFX_WideStringC& str) { CFX_WideTextBuf textBuf; @@ -124,7 +124,7 @@ CFX_WideString XFA_ExportEncodeContent(const CFX_WideStringC& str) { textBuf.AppendChar(str.GetAt(i)); } } - return textBuf.GetWideString(); + return textBuf.AsStringC(); } static void XFA_SaveAttribute(CXFA_Node* pNode, XFA_ATTRIBUTE eName, @@ -303,7 +303,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( buf << FX_WSTRC(L"</"); buf << bodyTagName; buf << FX_WSTRC(L"\n>"); - wsChildren += buf.GetWideString(); + wsChildren += buf.AsStringC(); buf.Clear(); } else { CFX_WideStringC wsValue = pRawValueNode->GetCData(XFA_ATTRIBUTE_Value); @@ -330,7 +330,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( while (pChildNode) { XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf, bSaveXML); - wsChildren += newBuf.GetWideString(); + wsChildren += newBuf.AsStringC(); newBuf.Clear(); pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); } @@ -342,7 +342,7 @@ static void XFA_DataExporter_RegenerateFormFile_Changed( while (pChildNode) { XFA_DataExporter_RegenerateFormFile_Changed(pChildNode, newBuf, bSaveXML); - wsChildren += newBuf.GetWideString(); + wsChildren += newBuf.AsStringC(); newBuf.Clear(); pChildNode = pChildNode->GetNodeItem(XFA_NODEITEM_NextSibling); } diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index 002197c55d..75ccb1122a 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -1248,7 +1248,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, } else { bMarkAsCompound = TRUE; if (pXMLCurValueNode) { - CFX_WideStringC wsCurValue = wsCurValueTextBuf.GetWideString(); + CFX_WideStringC wsCurValue = wsCurValueTextBuf.AsStringC(); if (!wsCurValue.IsEmpty()) { CXFA_Node* pXFAChild = m_pFactory->CreateNode(ePacketID, XFA_ELEMENT_DataValue); @@ -1282,7 +1282,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, } } if (pXMLCurValueNode) { - CFX_WideStringC wsCurValue = wsCurValueTextBuf.GetWideString(); + CFX_WideStringC wsCurValue = wsCurValueTextBuf.AsStringC(); if (!wsCurValue.IsEmpty()) { if (bMarkAsCompound) { CXFA_Node* pXFAChild = @@ -1301,7 +1301,7 @@ void CXFA_SimpleParser::ParseDataValue(CXFA_Node* pXFANode, } pXMLCurValueNode = nullptr; } - CFX_WideStringC wsNodeValue = wsValueTextBuf.GetWideString(); + CFX_WideStringC wsNodeValue = wsValueTextBuf.AsStringC(); pXFANode->SetCData(XFA_ATTRIBUTE_Value, wsNodeValue); } |