View | Details | Raw Unified | Return to issue 21923
Collapse All | Expand All

(-)sfx2/inc/sfx2/passwd.hxx.orig (+5 lines)
Lines 74-79 Link Here
74
	Edit			maPasswordED;
74
	Edit			maPasswordED;
75
	FixedText		maConfirmFT;
75
	FixedText		maConfirmFT;
76
	Edit			maConfirmED;
76
	Edit			maConfirmED;
77
    FixedText		maMinLengthFT;
77
    FixedLine       maPasswordBox;
78
    FixedLine       maPasswordBox;
78
79
79
	OKButton		maOKBtn;
80
	OKButton		maOKBtn;
Lines 82-93 Link Here
82
83
83
	String			maConfirmStr;
84
	String			maConfirmStr;
84
	USHORT			mnMinLen;
85
	USHORT			mnMinLen;
86
    String			maMinLenPwdStr;
87
    String			maEmptyPwdStr;
88
    String			maMainPwdStr;
85
	USHORT			mnExtras;
89
	USHORT			mnExtras;
86
90
87
//#if 0 // _SOLAR__PRIVATE
91
//#if 0 // _SOLAR__PRIVATE
88
	DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
92
	DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* );
89
	DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
93
	DECL_DLLPRIVATE_LINK( OKHdl, OKButton* );
90
//#endif
94
//#endif
95
    void			SetPasswdText();
91
96
92
public:
97
public:
93
	SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
98
	SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL );
(-)sfx2/source/dialog/passwd.hrc (+29 lines)
Lines 100-105 Link Here
100
	maPasswordED	( this, SfxResId( ED_PASSWD_PASSWORD ) ),
100
	maPasswordED	( this, SfxResId( ED_PASSWD_PASSWORD ) ),
101
	maConfirmFT		( this, SfxResId( FT_PASSWD_CONFIRM ) ),
101
	maConfirmFT		( this, SfxResId( FT_PASSWD_CONFIRM ) ),
102
	maConfirmED		( this, SfxResId( ED_PASSWD_CONFIRM ) ),
102
	maConfirmED		( this, SfxResId( ED_PASSWD_CONFIRM ) ),
103
    maMinLengthFT	( this, SfxResId( FT_PASSWD_MINLEN ) ),
103
	maPasswordBox	( this, SfxResId( GB_PASSWD_PASSWORD ) ),
104
	maPasswordBox	( this, SfxResId( GB_PASSWD_PASSWORD ) ),
104
	maOKBtn			( this, SfxResId( BTN_PASSWD_OK ) ),
105
	maOKBtn			( this, SfxResId( BTN_PASSWD_OK ) ),
105
	maCancelBtn		( this, SfxResId( BTN_PASSWD_CANCEL ) ),
106
	maCancelBtn		( this, SfxResId( BTN_PASSWD_CANCEL ) ),
Lines 107-112 Link Here
107
	maConfirmStr	( 		SfxResId( STR_PASSWD_CONFIRM ) ),
108
	maConfirmStr	( 		SfxResId( STR_PASSWD_CONFIRM ) ),
108
109
109
	mnMinLen		( 5 ),
110
	mnMinLen		( 5 ),
111
    maMinLenPwdStr	( SfxResId( STR_PASSWD_MIN_LEN ) ),
112
    maEmptyPwdStr	( SfxResId( STR_PASSWD_EMPTY ) ),
113
    maMainPwdStr    ( ),
110
	mnExtras		( 0 )
114
	mnExtras		( 0 )
111
115
112
{
116
{
Lines 119-124 Link Here
119
123
120
	if ( pGroupText )
124
	if ( pGroupText )
121
		  maPasswordBox.SetText( *pGroupText );
125
		  maPasswordBox.SetText( *pGroupText );
126
	
127
//set the text to the pasword length
128
	SetPasswdText();
129
}
130
131
// -----------------------------------------------------------------------
132
133
void SfxPasswordDialog::SetPasswdText( )
134
{
135
//set the new string to the minimum password length
136
	if( mnMinLen == 0 )
137
		maMinLengthFT.SetText( maEmptyPwdStr );
138
	else
139
	{
140
		maMainPwdStr = maMinLenPwdStr;
141
		maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0);
142
		maMinLengthFT.SetText( maMainPwdStr );
143
		maMinLengthFT.Show();
144
	}	
122
}
145
}
123
146
124
// -----------------------------------------------------------------------
147
// -----------------------------------------------------------------------
Lines 126-131 Link Here
126
void SfxPasswordDialog::SetMinLen( USHORT nLen )
149
void SfxPasswordDialog::SetMinLen( USHORT nLen )
127
{
150
{
128
	mnMinLen = nLen;
151
	mnMinLen = nLen;
152
	SetPasswdText();
129
	EditModifyHdl( NULL );
153
	EditModifyHdl( NULL );
130
}
154
}
131
155
Lines 176-183 Link Here
176
			aPos = maUserED.GetPosPixel();
200
			aPos = maUserED.GetPosPixel();
177
			maPasswordED.SetPosPixel( aPos );
201
			maPasswordED.SetPosPixel( aPos );
178
202
203
			aPos = maConfirmFT.GetPosPixel();
179
			maConfirmFT.SetPosPixel( aPwdPos1 );
204
			maConfirmFT.SetPosPixel( aPwdPos1 );
180
			maConfirmED.SetPosPixel( aPwdPos2 );
205
			maConfirmED.SetPosPixel( aPwdPos2 );
206
			maMinLengthFT.SetPosPixel(aPos);
181
		}
207
		}
182
208
183
		Size aBoxSize = maPasswordBox.GetSizePixel();
209
		Size aBoxSize = maPasswordBox.GetSizePixel();
Lines 44-55 Link Here
44
#define ED_PASSWD_PASSWORD 14
44
#define ED_PASSWD_PASSWORD 14
45
#define FT_PASSWD_CONFIRM 15
45
#define FT_PASSWD_CONFIRM 15
46
#define ED_PASSWD_CONFIRM 16
46
#define ED_PASSWD_CONFIRM 16
47
#define FT_PASSWD_MINLEN 17
47
48
48
#define BTN_PASSWD_OK 20
49
#define BTN_PASSWD_OK 20
49
#define BTN_PASSWD_CANCEL 21
50
#define BTN_PASSWD_CANCEL 21
50
#define BTN_PASSWD_HELP 22
51
#define BTN_PASSWD_HELP 22
51
52
52
#define STR_PASSWD_CONFIRM 30
53
#define STR_PASSWD_CONFIRM 30
54
#define STR_PASSWD_MIN_LEN	31
55
#define STR_PASSWD_EMPTY	32
53
56
54
#endif
57
#endif
55
58
(-)sfx2/source/dialog/passwd.src (+16 lines)
Lines 91-96 ModalDialog DLG_PASSWD Link Here
91
		Pos = MAP_APPFONT( 57, 44 );
91
		Pos = MAP_APPFONT( 57, 44 );
92
		Size = MAP_APPFONT( 75, 12 );
92
		Size = MAP_APPFONT( 75, 12 );
93
	};
93
	};
94
	
95
	String STR_PASSWD_MIN_LEN
96
	{
97
		Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
98
	};
99
	String STR_PASSWD_EMPTY
100
	{
101
		Text [ en-US ] = "(The password can be empty)" ;
102
	};
103
	
104
	FixedText FT_PASSWD_MINLEN
105
	{
106
		Pos = MAP_APPFONT(12, 65 );
107
		Size = MAP_APPFONT( 126, 10 );
108
	};
109
	
94
    FixedLine GB_PASSWD_PASSWORD
110
    FixedLine GB_PASSWD_PASSWORD
95
	{
111
	{
96
		Pos = MAP_APPFONT( 6, 3 );
112
		Pos = MAP_APPFONT( 6, 3 );

Return to issue 21923