summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-05-02 17:34:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-02 17:34:05 +0000
commit9bd3566d82deb39ea282ddafa4f89930160e637c (patch)
treeb5cf7edd484aa8bdadbd3ebf065eeba0c8a48bf1 /xfa
parentac91f6b598f5e0373176e6e9b860c1e135fddf65 (diff)
downloadpdfium-9bd3566d82deb39ea282ddafa4f89930160e637c.tar.xz
CFWL_MonthCalendar::GetTodayText() includes "Today" string.
All usages were prepending the "Today" string, so move it inside GetTodayText(). Change-Id: I454fb683c9507e76b61bf69ca29a0ee9b49f1a58 Reviewed-on: https://pdfium-review.googlesource.com/31970 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fwl/cfwl_monthcalendar.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fwl/cfwl_monthcalendar.cpp b/xfa/fwl/cfwl_monthcalendar.cpp
index af865b530b..f2bd845a19 100644
--- a/xfa/fwl/cfwl_monthcalendar.cpp
+++ b/xfa/fwl/cfwl_monthcalendar.cpp
@@ -333,7 +333,7 @@ void CFWL_MonthCalendar::DrawToday(CXFA_Graphics* pGraphics,
params.m_pGraphics = pGraphics;
params.m_dwStates = CFWL_PartState_Normal;
params.m_iTTOAlign = FDE_TextAlignment::kCenterLeft;
- params.m_wsText = L"Today" + GetTodayText(m_iYear, m_iMonth, m_iDay);
+ params.m_wsText = GetTodayText(m_iYear, m_iMonth, m_iDay);
m_szToday =
CalcTextSize(params.m_wsText, m_pProperties->m_pThemeProvider, false);
@@ -461,9 +461,8 @@ CFX_SizeF CFWL_MonthCalendar::CalcSize() {
m_szHead.width + MONTHCAL_HEADER_BTN_HMARGIN * 2 + m_szCell.width * 2;
fs.width = std::max(fs.width, fMonthMaxW);
- WideString wsToday = GetTodayText(m_iYear, m_iMonth, m_iDay);
- m_wsToday = L"Today" + wsToday;
- m_szToday = CalcTextSize(wsToday, m_pProperties->m_pThemeProvider, false);
+ m_wsToday = GetTodayText(m_iYear, m_iMonth, m_iDay);
+ m_szToday = CalcTextSize(m_wsToday, m_pProperties->m_pThemeProvider, false);
m_szToday.height = (m_szToday.height >= m_szCell.height) ? m_szToday.height
: m_szCell.height;
fs.height = m_szCell.width + m_szCell.height * (MONTHCAL_ROWS - 2) +
@@ -683,7 +682,7 @@ WideString CFWL_MonthCalendar::GetHeadText(int32_t iYear, int32_t iMonth) {
WideString CFWL_MonthCalendar::GetTodayText(int32_t iYear,
int32_t iMonth,
int32_t iDay) {
- return WideString::Format(L", %d/%d/%d", iDay, iMonth, iYear);
+ return WideString::Format(L"Today, %d/%d/%d", iDay, iMonth, iYear);
}
int32_t CFWL_MonthCalendar::GetDayAtPoint(const CFX_PointF& point) const {