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/12307
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Szymon Kłos
2014-11-08 13:43:07 +01:00
committed by Caolán McNamara
parent bd78cbd028
commit 2fc7a10dbf
3 changed files with 9 additions and 1 deletions

View File

@@ -46,6 +46,7 @@
#define MN_CONTEXT_TEMPLDLG ( RC_DIALOG_BEGIN + 46)
#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 )

View File

@@ -473,9 +473,11 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVe
get(m_pCancelButton, "cancel");
get(m_pCloseButton, "close");
OUString sAuthor = rInfo.aAuthor.isEmpty() ? SfxResId(STR_NO_NAME_SET) : rInfo.aAuthor;
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
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->set_height_request(7 * m_pEdit->GetTextHeight());
m_pEdit->set_width_request(40 * m_pEdit->approximate_char_width());

View File

@@ -24,4 +24,9 @@ String STR_VIEWVERSIONCOMMENT
Text [ en-US ] = "View Version Comment" ;
};
String STR_NO_NAME_SET
{
Text [ en-US ] = "(no name set)" ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */