Lines 98-103
SfxPasswordDialog::SfxPasswordDialog( Wi
Link Here
|
98 |
maPasswordED ( this, ResId( ED_PASSWD_PASSWORD ) ), |
98 |
maPasswordED ( this, ResId( ED_PASSWD_PASSWORD ) ), |
99 |
maConfirmFT ( this, ResId( FT_PASSWD_CONFIRM ) ), |
99 |
maConfirmFT ( this, ResId( FT_PASSWD_CONFIRM ) ), |
100 |
maConfirmED ( this, ResId( ED_PASSWD_CONFIRM ) ), |
100 |
maConfirmED ( this, ResId( ED_PASSWD_CONFIRM ) ), |
|
|
101 |
maMinLengthFT ( this, ResId( FT_PASSWD_MINLEN ) ), |
101 |
maPasswordBox ( this, ResId( GB_PASSWD_PASSWORD ) ), |
102 |
maPasswordBox ( this, ResId( GB_PASSWD_PASSWORD ) ), |
102 |
maOKBtn ( this, ResId( BTN_PASSWD_OK ) ), |
103 |
maOKBtn ( this, ResId( BTN_PASSWD_OK ) ), |
103 |
maCancelBtn ( this, ResId( BTN_PASSWD_CANCEL ) ), |
104 |
maCancelBtn ( this, ResId( BTN_PASSWD_CANCEL ) ), |
Lines 105-110
SfxPasswordDialog::SfxPasswordDialog( Wi
Link Here
|
105 |
maConfirmStr ( ResId( STR_PASSWD_CONFIRM ) ), |
106 |
maConfirmStr ( ResId( STR_PASSWD_CONFIRM ) ), |
106 |
|
107 |
|
107 |
mnMinLen ( 5 ), |
108 |
mnMinLen ( 5 ), |
|
|
109 |
maMinLenPwdStr ( ResId( STR_PASSWD_MIN_LEN ) ), |
110 |
maEmptyPwdStr ( ResId( STR_PASSWD_EMPTY ) ), |
111 |
maMainPwdStr ( ), |
108 |
mnExtras ( 0 ) |
112 |
mnExtras ( 0 ) |
109 |
|
113 |
|
110 |
{ |
114 |
{ |
Lines 117-122
SfxPasswordDialog::SfxPasswordDialog( Wi
Link Here
|
117 |
|
121 |
|
118 |
if ( pGroupText ) |
122 |
if ( pGroupText ) |
119 |
maPasswordBox.SetText( *pGroupText ); |
123 |
maPasswordBox.SetText( *pGroupText ); |
|
|
124 |
|
125 |
//set the text to the pasword length |
126 |
SetPasswdText(); |
127 |
} |
128 |
|
129 |
// ----------------------------------------------------------------------- |
130 |
|
131 |
void SfxPasswordDialog::SetPasswdText( ) |
132 |
{ |
133 |
//set the new string to the minimum password length |
134 |
if( mnMinLen == 0 ) |
135 |
maMinLengthFT.SetText( maEmptyPwdStr ); |
136 |
else |
137 |
{ |
138 |
maMainPwdStr = maMinLenPwdStr; |
139 |
maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0); |
140 |
maMinLengthFT.SetText( maMainPwdStr ); |
141 |
maMinLengthFT.Show(); |
142 |
} |
120 |
} |
143 |
} |
121 |
|
144 |
|
122 |
// ----------------------------------------------------------------------- |
145 |
// ----------------------------------------------------------------------- |
Lines 124-129
SfxPasswordDialog::SfxPasswordDialog( Wi
Link Here
|
124 |
void SfxPasswordDialog::SetMinLen( USHORT nLen ) |
147 |
void SfxPasswordDialog::SetMinLen( USHORT nLen ) |
125 |
{ |
148 |
{ |
126 |
mnMinLen = nLen; |
149 |
mnMinLen = nLen; |
|
|
150 |
SetPasswdText(); |
127 |
EditModifyHdl( NULL ); |
151 |
EditModifyHdl( NULL ); |
128 |
} |
152 |
} |
129 |
|
153 |
|
Lines 174-181
short SfxPasswordDialog::Execute()
Link Here
|
174 |
aPos = maUserED.GetPosPixel(); |
198 |
aPos = maUserED.GetPosPixel(); |
175 |
maPasswordED.SetPosPixel( aPos ); |
199 |
maPasswordED.SetPosPixel( aPos ); |
176 |
|
200 |
|
|
|
201 |
aPos = maConfirmFT.GetPosPixel(); |
177 |
maConfirmFT.SetPosPixel( aPwdPos1 ); |
202 |
maConfirmFT.SetPosPixel( aPwdPos1 ); |
178 |
maConfirmED.SetPosPixel( aPwdPos2 ); |
203 |
maConfirmED.SetPosPixel( aPwdPos2 ); |
|
|
204 |
maMinLengthFT.SetPosPixel(aPos); |
179 |
} |
205 |
} |
180 |
|
206 |
|
181 |
Size aBoxSize = maPasswordBox.GetSizePixel(); |
207 |
Size aBoxSize = maPasswordBox.GetSizePixel(); |