Kaydet (Commit) 06e3724d authored tarafından Caolán McNamara's avatar Caolán McNamara

convert password dialog to .ui

Change-Id: Ib2e9c5a72239fc0fa3a54ac3717d90fe1b779d63
üst a65f48f3
...@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\ ...@@ -58,7 +58,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
sfx2/source/dialog/mailwindow.src \ sfx2/source/dialog/mailwindow.src \
sfx2/source/dialog/mgetempl.src \ sfx2/source/dialog/mgetempl.src \
sfx2/source/dialog/newstyle.src \ sfx2/source/dialog/newstyle.src \
sfx2/source/dialog/passwd.src \
sfx2/source/dialog/printopt.src \ sfx2/source/dialog/printopt.src \
sfx2/source/dialog/recfloat.src \ sfx2/source/dialog/recfloat.src \
sfx2/source/dialog/securitypage.src \ sfx2/source/dialog/securitypage.src \
......
...@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,sfx2,\ ...@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,sfx2,\
Library_sfx \ Library_sfx \
Package_inc \ Package_inc \
Package_sdi \ Package_sdi \
UI_sfx \
)) ))
$(eval $(call gb_Module_add_check_targets,sfx2,\ $(eval $(call gb_Module_add_check_targets,sfx2,\
......
# -*- 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:
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <vcl/dialog.hxx> #include <vcl/dialog.hxx>
#include <vcl/edit.hxx> #include <vcl/edit.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
#include <vcl/layout.hxx>
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
// defines --------------------------------------------------------------- // defines ---------------------------------------------------------------
...@@ -50,23 +51,23 @@ ...@@ -50,23 +51,23 @@
class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
{ {
private: private:
FixedLine maPasswordBox; VclFrame* mpPassword1Box;
FixedText maUserFT; FixedText* mpUserFT;
Edit maUserED; Edit* mpUserED;
FixedText maPasswordFT; FixedText* mpPassword1FT;
Edit maPasswordED; Edit* mpPassword1ED;
FixedText maConfirmFT; FixedText* mpConfirm1FT;
Edit maConfirmED; Edit* mpConfirm1ED;
FixedText maMinLengthFT;
FixedLine maPassword2Box;
FixedText maPassword2FT;
Edit maPassword2ED;
FixedText maConfirm2FT;
Edit maConfirm2ED;
OKButton maOKBtn; VclFrame* mpPassword2Box;
CancelButton maCancelBtn; FixedText* mpPassword2FT;
HelpButton maHelpBtn; Edit* mpPassword2ED;
FixedText* mpConfirm2FT;
Edit* mpConfirm2ED;
FixedText* mpMinLengthFT;
OKButton* mpOKBtn;
String maConfirmStr; String maConfirmStr;
String maMinLenPwdStr; String maMinLenPwdStr;
...@@ -76,28 +77,52 @@ private: ...@@ -76,28 +77,52 @@ private:
sal_uInt16 mnExtras; sal_uInt16 mnExtras;
bool mbAsciiOnly; bool mbAsciiOnly;
DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* ); DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*);
DECL_DLLPRIVATE_LINK(OKHdl, void *); DECL_DLLPRIVATE_LINK(OKHdl, void *);
void SetPasswdText(); void SetPasswdText();
public: public:
SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL ); SfxPasswordDialog(Window* pParent, const String* pGroupText = NULL);
String GetUser() const { return maUserED.GetText(); } String GetUser() const
String GetPassword() const { return maPasswordED.GetText(); } {
String GetConfirm() const { return maConfirmED.GetText(); } return mpUserED->GetText();
}
String GetPassword2() const { return maPassword2ED.GetText(); } String GetPassword() const
String GetConfirm2() const { return maConfirm2ED.GetText(); } {
void SetGroup2Text( const String& i_rText ) { maPassword2Box.SetText( i_rText ); } return mpPassword1ED->GetText();
}
void SetMinLen( sal_uInt16 Len ); String GetConfirm() const
void SetEditHelpId( const rtl::OString& rId ) { maPasswordED.SetHelpId( rId ); } {
void ShowExtras( sal_uInt16 nExtras ) { mnExtras = nExtras; } return mpConfirm1ED->GetText();
void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; } }
String GetPassword2() const
virtual short Execute(); {
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();
}; };
#endif // #ifndef _SFX_PASSWD_HXX #endif // #ifndef _SFX_PASSWD_HXX
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
#define STR_STANDARD (RID_SFX_START+104) #define STR_STANDARD (RID_SFX_START+104)
#define STR_READONLY (RID_SFX_START+105) #define STR_READONLY (RID_SFX_START+105)
#define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106) #define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106)
#define STR_EDIT (RID_SFX_START+108) #define STR_EDIT (RID_SFX_START+108)
#define STR_QUERY_SAVE_DOCUMENT (RID_SFX_START+110) #define STR_QUERY_SAVE_DOCUMENT (RID_SFX_START+110)
#define STR_BYTES (RID_SFX_START+111) #define STR_BYTES (RID_SFX_START+111)
...@@ -166,10 +166,12 @@ ...@@ -166,10 +166,12 @@
#define STR_STANDARD_SHORTCUT (RID_SFX_START+117) #define STR_STANDARD_SHORTCUT (RID_SFX_START+117)
#define STR_REPAIREDDOCUMENT (RID_SFX_START+118) #define STR_REPAIREDDOCUMENT (RID_SFX_START+118)
#define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119) #define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119)
#define STR_SHARED (RID_SFX_START+120) #define STR_SHARED (RID_SFX_START+120)
#define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121) #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) #define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157)
//========================================================================= //=========================================================================
......
...@@ -23,3 +23,17 @@ String STR_ACCTITLE_PRODUCTIVITYTOOLS ...@@ -23,3 +23,17 @@ String STR_ACCTITLE_PRODUCTIVITYTOOLS
Text [ en-US ] = "%PRODUCTNAME"; 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" ;
};
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0) #define RID_DLG_ALIEN_WARNING ( RC_DIALOG_BEGIN + 0)
#define STR_RESET ( 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 STR_TABPAGE_MANAGESTYLES ( RC_DIALOG_BEGIN + 12)
#define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13) #define MSG_TABPAGE_INVALIDNAME ( RC_DIALOG_BEGIN + 13)
#define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14) #define MSG_TABPAGE_INVALIDSTYLE ( RC_DIALOG_BEGIN + 14)
......
This diff is collapsed.
/*
* 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
/*
* 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" ;
};
};
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
// Help-Ids ----------------------------------------------------------------- // Help-Ids -----------------------------------------------------------------
#define HID_DOCINFO_EDT "SFX2_HID_DOCINFO_EDT" #define HID_DOCINFO_EDT "SFX2_HID_DOCINFO_EDT"
#define HID_PASSWD "SFX2_HID_PASSWD"
#define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR" #define HID_PRINTMONITOR "SFX2_HID_PRINTMONITOR"
#define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES" #define HID_MANAGE_STYLES "SFX2_HID_MANAGE_STYLES"
#define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT" #define HID_CONFIG_EVENT "SFX2_HID_CONFIG_EVENT"
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment