Kaydet (Commit) 2fc7a10d authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Caolán McNamara

fdo#84582 : fixed label in the 'Insert Version Comment' dialog

When user's data are empty, dialog shows "(no name set)".

Dialog:
Writer->File->Versions...->Save New Version

Change-Id: I6780cbe452fbc206b3e153975dbb1c1d9570718b
Reviewed-on: https://gerrit.libreoffice.org/12307Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst bd78cbd0
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46) #define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
#define STR_VIEWVERSIONCOMMENT ( RC_DIALOG_BEGIN + 71 ) #define STR_VIEWVERSIONCOMMENT ( RC_DIALOG_BEGIN + 71 )
#define STR_NO_NAME_SET ( RC_DIALOG_BEGIN + 72 )
#define STR_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 ) #define STR_ERROR_WRONG_CONFIRM ( RC_DIALOG_BEGIN + 76 )
......
...@@ -473,9 +473,11 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVe ...@@ -473,9 +473,11 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVe
get(m_pCancelButton, "cancel"); get(m_pCancelButton, "cancel");
get(m_pCloseButton, "close"); get(m_pCloseButton, "close");
OUString sAuthor = rInfo.aAuthor.isEmpty() ? SfxResId(STR_NO_NAME_SET) : rInfo.aAuthor;
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
m_pDateTimeText->SetText(m_pDateTimeText->GetText() + formatTime(rInfo.aCreationDate, rLocaleWrapper)); m_pDateTimeText->SetText(m_pDateTimeText->GetText() + formatTime(rInfo.aCreationDate, rLocaleWrapper));
m_pSavedByText->SetText(m_pSavedByText->GetText() + rInfo.aAuthor); m_pSavedByText->SetText(m_pSavedByText->GetText() + sAuthor);
m_pEdit->SetText(rInfo.aComment); m_pEdit->SetText(rInfo.aComment);
m_pEdit->set_height_request(7 * m_pEdit->GetTextHeight()); m_pEdit->set_height_request(7 * m_pEdit->GetTextHeight());
m_pEdit->set_width_request(40 * m_pEdit->approximate_char_width()); m_pEdit->set_width_request(40 * m_pEdit->approximate_char_width());
......
...@@ -24,4 +24,9 @@ String STR_VIEWVERSIONCOMMENT ...@@ -24,4 +24,9 @@ String STR_VIEWVERSIONCOMMENT
Text [ en-US ] = "View Version Comment" ; Text [ en-US ] = "View Version Comment" ;
}; };
String STR_NO_NAME_SET
{
Text [ en-US ] = "(no name set)" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment