diff options
author | tsepez <tsepez@chromium.org> | 2016-04-08 12:20:38 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-08 12:20:39 -0700 |
commit | 4c3debb3c91f5842784be30a911b52cdabcab7df (patch) | |
tree | e0534dcb43a71376be8da0b376a97de37080ecc5 /fpdfsdk/pdfwindow | |
parent | f172290a8dc527cd8bc73b0d0ad59e78797968c1 (diff) | |
download | pdfium-4c3debb3c91f5842784be30a911b52cdabcab7df.tar.xz |
Rename both As{Byte,Wide}StringC() helpers to AsStringC().
The naming is redundant given the base type, and will stand
in the way of consolidating Byte and Wide code.
BUG=
Review URL: https://codereview.chromium.org/1862123003
Diffstat (limited to 'fpdfsdk/pdfwindow')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Edit.cpp | 28 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Icon.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Label.cpp | 8 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_ListBox.cpp | 10 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_ScrollBar.cpp | 2 | ||||
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Signature.cpp | 2 |
6 files changed, 23 insertions, 29 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Edit.cpp b/fpdfsdk/pdfwindow/PWL_Edit.cpp index e836594378..f75aa53a54 100644 --- a/fpdfsdk/pdfwindow/PWL_Edit.cpp +++ b/fpdfsdk/pdfwindow/PWL_Edit.cpp @@ -260,7 +260,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { case PBS_SOLID: { sLine << "q\n" << GetBorderWidth() << " w\n" << CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE) - .AsByteStringC() + .AsStringC() << " 2 J 0 j\n"; for (int32_t i = 1; i < nCharArray; i++) { @@ -277,7 +277,7 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { case PBS_DASH: { sLine << "q\n" << GetBorderWidth() << " w\n" << CPWL_Utils::GetColorAppStream(GetBorderColor(), FALSE) - .AsByteStringC() + .AsStringC() << " 2 J 0 j\n" << "[" << GetBorderDash().nDash << " " << GetBorderDash().nGap << "] " << GetBorderDash().nPhase << " d\n"; @@ -315,9 +315,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { CPWL_Utils::GetEditSelAppStream(m_pEdit, ptOffset, &wrTemp); if (sEditSel.GetLength() > 0) - sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR) - .AsByteStringC() - << sEditSel.AsByteStringC(); + sText << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELBACKCOLOR).AsStringC() + << sEditSel.AsStringC(); wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelBefore); CFX_ByteString sEditBefore = CPWL_Utils::GetEditAppStream( @@ -325,9 +324,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { m_pEdit->GetPasswordChar()); if (sEditBefore.GetLength() > 0) - sText << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC() - << sEditBefore.AsByteStringC() << "ET\n"; + sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() + << sEditBefore.AsStringC() << "ET\n"; wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelect); CFX_ByteString sEditMid = CPWL_Utils::GetEditAppStream( @@ -337,8 +335,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { if (sEditMid.GetLength() > 0) sText << "BT\n" << CPWL_Utils::GetColorAppStream(CPWL_Color(COLORTYPE_GRAY, 1)) - .AsByteStringC() - << sEditMid.AsByteStringC() << "ET\n"; + .AsStringC() + << sEditMid.AsStringC() << "ET\n"; wrTemp = CPWL_Utils::OverlapWordRange(wrVisible, wrSelAfter); CFX_ByteString sEditAfter = CPWL_Utils::GetEditAppStream( @@ -346,9 +344,8 @@ void CPWL_Edit::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { m_pEdit->GetPasswordChar()); if (sEditAfter.GetLength() > 0) - sText << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC() - << sEditAfter.AsByteStringC() << "ET\n"; + sText << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() + << sEditAfter.AsStringC() << "ET\n"; if (sText.GetLength() > 0) { CFX_FloatRect rcClient = GetClientRect(); @@ -707,9 +704,8 @@ CFX_ByteString CPWL_Edit::GetTextAppearanceStream( CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); if (sEdit.GetLength() > 0) { - sRet << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC() - << sEdit.AsByteStringC() << "ET\n"; + sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() + << sEdit.AsStringC() << "ET\n"; } return sRet.GetByteString(); diff --git a/fpdfsdk/pdfwindow/PWL_Icon.cpp b/fpdfsdk/pdfwindow/PWL_Icon.cpp index 69f9e599da..bae5dc8a56 100644 --- a/fpdfsdk/pdfwindow/PWL_Icon.cpp +++ b/fpdfsdk/pdfwindow/PWL_Icon.cpp @@ -42,7 +42,7 @@ CFX_ByteString CPWL_Image::GetImageAppStream() { sAppStream << mt.GetA() << " " << mt.GetB() << " " << mt.GetC() << " " << mt.GetD() << " " << mt.GetE() << " " << mt.GetF() << " cm\n"; - sAppStream << "0 g 0 G 1 w /" << sAlias.AsByteStringC() << " Do\n" + sAppStream << "0 g 0 G 1 w /" << sAlias.AsStringC() << " Do\n" << "Q\n"; } diff --git a/fpdfsdk/pdfwindow/PWL_Label.cpp b/fpdfsdk/pdfwindow/PWL_Label.cpp index 5560b59eb1..9a1dce61d8 100644 --- a/fpdfsdk/pdfwindow/PWL_Label.cpp +++ b/fpdfsdk/pdfwindow/PWL_Label.cpp @@ -119,8 +119,7 @@ CFX_FloatRect CPWL_Label::GetContentRect() const { void CPWL_Label::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { CPWL_Wnd::GetThisAppearanceStream(sAppStream); - sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)) - .AsByteStringC(); + sAppStream << GetTextAppearanceStream(CFX_FloatPoint(0.0f, 0.0f)).AsStringC(); } CFX_ByteString CPWL_Label::GetTextAppearanceStream( @@ -129,9 +128,8 @@ CFX_ByteString CPWL_Label::GetTextAppearanceStream( CFX_ByteString sEdit = CPWL_Utils::GetEditAppStream(m_pEdit, ptOffset); if (sEdit.GetLength() > 0) { - sRet << "BT\n" - << CPWL_Utils::GetColorAppStream(GetTextColor()).AsByteStringC() - << sEdit.AsByteStringC() << "ET\n"; + sRet << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()).AsStringC() + << sEdit.AsStringC() << "ET\n"; } return sRet.GetByteString(); diff --git a/fpdfsdk/pdfwindow/PWL_ListBox.cpp b/fpdfsdk/pdfwindow/PWL_ListBox.cpp index ccccc77dcd..d32e7c937c 100644 --- a/fpdfsdk/pdfwindow/PWL_ListBox.cpp +++ b/fpdfsdk/pdfwindow/PWL_ListBox.cpp @@ -120,14 +120,14 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { if (m_pList->IsItemSelected(i)) { sListItems << CPWL_Utils::GetRectFillAppStream(rcItem, PWL_DEFAULT_SELBACKCOLOR) - .AsByteStringC(); + .AsStringC(); CFX_ByteString sItem = CPWL_Utils::GetEditAppStream(m_pList->GetItemEdit(i), ptOffset); if (sItem.GetLength() > 0) { sListItems << "BT\n" << CPWL_Utils::GetColorAppStream(PWL_DEFAULT_SELTEXTCOLOR) - .AsByteStringC() - << sItem.AsByteStringC() << "ET\n"; + .AsStringC() + << sItem.AsStringC() << "ET\n"; } } else { CFX_ByteString sItem = @@ -135,8 +135,8 @@ void CPWL_ListBox::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { if (sItem.GetLength() > 0) { sListItems << "BT\n" << CPWL_Utils::GetColorAppStream(GetTextColor()) - .AsByteStringC() - << sItem.AsByteStringC() << "ET\n"; + .AsStringC() + << sItem.AsStringC() << "ET\n"; } } } diff --git a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp index 2dfa6cfe6a..385ff44f4a 100644 --- a/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp +++ b/fpdfsdk/pdfwindow/PWL_ScrollBar.cpp @@ -671,7 +671,7 @@ void CPWL_ScrollBar::GetThisAppearanceStream(CFX_ByteTextBuf& sAppStream) { sButton << "q\n"; sButton << "0 w\n" << CPWL_Utils::GetColorAppStream(GetBackgroundColor(), TRUE) - .AsByteStringC(); + .AsStringC(); sButton << rectWnd.left << " " << rectWnd.bottom << " " << rectWnd.right - rectWnd.left << " " << rectWnd.top - rectWnd.bottom << " re b Q\n"; diff --git a/fpdfsdk/pdfwindow/PWL_Signature.cpp b/fpdfsdk/pdfwindow/PWL_Signature.cpp index 6dd2ea1b30..c737998f26 100644 --- a/fpdfsdk/pdfwindow/PWL_Signature.cpp +++ b/fpdfsdk/pdfwindow/PWL_Signature.cpp @@ -42,7 +42,7 @@ void CPWL_Signature_Image::DrawThisAppearance(CFX_RenderDevice* pDevice, void CPWL_Signature_Image::GetThisAppearanceStream( CFX_ByteTextBuf& sAppStream) { - sAppStream << CPWL_Image::GetImageAppStream().AsByteStringC(); + sAppStream << CPWL_Image::GetImageAppStream().AsStringC(); } void CPWL_Signature_Image::GetScale(FX_FLOAT& fHScale, FX_FLOAT& fVScale) { |