diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2006-11-22 09:56:33 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2006-11-22 09:56:33 +0000 |
commit | f0efd3549f47aa45581863d28ec55c00a56bfa6c (patch) | |
tree | f0da5643d939255aa7277c1c12f815f526af2ab3 /sfx2/source | |
parent | a3800cf81c6850f911a114d10912d168857b9ba6 (diff) |
INTEGRATION: CWS asyncdialogs (1.29.140); FILE MERGED
2006/11/01 09:32:33 pb 1.29.140.8: fix: #i66952# syntax error after resync
2006/10/31 17:59:40 pb 1.29.140.7: RESYNC: (1.35-1.36); FILE MERGED
2006/09/20 20:34:15 pb 1.29.140.6: RESYNC: (1.34-1.35); FILE MERGED
2006/07/14 10:39:36 pb 1.29.140.5: fix: #i57125# warning free code
2006/07/12 20:55:28 pb 1.29.140.4: RESYNC: (1.33-1.34); FILE MERGED
2006/05/31 14:53:30 pb 1.29.140.3: RESYNC: (1.31-1.33); FILE MERGED
2005/12/08 08:54:02 kso 1.29.140.2: RESYNC: (1.29-1.31); FILE MERGED
2005/11/10 09:55:35 pb 1.29.140.1: fix: #i57125# asynchronous execute of file dialog
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 73 |
1 files changed, 46 insertions, 27 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index ffce54c56623..4e59f3edae7b 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -4,9 +4,9 @@ * * $RCSfile: dinfdlg.cxx,v $ * - * $Revision: 1.36 $ + * $Revision: 1.37 $ * - * last change: $Author: obo $ $Date: 2006-10-12 15:52:33 $ + * last change: $Author: vg $ $Date: 2006-11-22 10:56:33 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -86,7 +86,7 @@ #ifndef INCLUDED_RTL_MATH_HXX #include <rtl/math.hxx> #endif -#include "com/sun/star/ui/dialogs/TemplateDescription.hpp" +#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include "dinfdlg.hxx" #include "sfxresid.hxx" @@ -106,6 +106,7 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::uno; // STATIC DATA ----------------------------------------------------------- @@ -489,19 +490,23 @@ sal_Bool SfxDocumentInfoItem::PutValue( const com::sun::star::uno::Any& rVal, BY //------------------------------------------------------------------------ -SfxDocumentDescPage::SfxDocumentDescPage( Window * pParent, const SfxItemSet &rItemSet) - : SfxTabPage( pParent, SfxResId(TP_DOCINFODESC), rItemSet), - aTitleFt( this, ResId( FT_TITLE ) ), - aTitleEd( this, ResId( ED_TITLE ) ), - aThemaFt( this, ResId( FT_THEMA ) ), - aThemaEd( this, ResId( ED_THEMA ) ), - aKeywordsFt( this, ResId( FT_KEYWORDS ) ), - aKeywordsEd( this, ResId( ED_KEYWORDS ) ), - aCommentFt( this, ResId( FT_COMMENT ) ), - aCommentEd( this, ResId( ED_COMMENT ) ), - pInfoItem(0) +SfxDocumentDescPage::SfxDocumentDescPage( Window * pParent, const SfxItemSet& rItemSet ) : + + SfxTabPage( pParent, SfxResId( TP_DOCINFODESC ), rItemSet ), + + aTitleFt ( this, ResId( FT_TITLE ) ), + aTitleEd ( this, ResId( ED_TITLE ) ), + aThemaFt ( this, ResId( FT_THEMA ) ), + aThemaEd ( this, ResId( ED_THEMA ) ), + aKeywordsFt ( this, ResId( FT_KEYWORDS ) ), + aKeywordsEd ( this, ResId( ED_KEYWORDS ) ), + aCommentFt ( this, ResId( FT_COMMENT ) ), + aCommentEd ( this, ResId( ED_COMMENT ) ), + + pInfoItem ( NULL ) + { - FreeResource(); + FreeResource(); } //------------------------------------------------------------------------ @@ -1010,8 +1015,9 @@ SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet ) aCBFrame ( this, ResId( CB_FRAME ) ), aForwardErrorMessg ( ResId( STR_FORWARD_ERRMSSG ) ), - pInfoItem( NULL ), - eState( S_Init ) + pInfoItem ( NULL ), + pFileDlg ( NULL ), + eState ( S_Init ) { FreeResource(); @@ -1046,6 +1052,12 @@ SfxInternetPage::SfxInternetPage( Window* pParent, const SfxItemSet& rItemSet ) ChangeState( S_NoUpdate ); } +//------------------------------------------------------------------------ + +SfxInternetPage::~SfxInternetPage() +{ + delete pFileDlg; +} //------------------------------------------------------------------------ @@ -1099,7 +1111,6 @@ void SfxInternetPage::EnableNoUpdate( BOOL bEnable ) aRBNoAutoUpdate.Check(); } - //------------------------------------------------------------------------ void SfxInternetPage::EnableReload( BOOL bEnable ) @@ -1158,16 +1169,24 @@ IMPL_LINK( SfxInternetPage, ClickHdlForward, Control*, pCtrl ) //------------------------------------------------------------------------ -IMPL_LINK( SfxInternetPage, ClickHdlBrowseURL, PushButton*, pButton ) +IMPL_LINK( SfxInternetPage, ClickHdlBrowseURL, PushButton*, EMPTYARG ) { - (void)pButton; //unused - sfx2::FileDialogHelper aHelper( - com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, - WB_OPEN ); - aHelper.SetDisplayDirectory( aEDForwardURL.GetText() ); - - if( ERRCODE_NONE == aHelper.Execute() ) - aEDForwardURL.SetText( aHelper.GetPath() ); + if ( !pFileDlg ) + pFileDlg = new sfx2::FileDialogHelper( TemplateDescription::FILEOPEN_SIMPLE, WB_OPEN ); + pFileDlg->SetDisplayDirectory( aEDForwardURL.GetText() ); + pFileDlg->StartExecuteModal( LINK( this, SfxInternetPage, DialogClosedHdl ) ); + + return 0; +} + +//------------------------------------------------------------------------ + +IMPL_LINK( SfxInternetPage, DialogClosedHdl, sfx2::FileDialogHelper*, EMPTYARG ) +{ + DBG_ASSERT( pFileDlg, "SfxInternetPage::DialogClosedHdl(): no file dialog" ); + + if ( ERRCODE_NONE == pFileDlg->GetError() ) + aEDForwardURL.SetText( pFileDlg->GetPath() ); return 0; } |