include/sfx2/passwd.hxx | 1 + include/sfx2/sfx.hrc | 1 + sfx2/source/appl/sfx.src | 5 +++++ sfx2/source/dialog/passwd.cxx | 12 +++++++++--- 4 files changed, 16 insertions(+), 3 deletions(-)
New commits: commit a4440671a9de18ebf944ed09c432a98908d79f5e Author: Laurent Balland-Poirier <laurent.balland-poir...@laposte.net> Date: Tue Jun 3 19:11:54 2014 +0200 fdo#79597 Password UI: correct typo for 1 character Display a different string in case of 1 character for minimum length Change-Id: Iba2fbbb7d4101718def7c79ce5354debf5d97041 Reviewed-on: https://gerrit.libreoffice.org/9631 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx index 789e444..ed96e33 100644 --- a/include/sfx2/passwd.hxx +++ b/include/sfx2/passwd.hxx @@ -61,6 +61,7 @@ private: OKButton* mpOKBtn; OUString maMinLenPwdStr; + OUString maMinLenPwdStr1; OUString maEmptyPwdStr; OUString maMainPwdStr; sal_uInt16 mnMinLen; diff --git a/include/sfx2/sfx.hrc b/include/sfx2/sfx.hrc index 4c52994..0497f52 100644 --- a/include/sfx2/sfx.hrc +++ b/include/sfx2/sfx.hrc @@ -155,6 +155,7 @@ #define STR_PASSWD_MIN_LEN (RID_SFX_START+124) #define STR_NONCHECKEDOUT_DOCUMENT (RID_SFX_START+125) #define BT_CHECKOUT (RID_SFX_START+126) +#define STR_PASSWD_MIN_LEN1 (RID_SFX_START+127) #define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) #define SFX_THUMBNAIL_TEXT (RID_SFX_START+158) diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src index 08e6f1f..16f3044 100644 --- a/sfx2/source/appl/sfx.src +++ b/sfx2/source/appl/sfx.src @@ -29,6 +29,11 @@ String STR_PASSWD_MIN_LEN Text [ en-US ] = "(Minimum $(MINLEN) characters)" ; }; +String STR_PASSWD_MIN_LEN1 +{ + Text [ en-US ] = "(Minimum 1 character)" ; +}; + String STR_PASSWD_EMPTY { Text [ en-US ] = "(The password can be empty)" ; diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index c1d47d5..d55700f 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -86,6 +86,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl) SfxPasswordDialog::SfxPasswordDialog(Window* pParent, const OUString* pGroupText) : ModalDialog(pParent, "PasswordDialog", "sfx/ui/password.ui") , maMinLenPwdStr(SFX2_RESSTR(STR_PASSWD_MIN_LEN)) + , maMinLenPwdStr1(SFX2_RESSTR(STR_PASSWD_MIN_LEN1)) , maEmptyPwdStr(SFX2_RESSTR(STR_PASSWD_EMPTY)) , mnMinLen(5) , mnExtras(0) @@ -133,9 +134,14 @@ void SfxPasswordDialog::SetPasswdText( ) mpMinLengthFT->SetText(maEmptyPwdStr); else { - maMainPwdStr = maMinLenPwdStr; - maMainPwdStr = maMainPwdStr.replaceAll( "$(MINLEN)", OUString::number((sal_Int32) mnMinLen ) ); - mpMinLengthFT->SetText(maMainPwdStr); + if( mnMinLen == 1 ) + mpMinLengthFT->SetText(maMinLenPwdStr1); + else + { + maMainPwdStr = maMinLenPwdStr; + maMainPwdStr = maMainPwdStr.replaceAll( "$(MINLEN)", OUString::number((sal_Int32) mnMinLen ) ); + mpMinLengthFT->SetText(maMainPwdStr); + } } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits