diff options
author | Michael Stahl <mstahl@redhat.com> | 2011-11-30 16:08:23 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2011-12-03 00:48:13 +0100 |
commit | db74fdf5346c4f97256522ee2a3200fcdce1af5a (patch) | |
tree | 46f79b6c8d8c37bc3ba3c018bff0919483273373 | |
parent | 4f201dc32b58b56e27fa12b6c770ff38c2da7230 (diff) |
sfx2::DocumentInserter: remove nFlags ctor param
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/instbdlg.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/linkarea.cxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/docinsert.hxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/docinsert.cxx | 13 | ||||
-rw-r--r-- | starmath/source/view.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/uiview/uivwimp.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/utlui/glbltree.cxx | 3 |
9 files changed, 21 insertions, 19 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 1fbaa783f502..93d5c42f793c 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -730,7 +730,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) pImpl->pRequest = new SfxRequest( rReq ); delete pImpl->pDocInserter; pImpl->pDocInserter = new ::sfx2::DocumentInserter( - 0, String::CreateFromAscii( ScDocShell::Factory().GetShortName() ), 0 ); + String::CreateFromAscii( ScDocShell::Factory().GetShortName() ), 0 ); pImpl->pDocInserter->StartExecuteModal( LINK( this, ScDocShell, DialogClosedHdl ) ); return ; } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 6476d8225290..70d681ceacdb 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -315,7 +315,7 @@ IMPL_LINK( ScInsertTableDlg, BrowseHdl_Impl, PushButton*, EMPTYARG ) if ( pDocInserter ) delete pDocInserter; pDocInserter = new ::sfx2::DocumentInserter( - 0, String::CreateFromAscii( ScDocShell::Factory().GetShortName() ) ); + String::CreateFromAscii( ScDocShell::Factory().GetShortName() ) ); pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) ); return 0; } diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index cee0f4d0fdfe..9607d4c47a37 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -112,7 +112,7 @@ IMPL_LINK( ScLinkedAreaDlg, BrowseHdl, PushButton*, EMPTYARG ) { if ( !pDocInserter ) pDocInserter = new sfx2::DocumentInserter( - 0, String::CreateFromAscii( ScDocShell::Factory().GetShortName() ) ); + String::CreateFromAscii( ScDocShell::Factory().GetShortName() ) ); pDocInserter->StartExecuteModal( LINK( this, ScLinkedAreaDlg, DialogClosedHdl ) ); return 0; } diff --git a/sfx2/inc/sfx2/docinsert.hxx b/sfx2/inc/sfx2/docinsert.hxx index 40969a76dbe1..292b396cc906 100644 --- a/sfx2/inc/sfx2/docinsert.hxx +++ b/sfx2/inc/sfx2/docinsert.hxx @@ -60,8 +60,7 @@ private: String m_sFilter; Link m_aDialogClosedLink; - bool m_bMultiSelectionEnabled; - sal_Int64 m_nDlgFlags; + sal_Int64 const m_nDlgFlags; ErrCode m_nError; sfx2::FileDialogHelper* m_pFileDlg; @@ -71,7 +70,8 @@ private: DECL_LINK( DialogClosedHdl, sfx2::FileDialogHelper* ); public: - DocumentInserter( sal_Int64 _nFlags, const String& _rFactory, bool _bEnableMultiSelection = false ); + DocumentInserter(const String& rFactory, + bool const bEnableMultiSelection = false); ~DocumentInserter(); void StartExecuteModal( const Link& _rDialogClosedLink ); diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx index 3eab0a051345..cb4354b1d2d2 100644 --- a/sfx2/source/doc/docinsert.cxx +++ b/sfx2/source/doc/docinsert.cxx @@ -70,11 +70,12 @@ namespace sfx2 { // ======================================================================= DocumentInserter::DocumentInserter( - sal_Int64 _nFlags, const String& _rFactory, bool _bEnableMultiSelection ) : + const String& rFactory, bool const bEnableMultiSelection) : - m_sDocFactory ( _rFactory ) - , m_bMultiSelectionEnabled ( _bEnableMultiSelection ) - , m_nDlgFlags ( _nFlags | SFXWB_INSERT | WB_3DLOOK ) + m_sDocFactory ( rFactory ) + , m_nDlgFlags ( (bEnableMultiSelection) + ? (SFXWB_INSERT|SFXWB_MULTISELECTION) + : SFXWB_INSERT ) , m_nError ( ERRCODE_NONE ) , m_pFileDlg ( NULL ) , m_pItemSet ( NULL ) @@ -95,9 +96,7 @@ void DocumentInserter::StartExecuteModal( const Link& _rDialogClosedLink ) DELETEZ( m_pURLList ); if ( !m_pFileDlg ) { - sal_Int64 nFlags = m_bMultiSelectionEnabled ? ( m_nDlgFlags | SFXWB_MULTISELECTION ) - : m_nDlgFlags; - m_pFileDlg = new FileDialogHelper( nFlags, m_sDocFactory ); + m_pFileDlg = new FileDialogHelper( m_nDlgFlags, m_sDocFactory ); } m_pFileDlg->StartExecuteModal( LINK( this, DocumentInserter, DialogClosedHdl ) ); } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 15861c062a18..66626a089062 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1792,8 +1792,8 @@ void SmViewShell::Execute(SfxRequest& rReq) delete pImpl->pRequest; pImpl->pRequest = new SfxRequest( rReq ); delete pImpl->pDocInserter; - pImpl->pDocInserter = - new ::sfx2::DocumentInserter( 0, GetDoc()->GetFactory().GetFactoryName(), 0 ); + pImpl->pDocInserter = new ::sfx2::DocumentInserter( + GetDoc()->GetFactory().GetFactoryName(), 0 ); pImpl->pDocInserter->StartExecuteModal( LINK( this, SmViewShell, DialogClosedHdl ) ); break; } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 6fff884754e4..77647b9e68cb 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1114,7 +1114,8 @@ IMPL_LINK( SwEditRegionDlg, FileSearchHdl, PushButton *, EMPTYARG ) m_pOldDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter( 0, String::CreateFromAscii("swriter") ); + m_pDocInserter = + new ::sfx2::DocumentInserter( String::CreateFromAscii("swriter") ); m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) ); return 0; } @@ -1864,7 +1865,8 @@ IMPL_LINK( SwInsertSectionTabPage, FileSearchHdl, PushButton *, EMPTYARG ) m_pOldDefDlgParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter( 0, String::CreateFromAscii("swriter") ); + m_pDocInserter = new ::sfx2::DocumentInserter( + String::CreateFromAscii("swriter") ); m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) ); return 0; } diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index 237a0683a039..5f730ffa991c 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -244,7 +244,7 @@ void SwView_Impl::AddTransferable(SwTransferable& rTransferable) void SwView_Impl::StartDocumentInserter( const String& rFactory, const Link& rEndDialogHdl ) { delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter( 0, rFactory ); + m_pDocInserter = new ::sfx2::DocumentInserter( rFactory ); m_pDocInserter->StartExecuteModal( rEndDialogHdl ); } diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index f7497cfd15bd..cac16e6fc292 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -729,7 +729,8 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF pDefParentWin = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); delete pDocInserter; - pDocInserter = new ::sfx2::DocumentInserter( 0, String::CreateFromAscii("swriter"), true ); + pDocInserter = new ::sfx2::DocumentInserter( + String::CreateFromAscii("swriter"), true ); pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) ); } else if ( pFileName->Len() ) |