diff options
author | Oliver-Rainer Wittmann <od@openoffice.org> | 2010-03-24 09:01:45 +0100 |
---|---|---|
committer | Oliver-Rainer Wittmann <od@openoffice.org> | 2010-03-24 09:01:45 +0100 |
commit | 1c20aa26ebaa0efc0605b054ebcfe329beb829dd (patch) | |
tree | 9579983414ddaafbe649d45f5077a1220e4750fe | |
parent | e4fa30705ff0f3c7b42efbc8e473e45f05e4c0ff (diff) | |
parent | f16413a0d953d0c3bb81b2dce768eaec3402c8f1 (diff) |
sw321bf01: merge changes
-rw-r--r-- | fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx | 40 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/appl/shutdownicon.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/topfrm.cxx | 5 |
5 files changed, 48 insertions, 23 deletions
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index 6814f79761..f833e65af3 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -128,14 +128,14 @@ STDMETHODIMP VistaFilePickerEventHandler::OnFileOk(IFileDialog* /*pDialog*/) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnFolderChanging(IFileDialog* pDialog, - IShellItem* pFolder) +STDMETHODIMP VistaFilePickerEventHandler::OnFolderChanging(IFileDialog* /*pDialog*/, + IShellItem* /*pFolder*/) { return E_NOTIMPL; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnFolderChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_DIRECTORY_CHANGED, 0); return S_OK; @@ -253,7 +253,7 @@ void lcl_updateVersionListDirectly(IFileDialog* pDialog) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* /*pDialog*/) { impl_sendEvent(E_FILE_SELECTION_CHANGED, 0); //lcl_updateVersionListDirectly(pDialog); @@ -261,16 +261,16 @@ STDMETHODIMP VistaFilePickerEventHandler::OnSelectionChange(IFileDialog* pDialog } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* pDialog , - IShellItem* pItem , - FDE_SHAREVIOLATION_RESPONSE* pResponse) +STDMETHODIMP VistaFilePickerEventHandler::OnShareViolation(IFileDialog* /*pDialog*/ , + IShellItem* /*pItem*/ , + FDE_SHAREVIOLATION_RESPONSE* /*pResponse*/) { impl_sendEvent(E_CONTROL_STATE_CHANGED, css::ui::dialogs::CommonFilePickerElementIds::LISTBOX_FILTER); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) +STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* /*pDialog*/) { /* IFileDialogCustomize *iCustomize; @@ -302,32 +302,32 @@ STDMETHODIMP VistaFilePickerEventHandler::OnTypeChange(IFileDialog* pDialog) } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* pDialog , - IShellItem* pItem , - FDE_OVERWRITE_RESPONSE* pResponse) +STDMETHODIMP VistaFilePickerEventHandler::OnOverwrite(IFileDialog* /*pDialog*/ , + IShellItem* /*pItem*/ , + FDE_OVERWRITE_RESPONSE* /*pResponse*/) { return E_NOTIMPL; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnItemSelected(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , - DWORD nIDItem ) + DWORD /*nIDItem*/ ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl )); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnButtonClicked(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl , BOOL bChecked ) { @@ -356,15 +356,15 @@ STDMETHODIMP VistaFilePickerEventHandler::OnCheckButtonToggled(IFileDialogCustom if (nIDCtl == css::ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION) m_pInternalNotify->onAutoExtensionChanged(bChecked); - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } //----------------------------------------------------------------------------------------- -STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomize* pCustomize, +STDMETHODIMP VistaFilePickerEventHandler::OnControlActivating(IFileDialogCustomize* /*pCustomize*/, DWORD nIDCtl ) { - impl_sendEvent(E_CONTROL_STATE_CHANGED, nIDCtl); + impl_sendEvent(E_CONTROL_STATE_CHANGED, static_cast<sal_Int16>( nIDCtl)); return S_OK; } diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx index 985af75b1f..d3e714f99e 100644 --- a/sfx2/source/appl/shutdownicon.cxx +++ b/sfx2/source/appl/shutdownicon.cxx @@ -36,6 +36,7 @@ #include <sfx2/app.hxx> #include <vos/mutex.hxx> #include <svtools/imagemgr.hxx> +#include <svtools/miscopt.hxx> // #include <cmdlineargs.hxx> #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/frame/XDispatchResultListener.hpp> @@ -238,6 +239,7 @@ ShutdownIcon::ShutdownIcon( Reference< XMultiServiceFactory > aSMgr ) : ShutdownIconServiceBase( m_aMutex ), m_bVeto ( false ), m_bListenForTermination ( false ), + m_bSystemDialogs( false ), m_pResMgr( NULL ), m_pFileDlg( NULL ), m_xServiceManager( aSMgr ), @@ -246,6 +248,7 @@ ShutdownIcon::ShutdownIcon( Reference< XMultiServiceFactory > aSMgr ) : m_pPlugin( 0 ), m_bInitialized( false ) { + m_bSystemDialogs = SvtMiscOptions().UseSystemFileDialog(); } ShutdownIcon::~ShutdownIcon() @@ -379,6 +382,16 @@ void ShutdownIcon::StartFileDialog() { ::vos::OGuard aGuard( Application::GetSolarMutex() ); + bool bDirty = ( m_bSystemDialogs != static_cast<bool>(SvtMiscOptions().UseSystemFileDialog()) ); + + if ( m_pFileDlg && bDirty ) + { + // Destroy instance as changing the system file dialog setting + // forces us to create a new FileDialogHelper instance! + delete m_pFileDlg; + m_pFileDlg = NULL; + } + if ( !m_pFileDlg ) m_pFileDlg = new FileDialogHelper( WB_OPEN | SFXWB_MULTISELECTION, String() ); m_pFileDlg->StartExecuteModal( STATIC_LINK( this, ShutdownIcon, DialogClosedHdl_Impl ) ); @@ -515,8 +528,14 @@ IMPL_STATIC_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, EMPTYAR #ifdef WNT // #103346 Destroy dialog to prevent problems with custom controls - delete pThis->m_pFileDlg; - pThis->m_pFileDlg = NULL; + // This fix is dependent on the dialog settings. Destroying the dialog here will + // crash the non-native dialog implementation! Therefore make this dependent on + // the settings. + if ( SvtMiscOptions().UseSystemFileDialog() ) + { + delete pThis->m_pFileDlg; + pThis->m_pFileDlg = NULL; + } #endif LeaveModalMode(); diff --git a/sfx2/source/appl/shutdownicon.hxx b/sfx2/source/appl/shutdownicon.hxx index a1c836cbea..cc18016e33 100644 --- a/sfx2/source/appl/shutdownicon.hxx +++ b/sfx2/source/appl/shutdownicon.hxx @@ -52,6 +52,7 @@ class SFX2_DLLPUBLIC ShutdownIcon : public ShutdownIconServiceBase ::osl::Mutex m_aMutex; bool m_bVeto; bool m_bListenForTermination; + bool m_bSystemDialogs; ResMgr* m_pResMgr; sfx2::FileDialogHelper* m_pFileDlg; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 972ac57ce6..d2c73fe3bc 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2596,6 +2596,7 @@ sal_Bool SfxObjectShell::DoSave_Impl( const SfxItemSet* pArgs ) // is a new medium "from scratch", so no version should be stored into it SfxItemSet* pSet = new SfxAllItemSet(*pRetrMedium->GetItemSet()); pSet->ClearItem( SID_VERSION ); + pSet->ClearItem( SID_DOC_BASEURL ); // create a medium as a copy; this medium is only for writingm, because it uses the same name as the original one // writing is done through a copy, that will be transferred to the target ( of course after calling HandsOff ) @@ -2882,6 +2883,7 @@ sal_Bool SfxObjectShell::PreDoSaveAs_Impl pMergedParams->ClearItem( SID_STREAM ); pMergedParams->ClearItem( SID_CONTENT ); pMergedParams->ClearItem( SID_DOC_READONLY ); + pMergedParams->ClearItem( SID_DOC_BASEURL ); pMergedParams->ClearItem( SID_REPAIRPACKAGE ); diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx index bf88a5775d..358af31565 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -847,7 +847,10 @@ sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc ) if ( GetCurrentDocument() != pDoc ) // something went wrong during insertion return sal_False; - pDoc->OwnerLock( sal_False ); + + if( !pImp->bHidden ) + pDoc->OwnerLock( sal_False ); + return sal_True; } |