diff options
author | Oliver Bolte <obo@openoffice.org> | 2009-02-19 08:26:23 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2009-02-19 08:26:23 +0000 |
commit | 09a136a6efbe7ace8514906d5d07eddb98c11fea (patch) | |
tree | deb5b30fd5fb84b80b98dcd58c20abcd7fc4c499 /sfx2/source | |
parent | 0dba79793564a0d8c9aa281671fac2724654e458 (diff) |
CWS-TOOLING: integrate CWS fwk102
2009-02-10 18:30:48 +0100 mav r267575 : #159157# let the hypterlink be opened in the same browser window in case of ActiveX control
2009-02-10 18:26:06 +0100 mav r267574 : #159157# let the hypterlink be opened in the same browser window in case of ActiveX control
2009-02-10 18:18:28 +0100 mav r267573 : #159157# let the hypterlink be opened in the same browser window in case of ActiveX control
2009-02-09 16:51:23 +0100 mav r267522 : #i98922# the fix from IS from native222
2009-02-09 14:48:19 +0100 os r267516 : RES_PARATR_OUTLINELEVEL added
2009-02-09 11:07:55 +0100 mav r267503 : #i97987# handle untitled documen correctly on switching to shared mode
2009-02-06 14:52:48 +0100 mav r267465 : #i98240# commit the patch
2009-02-06 13:56:09 +0100 mav r267460 : #i98206# do not get outstream ourself
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/bindings.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/inc/statcach.hxx | 7 |
7 files changed, 57 insertions, 19 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 228eecfb6ce5..34deb24bcc32 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1544,8 +1544,17 @@ const SfxPoolItem* SfxBindings::Execute_Impl( sal_uInt16 nId, const SfxPoolItem* if ( pCache && pCache->GetDispatch().is() ) { + DBG_ASSERT( !ppInternalArgs, "Internal args get lost when dispatched!" ); + + SfxItemPool &rPool = GetDispatcher()->GetFrame()->GetObjectShell()->GetPool(); + SfxRequest aReq( nId, nCallMode, rPool ); + aReq.SetModifier( nModi ); + if( ppItems ) + while( *ppItems ) + aReq.AppendItem( **ppItems++ ); + // cache binds to an external dispatch provider - pCache->Dispatch( nCallMode == SFX_CALLMODE_SYNCHRON ); + pCache->Dispatch( aReq.GetArgs(), nCallMode == SFX_CALLMODE_SYNCHRON ); if ( bDeleteCache ) DELETEZ( pCache ); SfxPoolItem *pVoid = new SfxVoidItem( nId ); diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index f72d8573df6c..cb7e0f042f0d 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: statcach.cxx,v $ - * $Revision: 1.36 $ + * $Revision: 1.36.180.1 $ * * This file is part of OpenOffice.org. * @@ -44,6 +44,7 @@ #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/FrameActionEvent.hpp> #include <com/sun/star/frame/FrameAction.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> #include <cppuhelper/weak.hxx> #include <svtools/eitem.hxx> #include <svtools/intitem.hxx> @@ -55,6 +56,7 @@ #endif #include <sfx2/app.hxx> +#include <sfx2/appuno.hxx> #include "statcach.hxx" #include <sfx2/msg.hxx> #include <sfx2/ctrlitem.hxx> @@ -65,6 +67,7 @@ #include <sfx2/msgpool.hxx> #include <sfx2/viewfrm.hxx> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; @@ -191,13 +194,14 @@ const ::com::sun::star::frame::FeatureStateEvent& BindDispatch_Impl::GetStatus() return aStatus; } -void BindDispatch_Impl::Dispatch( sal_Bool bForceSynchron ) +void BindDispatch_Impl::Dispatch( uno::Sequence < beans::PropertyValue > aProps, sal_Bool bForceSynchron ) { if ( xDisp.is() && aStatus.IsEnabled ) { - ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > aProps(1); - aProps.getArray()[0].Name = DEFINE_CONST_UNICODE("SynchronMode"); - aProps.getArray()[0].Value <<= bForceSynchron ; + sal_Int32 nLength = aProps.getLength(); + aProps.realloc(nLength+1); + aProps[nLength].Name = DEFINE_CONST_UNICODE("SynchronMode"); + aProps[nLength].Value <<= bForceSynchron ; xDisp->dispatch( aURL, aProps ); } } @@ -560,12 +564,17 @@ void SfxStateCache::DeleteFloatingWindows() return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > (); } -void SfxStateCache::Dispatch( sal_Bool bForceSynchron ) +void SfxStateCache::Dispatch( const SfxItemSet* pSet, sal_Bool bForceSynchron ) { // protect pDispatch against destruction in the call ::com::sun::star::uno::Reference < ::com::sun::star::frame::XStatusListener > xKeepAlive( pDispatch ); if ( pDispatch ) - pDispatch->Dispatch( bForceSynchron ); + { + uno::Sequence < beans::PropertyValue > aArgs; + if (pSet) + TransformItems( nId, *pSet, aArgs ); + pDispatch->Dispatch( aArgs, bForceSynchron ); + } } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 2ffe22adf400..6f70f743908f 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1188,7 +1188,7 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading, sal_Bool bNoUI ) } // TODO/LATER: This implementation does not allow to detect the system lock on saving here, actually this is no big problem - if ( bUseSystemLock && !pImp->xStream.is() && !pOutStream ) + if ( bLoading && bUseSystemLock && !pImp->xStream.is() && !pOutStream ) pImp->m_bHandleSysLocked = sal_True; // if system lock is used the writeable stream should be available do diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 5fe4fc1d27f2..7bb988f6d80e 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -535,10 +535,30 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) if ( bShared != IsDocShared() ) { + ::rtl::OUString aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + + if ( !aOrigURL.getLength() && bSave ) + { + // this is a new document, let it be stored before switching to the shared mode; + // the storing should be done without shared flag, since it is possible that the + // target location does not allow to create sharing control file; + // the shared flag will be set later after creation of sharing control file + SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( this ); + + if ( pViewFrame ) + { + // TODO/LATER: currently the application guards against the reentrance problem + const SfxPoolItem* pItem = pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : SID_SAVEASDOC ); + SfxBoolItem* pResult = PTR_CAST( SfxBoolItem, pItem ); + bResult = ( pResult && pResult->GetValue() ); + if ( bResult ) + aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); + } + } + sal_Bool bOldValue = HasSharedXMLFlagSet(); SetSharedXMLFlag( bShared ); - ::rtl::OUString aOrigURL = GetMedium()->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ); sal_Bool bRemoveEntryOnError = sal_False; if ( bResult && bShared ) { @@ -561,6 +581,7 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave ) if ( pViewFrame ) { // TODO/LATER: currently the application guards against the reentrance problem + SetModified( sal_True ); // the modified flag has to be set to let the document be stored with the shared flag const SfxPoolItem* pItem = pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : SID_SAVEASDOC ); SfxBoolItem* pResult = PTR_CAST( SfxBoolItem, pItem ); bResult = ( pResult && pResult->GetValue() ); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 95640642f565..2867334625bc 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1304,7 +1304,7 @@ sal_uInt16 SfxObjectShell::ImplGetSignatureState( sal_Bool bScriptingContent ) { *pState = SIGNATURESTATE_NOSIGNATURES; - if ( GetMedium() && GetMedium()->GetName().Len() && GetMedium()->GetStorage().is() && IsOwnStorageFormat_Impl( *GetMedium()) ) + if ( GetMedium() && GetMedium()->GetName().Len() && IsOwnStorageFormat_Impl( *GetMedium()) && GetMedium()->GetStorage().is() ) { try { diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index dff75d14d459..5ec198c302cf 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -1317,16 +1317,14 @@ sal_Bool SfxObjectShell::SaveTo_Impl else { // This is SaveAs or export action, prepare the target medium + // the alien filters still might write directly to the file, that is of course a bug, + // but for now the framework has to be ready for it + // TODO/LATER: let the medium be prepared for alien formats as well rMedium.CloseAndRelease(); if ( bStorageBasedTarget ) { rMedium.GetOutputStorage(); } - else - { - rMedium.CreateTempFileNoCopy(); - rMedium.GetOutStream(); - } } // TODO/LATER: error handling diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx index d48f7c672643..84d045d2a14b 100644 --- a/sfx2/source/inc/statcach.hxx +++ b/sfx2/source/inc/statcach.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: statcach.hxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.180.1 $ * * This file is part of OpenOffice.org. * @@ -38,6 +38,7 @@ #include <com/sun/star/frame/XDispatchProviderInterception.hpp> #include <com/sun/star/frame/FeatureStateEvent.hpp> #include <com/sun/star/frame/DispatchDescriptor.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> #include <cppuhelper/weak.hxx> #ifndef _SFXBINDINGS_HXX @@ -76,7 +77,7 @@ public: void Release(); const ::com::sun::star::frame::FeatureStateEvent& GetStatus() const; - void Dispatch( sal_Bool bForceSynchron = sal_False ); + void Dispatch( com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aProps, sal_Bool bForceSynchron = sal_False ); }; class SfxStateCache @@ -109,7 +110,7 @@ public: const SfxSlotServer* GetSlotServer( SfxDispatcher &rDispat ) { return GetSlotServer( rDispat, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > () ); } ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > GetDispatch() const; - void Dispatch( sal_Bool bForceSynchron = sal_False ); + void Dispatch( const SfxItemSet* pSet, sal_Bool bForceSynchron = sal_False ); sal_Bool IsControllerDirty() const { return bCtrlDirty ? sal_True : sal_False; } SfxPoolItem* GetItem() const { return pLastItem; } |