summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_Note.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
commitf7a7d7e07396c3a0fae617ed8f15f29fd491bc3a (patch)
tree53e22c58375eb36abe97f5b8f2631b4eba111fbc /fpdfsdk/src/pdfwindow/PWL_Note.cpp
parent15a62973b9b89c3e229cc0ab501c45967f91b325 (diff)
downloadpdfium-f7a7d7e07396c3a0fae617ed8f15f29fd491bc3a.tar.xz
Revert "Kill operator LPCWSTR from CFX_WideString()."
This reverts commit 15a62973b9b89c3e229cc0ab501c45967f91b325. Reason for revert: broke build on windows, mac. I must have missed some platform-specific conversions. TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108883002
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_Note.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_Note.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_Note.cpp b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
index 33d1b3b009..7bc8fad395 100644
--- a/fpdfsdk/src/pdfwindow/PWL_Note.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_Note.cpp
@@ -82,7 +82,7 @@ void CPWL_Note_Options::CreateChildWnd(const PWL_CREATEPARAM & cp)
void CPWL_Note_Options::SetText(const CFX_WideString& sText)
{
- m_pText->SetText(sText.c_str());
+ m_pText->SetText(sText);
}
void CPWL_Note_Options::DrawThisAppearance(CFX_RenderDevice* pDevice, CPDF_Matrix* pUser2Device)
@@ -443,9 +443,9 @@ void CPWL_Note_Contents::SetText(const CFX_WideString& sText)
if (m_pEdit)
{
m_pEdit->EnableNotify(FALSE);
- m_pEdit->SetText(sText.c_str());
+ m_pEdit->SetText(sText);
m_pEdit->EnableNotify(TRUE);
- OnNotify(m_pEdit, PNM_NOTEEDITCHANGED, 0, 0);
+ OnNotify(m_pEdit, PNM_NOTEEDITCHANGED, 0, 0);
}
}
@@ -811,7 +811,7 @@ void CPWL_NoteItem::SetSubjectName(const CFX_WideString& sName)
{
if (m_pSubject)
{
- m_pSubject->SetText(sName.c_str());
+ m_pSubject->SetText(sName);
}
if (IPWL_NoteNotify* pNotify = GetNoteNotify())
@@ -848,10 +848,11 @@ void CPWL_NoteItem::ResetSubjectName(FX_INT32 nItemIndex)
ASSERT(pNote != NULL);
CFX_WideString sSubject;
- sSubject.Format(pNote->GetReplyString().c_str(), nItemIndex);
+ sSubject.Format(pNote->GetReplyString(), nItemIndex);
if (!m_sAuthor.IsEmpty())
{
+
sSubject += L" - ";
sSubject += m_sAuthor;
}
@@ -862,12 +863,12 @@ void CPWL_NoteItem::ResetSubjectName(FX_INT32 nItemIndex)
void CPWL_NoteItem::SetDateTime(FX_SYSTEMTIME time)
{
m_dtNote = time;
-
+
CFX_WideString swTime;
swTime.Format(L"%04d-%02d-%02d %02d:%02d:%02d", time.wYear, time.wMonth, time.wDay, time.wHour, time.wMinute, time.wSecond);
if (m_pDateTime)
{
- m_pDateTime->SetText(swTime.c_str());
+ m_pDateTime->SetText(swTime);
}
this->RePosChildWnd();
@@ -1527,14 +1528,14 @@ void CPWL_Note::SetAuthorName(const CFX_WideString& sName)
{
if (m_pAuthor)
{
- m_pAuthor->SetText(sName.c_str());
+ m_pAuthor->SetText(sName);
RePosChildWnd();
}
if (IPWL_NoteNotify* pNotify = GetNoteNotify())
{
pNotify->OnSetAuthorName(this);
- }
+ }
}
CFX_WideString CPWL_Note::GetAuthorName() const