diff options
Diffstat (limited to 'embeddedobj/source')
43 files changed, 309 insertions, 309 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index 33c6f5012814..94aad2c32d23 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -166,7 +166,7 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( sal_Bool bBeforeChange void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) { // TODO: may be needs interaction handler to detect wherether the object state - // can be changed even after errors + // can be changed even after errors if ( m_nObjectState == embed::EmbedStates::LOADED ) { @@ -448,7 +448,7 @@ void SAL_CALL OCommonEmbeddedObject::changeState( sal_Int32 nNewState ) uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); sal_Int32 nOldState = m_nObjectState; - + if ( m_nTargetState != -1 ) { // means that the object is currently trying to reach the target state diff --git a/embeddedobj/source/commonembedding/inplaceobj.cxx b/embeddedobj/source/commonembedding/inplaceobj.cxx index 7a70663f440f..a9e4b4eb2154 100644 --- a/embeddedobj/source/commonembedding/inplaceobj.cxx +++ b/embeddedobj/source/commonembedding/inplaceobj.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/commonembedding/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx index f71c4ce2cda8..160f867561d0 100644 --- a/embeddedobj/source/commonembedding/miscobj.cxx +++ b/embeddedobj/source/commonembedding/miscobj.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -334,7 +334,7 @@ void OCommonEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName, aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ); // For now all the events are sent as object events // aEvent.Source = ( xSource.is() ? xSource - // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); + // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { @@ -513,9 +513,9 @@ uno::Reference< util::XCloseable > SAL_CALL OCommonEmbeddedObject::getComponent( } // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); + // throw embed::WrongStateException( + // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); return uno::Reference< util::XCloseable >( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); } diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 48776dc36edb..88e537f5781b 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -1406,7 +1406,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed:: m_aNewDocMediaDescriptor = GetValuableArgs_Impl( lArguments, sal_True ); // TODO: register listeners for storages above, in case thay are disposed - // an exception will be thrown on saveCompleted( true ) + // an exception will be thrown on saveCompleted( true ) // TODO: should the listener notification be done here or in saveCompleted? } @@ -1733,7 +1733,7 @@ void SAL_CALL OCommonEmbeddedObject::reload( LinkInit_Impl( aObject, lArguments, lObjArgs ); } } - + m_aDocMediaDescriptor = GetValuableArgs_Impl( lArguments, sal_True ); // TODO: use lObjArgs for StoreVisualReplacement @@ -1832,7 +1832,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt /*sal_Bool bElExists =*/ xNameAccess->hasByName( sEntName ); m_bReadOnly = sal_False; -// sal_Int32 nStorageMode = embed::ElementModes::READWRITE; +// sal_Int32 nStorageMode = embed::ElementModes::READWRITE; if ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ) SwitchOwnPersistence( xStorage, sEntName ); @@ -1881,9 +1881,9 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() // Actually this information is clear even in case object is wayting for saveCompleted // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); + // throw embed::WrongStateException( + // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); return m_bIsLink; } @@ -1900,9 +1900,9 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink() // Actually this information is clear even in case object is wayting for saveCompleted // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); + // throw embed::WrongStateException( + // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_bIsLink ) throw embed::WrongStateException( diff --git a/embeddedobj/source/commonembedding/register.cxx b/embeddedobj/source/commonembedding/register.cxx index 0266d8386257..f874f5e9ce2c 100644 --- a/embeddedobj/source/commonembedding/register.cxx +++ b/embeddedobj/source/commonembedding/register.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx index 6234f339e232..08454d3339f7 100644 --- a/embeddedobj/source/commonembedding/specialobject.cxx +++ b/embeddedobj/source/commonembedding/specialobject.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -67,7 +67,7 @@ uno::Any SAL_CALL OSpecialEmbeddedObject::queryInterface( const uno::Type& rType { uno::Any aReturn; - aReturn <<= ::cppu::queryInterface( rType, + aReturn <<= ::cppu::queryInterface( rType, static_cast< embed::XEmbeddedObject* >( this ), static_cast< embed::XInplaceObject* >( this ), static_cast< embed::XVisualObject* >( this ), diff --git a/embeddedobj/source/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx index 206e57804bdb..60f3094f9dbe 100644 --- a/embeddedobj/source/commonembedding/visobj.cxx +++ b/embeddedobj/source/commonembedding/visobj.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/commonembedding/xfactory.cxx b/embeddedobj/source/commonembedding/xfactory.cxx index dfa7464a3dbf..a6b80ec72967 100644 --- a/embeddedobj/source/commonembedding/xfactory.cxx +++ b/embeddedobj/source/commonembedding/xfactory.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/commonembedding/xfactory.hxx b/embeddedobj/source/commonembedding/xfactory.hxx index 7f0b668bb750..3faeb71cb1f0 100644 --- a/embeddedobj/source/commonembedding/xfactory.hxx +++ b/embeddedobj/source/commonembedding/xfactory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 93e152db1e73..1659fadf3e4d 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -273,20 +273,20 @@ void DocumentHolder::FreeOffice() // whether the office can be terminated, so it is better to have unnecessary process running than // to loose any data -// uno::Reference< frame::XFramesSupplier > xFramesSupplier( xDesktop, uno::UNO_QUERY ); -// if ( xFramesSupplier.is() ) -// { -// uno::Reference< frame::XFrames > xFrames = xFramesSupplier->getFrames(); -// if ( xFrames.is() && !xFrames->hasElements() ) -// { -// try -// { -// xDesktop->terminate(); -// } -// catch( uno::Exception & ) -// {} -// } -// } +// uno::Reference< frame::XFramesSupplier > xFramesSupplier( xDesktop, uno::UNO_QUERY ); +// if ( xFramesSupplier.is() ) +// { +// uno::Reference< frame::XFrames > xFrames = xFramesSupplier->getFrames(); +// if ( xFrames.is() && !xFrames->hasElements() ) +// { +// try +// { +// xDesktop->terminate(); +// } +// catch( uno::Exception & ) +// {} +// } +// } } } @@ -962,9 +962,9 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() } } catch ( uno::Exception& ) - { + { } - + return m_xFrame; } @@ -983,7 +983,7 @@ void DocumentHolder::SetComponent( const uno::Reference< util::XCloseable >& xDo m_xComponent = xDoc; // done outside currently uno::Reference < container::XChild > xChild( m_xComponent, uno::UNO_QUERY ); // done outside currently if ( xChild.is() && m_pEmbedObj ) - // done outside currently xChild->setParent( m_pEmbedObj->getParent() ); + // done outside currently xChild->setParent( m_pEmbedObj->getParent() ); m_bReadOnly = bReadOnly; m_bAllowClosing = sal_False; @@ -1027,12 +1027,12 @@ sal_Bool DocumentHolder::LoadDocToFrame( sal_Bool bInPlace ) aArgs.put( "PluginMode", sal_Int16(1) ); ::rtl::OUString sUrl; uno::Reference< lang::XServiceInfo> xServiceInfo(xDoc,uno::UNO_QUERY); - if ( xServiceInfo.is() - && xServiceInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.ReportDefinition"))) ) + if ( xServiceInfo.is() + && xServiceInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.report.ReportDefinition"))) ) { sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".component:DB/ReportDesign")); } - else if( xServiceInfo.is() + else if( xServiceInfo.is() && xServiceInfo->supportsService( ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument")) ) sUrl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:factory/schart")); else diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 3079edc21aff..8f82a0a95582 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -74,7 +74,7 @@ void ODummyEmbeddedObject::PostEvent_Impl( const ::rtl::OUString& aEventName, aEvent.Source = uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ); // For now all the events are sent as object events // aEvent.Source = ( xSource.is() ? xSource - // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); + // : uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >( this ) ) ); ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) { diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index ec919a957f47..3839cedb9bcf 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -45,7 +45,7 @@ uno::Sequence< ::rtl::OUString > Interceptor::m_aInterceptedURL(IUL); struct equalOUString { - bool operator()( + bool operator()( const rtl::OUString& rKey1, const rtl::OUString& rKey2 ) const { @@ -84,27 +84,27 @@ void Interceptor::DisconnectDocHolder() } void SAL_CALL -Interceptor::addEventListener( +Interceptor::addEventListener( const uno::Reference<lang::XEventListener >& Listener ) throw( uno::RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); - + if ( ! m_pDisposeEventListeners ) m_pDisposeEventListeners = new cppu::OInterfaceContainerHelper( m_aMutex ); - + m_pDisposeEventListeners->addInterface( Listener ); } void SAL_CALL -Interceptor::removeEventListener( +Interceptor::removeEventListener( const uno::Reference< lang::XEventListener >& Listener ) throw( uno::RuntimeException ) { osl::MutexGuard aGuard( m_aMutex ); - + if ( m_pDisposeEventListeners ) m_pDisposeEventListeners->removeInterface( Listener ); } @@ -120,11 +120,11 @@ Interceptor::Interceptor( DocumentHolder* pDocHolder ) m_aInterceptedURL[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAll")); m_aInterceptedURL[2] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc")); + RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc")); m_aInterceptedURL[3] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseWin")); + RTL_CONSTASCII_USTRINGPARAM(".uno:CloseWin")); m_aInterceptedURL[4] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM(".uno:CloseFrame")); + RTL_CONSTASCII_USTRINGPARAM(".uno:CloseFrame")); m_aInterceptedURL[5] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".uno:SaveAs")); @@ -143,8 +143,8 @@ Interceptor::~Interceptor() //XDispatch -void SAL_CALL -Interceptor::dispatch( +void SAL_CALL +Interceptor::dispatch( const util::URL& URL, const uno::Sequence< beans::PropertyValue >& Arguments ) @@ -180,7 +180,7 @@ Interceptor::dispatch( } nInd++; } - + if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); @@ -197,9 +197,9 @@ Interceptor::dispatch( } void SAL_CALL -Interceptor::addStatusListener( - const uno::Reference< - frame::XStatusListener >& Control, +Interceptor::addStatusListener( + const uno::Reference< + frame::XStatusListener >& Control, const util::URL& URL ) throw ( uno::RuntimeException @@ -207,8 +207,8 @@ Interceptor::addStatusListener( { if(!Control.is()) return; - - if(URL.Complete == m_aInterceptedURL[0]) + + if(URL.Complete == m_aInterceptedURL[0]) { // Save frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[0]; @@ -218,18 +218,18 @@ Interceptor::addStatusListener( aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($1) ")) + m_pDocHolder->GetTitle() ); Control->statusChanged(aStateEvent); - + { osl::MutexGuard aGuard(m_aMutex); if(!m_pStatCL) - m_pStatCL = + m_pStatCL = new StatusChangeListenerContainer(m_aMutex); } - + m_pStatCL->addInterface(URL.Complete,Control); return; } - + sal_Int32 i = 2; if(URL.Complete == m_aInterceptedURL[i] || URL.Complete == m_aInterceptedURL[++i] || @@ -243,20 +243,20 @@ Interceptor::addStatusListener( aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($2) ")) + m_pDocHolder->GetTitle() ); Control->statusChanged(aStateEvent); - - + + { osl::MutexGuard aGuard(m_aMutex); if(!m_pStatCL) - m_pStatCL = + m_pStatCL = new StatusChangeListenerContainer(m_aMutex); } - + m_pStatCL->addInterface(URL.Complete,Control); return; } - if(URL.Complete == m_aInterceptedURL[5]) + if(URL.Complete == m_aInterceptedURL[5]) { // SaveAs frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[5]; @@ -266,14 +266,14 @@ Interceptor::addStatusListener( aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($3)"))); Control->statusChanged(aStateEvent); - + { osl::MutexGuard aGuard(m_aMutex); if(!m_pStatCL) - m_pStatCL = + m_pStatCL = new StatusChangeListenerContainer(m_aMutex); } - + m_pStatCL->addInterface(URL.Complete,Control); return; } @@ -283,9 +283,9 @@ Interceptor::addStatusListener( void SAL_CALL Interceptor::removeStatusListener( - const uno::Reference< - frame::XStatusListener >& Control, - const util::URL& URL ) + const uno::Reference< + frame::XStatusListener >& Control, + const util::URL& URL ) throw ( uno::RuntimeException ) @@ -300,15 +300,15 @@ Interceptor::removeStatusListener( //XInterceptorInfo -uno::Sequence< ::rtl::OUString > -SAL_CALL +uno::Sequence< ::rtl::OUString > +SAL_CALL Interceptor::getInterceptedURLs( ) throw ( uno::RuntimeException ) { // now implemented as update - + return m_aInterceptedURL; } @@ -316,9 +316,9 @@ Interceptor::getInterceptedURLs( ) // XDispatchProvider uno::Reference< frame::XDispatch > SAL_CALL -Interceptor::queryDispatch( +Interceptor::queryDispatch( const util::URL& URL, - const ::rtl::OUString& TargetFrameName, + const ::rtl::OUString& TargetFrameName, sal_Int32 SearchFlags ) throw ( uno::RuntimeException @@ -359,7 +359,7 @@ Interceptor::queryDispatches( aRet = m_xSlaveDispatchProvider->queryDispatches(Requests); else aRet.realloc(Requests.getLength()); - + for(sal_Int32 i = 0; i < Requests.getLength(); ++i) if(m_aInterceptedURL[0] == Requests[i].FeatureURL.Complete) aRet[i] = (frame::XDispatch*) this; @@ -381,8 +381,8 @@ Interceptor::queryDispatches( //XDispatchProviderInterceptor -uno::Reference< frame::XDispatchProvider > SAL_CALL -Interceptor::getSlaveDispatchProvider( ) +uno::Reference< frame::XDispatchProvider > SAL_CALL +Interceptor::getSlaveDispatchProvider( ) throw ( uno::RuntimeException ) @@ -392,7 +392,7 @@ Interceptor::getSlaveDispatchProvider( ) } void SAL_CALL -Interceptor::setSlaveDispatchProvider( +Interceptor::setSlaveDispatchProvider( const uno::Reference< frame::XDispatchProvider >& NewDispatchProvider ) throw ( uno::RuntimeException @@ -404,18 +404,18 @@ Interceptor::setSlaveDispatchProvider( uno::Reference< frame::XDispatchProvider > SAL_CALL -Interceptor::getMasterDispatchProvider( ) +Interceptor::getMasterDispatchProvider( ) throw ( uno::RuntimeException ) { osl::MutexGuard aGuard(m_aMutex); - return m_xMasterDispatchProvider; + return m_xMasterDispatchProvider; } - + void SAL_CALL -Interceptor::setMasterDispatchProvider( +Interceptor::setMasterDispatchProvider( const uno::Reference< frame::XDispatchProvider >& NewSupplier ) throw ( uno::RuntimeException diff --git a/embeddedobj/source/general/xcreator.cxx b/embeddedobj/source/general/xcreator.cxx index 46846f778541..cd0529781041 100644 --- a/embeddedobj/source/general/xcreator.cxx +++ b/embeddedobj/source/general/xcreator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/closepreventer.hxx b/embeddedobj/source/inc/closepreventer.hxx index 3ee9456c2bad..22908596f7ca 100644 --- a/embeddedobj/source/inc/closepreventer.hxx +++ b/embeddedobj/source/inc/closepreventer.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx index cd5ff0341f9b..a7c8964c4ff8 100644 --- a/embeddedobj/source/inc/commonembobj.hxx +++ b/embeddedobj/source/inc/commonembobj.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/docholder.hxx b/embeddedobj/source/inc/docholder.hxx index cb4637bdc286..9a1e6ee37c1b 100644 --- a/embeddedobj/source/inc/docholder.hxx +++ b/embeddedobj/source/inc/docholder.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/dummyobject.hxx b/embeddedobj/source/inc/dummyobject.hxx index 4655bbc3d81b..c288deaede28 100644 --- a/embeddedobj/source/inc/dummyobject.hxx +++ b/embeddedobj/source/inc/dummyobject.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -64,7 +64,7 @@ class ODummyEmbeddedObject : public ::cppu::WeakImplHelper2 < ::com::sun::star::embed::XEmbeddedObject , ::com::sun::star::embed::XEmbedPersist > { - ::osl::Mutex m_aMutex; + ::osl::Mutex m_aMutex; ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer; sal_Bool m_bDisposed; diff --git a/embeddedobj/source/inc/intercept.hxx b/embeddedobj/source/inc/intercept.hxx index 22420b44d7c2..6201f65b1127 100644 --- a/embeddedobj/source/inc/intercept.hxx +++ b/embeddedobj/source/inc/intercept.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,102 +57,102 @@ public: addEventListener( const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& xListener ) throw( com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL removeEventListener( const com::sun::star::uno::Reference< com::sun::star::lang::XEventListener >& aListener ) throw( com::sun::star::uno::RuntimeException ); - + //XDispatch - virtual void SAL_CALL - dispatch( + virtual void SAL_CALL + dispatch( const ::com::sun::star::util::URL& URL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::uno::RuntimeException); - + virtual void SAL_CALL - addStatusListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XStatusListener >& Control, + addStatusListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XStatusListener >& Control, const ::com::sun::star::util::URL& URL ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - removeStatusListener( - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XStatusListener >& Control, - const ::com::sun::star::util::URL& URL ) + removeStatusListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XStatusListener >& Control, + const ::com::sun::star::util::URL& URL ) throw ( ::com::sun::star::uno::RuntimeException ); - + //XInterceptorInfo - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getInterceptedURLs( ) throw ( ::com::sun::star::uno::RuntimeException ); - + //XDispatchProvider ( inherited by XDispatchProviderInterceptor ) - virtual ::com::sun::star::uno::Reference< + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL - queryDispatch( + queryDispatch( const ::com::sun::star::util::URL& URL, - const ::rtl::OUString& TargetFrameName, + const ::rtl::OUString& TargetFrameName, sal_Int32 SearchFlags ) throw ( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< + + virtual ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL - queryDispatches( + queryDispatches( const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& Requests ) throw ( ::com::sun::star::uno::RuntimeException ); - - + + //XDispatchProviderInterceptor virtual ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XDispatchProvider > SAL_CALL - getSlaveDispatchProvider( ) + ::com::sun::star::frame::XDispatchProvider > SAL_CALL + getSlaveDispatchProvider( ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - setSlaveDispatchProvider( - const ::com::sun::star::uno::Reference< + setSlaveDispatchProvider( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& NewDispatchProvider ) throw ( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL - getMasterDispatchProvider( ) + getMasterDispatchProvider( ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - setMasterDispatchProvider( - const ::com::sun::star::uno::Reference< + setMasterDispatchProvider( + const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >& NewSupplier ) throw ( ::com::sun::star::uno::RuntimeException - ); - - + ); + + private: - + osl::Mutex m_aMutex; - + DocumentHolder* m_pDocHolder; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider; diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 8d34e8fbce5b..bdf175e4a7fb 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -55,7 +55,7 @@ namespace cppu { class VerbExecutionController { // the following mutex is allowed to be locked only for variables initialization, so no deadlock can be caused - ::osl::Mutex m_aVerbExecutionMutex; + ::osl::Mutex m_aVerbExecutionMutex; sal_Bool m_bVerbExecutionInProgress; oslThreadIdentifier m_nVerbExecutionThreadIdentifier; @@ -116,9 +116,9 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5 { friend class OleComponent; - ::osl::Mutex m_aMutex; + ::osl::Mutex m_aMutex; - OleComponent* m_pOleComponent; + OleComponent* m_pOleComponent; ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer; @@ -180,7 +180,7 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5 ::rtl::OUString m_aLinkURL; // ??? // points to own view provider if the the object has no server - OwnView_Impl* m_pOwnView; + OwnView_Impl* m_pOwnView; // whether the object should be initialized from clipboard in case of default initialization sal_Bool m_bFromClipboard; @@ -192,7 +192,7 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper5 // STAMPIT solution // the following member is used during verb execution to detect whether the verb execution modifies the object VerbExecutionController m_aVerbExecutionController; - + // if the following member is set, the object works in wrapper mode ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > m_xWrappedObject; sal_Bool m_bTriedConversion; diff --git a/embeddedobj/source/inc/specialobject.hxx b/embeddedobj/source/inc/specialobject.hxx index 429177a34a13..e181fe8ccfbd 100644 --- a/embeddedobj/source/inc/specialobject.hxx +++ b/embeddedobj/source/inc/specialobject.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/targetstatecontrol.hxx b/embeddedobj/source/inc/targetstatecontrol.hxx index e97e3dd809cd..4361b7841003 100644 --- a/embeddedobj/source/inc/targetstatecontrol.hxx +++ b/embeddedobj/source/inc/targetstatecontrol.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/inc/xcreator.hxx b/embeddedobj/source/inc/xcreator.hxx index c5816f506393..ae9a4a361bb0 100644 --- a/embeddedobj/source/inc/xcreator.hxx +++ b/embeddedobj/source/inc/xcreator.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,7 +63,7 @@ public: static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - impl_staticCreateSelfInstance( + impl_staticCreateSelfInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); diff --git a/embeddedobj/source/msole/advisesink.cxx b/embeddedobj/source/msole/advisesink.cxx index 5195eb65ac9a..f8027bf85441 100644 --- a/embeddedobj/source/msole/advisesink.cxx +++ b/embeddedobj/source/msole/advisesink.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/advisesink.hxx b/embeddedobj/source/msole/advisesink.hxx index 93432b14b20a..83fac1e92060 100644 --- a/embeddedobj/source/msole/advisesink.hxx +++ b/embeddedobj/source/msole/advisesink.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/closepreventer.cxx b/embeddedobj/source/msole/closepreventer.cxx index c5d744c541a1..f2368cf43bf3 100644 --- a/embeddedobj/source/msole/closepreventer.cxx +++ b/embeddedobj/source/msole/closepreventer.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/graphconvert.cxx b/embeddedobj/source/msole/graphconvert.cxx index 0642d66f383d..d9cab95ba8a8 100644 --- a/embeddedobj/source/msole/graphconvert.cxx +++ b/embeddedobj/source/msole/graphconvert.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ using namespace ::com::sun::star; - + sal_Bool ConvertBufferToFormat( void* pBuf, sal_uInt32 nBufSize, const ::rtl::OUString& aMimeType, @@ -73,8 +73,8 @@ sal_Bool ConvertBufferToFormat( void* pBuf, if( xGraphic.is() ) { SvMemoryStream aNewStream( 65535, 65535 ); -// uno::Reference < io::XOutputStream > xOut = new utl::OOutputStreamHelper( aNewStream.GetLockBytes() ); - uno::Reference < io::XStream > xOut = new utl::OStreamWrapper( aNewStream ); +// uno::Reference < io::XOutputStream > xOut = new utl::OOutputStreamHelper( aNewStream.GetLockBytes() ); + uno::Reference < io::XStream > xOut = new utl::OStreamWrapper( aNewStream ); uno::Sequence< beans::PropertyValue > aOutMediaProperties( 2 ); aOutMediaProperties[0].Name = ::rtl::OUString::createFromAscii( "OutputStream" ); aOutMediaProperties[0].Value <<= xOut; diff --git a/embeddedobj/source/msole/mtnotification.hxx b/embeddedobj/source/msole/mtnotification.hxx index 85c95f688fe4..d64a9bd28b58 100644 --- a/embeddedobj/source/msole/mtnotification.hxx +++ b/embeddedobj/source/msole/mtnotification.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,8 +35,8 @@ class OleEmbeddedObject; -#define OLECOMP_ONVIEWCHANGE 1 -#define OLECOMP_ONCLOSE 2 +#define OLECOMP_ONVIEWCHANGE 1 +#define OLECOMP_ONCLOSE 2 class MainThreadNotificationRequest : public cppu::WeakImplHelper1< com::sun::star::awt::XCallback > { diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index ac0b05fd96fa..62b509e143ce 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -53,7 +53,7 @@ using namespace ::com::sun::star; using namespace ::comphelper; #define MAX_ENUM_ELE 20 -#define FORMATS_NUM 3 +#define FORMATS_NUM 3 // ============ class ComSmart ===================== namespace { @@ -566,7 +566,7 @@ void OleComponent::CreateNewIStorage_Impl() // write the stream to the temporary file ::rtl::OUString aTempURL; - + OSL_ENSURE( m_pUnoOleObject, "Unexpected object absence!" ); if ( m_pUnoOleObject ) aTempURL = m_pUnoOleObject->CreateTempURLEmpty_Impl(); @@ -775,7 +775,7 @@ void OleComponent::CreateObjectFromClipboard() hr = OleCreateFromData( pDO, IID_IUnknown, OLERENDER_DRAW, // OLERENDER_FORMAT - NULL, // &aFormat, + NULL, // &aFormat, NULL, m_pNativeImpl->m_pIStorage, (void**)&m_pNativeImpl->m_pObj ); @@ -814,7 +814,7 @@ void OleComponent::CreateNewEmbeddedObject( const uno::Sequence< sal_Int8 >& aSe HRESULT hr = OleCreate( aClsID, IID_IUnknown, OLERENDER_DRAW, // OLERENDER_FORMAT - NULL, // &aFormat, + NULL, // &aFormat, NULL, m_pNativeImpl->m_pIStorage, (void**)&m_pNativeImpl->m_pObj ); @@ -833,8 +833,8 @@ void OleComponent::CreateObjectFromData( const uno::Reference< datatransfer::XTr // Static objects are not supported, they should be inserted as graphics { // TODO: May be this call is useless since there are no static objects - // and nonstatic objects will be created based on OLEstorage ( stream ). - // ??? + // and nonstatic objects will be created based on OLEstorage ( stream ). + // ??? // OleQueryCreateFromData... } @@ -1061,7 +1061,7 @@ uno::Sequence< embed::VerbDescriptor > OleComponent::GetVerbList() { OLEVERB szEle[ MAX_ENUM_ELE ]; ULONG nNum = 0; - sal_Int32 nSeqSize = 0; + sal_Int32 nSeqSize = 0; do { @@ -1197,7 +1197,7 @@ awt::Size OleComponent::GetExtent( sal_Int64 nAspect ) // do nothing break; } - + sal_Int64 nX = ( (sal_Int64)abs( pMF->xExt ) ) * nMult / nDiv; sal_Int64 nY = ( (sal_Int64)abs( pMF->yExt ) ) * nMult / nDiv; if ( nX < SAL_MAX_INT32 && nY < SAL_MAX_INT32 ) @@ -1235,9 +1235,9 @@ awt::Size OleComponent::GetCachedExtent( sal_Int64 nAspect ) // TODO/LATER: is it correct? // if there is no appropriate cache for the aspect, OLE_E_BLANK error code is returned // if ( hr == OLE_E_BLANK ) - // throw lang::IllegalArgumentException(); + // throw lang::IllegalArgumentException(); //else - // throw io::IOException(); // TODO + // throw io::IOException(); // TODO throw lang::IllegalArgumentException(); } @@ -1418,7 +1418,7 @@ void OleComponent::OnViewChange_Impl( sal_uInt32 dwAspect ) if ( xLockObject.is() ) { - uno::Reference < awt::XRequestCallback > xRequestCallback( + uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback") ), uno::UNO_QUERY ); @@ -1439,7 +1439,7 @@ void OleComponent::OnClose_Impl() if ( xLockObject.is() ) { - uno::Reference < awt::XRequestCallback > xRequestCallback( + uno::Reference < awt::XRequestCallback > xRequestCallback( m_xFactory->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.awt.AsyncCallback") ), uno::UNO_QUERY ); @@ -1565,10 +1565,10 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor& // FORMATETC* pFormatEtc = m_pNativeImpl->GetSupportedFormatForAspect( nRequestedAspect ); // if ( pFormatEtc ) // { - // STGMEDIUM aMedium; - // hr = pDataObject->GetData( pFormatEtc, &aMedium ); - // if ( SUCCEEDED( hr ) ) - // bSupportedFlavor = m_pNativeImpl->ConvertDataForFlavor( aMedium, aFlavor, aResult ); + // STGMEDIUM aMedium; + // hr = pDataObject->GetData( pFormatEtc, &aMedium ); + // if ( SUCCEEDED( hr ) ) + // bSupportedFlavor = m_pNativeImpl->ConvertDataForFlavor( aMedium, aFlavor, aResult ); // } // else { @@ -1592,12 +1592,12 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor& } } } - + // If the replacement could not be retrieved, the cached representaion should be used // currently it is not necessary to retrieve it here, so it is implemented in the object itself } // TODO: Investigate if there is already the format name - // and whether this format is really required + // and whether this format is really required else if ( aFlavor.DataType == getCppuType( ( const uno::Reference< io::XInputStream >* ) 0 ) && aFlavor.MimeType.equalsAscii( "application/x-openoffice-contentstream" ) ) { diff --git a/embeddedobj/source/msole/olecomponent.hxx b/embeddedobj/source/msole/olecomponent.hxx index 9324f1cd2fe4..cddfaea2ce69 100644 --- a/embeddedobj/source/msole/olecomponent.hxx +++ b/embeddedobj/source/msole/olecomponent.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 2f077a44f3af..54b3f104b47a 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -116,13 +116,13 @@ uno::Sequence< sal_Int32 > OleEmbeddedObject::GetIntermediateVerbsSequence_Impl( { OSL_ENSURE( m_nObjectState != embed::EmbedStates::LOADED, "Loaded object is switched to running state without verbs using!" ); - // actually there will be only one verb + // actually there will be only one verb if ( m_nObjectState == embed::EmbedStates::RUNNING && nNewState == embed::EmbedStates::ACTIVE ) { uno::Sequence< sal_Int32 > aVerbs( 1 ); aVerbs[0] = embed::EmbedVerbs::MS_OLEVERB_OPEN; } - + return uno::Sequence< sal_Int32 >(); } #endif @@ -350,7 +350,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() if ( !aEmbedFactory.getLength() ) throw uno::RuntimeException(); - + uno::Reference< uno::XInterface > xFact = m_xFactory->createInstance( aEmbedFactory ); uno::Reference< embed::XEmbedObjectCreator > xEmbCreator( xFact, uno::UNO_QUERY_THROW ); @@ -402,7 +402,7 @@ sal_Bool OleEmbeddedObject::TryToConvertToOOo() try { close( sal_True ); } catch( uno::Exception& ) {} - + m_xParentStorage->dispose(); // ??? the storage has information loss, it should be closed without commiting! throw uno::RuntimeException(); // the repairing is not possible } @@ -478,7 +478,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - // in case the object is already in requested state + // in case the object is already in requested state if ( m_nObjectState == nNewState ) return; @@ -496,7 +496,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) TargetStateControl_Impl aControl( m_nTargetState, nNewState ); // TODO: additional verbs can be a problem, since nobody knows how the object - // will behave after activation + // will behave after activation sal_Int32 nOldState = m_nObjectState; aGuard.clear(); @@ -532,7 +532,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) { // if the target object is in loaded state and a different state is specified // as a new one the object first must be switched to running state. - + // the component can exist already in nonrunning state // it can be created during loading to detect type of object CreateOleComponentAndLoad_Impl( m_pOleComponent ); @@ -557,7 +557,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) if ( m_nObjectState == nNewState ) return; } - + // so now the object is either switched from Active to Running state or vise versa // the notification about object state change will be done asynchronously if ( m_nObjectState == embed::EmbedStates::RUNNING && nNewState == embed::EmbedStates::ACTIVE ) @@ -601,7 +601,7 @@ void SAL_CALL OleEmbeddedObject::changeState( sal_Int32 nNewState ) { aGuard.clear(); StateChangeNotification_Impl( sal_False, nOldState, m_nObjectState ); - throw; + throw; } } else @@ -721,7 +721,7 @@ namespace xFactory->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.OLESimpleStorage")), aArgs ), uno::UNO_QUERY_THROW ); - + uno::Reference< io::XStream > xCONTENTS; xNameContainer->getByName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CONTENTS"))) >>= xCONTENTS; @@ -929,8 +929,8 @@ uno::Sequence< embed::VerbDescriptor > SAL_CALL OleEmbeddedObject::getSupportedV // registry could be used in this case // if ( m_nObjectState == embed::EmbedStates::LOADED ) // { - // // the list of supported verbs can be retrieved only when object is in running state - // throw embed::NeedsRunningStateException(); // TODO: + // // the list of supported verbs can be retrieved only when object is in running state + // throw embed::NeedsRunningStateException(); // TODO: // } return m_pOleComponent->GetVerbList(); @@ -994,7 +994,7 @@ uno::Reference< embed::XEmbeddedClient > SAL_CALL OleEmbeddedObject::getClientSi if ( m_nObjectState == -1 ) throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - + return m_xClientSite; } @@ -1021,7 +1021,7 @@ void SAL_CALL OleEmbeddedObject::update() if ( m_nObjectState == -1 ) throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - + if ( m_nUpdateMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE ) { // TODO: update view representation @@ -1055,7 +1055,7 @@ void SAL_CALL OleEmbeddedObject::setUpdateMode( sal_Int32 nMode ) if ( m_nObjectState == -1 ) throw embed::WrongStateException( ::rtl::OUString::createFromAscii( "The object has no persistence!\n" ), uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); - + OSL_ENSURE( nMode == embed::EmbedUpdateModes::ALWAYS_UPDATE || nMode == embed::EmbedUpdateModes::EXPLICIT_UPDATE, "Unknown update mode!\n" ); @@ -1095,7 +1095,7 @@ sal_Int64 SAL_CALL OleEmbeddedObject::getStatus( sal_Int64 { // OLE should allow to get status even in loaded state // if ( m_nObjectState == embed::EmbedStates::LOADED ) - // changeState( m_nObjectState == embed::EmbedStates::RUNNING ); + // changeState( m_nObjectState == embed::EmbedStates::RUNNING ); m_nStatus = m_pOleComponent->GetMiscStatus( nAspect ); m_nStatusAspect = nAspect; diff --git a/embeddedobj/source/msole/olemisc.cxx b/embeddedobj/source/msole/olemisc.cxx index 1fb2e8977d4c..66c7323b54a3 100644 --- a/embeddedobj/source/msole/olemisc.cxx +++ b/embeddedobj/source/msole/olemisc.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -239,7 +239,7 @@ void OleEmbeddedObject::GetRidOfComponent() { if ( m_nObjectState != -1 && m_nObjectState != embed::EmbedStates::LOADED ) SaveObject_Impl(); - + m_pOleComponent->removeCloseListener( m_xClosePreventer ); try { @@ -248,7 +248,7 @@ void OleEmbeddedObject::GetRidOfComponent() catch( uno::Exception& ) { // TODO: there should be a special listener to wait for component closing - // and to notify object, may be object itself can be such a listener + // and to notify object, may be object itself can be such a listener m_pOleComponent->addCloseListener( m_xClosePreventer ); throw; } @@ -326,7 +326,7 @@ uno::Sequence< sal_Int8 > SAL_CALL OleEmbeddedObject::getClassID() return m_aClassID; } - + //------------------------------------------------------ ::rtl::OUString SAL_CALL OleEmbeddedObject::getClassName() throw ( uno::RuntimeException ) @@ -392,9 +392,9 @@ uno::Reference< util::XCloseable > SAL_CALL OleEmbeddedObject::getComponent() } // if ( m_bWaitSaveCompleted ) - // throw embed::WrongStateException( - // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), - // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); + // throw embed::WrongStateException( + // ::rtl::OUString::createFromAscii( "The object waits for saveCompleted() call!\n" ), + // uno::Reference< uno::XInterface >( reinterpret_cast< ::cppu::OWeakObject* >(this) ) ); if ( !m_pOleComponent ) { @@ -426,7 +426,7 @@ void SAL_CALL OleEmbeddedObject::addStateChangeListener( const uno::Reference< e if ( !m_pInterfaceContainer ) m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex ); - + m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< embed::XStateChangeListener >*)0 ), xListener ); } @@ -537,7 +537,7 @@ void SAL_CALL OleEmbeddedObject::addCloseListener( const uno::Reference< util::X if ( !m_pInterfaceContainer ) m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex ); - + m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< util::XCloseListener >*)0 ), xListener ); } @@ -584,7 +584,7 @@ void SAL_CALL OleEmbeddedObject::addEventListener( const uno::Reference< documen if ( !m_pInterfaceContainer ) m_pInterfaceContainer = new ::cppu::OMultiTypeInterfaceContainerHelper( m_aMutex ); - + m_pInterfaceContainer->addInterface( ::getCppuType( (const uno::Reference< document::XEventListener >*)0 ), xListener ); } diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 68a3a057edc4..b67159bf1dfe 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -330,8 +330,8 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( return xStream; } -// sal_Bool bSetSizeToRepl = sal_False; -// awt::Size aSizeToSet; +// sal_Bool bSetSizeToRepl = sal_False; +// awt::Size aSizeToSet; sal_uInt32 nHeaderOffset = 0; if ( ( nRead >= 8 && aData[0] == -1 && aData[1] == -1 && aData[2] == -1 && aData[3] == -1 ) @@ -352,19 +352,19 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( nHeaderOffset += nLen - 4; } -// if ( aData[4] == 3 ) -// { -// try -// { +// if ( aData[4] == 3 ) +// { +// try +// { // -// aSizeToSet = getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); -// aSizeToSet.Width /= 364; //2540; // let the size be in inches, as wmf requires -// aSizeToSet.Height /= 364; //2540; // let the size be in inches, as wmf requires -// bSetSizeToRepl = sal_True; -// } -// catch( uno::Exception& ) -// {} -// } +// aSizeToSet = getVisualAreaSize( embed::Aspects::MSOLE_CONTENT ); +// aSizeToSet.Width /= 364; //2540; // let the size be in inches, as wmf requires +// aSizeToSet.Height /= 364; //2540; // let the size be in inches, as wmf requires +// bSetSizeToRepl = sal_True; +// } +// catch( uno::Exception& ) +// {} +// } } else if ( nRead > 4 ) { @@ -391,46 +391,46 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl( // if it is windows metafile the size must be provided // the solution is not used currently -// if ( bSetSizeToRepl && abs( aSizeToSet.Width ) < 0xFFFF && abs( aSizeToSet.Height ) < 0xFFFF ) -// { -// uno::Sequence< sal_Int8 > aHeader(22); -// sal_uInt8* pBuffer = (sal_uInt8*)aHeader.getArray(); -// -// // write 0x9ac6cdd7L -// pBuffer[0] = 0xd7; -// pBuffer[1] = 0xcd; -// pBuffer[2] = 0xc6; -// pBuffer[3] = 0x9a; +// if ( bSetSizeToRepl && abs( aSizeToSet.Width ) < 0xFFFF && abs( aSizeToSet.Height ) < 0xFFFF ) +// { +// uno::Sequence< sal_Int8 > aHeader(22); +// sal_uInt8* pBuffer = (sal_uInt8*)aHeader.getArray(); // -// // following data seems to have no value -// pBuffer[4] = 0; -// pBuffer[5] = 0; +// // write 0x9ac6cdd7L +// pBuffer[0] = 0xd7; +// pBuffer[1] = 0xcd; +// pBuffer[2] = 0xc6; +// pBuffer[3] = 0x9a; // -// // must be set to 0 -// pBuffer[6] = 0; -// pBuffer[7] = 0; -// pBuffer[8] = 0; -// pBuffer[9] = 0; +// // following data seems to have no value +// pBuffer[4] = 0; +// pBuffer[5] = 0; // -// // width of the picture -// pBuffer[10] = abs( aSizeToSet.Width ) % 0x100; -// pBuffer[11] = ( abs( aSizeToSet.Width ) / 0x100 ) % 0x100; +// // must be set to 0 +// pBuffer[6] = 0; +// pBuffer[7] = 0; +// pBuffer[8] = 0; +// pBuffer[9] = 0; +// +// // width of the picture +// pBuffer[10] = abs( aSizeToSet.Width ) % 0x100; +// pBuffer[11] = ( abs( aSizeToSet.Width ) / 0x100 ) % 0x100; // -// // height of the picture -// pBuffer[12] = abs( aSizeToSet.Height ) % 0x100; -// pBuffer[13] = ( abs( aSizeToSet.Height ) / 0x100 ) % 0x100; +// // height of the picture +// pBuffer[12] = abs( aSizeToSet.Height ) % 0x100; +// pBuffer[13] = ( abs( aSizeToSet.Height ) / 0x100 ) % 0x100; // -// // write 2540 -// pBuffer[14] = 0x6c; //0xec; -// pBuffer[15] = 0x01; //0x09; +// // write 2540 +// pBuffer[14] = 0x6c; //0xec; +// pBuffer[15] = 0x01; //0x09; // -// // fill with 0 -// for ( sal_Int32 nInd = 16; nInd < 22; nInd++ ) -// pBuffer[nInd] = 0; +// // fill with 0 +// for ( sal_Int32 nInd = 16; nInd < 22; nInd++ ) +// pBuffer[nInd] = 0; // -// xResultOut->writeBytes( aHeader ); -// } - +// xResultOut->writeBytes( aHeader ); +// } + xSeek->seek( nHeaderOffset ); // header size for these formats ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xResultOut ); xResultOut->closeOutput(); @@ -535,7 +535,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea // write width for ( nIndex = 0; nIndex < 4; nIndex++ ) { - aData[nIndex] = (sal_Int8)( aSize.Width % 0x100 ); + aData[nIndex] = (sal_Int8)( aSize.Width % 0x100 ); aSize.Width /= 0x100; } xTempOutStream->writeBytes( aData ); @@ -543,11 +543,11 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea // write height for ( nIndex = 0; nIndex < 4; nIndex++ ) { - aData[nIndex] = (sal_Int8)( aSize.Height % 0x100 ); + aData[nIndex] = (sal_Int8)( aSize.Height % 0x100 ); aSize.Height /= 0x100; } xTempOutStream->writeBytes( aData ); - + // write garbage, it will be overwritten by the size xTempOutStream->writeBytes( aData ); @@ -566,7 +566,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea } for ( sal_Int32 nInd = 0; nInd < 4; nInd++ ) { - aData[nInd] = (sal_Int8)( ( (sal_uInt64) nLength ) % 0x100 ); + aData[nInd] = (sal_Int8)( ( (sal_uInt64) nLength ) % 0x100 ); nLength /= 0x100; } xTempSeek->seek( 36 ); @@ -649,7 +649,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() RTL_LOGFILE_CONTEXT( aLog, "embeddedobj (mv76033) OleEmbeddedObject::HasVisualReplInStream, analizing" ); uno::Reference< io::XInputStream > xStream; - + OSL_ENSURE( !m_pOleComponent || m_aTempURL.getLength(), "The temporary file must exist if there is a component!\n" ); if ( m_aTempURL.getLength() ) { @@ -702,7 +702,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() } SetVisReplInStream( bExists ); - } + } } } @@ -831,7 +831,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToRetrieveCachedVisualRepres } #endif } - + xResult = TryToRetrieveCachedVisualRepresentation_Impl( xStream, sal_False ); } } @@ -1033,7 +1033,7 @@ void OleEmbeddedObject::OnClosed_Impl() uno::Reference< io::XInputStream > xInStream = m_xObjectStream->getInputStream(); if ( !xInStream.is() ) throw io::IOException(); // TODO: access denied - + m_aTempURL = GetNewFilledTempFile_Impl( xInStream, m_xFactory ); } } @@ -1155,7 +1155,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > throw io::IOException(); // TODO: // TODO: should the view replacement be in the stream ??? - // probably it must be specified on storing + // probably it must be specified on storing } #endif //------------------------------------------------------ @@ -1275,7 +1275,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( // and there is no need to cache it even if it is thrown away because the object // is not changed by StoreTo action - uno::Reference< io::XStream > xTmpCVRepresentation = + uno::Reference< io::XStream > xTmpCVRepresentation = TryToRetrieveCachedVisualRepresentation_Impl( xTargetStream ); // the locally retrieved representation is always preferable @@ -1355,7 +1355,7 @@ void OleEmbeddedObject::StoreToLocation_Impl( } // TODO: register listeners for storages above, in case they are disposed - // an exception will be thrown on saveCompleted( true ) + // an exception will be thrown on saveCompleted( true ) } else { diff --git a/embeddedobj/source/msole/oleregister.cxx b/embeddedobj/source/msole/oleregister.cxx index 39a35230a13b..fe49cb1ecbf7 100644 --- a/embeddedobj/source/msole/oleregister.cxx +++ b/embeddedobj/source/msole/oleregister.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTyp void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; - + ::rtl::OUString aImplName( ::rtl::OUString::createFromAscii( pImplName ) ); uno::Reference< lang::XSingleServiceFactory > xFactory; @@ -80,7 +80,7 @@ void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServic xFactory->acquire(); pRet = xFactory.get(); } - + return pRet; } @@ -93,7 +93,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis uno::Reference< registry::XRegistryKey > xKey( reinterpret_cast< registry::XRegistryKey* >( pRegistryKey ) ); uno::Reference< registry::XRegistryKey > xNewKey; - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + OleEmbeddedObjectFactory::impl_staticGetImplementationName() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); uno::Sequence< ::rtl::OUString > rServices = OleEmbeddedObjectFactory::impl_staticGetSupportedServiceNames(); @@ -102,7 +102,7 @@ sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegis #ifdef WNT // the following service makes sence only on windows - xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + + xNewKey = xKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/") ) + MSOLEDialogObjectCreator::impl_staticGetImplementationName() + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES") ) ); rServices = MSOLEDialogObjectCreator::impl_staticGetSupportedServiceNames(); diff --git a/embeddedobj/source/msole/olevisual.cxx b/embeddedobj/source/msole/olevisual.cxx index 31be74774e69..4eaf03b9b3cb 100644 --- a/embeddedobj/source/msole/olevisual.cxx +++ b/embeddedobj/source/msole/olevisual.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -123,10 +123,10 @@ void SAL_CALL OleEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const awt // SetExtent() is called only for objects that require it, // it should not be called for MSWord documents to workaround problem i49369 // If cached size is not set, that means that this is the size initialization, so there is no need to set the real size - sal_Bool bAllowToSetExtent = + sal_Bool bAllowToSetExtent = ( ( getStatus( nAspect ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE ) && !MimeConfigurationHelper::ClassIDsEqual( m_aClassID, MimeConfigurationHelper::GetSequenceClassID( 0x00020906L, 0x0000, 0x0000, - 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ) ) + 0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 ) ) && m_bHasCachedSize ); if ( m_nObjectState == embed::EmbedStates::LOADED && bAllowToSetExtent ) @@ -216,7 +216,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) // there is no internal cache awt::Size aSize; aGuard.clear(); - + sal_Bool bSuccess = sal_False; if ( getCurrentState() == embed::EmbedStates::LOADED ) { @@ -276,7 +276,7 @@ awt::Size SAL_CALL OleEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect ) uno::Reference< uno::XInterface >( static_cast< ::cppu::OWeakObject* >(this) ) ); aGuard.reset(); - + m_aCachedSize = aSize; m_nCachedAspect = nAspect; m_bHasCachedSize = sal_True; @@ -383,7 +383,7 @@ embed::VisualRepresentation SAL_CALL OleEmbeddedObject::getPreferredVisualRepres aVisualRepr.Data >>= aVisReplSeq; if ( aVisReplSeq.getLength() ) { - m_xCachedVisualRepresentation = GetNewFilledTempStream_Impl( + m_xCachedVisualRepresentation = GetNewFilledTempStream_Impl( uno::Reference< io::XInputStream > ( static_cast< io::XInputStream* > ( new ::comphelper::SequenceInputStream( aVisReplSeq ) ) ) ); } diff --git a/embeddedobj/source/msole/olewrapclient.cxx b/embeddedobj/source/msole/olewrapclient.cxx index 979c470bc27f..57b66baaf51c 100644 --- a/embeddedobj/source/msole/olewrapclient.cxx +++ b/embeddedobj/source/msole/olewrapclient.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/olewrapclient.hxx b/embeddedobj/source/msole/olewrapclient.hxx index 4cda361b0556..e054b0b12d49 100644 --- a/embeddedobj/source/msole/olewrapclient.hxx +++ b/embeddedobj/source/msole/olewrapclient.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 92f233dd2a29..1585860234f0 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -124,28 +124,28 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) if ( aFileURL.getLength() ) { try { - uno::Reference < frame::XComponentLoader > xDocumentLoader( - m_xFactory->createInstance ( + uno::Reference < frame::XComponentLoader > xDocumentLoader( + m_xFactory->createInstance ( ::rtl::OUString::createFromAscii( "com.sun.star.frame.Desktop" ) ), uno::UNO_QUERY ); if ( xDocumentLoader.is() ) { uno::Sequence< beans::PropertyValue > aArgs( m_aFilterName.getLength() ? 5 : 4 ); - + aArgs[0].Name = ::rtl::OUString::createFromAscii( "URL" ); aArgs[0].Value <<= aFileURL; - + aArgs[1].Name = ::rtl::OUString::createFromAscii( "ReadOnly" ); aArgs[1].Value <<= sal_True; - + aArgs[2].Name = ::rtl::OUString::createFromAscii( "InteractionHandler" ); aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >( static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY ); aArgs[3].Name = ::rtl::OUString::createFromAscii( "DontEdit" ); aArgs[3].Value <<= sal_True; - + if ( m_aFilterName.getLength() ) { aArgs[4].Name = ::rtl::OUString::createFromAscii( "FilterName" ); @@ -158,7 +158,7 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) 0, aArgs ), uno::UNO_QUERY ); - + if ( xModel.is() ) { uno::Reference< document::XEventBroadcaster > xBroadCaster( xModel, uno::UNO_QUERY ); @@ -166,16 +166,16 @@ sal_Bool OwnView_Impl::CreateModelFromURL( const ::rtl::OUString& aFileURL ) xBroadCaster->addEventListener( uno::Reference< document::XEventListener >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY ) ); - + uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY ); if ( xCloseable.is() ) { xCloseable->addCloseListener( uno::Reference< util::XCloseListener >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY ) ); - + ::osl::MutexGuard aGuard( m_aMutex ); - m_xModel = xModel; + m_xModel = xModel; bResult = sal_True; } } @@ -323,7 +323,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io (aReadSeq[0] >= '0' && aReadSeq[0] <= '9') || (aReadSeq[0] >= 'a' && aReadSeq[0] <= 'z') || (aReadSeq[0] >= 'A' && aReadSeq[0] <= 'Z') || - aReadSeq[0] == '.' + aReadSeq[0] == '.' ) { aFileSuffix += ::rtl::OUString::valueOf( (sal_Unicode) aReadSeq[0] ); @@ -354,7 +354,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io sal_Int64 nTargetPos = xSeekable->getPosition() + nUrlSize; xSeekable->seek( nTargetPos ); - + // get the size of stored data if ( xInStream->readBytes( aReadSeq, 4 ) != 4 ) return sal_False; @@ -370,8 +370,8 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io { sal_uInt32 nToRead = ( nDataSize - nRead > 32000 ) ? 32000 : nDataSize - nRead; sal_uInt32 nLocalRead = xInStream->readBytes( aReadSeq, nToRead ); - - + + if ( !nLocalRead ) { bFailed = sal_True; @@ -385,7 +385,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io aToWrite.realloc( nLocalRead ); xNativeOutTemp->writeBytes( aToWrite ); } - + nRead += nLocalRead; } } @@ -407,7 +407,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xNativeOutTemp ); } - + xNativeOutTemp->closeOutput(); // The temporary native file is created, now the filter must be detected @@ -440,7 +440,7 @@ void OwnView_Impl::CreateNative() uno::Sequence< uno::Any > aArgs( 1 ); aArgs[0] <<= xInStream; uno::Reference< container::XNameAccess > xNameAccess( - m_xFactory->createInstanceWithArguments( + m_xFactory->createInstanceWithArguments( ::rtl::OUString::createFromAscii( "com.sun.star.embed.OLESimpleStorage" ), aArgs ), uno::UNO_QUERY_THROW ); @@ -464,7 +464,7 @@ void OwnView_Impl::CreateNative() if ( MimeConfigurationHelper::ClassIDsEqual( aPackageClassID, aStorClassID ) ) { // the storage represents Object Package - + bOk = ReadContentsAndGenerateTempFile( xSubStream->getInputStream(), sal_True ); if ( !bOk && m_aNativeTempURL.getLength() ) @@ -625,7 +625,7 @@ void SAL_CALL OwnView_Impl::notifyEvent( const document::EventObject& aEvent ) xBroadCaster->removeEventListener( uno::Reference< document::XEventListener >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY ) ); - + uno::Reference< util::XCloseable > xCloseable( xModel, uno::UNO_QUERY ); if ( xCloseable.is() ) xCloseable->removeCloseListener( uno::Reference< util::XCloseListener >( diff --git a/embeddedobj/source/msole/ownview.hxx b/embeddedobj/source/msole/ownview.hxx index dccaec5d178e..1768ca61cdd4 100644 --- a/embeddedobj/source/msole/ownview.hxx +++ b/embeddedobj/source/msole/ownview.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -58,7 +58,7 @@ class OwnView_Impl : public ::cppu::WeakImplHelper2 < ::com::sun::star::util::XC private: sal_Bool CreateModelFromURL( const ::rtl::OUString& aFileURL ); - + sal_Bool CreateModel( sal_Bool bUseNative ); sal_Bool ReadContentsAndGenerateTempFile( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream, sal_Bool bParseHeader ); diff --git a/embeddedobj/source/msole/platform.h b/embeddedobj/source/msole/platform.h index 6333ac849858..20ffb3f305f8 100644 --- a/embeddedobj/source/msole/platform.h +++ b/embeddedobj/source/msole/platform.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index efaad69d11c7..953daaf7d866 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/xdialogcreator.hxx b/embeddedobj/source/msole/xdialogcreator.hxx index 4f2732b0fbf7..7d20ad0388b2 100644 --- a/embeddedobj/source/msole/xdialogcreator.hxx +++ b/embeddedobj/source/msole/xdialogcreator.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ public: static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - impl_staticCreateSelfInstance( + impl_staticCreateSelfInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); diff --git a/embeddedobj/source/msole/xolefactory.cxx b/embeddedobj/source/msole/xolefactory.cxx index ee2212636ad7..48114adbd218 100644 --- a/embeddedobj/source/msole/xolefactory.cxx +++ b/embeddedobj/source/msole/xolefactory.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/embeddedobj/source/msole/xolefactory.hxx b/embeddedobj/source/msole/xolefactory.hxx index 9896f4716601..4fea7d30653e 100644 --- a/embeddedobj/source/msole/xolefactory.hxx +++ b/embeddedobj/source/msole/xolefactory.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ public: static ::rtl::OUString SAL_CALL impl_staticGetImplementationName(); static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL - impl_staticCreateSelfInstance( + impl_staticCreateSelfInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceManager ); |