Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
06e3724d
Kaydet (Commit)
06e3724d
authored
Eki 05, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
convert password dialog to .ui
Change-Id: Ib2e9c5a72239fc0fa3a54ac3717d90fe1b779d63
üst
a65f48f3
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
487 additions
and
421 deletions
+487
-421
AllLangResTarget_sfx2.mk
sfx2/AllLangResTarget_sfx2.mk
+0
-1
Module_sfx2.mk
sfx2/Module_sfx2.mk
+1
-0
UI_sfx.mk
sfx2/UI_sfx.mk
+16
-0
passwd.hxx
sfx2/inc/sfx2/passwd.hxx
+57
-32
sfx.hrc
sfx2/inc/sfx2/sfx.hrc
+3
-1
sfx.src
sfx2/source/appl/sfx.src
+14
-0
dialog.hrc
sfx2/source/dialog/dialog.hrc
+0
-1
passwd.cxx
sfx2/source/dialog/passwd.cxx
+67
-194
passwd.hrc
sfx2/source/dialog/passwd.hrc
+0
-47
passwd.src
sfx2/source/dialog/passwd.src
+0
-144
helpid.hrc
sfx2/source/inc/helpid.hrc
+0
-1
password.ui
sfx2/uiconfig/ui/password.ui
+329
-0
No files found.
sfx2/AllLangResTarget_sfx2.mk
Dosyayı görüntüle @
06e3724d
...
...
@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/mailwindow.src \
sfx2/source/dialog/mgetempl.src \
sfx2/source/dialog/newstyle.src \
sfx2/source/dialog/passwd.src \
sfx2/source/dialog/printopt.src \
sfx2/source/dialog/recfloat.src \
sfx2/source/dialog/securitypage.src \
...
...
sfx2/Module_sfx2.mk
Dosyayı görüntüle @
06e3724d
...
...
@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,sfx2,\
Library_sfx \
Package_inc \
Package_sdi \
UI_sfx \
))
$(eval $(call gb_Module_add_check_targets,sfx2,\
...
...
sfx2/UI_sfx.mk
0 → 100644
Dosyayı görüntüle @
06e3724d
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UI_UI,sfx))
$(eval $(call gb_UI_add_uifiles,sfx,\
sfx2/uiconfig/ui/password \
))
# vim: set noet sw=4 ts=4:
sfx2/inc/sfx2/passwd.hxx
Dosyayı görüntüle @
06e3724d
...
...
@@ -34,6 +34,7 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <sfx2/app.hxx>
// defines ---------------------------------------------------------------
...
...
@@ -50,23 +51,23 @@
class
SFX2_DLLPUBLIC
SfxPasswordDialog
:
public
ModalDialog
{
private
:
FixedLine
maPasswordBox
;
FixedText
maUserFT
;
Edit
maUserED
;
FixedText
maPasswordFT
;
Edit
maPasswordED
;
FixedText
maConfirmFT
;
Edit
maConfirmED
;
FixedText
maMinLengthFT
;
FixedLine
maPassword2Box
;
FixedText
maPassword2FT
;
Edit
maPassword2ED
;
FixedText
maConfirm2FT
;
Edit
maConfirm2ED
;
VclFrame
*
mpPassword1Box
;
FixedText
*
mpUserFT
;
Edit
*
mpUserED
;
FixedText
*
mpPassword1FT
;
Edit
*
mpPassword1ED
;
FixedText
*
mpConfirm1FT
;
Edit
*
mpConfirm1ED
;
OKButton
maOKBtn
;
CancelButton
maCancelBtn
;
HelpButton
maHelpBtn
;
VclFrame
*
mpPassword2Box
;
FixedText
*
mpPassword2FT
;
Edit
*
mpPassword2ED
;
FixedText
*
mpConfirm2FT
;
Edit
*
mpConfirm2ED
;
FixedText
*
mpMinLengthFT
;
OKButton
*
mpOKBtn
;
String
maConfirmStr
;
String
maMinLenPwdStr
;
...
...
@@ -76,27 +77,51 @@ private:
sal_uInt16
mnExtras
;
bool
mbAsciiOnly
;
DECL_DLLPRIVATE_LINK
(
EditModifyHdl
,
Edit
*
);
DECL_DLLPRIVATE_LINK
(
EditModifyHdl
,
Edit
*
);
DECL_DLLPRIVATE_LINK
(
OKHdl
,
void
*
);
void
SetPasswdText
();
public
:
SfxPasswordDialog
(
Window
*
pParent
,
const
String
*
pGroupText
=
NULL
);
String
GetUser
()
const
{
return
maUserED
.
GetText
();
}
String
GetPassword
()
const
{
return
maPasswordED
.
GetText
();
}
String
GetConfirm
()
const
{
return
maConfirmED
.
GetText
();
}
String
GetPassword2
()
const
{
return
maPassword2ED
.
GetText
();
}
String
GetConfirm2
()
const
{
return
maConfirm2ED
.
GetText
();
}
void
SetGroup2Text
(
const
String
&
i_rText
)
{
maPassword2Box
.
SetText
(
i_rText
);
}
void
SetMinLen
(
sal_uInt16
Len
);
void
SetEditHelpId
(
const
rtl
::
OString
&
rId
)
{
maPasswordED
.
SetHelpId
(
rId
);
}
void
ShowExtras
(
sal_uInt16
nExtras
)
{
mnExtras
=
nExtras
;
}
void
AllowAsciiOnly
(
bool
i_bAsciiOnly
=
true
)
{
mbAsciiOnly
=
i_bAsciiOnly
;
}
SfxPasswordDialog
(
Window
*
pParent
,
const
String
*
pGroupText
=
NULL
);
String
GetUser
()
const
{
return
mpUserED
->
GetText
();
}
String
GetPassword
()
const
{
return
mpPassword1ED
->
GetText
();
}
String
GetConfirm
()
const
{
return
mpConfirm1ED
->
GetText
();
}
String
GetPassword2
()
const
{
return
mpPassword2ED
->
GetText
();
}
String
GetConfirm2
()
const
{
return
mpConfirm2ED
->
GetText
();
}
void
SetGroup2Text
(
const
String
&
i_rText
)
{
mpPassword2Box
->
set_label
(
i_rText
);
}
void
SetMinLen
(
sal_uInt16
Len
);
void
SetEditHelpId
(
const
OString
&
rId
)
{
mpPassword1ED
->
SetHelpId
(
rId
);
}
void
ShowExtras
(
sal_uInt16
nExtras
)
{
mnExtras
=
nExtras
;
}
void
AllowAsciiOnly
(
bool
i_bAsciiOnly
=
true
)
{
mbAsciiOnly
=
i_bAsciiOnly
;
}
virtual
short
Execute
();
};
...
...
sfx2/inc/sfx2/sfx.hrc
Dosyayı görüntüle @
06e3724d
...
...
@@ -166,10 +166,12 @@
#define STR_STANDARD_SHORTCUT (RID_SFX_START+117)
#define STR_REPAIREDDOCUMENT (RID_SFX_START+118)
#define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119)
#define STR_SHARED (RID_SFX_START+120)
#define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121)
#define STR_PASSWD (RID_SFX_START+122)
#define STR_PASSWD_EMPTY (RID_SFX_START+123)
#define STR_PASSWD_MIN_LEN (RID_SFX_START+124)
#define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157)
//=========================================================================
...
...
sfx2/source/appl/sfx.src
Dosyayı görüntüle @
06e3724d
...
...
@@ -23,3 +23,17 @@ String STR_ACCTITLE_PRODUCTIVITYTOOLS
Text [ en-US ] = "%PRODUCTNAME";
};
String STR_PASSWD_MIN_LEN
{
Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
};
String STR_PASSWD_EMPTY
{
Text [ en-US ] = "(The password can be empty)" ;
};
String STR_PASSWD
{
Text [ en-US ] = "Password" ;
};
sfx2/source/dialog/dialog.hrc
Dosyayı görüntüle @
06e3724d
...
...
@@ -32,7 +32,6 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( RC_DIALOG_BEGIN + 0)
#define DLG_PASSWD ( RC_DIALOG_BEGIN + 8)
#define STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12)
#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
...
...
sfx2/source/dialog/passwd.cxx
Dosyayı görüntüle @
06e3724d
...
...
@@ -35,20 +35,17 @@
#include "sfx2/sfxresid.hxx"
#include "dialog.hrc"
#include "passwd.hrc"
#include "vcl/arrange.hxx"
// -----------------------------------------------------------------------
IMPL_LINK_INLINE_START
(
SfxPasswordDialog
,
EditModifyHdl
,
Edit
*
,
pEdit
)
{
if
(
mbAsciiOnly
&&
(
pEdit
==
&
maPasswordED
||
pEdit
==
&
maPassword2ED
)
)
if
(
mbAsciiOnly
&&
(
pEdit
==
mpPassword1ED
||
pEdit
==
mpPassword2ED
)
)
{
rtl
::
OUString
aTest
(
pEdit
->
GetText
()
);
OUString
aTest
(
pEdit
->
GetText
()
);
const
sal_Unicode
*
pTest
=
aTest
.
getStr
();
sal_Int32
nLen
=
aTest
.
getLength
();
rtl
::
OUStringBuffer
aFilter
(
nLen
);
OUStringBuffer
aFilter
(
nLen
);
bool
bReset
=
false
;
for
(
sal_Int32
i
=
0
;
i
<
nLen
;
i
++
)
{
...
...
@@ -65,10 +62,10 @@ IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit )
}
}
bool
bEnable
=
m
aPasswordED
.
GetText
().
Len
()
>=
mnMinLen
;
if
(
m
aPassword2ED
.
IsVisible
()
)
bEnable
=
(
bEnable
&&
(
m
aPassword2ED
.
GetText
().
Len
()
>=
mnMinLen
));
m
aOKBtn
.
Enable
(
bEnable
);
bool
bEnable
=
m
pPassword1ED
->
GetText
().
Len
()
>=
mnMinLen
;
if
(
m
pPassword2ED
->
IsVisible
()
)
bEnable
=
(
bEnable
&&
(
m
pPassword2ED
->
GetText
().
Len
()
>=
mnMinLen
));
m
pOKBtn
->
Enable
(
bEnable
);
return
0
;
}
IMPL_LINK_INLINE_END
(
SfxPasswordDialog
,
EditModifyHdl
,
Edit
*
,
pEdit
)
...
...
@@ -85,8 +82,8 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
{
ErrorBox
aBox
(
this
,
SfxResId
(
MSG_ERROR_WRONG_CONFIRM
)
);
aBox
.
Execute
();
m
aConfirmED
.
SetText
(
String
()
);
m
aConfirmED
.
GrabFocus
();
m
pConfirm1ED
->
SetText
(
String
()
);
m
pConfirm1ED
->
GrabFocus
();
}
else
EndDialog
(
RET_OK
);
...
...
@@ -95,103 +92,44 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
// CTOR / DTOR -----------------------------------------------------------
SfxPasswordDialog
::
SfxPasswordDialog
(
Window
*
pParent
,
const
String
*
pGroupText
)
:
ModalDialog
(
pParent
,
SfxResId
(
DLG_PASSWD
)
),
maPasswordBox
(
this
,
SfxResId
(
GB_PASSWD_PASSWORD
)
),
maUserFT
(
this
,
SfxResId
(
FT_PASSWD_USER
)
),
maUserED
(
this
,
SfxResId
(
ED_PASSWD_USER
)
),
maPasswordFT
(
this
,
SfxResId
(
FT_PASSWD_PASSWORD
)
),
maPasswordED
(
this
,
SfxResId
(
ED_PASSWD_PASSWORD
)
),
maConfirmFT
(
this
,
SfxResId
(
FT_PASSWD_CONFIRM
)
),
maConfirmED
(
this
,
SfxResId
(
ED_PASSWD_CONFIRM
)
),
maMinLengthFT
(
this
,
SfxResId
(
FT_PASSWD_MINLEN
)
),
maPassword2Box
(
this
,
0
),
maPassword2FT
(
this
,
SfxResId
(
FT_PASSWD_PASSWORD2
)
),
maPassword2ED
(
this
,
SfxResId
(
ED_PASSWD_PASSWORD2
)
),
maConfirm2FT
(
this
,
SfxResId
(
FT_PASSWD_CONFIRM2
)
),
maConfirm2ED
(
this
,
SfxResId
(
ED_PASSWD_CONFIRM2
)
),
maOKBtn
(
this
,
SfxResId
(
BTN_PASSWD_OK
)
),
maCancelBtn
(
this
,
SfxResId
(
BTN_PASSWD_CANCEL
)
),
maHelpBtn
(
this
,
SfxResId
(
BTN_PASSWD_HELP
)
),
maMinLenPwdStr
(
SfxResId
(
STR_PASSWD_MIN_LEN
).
toString
()
),
maEmptyPwdStr
(
SfxResId
(
STR_PASSWD_EMPTY
).
toString
()
),
maMainPwdStr
(
),
mnMinLen
(
5
),
mnExtras
(
0
),
mbAsciiOnly
(
false
)
SfxPasswordDialog
::
SfxPasswordDialog
(
Window
*
pParent
,
const
String
*
pGroupText
)
:
ModalDialog
(
pParent
,
"PasswordDialog"
,
"sfx/ui/password.ui"
)
,
maMinLenPwdStr
(
SFX2_RESSTR
(
STR_PASSWD_MIN_LEN
))
,
maEmptyPwdStr
(
SFX2_RESSTR
(
STR_PASSWD_EMPTY
))
,
mnMinLen
(
5
)
,
mnExtras
(
0
)
,
mbAsciiOnly
(
false
)
{
maPasswordED
.
SetAccessibleName
(
SfxResId
(
TEXT_PASSWD
).
toString
());
FreeResource
();
// setup layout
boost
::
shared_ptr
<
vcl
::
RowOrColumn
>
xLayout
=
boost
::
dynamic_pointer_cast
<
vcl
::
RowOrColumn
>
(
getLayout
()
);
xLayout
->
setOuterBorder
(
0
);
// get edit size, should be used as minimum
Size
aEditSize
(
maUserED
.
GetSizePixel
()
);
// add labelcolumn for the labeled edit fields
boost
::
shared_ptr
<
vcl
::
LabelColumn
>
xEdits
(
new
vcl
::
LabelColumn
(
xLayout
.
get
()
)
);
size_t
nChildIndex
=
xLayout
->
addChild
(
xEdits
);
xLayout
->
setBorders
(
nChildIndex
,
-
2
,
-
2
,
-
2
,
0
);
get
(
mpPassword1Box
,
"password1frame"
);
get
(
mpUserFT
,
"userft"
);
get
(
mpUserED
,
"usered"
);
get
(
mpPassword1FT
,
"pass1ft"
);
get
(
mpPassword1ED
,
"pass1ed"
);
get
(
mpConfirm1FT
,
"confirm1ft"
);
get
(
mpConfirm1ED
,
"confirm1ed"
);
// add group box
xEdits
->
addWindow
(
&
maPasswordBox
);
get
(
mpPassword2Box
,
"password2frame"
);
get
(
mpPassword2FT
,
"pass2ft"
);
get
(
mpPassword2ED
,
"pass2ed"
);
get
(
mpConfirm2FT
,
"confirm2ft"
);
get
(
mpConfirm2ED
,
"confirm2ed"
);
// add user line
xEdits
->
addRow
(
&
maUserFT
,
&
maUserED
,
-
2
,
aEditSize
);
get
(
mpMinLengthFT
,
"minlenft"
);
// add password line
xEdits
->
addRow
(
&
maPasswordFT
,
&
maPasswordED
,
-
2
,
aEditSize
);
get
(
mpOKBtn
,
"ok"
);
// add confirm line
xEdits
->
addRow
(
&
maConfirmFT
,
&
maConfirmED
,
-
2
,
aEditSize
);
// add second group box
xEdits
->
addWindow
(
&
maPassword2Box
);
// add second password line
xEdits
->
addRow
(
&
maPassword2FT
,
&
maPassword2ED
,
-
2
,
aEditSize
);
// add second confirm line
xEdits
->
addRow
(
&
maConfirm2FT
,
&
maConfirm2ED
,
-
2
,
aEditSize
);
// add password length warning line
xEdits
->
addWindow
(
&
maMinLengthFT
);
// add a FixedLine
FixedLine
*
pLine
=
new
FixedLine
(
this
,
0
);
pLine
->
Show
();
addWindow
(
pLine
,
true
);
xLayout
->
addWindow
(
pLine
);
// add button column
Size
aBtnSize
(
maCancelBtn
.
GetSizePixel
()
);
boost
::
shared_ptr
<
vcl
::
RowOrColumn
>
xButtons
(
new
vcl
::
RowOrColumn
(
xLayout
.
get
(),
false
)
);
nChildIndex
=
xLayout
->
addChild
(
xButtons
);
xLayout
->
setBorders
(
nChildIndex
,
-
2
,
0
,
-
2
,
-
2
);
xButtons
->
addWindow
(
&
maHelpBtn
,
0
,
aBtnSize
);
xButtons
->
addChild
(
new
vcl
::
Spacer
(
xButtons
.
get
()
)
);
xButtons
->
addWindow
(
&
maOKBtn
,
0
,
aBtnSize
);
xButtons
->
addWindow
(
&
maCancelBtn
,
0
,
aBtnSize
);
mpPassword1ED
->
SetAccessibleName
(
SFX2_RESSTR
(
STR_PASSWD
));
Link
aLink
=
LINK
(
this
,
SfxPasswordDialog
,
EditModifyHdl
);
m
aPasswordED
.
SetModifyHdl
(
aLink
);
m
aPassword2ED
.
SetModifyHdl
(
aLink
);
m
pPassword1ED
->
SetModifyHdl
(
aLink
);
m
pPassword2ED
->
SetModifyHdl
(
aLink
);
aLink
=
LINK
(
this
,
SfxPasswordDialog
,
OKHdl
);
m
aOKBtn
.
SetClickHdl
(
aLink
);
m
pOKBtn
->
SetClickHdl
(
aLink
);
if
(
pGroupText
)
maPasswordBox
.
SetText
(
*
pGroupText
);
if
(
pGroupText
)
mpPassword1Box
->
set_label
(
*
pGroupText
);
//set the text to the pasword length
//set the text to the pasword length
SetPasswdText
();
}
...
...
@@ -201,13 +139,12 @@ void SfxPasswordDialog::SetPasswdText( )
{
//set the new string to the minimum password length
if
(
mnMinLen
==
0
)
m
aMinLengthFT
.
SetText
(
maEmptyPwdStr
);
m
pMinLengthFT
->
SetText
(
maEmptyPwdStr
);
else
{
maMainPwdStr
=
maMinLenPwdStr
;
maMainPwdStr
.
SearchAndReplace
(
rtl
::
OUString
(
"$(MINLEN)"
),
String
::
CreateFromInt32
((
sal_Int32
)
mnMinLen
),
0
);
maMinLengthFT
.
SetText
(
maMainPwdStr
);
maMinLengthFT
.
Show
();
maMainPwdStr
.
SearchAndReplace
(
OUString
(
"$(MINLEN)"
),
String
::
CreateFromInt32
((
sal_Int32
)
mnMinLen
),
0
);
mpMinLengthFT
->
SetText
(
maMainPwdStr
);
}
}
...
...
@@ -224,106 +161,42 @@ void SfxPasswordDialog::SetMinLen( sal_uInt16 nLen )
short
SfxPasswordDialog
::
Execute
()
{
m
aUserFT
.
Hide
();
m
aUserED
.
Hide
();
m
aConfirmFT
.
Hide
();
m
aConfirmED
.
Hide
();
m
aPasswordFT
.
Hide
();
m
aPassword2Box
.
Hide
();
m
aPassword2FT
.
Hide
();
m
aPassword2ED
.
Hide
();
m
aPassword2FT
.
Hide
();
m
aConfirm2FT
.
Hide
();
m
aConfirm2ED
.
Hide
();
if
(
mnExtras
!=
SHOWEXTRAS_NONE
)
m
aPasswordFT
.
Show
();
if
(
(
mnExtras
&
SHOWEXTRAS_USER
)
)
m
pUserFT
->
Hide
();
m
pUserED
->
Hide
();
m
pConfirm1FT
->
Hide
();
m
pConfirm1ED
->
Hide
();
m
pPassword1FT
->
Hide
();
m
pPassword2Box
->
Hide
();
m
pPassword2FT
->
Hide
();
m
pPassword2ED
->
Hide
();
m
pPassword2FT
->
Hide
();
m
pConfirm2FT
->
Hide
();
m
pConfirm2ED
->
Hide
();
if
(
mnExtras
!=
SHOWEXTRAS_NONE
)
m
pPassword1FT
->
Show
();
if
(
mnExtras
&
SHOWEXTRAS_USER
)
{
//TODO: Inevitably this layout logic will be wrong post merge until we can see the dialog to test it.
Size
a3Size
=
LogicToPixel
(
Size
(
3
,
3
),
MAP_APPFONT
);
Size
a6Size
=
LogicToPixel
(
Size
(
6
,
6
),
MAP_APPFONT
);
long
nMinHeight
=
maHelpBtn
.
GetPosPixel
().
Y
()
+
maHelpBtn
.
GetSizePixel
().
Height
()
+
a6Size
.
Height
();
sal_uInt16
nRowHided
=
1
;
if
(
SHOWEXTRAS_NONE
==
mnExtras
)
{
maUserFT
.
Hide
();
maUserED
.
Hide
();
maConfirmFT
.
Hide
();
maConfirmED
.
Hide
();
maPasswordFT
.
Hide
();
Point
aPos
=
maUserFT
.
GetPosPixel
();
long
nEnd
=
maUserED
.
GetPosPixel
().
X
()
+
maUserED
.
GetSizePixel
().
Width
();
maPasswordED
.
SetPosPixel
(
aPos
);
Size
aSize
=
maPasswordED
.
GetSizePixel
();
aSize
.
Width
()
=
nEnd
-
aPos
.
X
();
maPasswordED
.
SetSizePixel
(
aSize
);
nRowHided
=
2
;
}
else
if
(
SHOWEXTRAS_USER
==
mnExtras
)
{
maConfirmFT
.
Hide
();
maConfirmED
.
Hide
();
}
else
if
(
SHOWEXTRAS_CONFIRM
==
mnExtras
)
{
maUserFT
.
Hide
();
maUserED
.
Hide
();
Point
aPwdPos1
=
maPasswordFT
.
GetPosPixel
();
Point
aPwdPos2
=
maPasswordED
.
GetPosPixel
();
Point
aPos
=
maUserFT
.
GetPosPixel
();
maPasswordFT
.
SetPosPixel
(
aPos
);
aPos
=
maUserED
.
GetPosPixel
();
maPasswordED
.
SetPosPixel
(
aPos
);
aPos
=
maConfirmFT
.
GetPosPixel
();
maConfirmFT
.
SetPosPixel
(
aPwdPos1
);
maConfirmED
.
SetPosPixel
(
aPwdPos2
);
maMinLengthFT
.
SetPosPixel
(
aPos
);
}
Size
aBoxSize
=
maPasswordBox
.
GetSizePixel
();
aBoxSize
.
Height
()
-=
(
nRowHided
*
maUserED
.
GetSizePixel
().
Height
()
);
aBoxSize
.
Height
()
-=
(
nRowHided
*
a3Size
.
Height
()
);
maPasswordBox
.
SetSizePixel
(
aBoxSize
);
long
nDlgHeight
=
maPasswordBox
.
GetPosPixel
().
Y
()
+
aBoxSize
.
Height
()
+
a6Size
.
Height
();
if
(
nDlgHeight
<
nMinHeight
)
nDlgHeight
=
nMinHeight
;
Size
aDlgSize
=
GetOutputSizePixel
();
aDlgSize
.
Height
()
=
nDlgHeight
;
SetOutputSizePixel
(
aDlgSize
);
maUserFT
.
Show
();
maUserED
.
Show
();
mpUserFT
->
Show
();
mpUserED
->
Show
();
}
if
(
(
mnExtras
&
SHOWEXTRAS_CONFIRM
)
)
if
(
mnExtras
&
SHOWEXTRAS_CONFIRM
)
{
m
aConfirmFT
.
Show
();
m
aConfirmED
.
Show
();
m
pConfirm1FT
->
Show
();
m
pConfirm1ED
->
Show
();
}
if
(
(
mnExtras
&
SHOWEXTRAS_PASSWORD2
)
)
if
(
mnExtras
&
SHOWEXTRAS_PASSWORD2
)
{
m
aPassword2Box
.
Show
();
m
aPassword2FT
.
Show
();
m
aPassword2ED
.
Show
();
m
pPassword2Box
->
Show
();
m
pPassword2FT
->
Show
();
m
pPassword2ED
->
Show
();
}
if
(
(
mnExtras
&
SHOWEXTRAS_CONFIRM2
)
)
if
(
mnExtras
&
SHOWEXTRAS_CONFIRM2
)
{
m
aConfirm2FT
.
Show
();
m
aConfirm2ED
.
Show
();
m
pConfirm2FT
->
Show
();
m
pConfirm2ED
->
Show
();
}
boost
::
shared_ptr
<
vcl
::
RowOrColumn
>
xLayout
=
boost
::
dynamic_pointer_cast
<
vcl
::
RowOrColumn
>
(
getLayout
()
);
SetSizePixel
(
xLayout
->
getOptimalSize
(
WINDOWSIZE_PREFERRED
)
);
return
ModalDialog
::
Execute
();
}
...
...
sfx2/source/dialog/passwd.hrc
deleted
100644 → 0
Dosyayı görüntüle @
a65f48f3
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _SFX_PASSWD_HRC
#define _SFX_PASSWD_HRC
// defines ---------------------------------------------------------------
#define GB_PASSWD_PASSWORD 10
#define FT_PASSWD_USER 11
#define ED_PASSWD_USER 12
#define FT_PASSWD_PASSWORD 13
#define ED_PASSWD_PASSWORD 14
#define FT_PASSWD_CONFIRM 15
#define ED_PASSWD_CONFIRM 16
#define FT_PASSWD_MINLEN 17
#define BTN_PASSWD_OK 20
#define BTN_PASSWD_CANCEL 21
#define BTN_PASSWD_HELP 22
#define FT_PASSWD_PASSWORD2 25
#define ED_PASSWD_PASSWORD2 26
#define FT_PASSWD_CONFIRM2 27
#define ED_PASSWD_CONFIRM2 28
#define STR_PASSWD_MIN_LEN 30
#define STR_PASSWD_EMPTY 31
#define TEXT_PASSWD 32
#endif
sfx2/source/dialog/passwd.src
deleted
100644 → 0
Dosyayı görüntüle @
a65f48f3
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "helpid.hrc"
#include "dialog.hrc"
#include "passwd.hrc"
// DLG_PASSWD ------------------------------------------------------------
ModalDialog DLG_PASSWD
{
HelpId = HID_PASSWD ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT( 200, 68 );
Text [ en-US ] = "Enter Password" ;
Moveable = TRUE ;
FixedText FT_PASSWD_USER
{
Pos = MAP_APPFONT( 12, 15 );
Size = MAP_APPFONT( 42, 10 );
Text [ en-US ] = "~User";
};
Edit ED_PASSWD_USER
{
HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_USER";
Border = TRUE;
Pos = MAP_APPFONT( 57, 14 );
Size = MAP_APPFONT( 75, 12 );
};
FixedText FT_PASSWD_PASSWORD
{
Pos = MAP_APPFONT( 12, 30 );
Size = MAP_APPFONT( 42, 10 );
Text [ en-US ] = "~Password";
};
Edit ED_PASSWD_PASSWORD
{
HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_PASSWORD";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 29 );
Size = MAP_APPFONT( 75, 12 );
};
FixedText FT_PASSWD_CONFIRM
{
Pos = MAP_APPFONT( 12, 45 );
Size = MAP_APPFONT( 42, 10 );
Text [ en-US ] = "~Confirm";
};
Edit ED_PASSWD_CONFIRM
{
HelpID = "sfx2:Edit:DLG_PASSWD:ED_PASSWD_CONFIRM";
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 44 );
Size = MAP_APPFONT( 75, 12 );
};
String STR_PASSWD_MIN_LEN
{
Text [ en-US ] = "(Minimum $(MINLEN) characters)" ;
};
String STR_PASSWD_EMPTY
{
Text [ en-US ] = "(The password can be empty)" ;
};
FixedText FT_PASSWD_MINLEN
{
Pos = MAP_APPFONT(12, 65 );
Size = MAP_APPFONT( 126, 10 );
};
FixedLine GB_PASSWD_PASSWORD
{
Pos = MAP_APPFONT( 6, 3 );
Size = MAP_APPFONT( 132, 8 );
Text [ en-US ] = "Password" ;
};
FixedText FT_PASSWD_PASSWORD2
{
Pos = MAP_APPFONT( 12, 30 );
Size = MAP_APPFONT( 42, 10 );
Text [ en-US ] = "P~assword";
};
Edit ED_PASSWD_PASSWORD2
{
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 29 );
Size = MAP_APPFONT( 75, 12 );
};
FixedText FT_PASSWD_CONFIRM2
{
Pos = MAP_APPFONT( 12, 45 );
Size = MAP_APPFONT( 42, 10 );
Text [ en-US ] = "Confir~m";
};
Edit ED_PASSWD_CONFIRM2
{
Border = TRUE;
PassWord = TRUE;
Pos = MAP_APPFONT( 57, 44 );
Size = MAP_APPFONT( 75, 12 );
};
OKButton BTN_PASSWD_OK
{
Disable = TRUE;
Pos = MAP_APPFONT( 144, 6 );
Size = MAP_APPFONT( 50, 14 );
DefButton = TRUE;
};
CancelButton BTN_PASSWD_CANCEL
{
Pos = MAP_APPFONT( 144, 23 );
Size = MAP_APPFONT( 50, 14 );
};
HelpButton BTN_PASSWD_HELP
{
Pos = MAP_APPFONT( 144, 43 );
Size = MAP_APPFONT( 50, 14 );
};
String TEXT_PASSWD
{
Text [ en-US ] = "Password" ;
};
};
sfx2/source/inc/helpid.hrc
Dosyayı görüntüle @
06e3724d
...
...
@@ -23,7 +23,6 @@
// Help-Ids -----------------------------------------------------------------
#define HID_DOCINFO_EDT "SFX2_HID_DOCINFO_EDT"
#define HID_PASSWD "SFX2_HID_PASSWD"
#define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR"
#define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES"
#define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT"
...
...
sfx2/uiconfig/ui/password.ui
0 → 100644
Dosyayı görüntüle @
06e3724d
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object
class=
"GtkDialog"
id=
"PasswordDialog"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"border_width"
>
5
</property>
<property
name=
"title"
translatable=
"yes"
>
Enter Password
</property>
<property
name=
"type_hint"
>
dialog
</property>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"dialog-vbox1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
2
</property>
<child
internal-child=
"action_area"
>
<object
class=
"GtkButtonBox"
id=
"dialog-action_area1"
>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"layout_style"
>
end
</property>
<child>
<object
class=
"GtkButton"
id=
"help"
>
<property
name=
"label"
>
gtk-help
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"ok"
>
<property
name=
"label"
>
gtk-ok
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"sensitive"
>
False
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"cancel"
>
<property
name=
"label"
>
gtk-cancel
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"use_action_appearance"
>
False
</property>
<property
name=
"use_stock"
>
True
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkBox"
id=
"box1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
6
</property>
<child>
<object
class=
"GtkFrame"
id=
"password1frame"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkGrid"
id=
"grid1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"userft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
User
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"pass1ft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Password
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"confirm1ft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Confirm
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"usered"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"pass1ed"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"editable"
>
False
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"confirm1ed"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"editable"
>
False
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
2
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label1"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Password
</property>
<property
name=
"use_markup"
>
True
</property>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkFrame"
id=
"password2frame"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label_xalign"
>
0
</property>
<property
name=
"shadow_type"
>
none
</property>
<child>
<object
class=
"GtkAlignment"
id=
"alignment2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"left_padding"
>
12
</property>
<child>
<object
class=
"GtkGrid"
id=
"grid2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"row_spacing"
>
6
</property>
<property
name=
"column_spacing"
>
6
</property>
<child>
<object
class=
"GtkLabel"
id=
"pass2ft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Password
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"confirm2ft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"label"
translatable=
"yes"
>
Confirm
</property>
</object>
<packing>
<property
name=
"left_attach"
>
0
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"pass2ed"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"editable"
>
False
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
0
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkEntry"
id=
"confirm2ed"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"hexpand"
>
True
</property>
<property
name=
"editable"
>
False
</property>
<property
name=
"invisible_char"
>
●
</property>
<property
name=
"invisible_char_set"
>
True
</property>
</object>
<packing>
<property
name=
"left_attach"
>
1
</property>
<property
name=
"top_attach"
>
1
</property>
<property
name=
"width"
>
1
</property>
<property
name=
"height"
>
1
</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child
type=
"label"
>
<object
class=
"GtkLabel"
id=
"label2"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"label"
translatable=
"yes"
>
Second Password
</property>
<property
name=
"use_markup"
>
True
</property>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"minlenft"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"xalign"
>
0
</property>
<property
name=
"xpad"
>
6
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
2
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget
response=
"0"
>
help
</action-widget>
<action-widget
response=
"0"
>
ok
</action-widget>
<action-widget
response=
"0"
>
cancel
</action-widget>
</action-widgets>
</object>
</interface>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment