diff options
author | tsepez <tsepez@chromium.org> | 2016-05-13 17:51:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-13 17:51:27 -0700 |
commit | 71a452f8ce12e31cc4e0d8c7878567b0c7fc63c2 (patch) | |
tree | a0ee545eb67b14f9398df98196d88e5150893ce8 /fpdfsdk | |
parent | afe94306e3c542f0d499e7f7706ee5dec4028d8a (diff) | |
download | pdfium-71a452f8ce12e31cc4e0d8c7878567b0c7fc63c2.tar.xz |
Make CFX_ByteString(const CFX_ByteStringC&) explicit.
Add missing helper function to CFX_ByteTextBuf to avoid the
anti-pattern CFX_ByteString(sBuf.AsStringC()), using the name
"Make" to indicate there's an allocation going on in this case.
Change some method arguments to take pre-existing ByteStrings where
possible.
Review-Url: https://codereview.chromium.org/1977093002
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/formfiller/cba_fontmap.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/fpdf_transformpage.cpp | 24 | ||||
-rw-r--r-- | fpdfsdk/fpdfppo.cpp | 15 | ||||
-rw-r--r-- | fpdfsdk/fxedit/fxet_ap.cpp | 15 | ||||
-rw-r--r-- | fpdfsdk/fxedit/fxet_pageobjs.cpp | 22 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Caret.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Edit.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Icon.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Label.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Utils.cpp | 49 |
10 files changed, 63 insertions, 78 deletions
diff --git a/fpdfsdk/formfiller/cba_fontmap.cpp b/fpdfsdk/formfiller/cba_fontmap.cpp index 00e213c7d7..4c74d5a242 100644 --- a/fpdfsdk/formfiller/cba_fontmap.cpp +++ b/fpdfsdk/formfiller/cba_fontmap.cpp @@ -167,7 +167,7 @@ void CBA_FontMap::AddFontToAnnotDict(CPDF_Font* pFont, if (!pStream) { pStream = new CPDF_Stream(NULL, 0, NULL); int32_t objnum = m_pDocument->AddIndirectObject(pStream); - pAPDict->SetAtReference(m_sAPType.AsStringC(), m_pDocument, objnum); + pAPDict->SetAtReference(m_sAPType, m_pDocument, objnum); } CPDF_Dictionary* pStreamDict = pStream->GetDict(); @@ -223,7 +223,7 @@ CPDF_Font* CBA_FontMap::GetAnnotDefaultFont(CFX_ByteString& sAlias) { if (!sDA.IsEmpty()) { CPDF_SimpleParser syntax(sDA.AsStringC()); syntax.FindTagParamFromStart("Tf", 2); - CFX_ByteString sFontName = syntax.GetWord(); + CFX_ByteString sFontName(syntax.GetWord()); sAlias = PDF_NameDecode(sFontName).Mid(1); if (CPDF_Dictionary* pDRDict = m_pAnnotDict->GetDictBy("DR")) diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index d47cb02b1d..5fe6e4ebcc 100644 --- a/fpdfsdk/fpdf_transformpage.cpp +++ b/fpdfsdk/fpdf_transformpage.cpp @@ -20,36 +20,34 @@ namespace { void SetBoundingBox(CPDF_Page* page, - const CFX_ByteStringC& key, + const CFX_ByteString& key, float left, float bottom, float right, float top) { - CPDF_Dictionary* pPageDict = page->m_pFormDict; CPDF_Array* pBoundingBoxArray = new CPDF_Array; pBoundingBoxArray->Add(new CPDF_Number(left)); pBoundingBoxArray->Add(new CPDF_Number(bottom)); pBoundingBoxArray->Add(new CPDF_Number(right)); pBoundingBoxArray->Add(new CPDF_Number(top)); - pPageDict->SetAt(key, pBoundingBoxArray); + page->m_pFormDict->SetAt(key, pBoundingBoxArray); } -FPDF_BOOL GetBoundingBox(CPDF_Page* page, - const CFX_ByteStringC& key, - float* left, - float* bottom, - float* right, - float* top) { - CPDF_Dictionary* pPageDict = page->m_pFormDict; - CPDF_Array* pArray = pPageDict->GetArrayBy(key); +bool GetBoundingBox(CPDF_Page* page, + const CFX_ByteString& key, + float* left, + float* bottom, + float* right, + float* top) { + CPDF_Array* pArray = page->m_pFormDict->GetArrayBy(key); if (!pArray) - return FALSE; + return false; *left = pArray->GetFloatAt(0); *bottom = pArray->GetFloatAt(1); *right = pArray->GetFloatAt(2); *top = pArray->GetFloatAt(3); - return TRUE; + return true; } } // namespace diff --git a/fpdfsdk/fpdfppo.cpp b/fpdfsdk/fpdfppo.cpp index 1ec968ddf4..97fd390cb3 100644 --- a/fpdfsdk/fpdfppo.cpp +++ b/fpdfsdk/fpdfppo.cpp @@ -32,7 +32,7 @@ class CPDF_PageOrganizer { CPDF_Document* pDestPDFDoc, int nIndex); CPDF_Object* PageDictGetInheritableTag(CPDF_Dictionary* pDict, - CFX_ByteString nSrctag); + const CFX_ByteString& bsSrctag); FX_BOOL UpdateReference(CPDF_Object* pObj, CPDF_Document* pDoc, ObjectNumberMap* pObjNumberMap); @@ -175,8 +175,8 @@ FX_BOOL CPDF_PageOrganizer::ExportPage(CPDF_Document* pSrcPDFDoc, CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag( CPDF_Dictionary* pDict, - CFX_ByteString nSrctag) { - if (!pDict || nSrctag.IsEmpty()) + const CFX_ByteString& bsSrcTag) { + if (!pDict || bsSrcTag.IsEmpty()) return nullptr; if (!pDict->KeyExist("Parent") || !pDict->KeyExist("Type")) return nullptr; @@ -191,13 +191,12 @@ CPDF_Object* CPDF_PageOrganizer::PageDictGetInheritableTag( if (!pp) return nullptr; - CFX_ByteStringC sSrcTag = nSrctag.AsStringC(); - if (pDict->KeyExist(sSrcTag)) - return pDict->GetObjectBy(sSrcTag); + if (pDict->KeyExist(bsSrcTag)) + return pDict->GetObjectBy(bsSrcTag); while (pp) { - if (pp->KeyExist(sSrcTag)) - return pp->GetObjectBy(sSrcTag); + if (pp->KeyExist(bsSrcTag)) + return pp->GetObjectBy(bsSrcTag); if (!pp->KeyExist("Parent")) break; pp = ToDictionary(pp->GetObjectBy("Parent")->GetDirect()); diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp index 262f1e70cd..563acb65b5 100644 --- a/fpdfsdk/fxedit/fxet_ap.cpp +++ b/fpdfsdk/fxedit/fxet_ap.cpp @@ -48,15 +48,12 @@ static CFX_ByteString GetFontSetString(IPVT_FontMap* pFontMap, int32_t nFontIndex, FX_FLOAT fFontSize) { CFX_ByteTextBuf sRet; - if (pFontMap) { CFX_ByteString sFontAlias = pFontMap->GetPDFFontAlias(nFontIndex); - if (sFontAlias.GetLength() > 0 && fFontSize > 0) sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n"; } - - return sRet.AsStringC(); + return sRet.MakeString(); } CFX_ByteString IFX_Edit::GetEditAppearanceStream( @@ -87,7 +84,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( if (bContinuous) { if (place.LineCmp(oldplace) != 0) { if (sWords.GetSize() > 0) { - sEditStream << GetWordRenderString(sWords.AsStringC()); + sEditStream << GetWordRenderString(sWords.MakeString()); sWords.Clear(); } @@ -114,7 +111,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( if (pIterator->GetWord(word)) { if (word.nFontIndex != nCurFontIndex) { if (sWords.GetSize() > 0) { - sEditStream << GetWordRenderString(sWords.AsStringC()); + sEditStream << GetWordRenderString(sWords.MakeString()); sWords.Clear(); } sEditStream << GetFontSetString(pEdit->GetFontMap(), word.nFontIndex, @@ -152,7 +149,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( } if (sWords.GetSize() > 0) { - sEditStream << GetWordRenderString(sWords.AsStringC()); + sEditStream << GetWordRenderString(sWords.MakeString()); sWords.Clear(); } @@ -171,7 +168,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream( sAppStream << sEditStream; } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CFX_ByteString IFX_Edit::GetSelectAppearanceStream( @@ -200,5 +197,5 @@ CFX_ByteString IFX_Edit::GetSelectAppearanceStream( } } - return sRet.AsStringC(); + return sRet.MakeString(); } diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp index 1fe29af283..e8d9e2a371 100644 --- a/fpdfsdk/fxedit/fxet_pageobjs.cpp +++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp @@ -228,7 +228,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, - sTextBuf.AsStringC(), crOldFill, crTextStroke, nHorzScale); + sTextBuf.MakeString(), crOldFill, crTextStroke, nHorzScale); sTextBuf.Clear(); } @@ -253,10 +253,10 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice, } if (sTextBuf.GetLength() > 0) { - DrawTextString(pDevice, - CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), - pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, - sTextBuf.AsStringC(), crOldFill, crTextStroke, nHorzScale); + DrawTextString( + pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), + pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device, + sTextBuf.MakeString(), crOldFill, crTextStroke, nHorzScale); } } @@ -340,7 +340,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, pUser2Device, - sTextBuf.AsStringC(), crOld, 0, wp.nHorzScale); + sTextBuf.MakeString(), crOld, 0, wp.nHorzScale); sTextBuf.Clear(); } @@ -381,7 +381,7 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice, DrawTextString( pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, pUser2Device, - sTextBuf.AsStringC(), crOld, 0, wp.nHorzScale); + sTextBuf.MakeString(), crOld, 0, wp.nHorzScale); } } @@ -483,7 +483,7 @@ void IFX_Edit::GeneratePageObjects( pObjectHolder, crText, pFontMap->GetPDFFont(nOldFontIndex), fFontSize, 0.0f, 100, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), - sTextBuf.AsStringC())); + sTextBuf.MakeString())); sTextBuf.Clear(); } @@ -502,7 +502,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), - sTextBuf.AsStringC())); + sTextBuf.MakeString())); } } } @@ -551,7 +551,7 @@ void IFX_Edit::GenerateRichPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), - sTextBuf.AsStringC())); + sTextBuf.MakeString())); sTextBuf.Clear(); } @@ -594,7 +594,7 @@ void IFX_Edit::GenerateRichPageObjects( pObjectHolder, crOld, pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize, wp.fCharSpace, wp.nHorzScale, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y), - sTextBuf.AsStringC())); + sTextBuf.MakeString())); } } } diff --git a/fpdfsdk/pdfwindow/PWL_Caret.cpp b/fpdfsdk/pdfwindow/PWL_Caret.cpp index 88ce429c85..a5728ceac8 100644 --- a/fpdfsdk/pdfwindow/PWL_Caret.cpp +++ b/fpdfsdk/pdfwindow/PWL_Caret.cpp @@ -95,7 +95,7 @@ CFX_ByteString CPWL_Caret::GetCaretAppearanceStream( const CFX_FloatPoint& ptOffset) { CFX_ByteTextBuf sCaret; GetCaretApp(sCaret, ptOffset); - return sCaret.AsStringC(); + return sCaret.MakeString(); } void CPWL_Caret::TimerProc() { diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index 80aa629a06..ae95570d6c 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -503,13 +503,11 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream( const CFX_FloatPoint& ptOffset) const { CFX_ByteTextBuf sRet; CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); - if (sEdit.GetLength() > 0) { sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() << sEdit.AsStringC() << "ET\n"; } - - return sRet.AsStringC(); + return sRet.MakeString(); } CFX_ByteString CPWL_Edit::GetCaretAppearanceStream( diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp index 08ba970225..cfd62dfcd9 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp @@ -46,7 +46,7 @@ CFX_ByteString CPWL_Image::GetImageAppStream() { << "Q\n"; } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } void CPWL_Image::SetPDFStream(CPDF_Stream* pStream) { diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp index 7abeb0d558..203ec49e0f 100644 --- a/fpdfsdk/pdfwindow/PWL_Label.cpp +++ b/fpdfsdk/pdfwindow/PWL_Label.cpp @@ -123,13 +123,11 @@ CFX_ByteString CPWL_Label::GetTextAppearanceStream( const CFX_FloatPoint& ptOffset) const { CFX_ByteTextBuf sRet; CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); - if (sEdit.GetLength() > 0) { sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() << sEdit.AsStringC() << "ET\n"; } - - return sRet.AsStringC(); + return sRet.MakeString(); } CFX_WideString CPWL_Label::GetText() const { diff --git a/fpdfsdk/pdfwindow/PWL_Utils.cpp b/fpdfsdk/pdfwindow/PWL_Utils.cpp index 2e60471927..60949abd4e 100644 --- a/fpdfsdk/pdfwindow/PWL_Utils.cpp +++ b/fpdfsdk/pdfwindow/PWL_Utils.cpp @@ -44,7 +44,7 @@ CFX_ByteString CPWL_Utils::GetAppStreamFromArray(const CPWL_PathData* pPathData, } } - return csAP.AsStringC(); + return csAP.MakeString(); } void CPWL_Utils::GetPathDataFromArray(CFX_PathData& path, @@ -185,7 +185,7 @@ CFX_ByteString CPWL_Utils::GetAP_Check(const CFX_FloatRect& crBBox) { << pts[nNext][0].y << " c\n"; } - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_Circle(const CFX_FloatRect& crBBox) { @@ -227,7 +227,7 @@ CFX_ByteString CPWL_Utils::GetAP_Circle(const CFX_FloatRect& crBBox) { csAP << pt4.x - px * FX_BEZIER << " " << pt4.y << " " << pt1.x << " " << pt1.y - py * FX_BEZIER << " " << pt1.x << " " << pt1.y << " c\n"; - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_Cross(const CFX_FloatRect& crBBox) { @@ -238,7 +238,7 @@ CFX_ByteString CPWL_Utils::GetAP_Cross(const CFX_FloatRect& crBBox) { csAP << crBBox.left << " " << crBBox.bottom << " m\n"; csAP << crBBox.right << " " << crBBox.top << " l\n"; - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_Diamond(const CFX_FloatRect& crBBox) { @@ -258,7 +258,7 @@ CFX_ByteString CPWL_Utils::GetAP_Diamond(const CFX_FloatRect& crBBox) { csAP << pt4.x << " " << pt4.y << " l\n"; csAP << pt1.x << " " << pt1.y << " l\n"; - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_Square(const CFX_FloatRect& crBBox) { @@ -270,7 +270,7 @@ CFX_ByteString CPWL_Utils::GetAP_Square(const CFX_FloatRect& crBBox) { csAP << crBBox.left << " " << crBBox.bottom << " l\n"; csAP << crBBox.left << " " << crBBox.top << " l\n"; - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_Star(const CFX_FloatRect& crBBox) { @@ -302,7 +302,7 @@ CFX_ByteString CPWL_Utils::GetAP_Star(const CFX_FloatRect& crBBox) { csAP << px[nNext] << " " << py[nNext] << " l\n"; } - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CFX_FloatRect& crBBox, @@ -337,7 +337,7 @@ CFX_ByteString CPWL_Utils::GetAP_HalfCircle(const CFX_FloatRect& crBBox, csAP << pt2.x + px * FX_BEZIER << " " << pt2.y << " " << pt3.x << " " << pt3.y + py * FX_BEZIER << " " << pt3.x << " " << pt3.y << " c\n"; - return csAP.AsStringC(); + return csAP.MakeString(); } CFX_FloatRect CPWL_Utils::InflateRect(const CFX_FloatRect& rcRect, @@ -378,7 +378,6 @@ CFX_FloatRect CPWL_Utils::ScaleRect(const CFX_FloatRect& rcRect, CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect, const CPWL_Color& color) { CFX_ByteTextBuf sAppStream; - CFX_ByteString sColor = GetColorAppStream(color, TRUE); if (sColor.GetLength() > 0) { sAppStream << "q\n" << sColor; @@ -387,19 +386,17 @@ CFX_ByteString CPWL_Utils::GetRectFillAppStream(const CFX_FloatRect& rect, << " re f\nQ\n"; } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CFX_ByteString CPWL_Utils::GetCircleFillAppStream(const CFX_FloatRect& rect, const CPWL_Color& color) { CFX_ByteTextBuf sAppStream; - CFX_ByteString sColor = GetColorAppStream(color, TRUE); if (sColor.GetLength() > 0) { sAppStream << "q\n" << sColor << CPWL_Utils::GetAP_Circle(rect) << "f\nQ\n"; } - - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CFX_FloatRect CPWL_Utils::GetCenterSquare(const CFX_FloatRect& rect) { @@ -462,7 +459,7 @@ CFX_ByteString CPWL_Utils::GetTextAppStream(const CFX_FloatRect& rcBBox, sRet << "BT\n" << CPWL_Utils::GetColorAppStream(crText) << sEdit << "ET\n"; IFX_Edit::DelEdit(pEdit); - return sRet.AsStringC(); + return sRet.MakeString(); } CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox, @@ -678,7 +675,6 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox, } IFX_Edit::DelEdit(pEdit); - if (sTemp.GetSize() > 0) { sAppStream << "q\n" << rcBBox.left << " " << rcBBox.bottom << " " @@ -686,8 +682,7 @@ CFX_ByteString CPWL_Utils::GetPushButtonAppStream(const CFX_FloatRect& rcBBox, << rcBBox.top - rcBBox.bottom << " re W n\n"; sAppStream << sTemp << "Q\n"; } - - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color& color, @@ -711,7 +706,7 @@ CFX_ByteString CPWL_Utils::GetColorAppStream(const CPWL_Color& color, break; } - return sColorStream.AsStringC(); + return sColorStream.MakeString(); } CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect, @@ -827,7 +822,7 @@ CFX_ByteString CPWL_Utils::GetBorderAppStream(const CFX_FloatRect& rect, sAppStream << "Q\n"; } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CFX_ByteString CPWL_Utils::GetCircleBorderAppStream( @@ -926,7 +921,7 @@ CFX_ByteString CPWL_Utils::GetCircleBorderAppStream( sAppStream << "Q\n"; } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } CPWL_Color CPWL_Utils::SubstractColor(const CPWL_Color& sColor, @@ -985,7 +980,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Check(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE) << CPWL_Utils::GetAP_Check(rcBBox) << "f\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox, @@ -993,7 +988,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Circle(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE) << CPWL_Utils::GetAP_Circle(rcBBox) << "f\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox, @@ -1001,7 +996,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Cross(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, FALSE) << CPWL_Utils::GetAP_Cross(rcBBox) << "S\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox, @@ -1009,7 +1004,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Diamond(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n1 w\n" << CPWL_Utils::GetColorAppStream(crText, TRUE) << CPWL_Utils::GetAP_Diamond(rcBBox) << "f\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox, @@ -1017,7 +1012,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Square(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE) << CPWL_Utils::GetAP_Square(rcBBox) << "f\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox, @@ -1025,7 +1020,7 @@ CFX_ByteString CPWL_Utils::GetAppStream_Star(const CFX_FloatRect& rcBBox, CFX_ByteTextBuf sAP; sAP << "q\n" << CPWL_Utils::GetColorAppStream(crText, TRUE) << CPWL_Utils::GetAP_Star(rcBBox) << "f\nQ\n"; - return sAP.AsStringC(); + return sAP.MakeString(); } CFX_ByteString CPWL_Utils::GetCheckBoxAppStream(const CFX_FloatRect& rcBBox, @@ -1104,7 +1099,7 @@ CFX_ByteString CPWL_Utils::GetDropButtonAppStream(const CFX_FloatRect& rcBBox) { } } - return sAppStream.AsStringC(); + return sAppStream.MakeString(); } void CPWL_Utils::ConvertCMYK2GRAY(FX_FLOAT dC, |