diff options
-rw-r--r-- | include/sfx2/passwd.hxx | 1 | ||||
-rw-r--r-- | include/sfx2/sfx.hrc | 1 | ||||
-rw-r--r-- | sfx2/source/appl/sfx.src | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 12 |
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); + } } } |