From 9a85ae64dc245011eb17debb1cf264af3ab9bb7b Mon Sep 17 00:00:00 2001 From: Dirk Völzke Date: Fri, 27 Jul 2001 09:55:34 +0000 Subject: #90315# call enablePasswordBox before execute to set the status of the password box right --- sfx2/source/dialog/filedlghelper.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 68df8aa7a99c..84368389e0e4 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: filedlghelper.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: dv $ $Date: 2001-07-25 15:48:10 $ + * last change: $Author: dv $ $Date: 2001-07-27 10:55:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -381,6 +381,9 @@ void FileDialogHelper_Impl::dispose() // ------------------------------------------------------------------------ void FileDialogHelper_Impl::enablePasswordBox() { + if ( ! mbHasPassword ) + return; + Reference< XFilterManager > xFltMgr( mxFileDlg, UNO_QUERY ); OUString aFilterName = xFltMgr->getCurrentFilter(); @@ -631,7 +634,7 @@ FileDialogHelper_Impl::FileDialogHelper_Impl( const short nDialogType, mnError = ERRCODE_NONE; mbHasAutoExt = sal_False; mbHasPassword = sal_False; - mbIsPwdEnabled = sal_False; + mbIsPwdEnabled = sal_True; mbHasVersions = sal_False; mbHasPreview = sal_False; mbShowPreview = sal_False; @@ -767,8 +770,8 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList, return ERRCODE_ABORT; loadConfig(); - setDefaultValues(); + enablePasswordBox(); // show the dialog sal_Int16 nRet = mxFileDlg->execute(); @@ -889,6 +892,7 @@ ErrCode FileDialogHelper_Impl::execute() loadConfig(); setDefaultValues(); + enablePasswordBox(); // show the dialog sal_Int16 nRet = mxFileDlg->execute(); -- cgit