? unxlngx6.pro Index: source/general/docholder.cxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/general/docholder.cxx,v retrieving revision 1.31 diff -u -r1.31 docholder.cxx --- source/general/docholder.cxx 6 Jul 2007 10:08:49 -0000 1.31 +++ source/general/docholder.cxx 22 Feb 2008 19:15:25 -0000 @@ -1109,19 +1109,6 @@ 0, aArgs ); -// ::rtl::OUString aDocumentName; -// uno::Reference < frame::XModel > xDocument( m_xComponent, uno::UNO_QUERY ); - -//REMOVE uno::Sequence< beans::PropertyValue > aDocArgs = xDocument->getArgs(); -//REMOVE for ( sal_Int32 nInd = 0; nInd < aDocArgs.getLength(); nInd++ ) -//REMOVE if ( aDocArgs[nInd].Name.equalsAscii( "Title" ) ) -//REMOVE { -//REMOVE aDocArgs[nInd].Value >>= aDocumentName; -//REMOVE break; -//REMOVE } -//REMOVE -//REMOVE SetTitle( aDocumentName ); - return sal_True; } else @@ -1152,91 +1139,6 @@ } //--------------------------------------------------------------------------- -void DocumentHolder::SetTitle( const rtl::OUString& aDocumentName ) -{ - // TODO: to have a different title for links - if( m_xFrame.is() ) - { - rtl::OUString aFilterName; - uno::Sequence aSeq; - uno::Reference < frame::XModel > xDocument( m_xComponent, uno::UNO_QUERY ); - if( xDocument.is() ) - { - aSeq = xDocument->getArgs(); - for( sal_Int32 j = 0; j < aSeq.getLength(); ++j ) - { - if( aSeq[j].Name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ) ) - { - aSeq[j].Value >>= aFilterName; - break; - } - } - } - - if( aFilterName.getLength() ) - { - uno::Reference xNameAccess( - m_xFactory->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.document.FilterFactory" ) ) ), - uno::UNO_QUERY ); - try { - if( xNameAccess.is() && ( xNameAccess->getByName( aFilterName ) >>= aSeq ) ) - { - for( sal_Int32 j = 0; j < aSeq.getLength(); ++j ) - if( aSeq[j].Name == rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "UIName" ) ) ) - { - aSeq[j].Value >>= aFilterName; - break; - } - } - } - catch( const uno::Exception& ) - { - } - } - - // set the title - uno::Reference xPropSet( m_xFrame,uno::UNO_QUERY ); - if( xPropSet.is() ) - { - uno::Any aAny; - static const sal_Unicode u[] = { ' ', '(', ' ', 0 }; - static const sal_Unicode c[] = { ' ', ')', 0 }; - rtl::OUString aTotalName( aFilterName ); - aTotalName += rtl::OUString( u ); - aTotalName += aDocumentName; - aTotalName += rtl::OUString( c ); - aAny <<= aTotalName; - - try - { - xPropSet->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), - aAny ); - } - catch( const uno::Exception& ) - { - } - } - } - - m_aDocumentNamePart = aDocumentName; - - if( m_pInterceptor ) - m_pInterceptor->GenerateFeatureStateEvent(); -} - -//--------------------------------------------------------------------------- -void DocumentHolder::SetContainerName( const rtl::OUString& aContainerName ) -{ - m_aContainerName = aContainerName; -} - -//--------------------------------------------------------------------------- -void DocumentHolder::Hide() -{ - if( m_xFrame.is() ) - m_xFrame->deactivate(); -} #if 0 //--------------------------------------------------------------------------- Index: source/general/intercept.cxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/general/intercept.cxx,v retrieving revision 1.6 diff -u -r1.6 intercept.cxx --- source/general/intercept.cxx 17 Sep 2006 00:42:56 -0000 1.6 +++ source/general/intercept.cxx 22 Feb 2008 19:15:29 -0000 @@ -123,26 +123,6 @@ } -void SAL_CALL Interceptor::dispose() - throw( uno::RuntimeException ) -{ - lang::EventObject aEvt; - aEvt.Source = static_cast< frame::XDispatch* >( this ); - - osl::MutexGuard aGuard(m_aMutex); - - if ( m_pDisposeEventListeners && m_pDisposeEventListeners->getLength() ) - m_pDisposeEventListeners->disposeAndClear( aEvt ); - - if(m_pStatCL) - m_pStatCL->disposeAndClear( aEvt ); - - m_xSlaveDispatchProvider = 0; - m_xMasterDispatchProvider = 0; -} - - - Interceptor::Interceptor( DocumentHolder* pDocHolder ) : m_pDocHolder( pDocHolder ), m_pDisposeEventListeners(0), @@ -227,66 +207,6 @@ } } -void Interceptor::GenerateFeatureStateEvent() -{ - if(m_pStatCL) - { - for(int i = 0; i < IUL; ++i) - { - if( i == 1 ) - continue; - - cppu::OInterfaceContainerHelper* pICH = - m_pStatCL->getContainer(m_aInterceptedURL[i]); - uno::Sequence > aSeq; - if(pICH) - aSeq = pICH->getElements(); - if(!aSeq.getLength()) - continue; - - frame::FeatureStateEvent aStateEvent; - aStateEvent.IsEnabled = sal_True; - aStateEvent.Requery = sal_False; - if(i == 0) - { - aStateEvent.FeatureURL.Complete = m_aInterceptedURL[0]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Update")); - aStateEvent.State <<= (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("($1) ")) + m_pDocHolder->GetTitle() ); - - } - else if ( i == 5 ) - { - aStateEvent.FeatureURL.Complete = m_aInterceptedURL[5]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("SaveCopyTo")); - aStateEvent.State <<= (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("($3)"))); - } - else - { - aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i]; - aStateEvent.FeatureDescriptor = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("Close and Return")); - aStateEvent.State <<= (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("($2) ")) + m_pDocHolder->GetTitle() ); - - } - - for(sal_Int32 k = 0; k < aSeq.getLength(); ++k) - { - uno::Reference - Control(aSeq[k],uno::UNO_QUERY); - if(Control.is()) - Control->statusChanged(aStateEvent); - - } - } - } -} - - void SAL_CALL Interceptor::addStatusListener( const uno::Reference< Index: source/inc/docholder.hxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/inc/docholder.hxx,v retrieving revision 1.13 diff -u -r1.13 docholder.hxx --- source/inc/docholder.hxx 16 Apr 2007 16:51:14 -0000 1.13 +++ source/inc/docholder.hxx 22 Feb 2008 19:15:35 -0000 @@ -175,14 +175,11 @@ void CloseDocument( sal_Bool bDeliverOwnership, sal_Bool bWaitForClose ); void CloseFrame(); - void SetTitle(const rtl::OUString& aDocumentName); - rtl::OUString GetTitle() const { return m_aContainerName + ::rtl::OUString::createFromAscii( " - " ) + m_aDocumentNamePart; } - void SetContainerName(const rtl::OUString& aContainerName); rtl::OUString GetContainerName() const { return m_aContainerName; } void SetOutplaceFrameProperties( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > aProps ) @@ -206,8 +203,6 @@ void Show(); - void Hide(); - // sal_Bool SetVisArea( sal_Int64 nAspect, const ::com::sun::star::awt::Rectangle& aRect ); // sal_Bool GetVisArea( sal_Int64 nAspect, ::com::sun::star::awt::Rectangle *pRect ); sal_Bool SetExtent( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize ); Index: source/inc/intercept.hxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/inc/intercept.hxx,v retrieving revision 1.3 diff -u -r1.3 intercept.hxx --- source/inc/intercept.hxx 8 Sep 2005 18:39:32 -0000 1.3 +++ source/inc/intercept.hxx 22 Feb 2008 19:15:39 -0000 @@ -68,8 +68,6 @@ Interceptor( DocumentHolder* pDocHolder ); ~Interceptor(); - void GenerateFeatureStateEvent(); - void DisconnectDocHolder(); // overwritten to release the statuslistner. @@ -83,10 +81,6 @@ removeEventListener( const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& aListener ) throw( com::sun::star::uno::RuntimeException ); - void SAL_CALL - dispose() throw(::com::sun::star::uno::RuntimeException); - - //XDispatch virtual void SAL_CALL dispatch( Index: source/inc/oleembobj.hxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/inc/oleembobj.hxx,v retrieving revision 1.27 diff -u -r1.27 oleembobj.hxx --- source/inc/oleembobj.hxx 23 Jan 2007 07:32:32 -0000 1.27 +++ source/inc/oleembobj.hxx 22 Feb 2008 19:15:41 -0000 @@ -110,11 +110,11 @@ , m_bWasEverActive( sal_False ) , m_nNotificationLock( 0 ) {} - +#ifdef WNT void StartControlExecution(); sal_Bool EndControlExecution_WasModified(); void ModificationNotificationIsDone(); - +#endif void LockNotification(); void UnlockNotification(); @@ -235,18 +235,20 @@ ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetNewFilledTempStream_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream ) throw( ::com::sun::star::io::IOException ); - +#ifdef WNT void SwitchComponentToRunningState_Impl(); - +#endif void MakeEventListenerNotification_Impl( const ::rtl::OUString& aEventName ); +#ifdef WNT void StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState ); - ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > GetStreamForSaving(); + ::com::sun::star::uno::Sequence< sal_Int32 > GetIntermediateVerbsSequence_Impl( sal_Int32 nNewState ); ::com::sun::star::uno::Sequence< sal_Int32 > GetReachableStatesList_Impl( const ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor >& aVerbList ); +#endif void CloseComponent(); void Dispose(); @@ -269,10 +271,10 @@ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs, sal_Bool bSaveAs ) throw ( ::com::sun::star::uno::Exception ); - +#ifdef WNT void StoreObjectToStream( ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > xOutStream ) throw ( ::com::sun::star::uno::Exception ); - +#endif void InsertVisualCache_Impl( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xCachedVisualRepresentation ) @@ -292,19 +294,19 @@ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream, sal_Bool bAllowRepair50 = sal_False ) throw (); - +#ifdef WNT sal_Bool SaveObject_Impl(); sal_Bool OnShowWindow_Impl( sal_Bool bShow ); - void CreateOleComponent_Impl( OleComponent* pOleComponent = NULL ); void CreateOleComponentAndLoad_Impl( OleComponent* pOleComponent = NULL ); void CreateOleComponentFromClipboard_Impl( OleComponent* pOleComponent = NULL ); - +#endif void SetObjectIsLink_Impl( sal_Bool bIsLink ) { m_bIsLink = bIsLink; } +#ifdef WNT ::rtl::OUString CreateTempURLEmpty_Impl(); ::rtl::OUString GetTempURL_Impl(); - +#endif ::rtl::OUString GetContainerName_Impl() { return m_aContainerName; } public: @@ -317,15 +319,18 @@ // factory can do it for OOo objects, but for OLE objects OS dependent code is required OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory, sal_Bool bLink ); - +#ifdef WNT // this constructor let object be initialized from clipboard OleEmbeddedObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); +#endif - virtual ~OleEmbeddedObject(); + virtual ~OleEmbeddedObject(); - void OnIconChanged_Impl(); +#ifdef WNT + void OnIconChanged_Impl(); void OnViewChanged_Impl(); void OnClosed_Impl(); +#endif // XEmbeddedObject Index: source/msole/oleembed.cxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/msole/oleembed.cxx,v retrieving revision 1.21 diff -u -r1.21 oleembed.cxx --- source/msole/oleembed.cxx 23 Jan 2007 07:33:40 -0000 1.21 +++ source/msole/oleembed.cxx 22 Feb 2008 19:15:54 -0000 @@ -90,10 +90,10 @@ using namespace ::com::sun::star; +#ifdef WNT //---------------------------------------------- void OleEmbeddedObject::SwitchComponentToRunningState_Impl() { -#ifdef WNT if ( m_pOleComponent ) { try @@ -112,7 +112,6 @@ } } else -#endif { throw embed::UnreachableStateException(); } @@ -149,7 +148,7 @@ return uno::Sequence< sal_Int32 >(); } - +#endif //---------------------------------------------- void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw ( embed::UnreachableStateException, Index: source/msole/olemisc.cxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/msole/olemisc.cxx,v retrieving revision 1.25 diff -u -r1.25 olemisc.cxx --- source/msole/olemisc.cxx 12 Oct 2006 11:22:51 -0000 1.25 +++ source/msole/olemisc.cxx 22 Feb 2008 19:15:58 -0000 @@ -125,7 +125,7 @@ , m_bFromClipboard( sal_False ) { } - +#ifdef WNT //------------------------------------------------------ // this constructor let object be initialized from clipboard OleEmbeddedObject::OleEmbeddedObject( const uno::Reference< lang::XMultiServiceFactory >& xFactory ) @@ -155,7 +155,7 @@ , m_bFromClipboard( sal_True ) { } - +#endif //------------------------------------------------------ OleEmbeddedObject::~OleEmbeddedObject() { @@ -200,7 +200,7 @@ } } } - +#ifdef WNT //---------------------------------------------- void OleEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange, sal_Int32 nOldState, sal_Int32 nNewState ) { @@ -241,7 +241,7 @@ } } } - +#endif //------------------------------------------------------ void OleEmbeddedObject::GetRidOfComponent() { Index: source/msole/olepersist.cxx =================================================================== RCS file: /cvs/framework/embeddedobj/source/msole/olepersist.cxx,v retrieving revision 1.36 diff -u -r1.36 olepersist.cxx --- source/msole/olepersist.cxx 6 Jul 2007 10:10:50 -0000 1.36 +++ source/msole/olepersist.cxx 22 Feb 2008 19:16:03 -0000 @@ -221,7 +221,7 @@ return aResult; } - +#ifdef WNT ::rtl::OUString GetNewFilledTempFile_Impl( const uno::Reference< embed::XOptimizedStorage >& xParentStorage, const ::rtl::OUString& aEntryName, const uno::Reference< lang::XMultiServiceFactory >& xFactory ) throw( io::IOException, uno::RuntimeException ) { @@ -263,7 +263,7 @@ xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), uno::makeAny( aMediaType ) ); } - +#endif //------------------------------------------------------ void LetCommonStoragePassBeUsed_Impl( const uno::Reference< io::XStream >& xStream ) { @@ -274,7 +274,7 @@ xPropSet->setPropertyValue( ::rtl::OUString::createFromAscii( "UseCommonStoragePasswordEncryption" ), uno::makeAny( (sal_Bool)sal_True ) ); } - +#ifdef WNT //------------------------------------------------------ void VerbExecutionController::StartControlExecution() { @@ -312,7 +312,7 @@ if ( m_bVerbExecutionInProgress && osl_getThreadIdentifier( NULL ) == m_nVerbExecutionThreadIdentifier ) m_bChangedOnVerbExecution = sal_True; } - +#endif //----------------------------------------------- void VerbExecutionController::LockNotification() { @@ -934,7 +934,7 @@ SwitchOwnPersistence( xNewParentStorage, xNewOwnStream, aNewName ); } - +#ifdef WNT //---------------------------------------------- sal_Bool OleEmbeddedObject::SaveObject_Impl() { @@ -1089,13 +1089,8 @@ } //------------------------------------------------------ -void OleEmbeddedObject::CreateOleComponent_Impl( OleComponent* -#ifdef WNT -pOleComponent -#endif -) +void OleEmbeddedObject::CreateOleComponent_Impl( OleComponent* pOleComponent ) { -#ifdef WNT if ( !m_pOleComponent ) { m_pOleComponent = pOleComponent ? pOleComponent : new OleComponent( m_xFactory, this ); @@ -1108,17 +1103,11 @@ m_pOleComponent->addCloseListener( m_xClosePreventer ); } -#endif } //------------------------------------------------------ -void OleEmbeddedObject::CreateOleComponentAndLoad_Impl( OleComponent* -#ifdef WNT -pOleComponent -#endif -) +void OleEmbeddedObject::CreateOleComponentAndLoad_Impl( OleComponent* pOleComponent ) { -#ifdef WNT if ( !m_pOleComponent ) { if ( !m_xObjectStream.is() ) @@ -1135,18 +1124,11 @@ m_pOleComponent->LoadEmbeddedObject( m_aTempURL ); } - -#endif } //------------------------------------------------------ -void OleEmbeddedObject::CreateOleComponentFromClipboard_Impl( OleComponent* -#ifdef WNT -pOleComponent -#endif -) +void OleEmbeddedObject::CreateOleComponentFromClipboard_Impl( OleComponent* pOleComponent ) { -#ifdef WNT if ( !m_pOleComponent ) { if ( !m_xObjectStream.is() ) @@ -1158,7 +1140,6 @@ // will be detected later by olecomponent m_pOleComponent->CreateObjectFromClipboard(); } -#endif } //------------------------------------------------------ @@ -1181,15 +1162,10 @@ } //---------------------------------------------- -void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > -#ifdef WNT -xOutStream -#endif -) +void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > xOutStream ) throw ( uno::Exception ) { // this method should be used only on windows -#ifdef WNT if ( m_pOleComponent ) m_pOleComponent->StoreOwnTmpIfNecessary(); @@ -1227,11 +1203,8 @@ // TODO: should the view replacement be in the stream ??? // probably it must be specified on storing -#else - throw io::IOException(); -#endif } - +#endif //------------------------------------------------------ void OleEmbeddedObject::StoreToLocation_Impl( const uno::Reference< embed::XStorage >& xStorage,