summaryrefslogtreecommitdiff
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-05 08:15:36 +0000
commit1fc5d5fc5174d768869c84adfbda6367057e8577 (patch)
tree13a37d2b3227f35db4ec2ce83e975019229f7986
parentebbb52a25da123b084f5138f780fb39573276d86 (diff)
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> (cherry picked from commit a4440671a9de18ebf944ed09c432a98908d79f5e) Reviewed-on: https://gerrit.libreoffice.org/9646
-rw-r--r--include/sfx2/passwd.hxx1
-rw-r--r--include/sfx2/sfx.hrc1
-rw-r--r--sfx2/source/appl/sfx.src5
-rw-r--r--sfx2/source/dialog/passwd.cxx12
4 files changed, 16 insertions, 3 deletions
diff --git a/include/sfx2/passwd.hxx b/include/sfx2/passwd.hxx
index 789e44442fd9..ed96e330cc18 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 4c529946a5a9..0497f5256864 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 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);
+ }
}
}