summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-14 13:42:44 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-14 13:42:44 -0700
commit8e4c505ff6d82263183e9f812fcc7b45c1414f15 (patch)
tree765e0f3a18f9ad60dde74431846d770fecdcdb37 /fpdfsdk/fxedit
parent3bac505132235c009b4b79aa4ac238afad5366e8 (diff)
downloadpdfium-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 'fpdfsdk/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_ap.cpp12
-rw-r--r--fpdfsdk/fxedit/fxet_pageobjs.cpp32
2 files changed, 22 insertions, 22 deletions
diff --git a/fpdfsdk/fxedit/fxet_ap.cpp b/fpdfsdk/fxedit/fxet_ap.cpp
index cafce2eb04..1a36c803da 100644
--- a/fpdfsdk/fxedit/fxet_ap.cpp
+++ b/fpdfsdk/fxedit/fxet_ap.cpp
@@ -56,7 +56,7 @@ static CFX_ByteString GetFontSetString(IPVT_FontMap* pFontMap,
sRet << "/" << sFontAlias << " " << fFontSize << " Tf\n";
}
- return sRet.GetByteString();
+ return sRet.AsStringC();
}
CFX_ByteString IFX_Edit::GetEditAppearanceStream(
@@ -87,7 +87,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(
if (bContinuous) {
if (place.LineCmp(oldplace) != 0) {
if (sWords.GetSize() > 0) {
- sEditStream << GetWordRenderString(sWords.GetByteString());
+ sEditStream << GetWordRenderString(sWords.AsStringC());
sWords.Clear();
}
@@ -114,7 +114,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(
if (pIterator->GetWord(word)) {
if (word.nFontIndex != nCurFontIndex) {
if (sWords.GetSize() > 0) {
- sEditStream << GetWordRenderString(sWords.GetByteString());
+ sEditStream << GetWordRenderString(sWords.AsStringC());
sWords.Clear();
}
sEditStream << GetFontSetString(pEdit->GetFontMap(),
@@ -152,7 +152,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(
}
if (sWords.GetSize() > 0) {
- sEditStream << GetWordRenderString(sWords.GetByteString());
+ sEditStream << GetWordRenderString(sWords.AsStringC());
sWords.Clear();
}
}
@@ -172,7 +172,7 @@ CFX_ByteString IFX_Edit::GetEditAppearanceStream(
sAppStream << sEditStream;
}
- return sAppStream.GetByteString();
+ return sAppStream.AsStringC();
}
CFX_ByteString IFX_Edit::GetSelectAppearanceStream(
@@ -202,5 +202,5 @@ CFX_ByteString IFX_Edit::GetSelectAppearanceStream(
}
}
- return sRet.GetByteString();
+ return sRet.AsStringC();
}
diff --git a/fpdfsdk/fxedit/fxet_pageobjs.cpp b/fpdfsdk/fxedit/fxet_pageobjs.cpp
index a09b92f4d4..b3f4ad60c6 100644
--- a/fpdfsdk/fxedit/fxet_pageobjs.cpp
+++ b/fpdfsdk/fxedit/fxet_pageobjs.cpp
@@ -234,11 +234,11 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
if (place.LineCmp(oldplace) != 0 || word.nFontIndex != nFontIndex ||
crOldFill != crCurFill) {
if (sTextBuf.GetLength() > 0) {
- DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x,
- ptBT.y + ptOffset.y),
- pFontMap->GetPDFFont(nFontIndex), fFontSize,
- pUser2Device, sTextBuf.GetByteString(),
- crOldFill, crTextStroke, nHorzScale);
+ DrawTextString(
+ pDevice,
+ CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
+ pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device,
+ sTextBuf.AsStringC(), crOldFill, crTextStroke, nHorzScale);
sTextBuf.Clear();
}
@@ -266,7 +266,7 @@ void IFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
DrawTextString(
pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x, ptBT.y + ptOffset.y),
pFontMap->GetPDFFont(nFontIndex), fFontSize, pUser2Device,
- sTextBuf.GetByteString(), crOldFill, crTextStroke, nHorzScale);
+ sTextBuf.AsStringC(), crOldFill, crTextStroke, nHorzScale);
}
}
}
@@ -348,11 +348,11 @@ void IFX_Edit::DrawRichEdit(CFX_RenderDevice* pDevice,
FXSYS_memcmp(&word.WordProps, &wp, sizeof(CPVT_WordProps)) != 0 ||
crOld != crCurText) {
if (sTextBuf.GetLength() > 0) {
- DrawTextString(pDevice, CFX_FloatPoint(ptBT.x + ptOffset.x,
- ptBT.y + ptOffset.y),
- pFontMap->GetPDFFont(wp.nFontIndex), wp.fFontSize,
- pUser2Device, sTextBuf.GetByteString(), crOld, 0,
- wp.nHorzScale);
+ 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.Clear();
}
@@ -393,7 +393,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.GetByteString(), crOld, 0, wp.nHorzScale);
+ sTextBuf.AsStringC(), crOld, 0, wp.nHorzScale);
}
}
}
@@ -497,7 +497,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.GetByteString()));
+ sTextBuf.AsStringC()));
sTextBuf.Clear();
}
@@ -517,7 +517,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.GetByteString()));
+ sTextBuf.AsStringC()));
}
}
}
@@ -568,7 +568,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.GetByteString()));
+ sTextBuf.AsStringC()));
sTextBuf.Clear();
}
@@ -611,7 +611,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.GetByteString()));
+ sTextBuf.AsStringC()));
}
}
}