diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dialoghelper.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/dialog/versdlg.cxx | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx index 93e697b29517..9585c8baac80 100644 --- a/sfx2/source/dialog/dialoghelper.cxx +++ b/sfx2/source/dialog/dialoghelper.cxx @@ -32,17 +32,17 @@ Size getPreviewOptionsSize(const OutputDevice& rReference) return rReference.LogicToPixel(Size(70, 27), MapMode(MapUnit::MapAppFont)); } -OUString getWidestTime(const LocaleDataWrapper& rWrapper) +OUString getWidestDateTime(const LocaleDataWrapper& rWrapper, bool bWithSec) { Date aDate(22, 12, 2000); tools::Time aTime(22, 59, 59); DateTime aDateTime(aDate, aTime); - return formatTime(aDateTime, rWrapper); + return formatDateTime(aDateTime, rWrapper, bWithSec); } -OUString formatTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper) +OUString formatDateTime(const DateTime& rDateTime, const LocaleDataWrapper& rWrapper, bool bWithSec) { - return rWrapper.getDate(rDateTime) + " " + rWrapper.getTime(rDateTime, false); + return rWrapper.getDate(rDateTime) + " " + rWrapper.getTime(rDateTime, bWithSec); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 4b0a05d40eae..90e704ab7ef1 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -115,7 +115,7 @@ namespace void setColSizes(weld::TreeView& rVersionBox) { // recalculate the datetime column width - int nWidestTime(rVersionBox.get_pixel_size(getWidestTime(Application::GetSettings().GetLocaleDataWrapper())).Width()); + int nWidestTime(rVersionBox.get_pixel_size(getWidestDateTime(Application::GetSettings().GetLocaleDataWrapper(), false)).Width()); int nW1 = rVersionBox.get_pixel_size(rVersionBox.get_column_title(1)).Width(); int nMax = std::max(nWidestTime, nW1) + 12; // max width + a little offset @@ -217,7 +217,7 @@ void SfxVersionDialog::Init_Impl() for (size_t n = 0; n < m_pTable->size(); ++n) { SfxVersionInfo *pInfo = m_pTable->at( n ); - OUString aEntry = formatTime(pInfo->aCreationDate, Application::GetSettings().GetLocaleDataWrapper()); + OUString aEntry = formatDateTime(pInfo->aCreationDate, Application::GetSettings().GetLocaleDataWrapper(), false); m_xVersionBox->append(weld::toId(pInfo), aEntry); auto nLastRow = m_xVersionBox->n_children() - 1; m_xVersionBox->set_text(nLastRow, pInfo->aAuthor, 1); @@ -394,7 +394,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(weld::Window *pParent, SfxV OUString sAuthor = rInfo.aAuthor.isEmpty() ? SfxResId(STR_NO_NAME_SET) : rInfo.aAuthor; const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); - m_xDateTimeText->set_label(m_xDateTimeText->get_label() + formatTime(rInfo.aCreationDate, rLocaleWrapper)); + m_xDateTimeText->set_label(m_xDateTimeText->get_label() + formatDateTime(rInfo.aCreationDate, rLocaleWrapper, false)); m_xSavedByText->set_label(m_xSavedByText->get_label() + sAuthor); m_xEdit->set_text(rInfo.aComment); m_xEdit->set_size_request(40 * m_xEdit->get_approximate_digit_width(), @@ -459,7 +459,7 @@ void SfxCmisVersionsDialog::LoadVersions() for (size_t n = 0; n < m_pTable->size(); ++n) { SfxVersionInfo *pInfo = m_pTable->at( n ); - OUString aEntry = formatTime(pInfo->aCreationDate, Application::GetSettings().GetLocaleDataWrapper()); + OUString aEntry = formatDateTime(pInfo->aCreationDate, Application::GetSettings().GetLocaleDataWrapper(), false); m_xVersionBox->append(weld::toId(pInfo), aEntry); auto nLastRow = m_xVersionBox->n_children() - 1; m_xVersionBox->set_text(nLastRow, pInfo->aAuthor, 1); |