/************************************************************************* * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: masterpassworddlg.cxx,v $ * * $Revision: 1.4 $ * * last change: $Author: rt $ $Date: 2007-04-26 08:19:40 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. * * * GNU Lesser General Public License Version 2.1 * ============================================= * Copyright 2005 by Sun Microsystems, Inc. * 901 San Antonio Road, Palo Alto, CA 94303, USA * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License version 2.1, as published by the Free Software Foundation. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, * MA 02111-1307 USA * ************************************************************************/ #ifndef _SVT_FILEDLG_HXX #include #endif #ifndef _SV_MSGBOX_HXX #include #endif #ifndef UUI_IDS_HRC #include #endif #ifndef UUI_MASTERPASSWORDDLG_HRC #include #endif #ifndef UUI_MASTERPASSWORDDLG_HXX #include #endif // MasterPasswordDialog--------------------------------------------------- // ----------------------------------------------------------------------- IMPL_LINK( MasterPasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG ) { EndDialog( RET_OK ); return 1; } // ----------------------------------------------------------------------- MasterPasswordDialog::MasterPasswordDialog ( Window* pParent, ::com::sun::star::task::PasswordRequestMode aDialogMode, ResMgr* pResMgr ) : ModalDialog( pParent, ResId( DLG_UUI_MASTERPASSWORD, *pResMgr ) ), aFTMasterPassword ( this, ResId( FT_MASTERPASSWORD, *pResMgr ) ), aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ), aOKBtn ( this, ResId( BTN_MASTERPASSWORD_OK, *pResMgr ) ), aCancelBtn ( this, ResId( BTN_MASTERPASSWORD_CANCEL, *pResMgr ) ), aHelpBtn ( this, ResId( BTN_MASTERPASSWORD_HELP, *pResMgr ) ), nDialogMode ( aDialogMode ), pResourceMgr ( pResMgr ) { if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER ) { String aErrorMsg( ResId( STR_ERROR_MASTERPASSWORD_WRONG, *pResourceMgr )); ErrorBox aErrorBox( pParent, WB_OK, aErrorMsg ); aErrorBox.Execute(); } FreeResource(); aOKBtn.SetClickHdl( LINK( this, MasterPasswordDialog, OKHdl_Impl ) ); };