summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2014-06-03 19:11:54 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-04 08:29:03 +0000
commita4440671a9de18ebf944ed09c432a98908d79f5e (patch)
treea0b9e798c34db4fb19d39ded5cd1af52599e4a53 /sfx2
parentMissing gb_CppunitTest_use_vcl (diff)
downloadcore-a4440671a9de18ebf944ed09c432a98908d79f5e.tar.gz
core-a4440671a9de18ebf944ed09c432a98908d79f5e.zip
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/sfx.src5
-rw-r--r--sfx2/source/dialog/passwd.cxx12
2 files changed, 14 insertions, 3 deletions
diff --git a/sfx2/source/appl/sfx.src b/sfx2/source/appl/sfx.src
index 08e6f1fd9a91..16f3044b699d 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 c1d47d5d1e8c..d55700ffe458 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);
+ }
}
}