diff options
Diffstat (limited to 'embedserv')
31 files changed, 497 insertions, 497 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 02e8d01bf9b7..236eb1d8b85f 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/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 @@ -73,7 +73,7 @@ using namespace ::com::sun::star; -extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); +extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); // add mutex locking ??? @@ -139,7 +139,7 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode ) -1, aAny, beans::PropertyState_DIRECT_VALUE); - + aAny <<= sal_False; aSeq[1] = beans::PropertyValue( rtl::OUString( @@ -147,7 +147,7 @@ void DocumentHolder::LoadDocInFrame( sal_Bool bPluginMode ) -1, aAny, beans::PropertyState_DIRECT_VALUE); - + aAny <<= (sal_Bool) sal_True; aSeq[2] = beans::PropertyValue( rtl::OUString( @@ -295,7 +295,7 @@ HRESULT DocumentHolder::InPlaceActivate( { // determine XWindow and window handle of parent HWND hWndxWinParent(0); uno::Reference<awt::XWindow> xWin; - + static const ::rtl::OUString aToolkitServiceName( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.awt.Toolkit" ) ); uno::Reference<awt::XSystemChildFactory> xToolkit( @@ -306,7 +306,7 @@ HRESULT DocumentHolder::InPlaceActivate( if( !m_pCHatchWin ) m_pCHatchWin = new winwrap::CHatchWin( m_hInstance,this); - + if(m_pCHatchWin->Init(hWndSite,/*ID_HATCHWINDOW*/2000, NULL)) { m_pCHatchWin->RectsSet(&rcPos,&rcClip); //set visible area hWndxWinParent = m_pCHatchWin->Window(); @@ -317,7 +317,7 @@ HRESULT DocumentHolder::InPlaceActivate( delete m_pCHatchWin, m_pCHatchWin = 0; hWndxWinParent = hWndSite; } - + aAny <<= sal_Int32(hWndxWinParent); xWin = uno::Reference<awt::XWindow>( xToolkit->createSystemChild( @@ -326,7 +326,7 @@ HRESULT DocumentHolder::InPlaceActivate( lang::SystemDependent::SYSTEM_WIN32), uno::UNO_QUERY); } - + if(xWin.is()) { xWin->setPosSize( m_pCHatchWin ? HATCHWIN_BORDERWIDTHDEFAULT : 0, @@ -335,7 +335,7 @@ HRESULT DocumentHolder::InPlaceActivate( rcPos.bottom - rcPos.top, awt::PosSize::POSSIZE); xWin->setVisible(sal_True); - + m_xEditWindow = xWin; m_hWndxWinParent = hWndxWinParent; } @@ -347,7 +347,7 @@ HRESULT DocumentHolder::InPlaceActivate( SetParent(m_hWndxWinParent,hWndSite); ShowWindow(m_hWndxWinParent,SW_SHOW); //Make visible. } - + if ( !m_xFrame.is() ) // initially set size to "empty", this guarantees that the final resize // is always executed (will be done by "SetObjectRects" after getting internal border) @@ -359,7 +359,7 @@ HRESULT DocumentHolder::InPlaceActivate( awt::PosSize::POSSIZE); m_xEditWindow->setVisible(sal_True); } - + if(m_xContainerWindow.is()) { if(m_hWndxWinCont) { if(m_pIOleIPFrame) { @@ -371,7 +371,7 @@ HRESULT DocumentHolder::InPlaceActivate( } m_xContainerWindow->setVisible(true); } - + if(m_xFrame.is()) m_xFrame->activate(); else { @@ -381,10 +381,10 @@ HRESULT DocumentHolder::InPlaceActivate( m_xFrame = uno::Reference<frame::XFrame>( m_xFactory->createInstance(aFrameServiceName), uno::UNO_QUERY); - + if(!m_xFrame.is()) return ERROR; - + m_xFrame->initialize(m_xEditWindow); uno::Reference<frame::XDispatchProviderInterception> @@ -399,13 +399,13 @@ HRESULT DocumentHolder::InPlaceActivate( rtl::OUString::createFromAscii("LayoutManager")); aAny >>= m_xLayoutManager; } - + if(m_xLayoutManager.is()) m_xLayoutManager->setDockingAreaAcceptor(this); - + // load the model into the frame LoadDocInFrame( sal_True ); - + static const ::rtl::OUString aDesktopServiceName ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.frame.Desktop" ) ); uno::Reference< frame::XFramesSupplier > xDesktop( @@ -413,7 +413,7 @@ HRESULT DocumentHolder::InPlaceActivate( uno::UNO_QUERY ); if(xDesktop.is()) xDesktop->getFrames()->append(m_xFrame); - + // determine the menuhandle to get menutitems. if(m_xLayoutManager.is()) { uno::Reference< ::com::sun::star::ui::XUIElement > xUIEl( @@ -435,14 +435,14 @@ HRESULT DocumentHolder::InPlaceActivate( "private:resource/menubar/menubar" ))); } } - + // TODO/cd: Workaround for status indicator bug. It always makes the // document window visible, when someone tries to use the status // indicator. As we save our document when we get the deactivation // from OLE this conflict to hide floating windows. if(m_xLayoutManager.is()) m_xLayoutManager->setVisible(true); - + // get document border and resize rects according to border GetDocumentBorder( &m_aBorder ); SetObjectRects( &rcPos, &rcClip ); @@ -457,7 +457,7 @@ HRESULT DocumentHolder::InPlaceActivate( // setTitle(m_aDocumentNamePart); if (fIncludeUI) hr=UIActivate(); - + m_pIOleIPSite->DiscardUndoState(); } catch( uno::Exception& ) @@ -501,7 +501,7 @@ void DocumentHolder::InPlaceDeactivate(void) // CComPtr< IOleClientSite > pClientSite; // // m_pIOleIPSite->QueryInterface( -// IID_IOleClientSite, (void**)&pClientSite ); +// IID_IOleClientSite, (void**)&pClientSite ); // if ( pClientSite ) // pClientSite->SaveObject(); @@ -881,7 +881,7 @@ uno::Reference< frame::XFrame > DocumentHolder::DocumentFrame() uno::Reference< frame::XDispatchProviderInterceptor > DocumentHolder::CreateNewInterceptor() { ::osl::MutexGuard aGuard( m_aMutex ); - + ClearInterceptorInternally(); uno::Reference< frame::XDispatchProviderInterceptor > xInterceptor( m_pInterceptor = new Interceptor( m_xOleAccess, this, m_bLink ) ); @@ -1320,14 +1320,14 @@ HRESULT DocumentHolder::SetContRects(LPCRECT aRect) memset(&wi,0,sizeof(wi)); if(m_pIOleIPFrame) { m_pIOleIPFrame->GetBorder((LPRECT)&wi); - m_xContainerWindow->setPosSize( + m_xContainerWindow->setPosSize( 0,0, wi.right - wi.left, wi.bottom - wi.top, awt::PosSize::POSSIZE); } else - m_xContainerWindow->setPosSize( + m_xContainerWindow->setPosSize( 0,0, aRect->right - aRect->left, aRect->bottom - aRect->top, @@ -1515,7 +1515,7 @@ DocumentHolder::queryClosing( util::CloseVetoException ) { - if ( !m_bLink + if ( !m_bLink && ( m_xDocument.is() && m_xDocument == aSource.Source || m_xFrame.is() && m_xFrame == aSource.Source ) ) throw util::CloseVetoException(); } @@ -1635,7 +1635,7 @@ void SAL_CALL DocumentHolder::modified( const lang::EventObject& /*aEvent*/ ) // mgw.width[5]=1; // } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/ed_idataobj.cxx b/embedserv/source/embed/ed_idataobj.cxx index d4f75f4a6353..73e1ed629441 100644 --- a/embedserv/source/embed/ed_idataobj.cxx +++ b/embedserv/source/embed/ed_idataobj.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 @@ -188,7 +188,7 @@ STDMETHODIMP EmbedDocument_Impl::GetDataHere( FORMATETC * pFormatetc, STGMEDIUM { if ( !( pFormatetc->tymed & TYMED_ISTORAGE ) ) return DV_E_TYMED; - + if ( !pMedium->pstg ) return STG_E_MEDIUMFULL; HRESULT hr = SaveTo_Impl( pMedium->pstg ); @@ -216,17 +216,17 @@ STDMETHODIMP EmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc ) { if ( !( pFormatetc->tymed & TYMED_ENHMF ) ) return DV_E_TYMED; - + return S_OK; } else if ( pFormatetc->cfFormat == CF_METAFILEPICT ) { - if ( !( pFormatetc->tymed & TYMED_MFPICT ) ) + if ( !( pFormatetc->tymed & TYMED_MFPICT ) ) return DV_E_TYMED; - + return S_OK; } - else + else { CLIPFORMAT cf_embSource = (CLIPFORMAT)RegisterClipboardFormatA( "Embed Source" ); CLIPFORMAT cf_embObj = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); @@ -234,7 +234,7 @@ STDMETHODIMP EmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc ) { if ( !( pFormatetc->tymed & TYMED_ISTORAGE ) ) return DV_E_TYMED; - + return S_OK; } } @@ -252,7 +252,7 @@ STDMETHODIMP EmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pFormatetcIn pFormatetcOut->ptd = NULL; pFormatetcOut->cfFormat = pFormatetcIn->cfFormat; pFormatetcOut->dwAspect = DVASPECT_CONTENT; - + if ( pFormatetcIn->cfFormat == CF_ENHMETAFILE ) { pFormatetcOut->tymed = TYMED_ENHMF; @@ -263,7 +263,7 @@ STDMETHODIMP EmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pFormatetcIn pFormatetcOut->tymed = TYMED_MFPICT; return S_OK; } - else + else { CLIPFORMAT cf_embSource = (CLIPFORMAT)RegisterClipboardFormatA( "Embed Source" ); CLIPFORMAT cf_embObj = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); @@ -295,7 +295,7 @@ STDMETHODIMP EmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD advf, IA if ( !m_pDAdviseHolder ) if ( !SUCCEEDED( CreateDataAdviseHolder( &m_pDAdviseHolder ) ) || !m_pDAdviseHolder ) return E_OUTOFMEMORY; - + return m_pDAdviseHolder->Advise( (IDataObject*)this, pFormatetc, advf, pAdvSink, pdwConnection ); } @@ -304,7 +304,7 @@ STDMETHODIMP EmbedDocument_Impl::DUnadvise( DWORD dwConnection ) if ( !m_pDAdviseHolder ) if ( !SUCCEEDED( CreateDataAdviseHolder( &m_pDAdviseHolder ) ) || !m_pDAdviseHolder ) return E_OUTOFMEMORY; - + return m_pDAdviseHolder->Unadvise( dwConnection ); } @@ -313,11 +313,11 @@ STDMETHODIMP EmbedDocument_Impl::EnumDAdvise( IEnumSTATDATA ** ppenumAdvise ) if ( !m_pDAdviseHolder ) if ( !SUCCEEDED( CreateDataAdviseHolder( &m_pDAdviseHolder ) ) || !m_pDAdviseHolder ) return E_OUTOFMEMORY; - + return m_pDAdviseHolder->EnumAdvise( ppenumAdvise ); } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/ed_iinplace.cxx b/embedserv/source/embed/ed_iinplace.cxx index 5604cbb7739e..7e696463f01c 100644 --- a/embedserv/source/embed/ed_iinplace.cxx +++ b/embedserv/source/embed/ed_iinplace.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 @@ -33,7 +33,7 @@ STDMETHODIMP EmbedDocument_Impl::GetWindow(HWND *hWnd) { OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); - + *hWnd = m_pDocHolder->GetTopMostWinHandle(); if(*hWnd != NULL) return NOERROR; @@ -84,7 +84,7 @@ STDMETHODIMP EmbedDocument_Impl::UIDeactivate(void) STDMETHODIMP EmbedDocument_Impl::SetObjectRects(LPCRECT aRect, LPCRECT aClip) { OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); - + return m_pDocHolder->SetObjectRects(aRect,aClip); } @@ -93,7 +93,7 @@ STDMETHODIMP EmbedDocument_Impl::ReactivateAndUndo(void) return E_NOTIMPL; } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/ed_ioleobject.cxx b/embedserv/source/embed/ed_ioleobject.cxx index db6adfaa729c..4910dca3d675 100644 --- a/embedserv/source/embed/ed_ioleobject.cxx +++ b/embedserv/source/embed/ed_ioleobject.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 @@ -35,7 +35,7 @@ using namespace ::com::sun::star; -extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); +extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); //------------------------------------------------------------------------------- // IOleObject @@ -187,7 +187,7 @@ STDMETHODIMP EmbedDocument_Impl::DoVerb( return m_pDocHolder->InPlaceActivate(pActiveSite,FALSE); break; case OLEIVERB_UIACTIVATE: - OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); + OSL_ENSURE(m_pDocHolder,"no document for inplace activation"); return m_pDocHolder->InPlaceActivate(pActiveSite,TRUE); break; diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 6d6bc7712cec..7a762f0ed3a3 100644 --- a/embedserv/source/embed/ed_ipersiststr.cxx +++ b/embedserv/source/embed/ed_ipersiststr.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 @@ -55,9 +55,9 @@ using namespace ::com::sun::star; extern ::rtl::OUString getStorageTypeFromGUID_Impl( GUID* guid ); -extern ::rtl::OUString getServiceNameFromGUID_Impl( GUID* ); -extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); -// extern CLIPFORMAT getClipFormatFromGUID_Impl( GUID* ); +extern ::rtl::OUString getServiceNameFromGUID_Impl( GUID* ); +extern ::rtl::OUString getFilterNameFromGUID_Impl( GUID* ); +// extern CLIPFORMAT getClipFormatFromGUID_Impl( GUID* ); ::rtl::OUString getTestFileURLFromGUID_Impl( GUID* guid ); const ::rtl::OUString aOfficeEmbedStreamName( RTL_CONSTASCII_USTRINGPARAM ( "package_stream" ) ); @@ -440,12 +440,12 @@ STDMETHODIMP EmbedDocument_Impl::InitNew( IStorage *pStg ) ::rtl::OUString aCurType = getStorageTypeFromGUID_Impl( &m_guid ); // ??? CLIPFORMAT cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( pStg, - cf, // ??? + cf, // ??? reinterpret_cast<LPWSTR>(( sal_Unicode* )aCurType.getStr()) ); if ( hr == S_OK ) { - hr = pStg->CreateStream( reinterpret_cast<LPCWSTR>(aOfficeEmbedStreamName.getStr()), + hr = pStg->CreateStream( reinterpret_cast<LPCWSTR>(aOfficeEmbedStreamName.getStr()), STGM_CREATE | ( nStreamMode & 0x73 ), 0, 0, @@ -453,7 +453,7 @@ STDMETHODIMP EmbedDocument_Impl::InitNew( IStorage *pStg ) if ( hr == S_OK && m_pOwnStream ) { - hr = pStg->CreateStream( reinterpret_cast<LPCWSTR>(aExtentStreamName.getStr()), + hr = pStg->CreateStream( reinterpret_cast<LPCWSTR>(aExtentStreamName.getStr()), STGM_CREATE | ( nStreamMode & 0x73 ), 0, 0, @@ -611,14 +611,14 @@ STDMETHODIMP EmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad ) if ( FAILED( hr ) ) return E_FAIL; DWORD nStreamMode = aStat.grfMode; - hr = pStgSave->CreateStream( reinterpret_cast<LPCWSTR>(aOfficeEmbedStreamName.getStr()), + hr = pStgSave->CreateStream( reinterpret_cast<LPCWSTR>(aOfficeEmbedStreamName.getStr()), STGM_CREATE | ( nStreamMode & 0x73 ), 0, 0, &pTargetStream ); if ( FAILED( hr ) || !pTargetStream ) return E_FAIL; - hr = pStgSave->CreateStream( reinterpret_cast<LPCWSTR>(aExtentStreamName.getStr()), + hr = pStgSave->CreateStream( reinterpret_cast<LPCWSTR>(aExtentStreamName.getStr()), STGM_CREATE | ( nStreamMode & 0x73 ), 0, 0, @@ -777,7 +777,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD /*dwMode*/ ) ::rtl::OUString aCurType = getServiceNameFromGUID_Impl( &m_guid ); // ??? CLIPFORMAT cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( m_pMasterStorage, - cf, // ??? + cf, // ??? reinterpret_cast<LPWSTR>(( sal_Unicode* )aCurType.getStr()) ); if ( FAILED( hr ) ) return E_FAIL; @@ -828,7 +828,7 @@ STDMETHODIMP EmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD /*dwMode*/ ) ::rtl::OUString aCurType = getServiceNameFromGUID_Impl( &m_guid ); // ??? CLIPFORMAT cf = (CLIPFORMAT)RegisterClipboardFormatA( "Embedded Object" ); hr = WriteFmtUserTypeStg( m_pMasterStorage, - cf, // ??? + cf, // ??? reinterpret_cast<LPWSTR>(( sal_Unicode* )aCurType.getStr()) ); if ( SUCCEEDED( hr ) ) @@ -1010,7 +1010,7 @@ void LockedEmbedDocument_Impl::ExecuteMethod( sal_Int16 nId ) } } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/esdll.cxx b/embedserv/source/embed/esdll.cxx index 56ee550c1e81..582a3dcba572 100644 --- a/embedserv/source/embed/esdll.cxx +++ b/embedserv/source/embed/esdll.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/embedserv/source/embed/guid.cxx b/embedserv/source/embed/guid.cxx index 90122776df9c..6512b0d8a82e 100644 --- a/embedserv/source/embed/guid.cxx +++ b/embedserv/source/embed/guid.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 @@ -206,7 +206,7 @@ } */ -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/iipaobj.cxx b/embedserv/source/embed/iipaobj.cxx index 1c51ffa09f89..d3d5ea77fd81 100644 --- a/embedserv/source/embed/iipaobj.cxx +++ b/embedserv/source/embed/iipaobj.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 @@ -48,12 +48,12 @@ CIIAObj::~CIIAObj() STDMETHODIMP CIIAObj::QueryInterface(REFIID riid, LPVOID FAR *ppv) { *ppv=NULL; - - if(IID_IUnknown==riid || + + if(IID_IUnknown==riid || IID_IOleWindow==riid || IID_IOleInPlaceActiveObject==riid) *ppv=this; - + //AddRef any interface we'll return. if (NULL!=*ppv) { @@ -110,7 +110,7 @@ STDMETHODIMP CIIAObj::ResizeBorder( LPCRECT pRect,LPOLEINPLACEUIWINDOW,BOOL bFrame) { if(!bFrame) return NOERROR; - + if ( !m_rDocHolder.is() ) return E_FAIL; @@ -123,7 +123,7 @@ STDMETHODIMP CIIAObj::EnableModeless(BOOL) return NOERROR; } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/intercept.cxx b/embedserv/source/embed/intercept.cxx index 08a01020510d..e94d5c900523 100644 --- a/embedserv/source/embed/intercept.cxx +++ b/embedserv/source/embed/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 @@ -46,7 +46,7 @@ uno::Sequence< ::rtl::OUString > Interceptor::m_aInterceptedURL(IUL); struct equalOUString { - bool operator()( + bool operator()( const rtl::OUString& rKey1, const rtl::OUString& rKey2 ) const { @@ -79,27 +79,27 @@ public: 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 ); } @@ -110,15 +110,15 @@ void SAL_CALL Interceptor::dispose() { 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; } @@ -141,11 +141,11 @@ Interceptor::Interceptor( 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")); } @@ -158,7 +158,7 @@ Interceptor::~Interceptor() if(m_pStatCL) delete m_pStatCL; - + DocumentHolder* pTmpDocH = NULL; uno::Reference< uno::XInterface > xLock; { @@ -181,8 +181,8 @@ void Interceptor::DisconnectDocHolder() } //XDispatch -void SAL_CALL -Interceptor::dispatch( +void SAL_CALL +Interceptor::dispatch( const util::URL& URL, const uno::Sequence< beans::PropertyValue >& Arguments ) @@ -193,7 +193,7 @@ Interceptor::dispatch( osl::MutexGuard aGuard(m_aMutex); xOleAccess = m_xOleAccess; } - + if ( xOleAccess.is() ) { LockedEmbedDocument_Impl aDocLock = xOleAccess->GetEmbedDocument(); @@ -210,7 +210,7 @@ Interceptor::dispatch( { uno::Sequence< beans::PropertyValue > aNewArgs = Arguments; sal_Int32 nInd = 0; - + while( nInd < aNewArgs.getLength() ) { if ( aNewArgs[nInd].Name.equalsAscii( "SaveTo" ) ) @@ -220,7 +220,7 @@ Interceptor::dispatch( } nInd++; } - + if ( nInd == aNewArgs.getLength() ) { aNewArgs.realloc( nInd + 1 ); @@ -259,28 +259,28 @@ void Interceptor::generateFeatureStateEvent() { if( i == 1 || m_bLink && i != 5 ) continue; - - cppu::OInterfaceContainerHelper* pICH = + + cppu::OInterfaceContainerHelper* pICH = m_pStatCL->getContainer(m_aInterceptedURL[i]); uno::Sequence<uno::Reference<uno::XInterface> > aSeq; if(pICH) aSeq = pICH->getElements(); if(!aSeq.getLength()) continue; - + frame::FeatureStateEvent aStateEvent; aStateEvent.IsEnabled = sal_True; - aStateEvent.Requery = sal_False; + 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) ")) + + RTL_CONSTASCII_USTRINGPARAM("($1) ")) + aTitle); - + } else if ( i == 5 ) { @@ -298,16 +298,16 @@ void Interceptor::generateFeatureStateEvent() aStateEvent.State <<= (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("($2) ")) + aTitle); - + } - + for(sal_Int32 k = 0; k < aSeq.getLength(); ++k) { uno::Reference<frame::XStatusListener> Control(aSeq[k],uno::UNO_QUERY); if(Control.is()) Control->statusChanged(aStateEvent); - + } } } @@ -315,9 +315,9 @@ void Interceptor::generateFeatureStateEvent() 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 @@ -325,8 +325,8 @@ Interceptor::addStatusListener( { if(!Control.is()) return; - - if( !m_bLink && URL.Complete == m_aInterceptedURL[0] ) + + if( !m_bLink && URL.Complete == m_aInterceptedURL[0] ) { // Save DocumentHolder* pTmpDocH = NULL; uno::Reference< uno::XInterface > xLock; @@ -348,21 +348,21 @@ Interceptor::addStatusListener( aStateEvent.IsEnabled = sal_True; aStateEvent.Requery = sal_False; aStateEvent.State <<= (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("($1) ")) + + RTL_CONSTASCII_USTRINGPARAM("($1) ")) + aTitle ); 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 ( !m_bLink && ( URL.Complete == m_aInterceptedURL[i] || @@ -392,20 +392,20 @@ Interceptor::addStatusListener( RTL_CONSTASCII_USTRINGPARAM("($2) ")) + aTitle ); 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]; @@ -415,14 +415,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; } @@ -432,9 +432,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 ) @@ -449,8 +449,8 @@ Interceptor::removeStatusListener( //XInterceptorInfo -uno::Sequence< ::rtl::OUString > -SAL_CALL +uno::Sequence< ::rtl::OUString > +SAL_CALL Interceptor::getInterceptedURLs( ) throw ( uno::RuntimeException @@ -465,7 +465,7 @@ Interceptor::getInterceptedURLs( ) return aResult; } - + return m_aInterceptedURL; } @@ -473,9 +473,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 @@ -516,7 +516,7 @@ Interceptor::queryDispatches( aRet = m_xSlaveDispatchProvider->queryDispatches(Requests); else aRet.realloc(Requests.getLength()); - + for(sal_Int32 i = 0; i < Requests.getLength(); ++i) if ( !m_bLink && m_aInterceptedURL[0] == Requests[i].FeatureURL.Complete ) aRet[i] = (frame::XDispatch*) this; @@ -538,8 +538,8 @@ Interceptor::queryDispatches( //XDispatchProviderInterceptor -uno::Reference< frame::XDispatchProvider > SAL_CALL -Interceptor::getSlaveDispatchProvider( ) +uno::Reference< frame::XDispatchProvider > SAL_CALL +Interceptor::getSlaveDispatchProvider( ) throw ( uno::RuntimeException ) @@ -549,7 +549,7 @@ Interceptor::getSlaveDispatchProvider( ) } void SAL_CALL -Interceptor::setSlaveDispatchProvider( +Interceptor::setSlaveDispatchProvider( const uno::Reference< frame::XDispatchProvider >& NewDispatchProvider ) throw ( uno::RuntimeException @@ -561,18 +561,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 @@ -582,7 +582,7 @@ Interceptor::setMasterDispatchProvider( m_xMasterDispatchProvider = NewSupplier; } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx index 75b9e5ed4e29..d51df036fb3c 100644 --- a/embedserv/source/embed/register.cxx +++ b/embedserv/source/embed/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/embedserv/source/embed/servprov.cxx b/embedserv/source/embed/servprov.cxx index 952774c2807a..e21780903ab6 100644 --- a/embedserv/source/embed/servprov.cxx +++ b/embedserv/source/embed/servprov.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 @@ -100,7 +100,7 @@ void o2u_attachCurrentThread() if ( oleThreadData.getData() != 0 ) { - HINSTANCE inst= LoadLibrary( _T("ole32.dll")); + HINSTANCE inst= LoadLibrary( _T("ole32.dll")); if( inst ) { HRESULT hr; @@ -226,25 +226,25 @@ EmbedProviderFactory_Impl::~EmbedProviderFactory_Impl() sal_Bool EmbedProviderFactory_Impl::registerClass() { HRESULT hresult; - + o2u_attachCurrentThread(); - hresult = CoRegisterClassObject( + hresult = CoRegisterClassObject( m_guid, this, CLSCTX_LOCAL_SERVER, REGCLS_MULTIPLEUSE, &m_factoryHandle); - - return (hresult == NOERROR); -} + + return (hresult == NOERROR); +} sal_Bool EmbedProviderFactory_Impl::deregisterClass() { HRESULT hresult = CoRevokeClassObject( m_factoryHandle ); - return (hresult == NOERROR); -} + return (hresult == NOERROR); +} STDMETHODIMP EmbedProviderFactory_Impl::QueryInterface(REFIID riid, void FAR* FAR* ppv) { @@ -253,7 +253,7 @@ STDMETHODIMP EmbedProviderFactory_Impl::QueryInterface(REFIID riid, void FAR* FA AddRef(); *ppv = (IUnknown*) (IClassFactory*) this; return NOERROR; - } + } else if (IsEqualIID(riid, IID_IClassFactory)) { AddRef(); @@ -276,9 +276,9 @@ STDMETHODIMP_(ULONG) EmbedProviderFactory_Impl::Release() sal_Int32 nCount = --m_refCount; if ( nCount == 0 ) { - delete this; + delete this; } - + return nCount; } @@ -287,9 +287,9 @@ STDMETHODIMP EmbedProviderFactory_Impl::CreateInstance(IUnknown FAR* punkOuter, void FAR* FAR* ppv) { punkOuter = NULL; - + IUnknown* pEmbedDocument = (IUnknown*)(IPersistStorage*)( new EmbedDocument_Impl( m_xFactory, &m_guid ) ); - + return pEmbedDocument->QueryInterface( riid, ppv ); } @@ -298,7 +298,7 @@ STDMETHODIMP EmbedProviderFactory_Impl::LockServer( int /*fLock*/ ) return NOERROR; } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/syswinwrapper.cxx b/embedserv/source/embed/syswinwrapper.cxx index 455e143261f7..c247617d9235 100644 --- a/embedserv/source/embed/syswinwrapper.cxx +++ b/embedserv/source/embed/syswinwrapper.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 @@ -226,15 +226,15 @@ BOOL CHatchWin::Init(HWND hWndParent, UINT uID, HWND hWndAssoc) , SZCLASSHATCHWIN, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 100, 100, hWndParent, (HMENU)uID , m_hInst, this); - + m_uID=uID; m_hWndAssociate=hWndAssoc; - + return (NULL!=m_hWnd); } -void CHatchWin::SetTrans() +void CHatchWin::SetTrans() { HRGN hrgn = CreateRectRgn(0,0,0,0); SetWindowRgn(m_hWnd,hrgn,true); @@ -317,14 +317,14 @@ void CHatchWin::RectsSet(LPRECT prcPos, LPRECT prcClip) // , prcPos->bottom-prcPos->top, SWP_NOZORDER | SWP_NOACTIVATE); RECT newRC; - GetClientRect(m_hWnd,&newRC); + GetClientRect(m_hWnd,&newRC); m_aTracker = Tracker( &newRC, - Tracker::hatchInside | + Tracker::hatchInside | Tracker::hatchedBorder | Tracker::resizeInside ); - + return; } @@ -406,10 +406,10 @@ LRESULT APIENTRY winwrap::HatchWndProc( PCHatchWin phw; HDC hDC; PAINTSTRUCT ps; - + phw=(PCHatchWin)GetWindowLong(hWnd, HWWL_STRUCTURE); POINT ptMouse; - + switch (iMsg) { case WM_CREATE: @@ -425,7 +425,7 @@ LRESULT APIENTRY winwrap::HatchWndProc( case WM_LBUTTONDOWN: GetCursorPos(&ptMouse); ScreenToClient(hWnd,&ptMouse); - + // track in case we have to if(phw->m_aTracker.Track(hWnd,ptMouse,FALSE,GetParent(hWnd))) { @@ -444,7 +444,7 @@ LRESULT APIENTRY winwrap::HatchWndProc( //We need this since the container will SetFocus to us. if (NULL!=phw->m_hWndKid) SetFocus(phw->m_hWndKid); - + break; case WM_LBUTTONDBLCLK: /* @@ -466,11 +466,11 @@ LRESULT APIENTRY winwrap::HatchWndProc( default: return DefWindowProc(hWnd, iMsg, wParam, lParam); } - + return 0L; } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/tracker.cxx b/embedserv/source/embed/tracker.cxx index 9c97c8c973d6..4d7e7408ad6a 100644 --- a/embedserv/source/embed/tracker.cxx +++ b/embedserv/source/embed/tracker.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 @@ -144,7 +144,7 @@ void DrawDragRect( SetRectRgn(rgnInside,rect.left,rect.top,rect.right,rect.bottom); CombineRgn(rgnLast,rgnOutside,rgnInside, RGN_XOR); -// // only diff them if brushes are the same +// // only diff them if brushes are the same if (hBrush == hBrushLast) { rgnUpdate = CreateRectRgn(0, 0, 0, 0); @@ -199,7 +199,7 @@ void NormalizeRect(LPRECT rp) rp->left = rp->right; rp->right = tmp; } - + if(rp->top > rp->bottom) { UINT tmp = rp->top; rp->top = rp->bottom; @@ -245,36 +245,36 @@ void Tracker::Construct() wPattern <<= 1; } HBITMAP hatchBitmap = CreateBitmap(8, 8, 1, 1,&hatchPattern); - + // create black hatched brush _afxHatchBrush = CreatePatternBrush(hatchBitmap); DeleteObject(hatchBitmap); } - + if (_afxBlackDottedPen == NULL) { // create black dotted pen _afxBlackDottedPen = CreatePen(PS_DOT, 0, RGB(0, 0, 0)); } - + // get default handle size from Windows profile setting static const TCHAR szWindows[] = TEXT("windows"); static const TCHAR szInplaceBorderWidth[] = TEXT("oleinplaceborderwidth"); _afxHandleSize = GetProfileInt(szWindows, szInplaceBorderWidth, 4); bInitialized = TRUE; - + _afxCursors[0] = _afxCursors[2] = LoadCursor(0,IDC_SIZENWSE); _afxCursors[4] = _afxCursors[6] = LoadCursor(0,IDC_SIZENS); _afxCursors[1] = _afxCursors[3] = LoadCursor(0,IDC_SIZENESW); _afxCursors[5] = _afxCursors[7] = LoadCursor(0,IDC_SIZEWE); _afxCursors[8] = LoadCursor(0,IDC_SIZEALL); } - + m_nStyle = 0; m_nHandleSize = _afxHandleSize; m_sizeMin.cy = m_sizeMin.cx = m_nHandleSize*2; - + SetRectEmpty(&m_rectLast); m_sizeLast.cx = m_sizeLast.cy = 0; m_bErase = FALSE; @@ -289,7 +289,7 @@ Tracker::~Tracker() int Tracker::HitTest(POINT point) const { TrackerHit hitResult = hitNothing; - + RECT rectTrue; GetTrueRect(&rectTrue); NormalizeRect(&rectTrue); @@ -309,20 +309,20 @@ BOOL Tracker::SetCursor(HWND pWnd, UINT nHitTest) const // trackers should only be in client area if (nHitTest != HTCLIENT) return FALSE; - + // convert cursor position to client co-ordinates POINT point; GetCursorPos(&point); ScreenToClient(pWnd,&point); - + // do hittest and normalize hit int nHandle = HitTestHandles(point); if (nHandle < 0) return FALSE; - + // need to normalize the hittest such that we get proper cursors nHandle = NormalizeHit(nHandle); - + // handle special case of hitting area between handles // (logically the same -- handled as a move -- but different cursor) if (nHandle == hitMiddle && !PtInRect(&m_rect,point)) @@ -331,8 +331,8 @@ BOOL Tracker::SetCursor(HWND pWnd, UINT nHitTest) const if (m_nStyle & hatchedBorder) nHandle = (TrackerHit)9; } - - ::SetCursor(_afxCursors[nHandle]); + + ::SetCursor(_afxCursors[nHandle]); return TRUE; } @@ -348,7 +348,7 @@ BOOL Tracker::Track(HWND hWnd,POINT point,BOOL bAllowInvert, // didn't hit a handle, so just return FALSE return FALSE; } - + // otherwise, call helper function to do the tracking m_bAllowInvert = bAllowInvert; SetCursor(hWnd,nHandle); @@ -361,25 +361,25 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) // don't handle if capture already set if (GetCapture() != NULL) return FALSE; - + // save original width & height in pixels int nWidth = m_rect.right - m_rect.left; int nHeight = m_rect.bottom - m_rect.top; - + // set capture to the window which received this message SetCapture(hWnd); UpdateWindow(hWnd); if (hWndClipTo != NULL) UpdateWindow(hWndClipTo); RECT rectSave = m_rect; - + // find out what x/y coords we are supposed to modify int *px, *py; int xDiff, yDiff; GetModifyPointers(nHandle, &px, &py, &xDiff, &yDiff); xDiff = point.x - xDiff; yDiff = point.y - yDiff; - + // get DC for drawing HDC hDrawDC; if (hWndClipTo != NULL) @@ -392,19 +392,19 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) // otherwise, just use normal DC hDrawDC = GetDC(hWnd); } - + RECT rectOld; BOOL bMoved = FALSE; - + // get messages until capture lost or cancelled/accepted for (;;) { MSG msg; GetMessage(&msg, NULL, 0, 0); - + if (GetCapture() != hWnd) break; - + switch (msg.message) { // handle movement/accept messages @@ -416,7 +416,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) *px = (int)(short)LOWORD(msg.lParam) - xDiff; if (py != NULL) *py = (int)(short)HIWORD(msg.lParam) - yDiff; - + // handle move case if (nHandle == hitMiddle) { @@ -425,7 +425,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) } // allow caller to adjust the rectangle if necessary AdjustRect(nHandle,&m_rect); - + // only redraw and callback if the rect actually changed! m_bFinalErase = (msg.message == WM_LBUTTONUP); if (!EqualRect(&rectOld,&m_rect) || m_bFinalErase) @@ -441,14 +441,14 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) } if (m_bFinalErase) goto ExitLoop; - + if (!EqualRect(&rectOld,&m_rect)) { m_bErase = FALSE; DrawTrackerRect(&m_rect,hWndClipTo,hDrawDC,hWnd); } break; - + // handle cancel messages case WM_KEYDOWN: if (msg.wParam != VK_ESCAPE) @@ -461,34 +461,34 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) } m_rect = rectSave; goto ExitLoop; - + // just dispatch rest of the messages default: DispatchMessage(&msg); break; } } - + ExitLoop: if (hWndClipTo != NULL) ReleaseDC(hWndClipTo,hDrawDC); else ReleaseDC(hWnd,hDrawDC); ReleaseCapture(); - + // restore rect in case bMoved is still FALSE if (!bMoved) m_rect = rectSave; m_bFinalErase = FALSE; m_bErase = FALSE; - + // return TRUE only if rect has changed return !EqualRect(&rectSave,&m_rect); } void Tracker::OnChangedRect(const RECT& /*rectOld*/) -{ +{ } @@ -496,11 +496,11 @@ void Tracker::AdjustRect(int nHandle, LPRECT) { if(nHandle == hitMiddle) return; - + // convert the handle into locations within m_rect int *px, *py; GetModifyPointers(nHandle, &px, &py, NULL, NULL); - + // enforce minimum width int nNewWidth = m_rect.right - m_rect.left; int nAbsWidth = m_bAllowInvert ? abs(nNewWidth) : nNewWidth; @@ -512,7 +512,7 @@ void Tracker::AdjustRect(int nHandle, LPRECT) *px = *(int*)((BYTE*)&m_rect + pRectInfo->nOffsetAcross) + nNewWidth * m_sizeMin.cx * -pRectInfo->nSignAcross; } - + // enforce minimum height int nNewHeight = m_rect.bottom - m_rect.top; int nAbsHeight = m_bAllowInvert ? abs(nNewHeight) : nNewHeight; @@ -533,11 +533,11 @@ void Tracker::DrawTrackerRect( // first, normalize the rectangle for drawing RECT rect = *lpRect; NormalizeRect(&rect); - + // convert to client coordinates if (pWndClipTo != NULL) TransformRect(&rect,pWnd,pWndClipTo); - + SIZE size; size.cx = 0; size.cy = 0; if (!m_bFinalErase) @@ -554,11 +554,11 @@ void Tracker::DrawTrackerRect( size.cy = 1; // CY_BORDER; } } - + // and draw it - if (m_bFinalErase || !m_bErase) + if (m_bFinalErase || !m_bErase) DrawDragRect(pDC,&rect,size,&m_rectLast,m_sizeLast); - + // remember last rectangles m_rectLast = rect; m_sizeLast = size; @@ -571,16 +571,16 @@ void Tracker::Draw(HDC hDC) const SetMapMode(hDC,MM_TEXT); SetViewportOrgEx(hDC,0, 0,NULL); SetWindowOrgEx(hDC,0, 0,NULL); - + // get normalized rectangle RECT rect = m_rect; NormalizeRect(&rect); - + HPEN pOldPen = NULL; HBRUSH pOldBrush = NULL; HGDIOBJ pTemp; int nOldROP; - + // draw lines if ((m_nStyle & (dottedLine|solidLine)) != 0) { @@ -594,11 +594,11 @@ void Tracker::Draw(HDC hDC) const Rectangle(hDC,rect.left, rect.top, rect.right, rect.bottom); SetROP2(hDC,nOldROP); } - + // if hatchBrush is going to be used, need to unrealize it if ((m_nStyle & (hatchInside|hatchedBorder)) != 0) UnrealizeObject((HGDIOBJ)_afxHatchBrush); - + // hatch inside if ((m_nStyle & hatchInside) != 0) { @@ -613,7 +613,7 @@ void Tracker::Draw(HDC hDC) const Rectangle(hDC,rect.left+1, rect.top+1, rect.right, rect.bottom); SetROP2(hDC,nOldROP); } - + // draw hatched border if ((m_nStyle & hatchedBorder) != 0) { @@ -633,7 +633,7 @@ void Tracker::Draw(HDC hDC) const PatBlt(hDC,rect.right, rect.top, rectTrue.right-rect.right, rect.bottom-rect.top, 0x000F0001 /* Pn */); } - + // draw resize handles if ((m_nStyle & (resizeInside|resizeOutside)) != 0) { @@ -650,7 +650,7 @@ void Tracker::Draw(HDC hDC) const } DeleteObject(hbrush); } - + // cleanup pDC state if (pOldPen != NULL) SelectObject(hDC,pOldPen); @@ -667,16 +667,16 @@ void Tracker::GetHandleRect(int nHandle,RECT* pHandleRect) const NormalizeRect(&rectT); if ((m_nStyle & (solidLine|dottedLine)) != 0) InflateRect(&rectT,+1, +1); - + // since the rectangle itself was normalized, we also have to invert the // resize handles. nHandle = NormalizeHit(nHandle); - + // handle case of resize handles outside the tracker int size = GetHandleSize(); if (m_nStyle & resizeOutside) InflateRect(&rectT,size-1, size-1); - + // calculate position of the resize handle int nWidth = rectT.right - rectT.left; int nHeight = rectT.bottom - rectT.top; @@ -690,7 +690,7 @@ void Tracker::GetHandleRect(int nHandle,RECT* pHandleRect) const rect.top += pHandleInfo->nCenterY * (nHeight - size) / 2; rect.right = rect.left + size; rect.bottom = rect.top + size; - + *pHandleRect = rect; } @@ -699,7 +699,7 @@ int Tracker::GetHandleSize(LPRECT lpRect) const { if (lpRect == NULL) lpRect = (LPRECT)&m_rect; - + int size = m_nHandleSize; if (!(m_nStyle & resizeOutside)) { @@ -759,12 +759,12 @@ int Tracker::HitTestHandles(POINT point) const { RECT rect; UINT mask = GetHandleMask(); - + // see if hit anywhere inside the tracker GetTrueRect(&rect); if (!PtInRect(&rect,point)) return hitNothing; // totally missed - + // see if we hit a handle for (int i = 0; i < 8; ++i) { @@ -775,7 +775,7 @@ int Tracker::HitTestHandles(POINT point) const return (TrackerHit)i; } } - + // last of all, check for non-hit outside of object, between resize handles if ((m_nStyle & hatchedBorder) == 0) { @@ -796,14 +796,14 @@ void Tracker::GetModifyPointers( { if (nHandle == hitMiddle) nHandle = hitTopLeft; // same as hitting top-left - + *ppx = NULL; *ppy = NULL; - + // fill in the part of the rect that this handle modifies // (Note: handles that map to themselves along a given axis when that // axis is inverted don't modify the value on that axis) - + const AFX_HANDLEINFO* pHandleInfo = &_afxHandleInfo[nHandle]; if (pHandleInfo->nInvertX != nHandle) { @@ -831,7 +831,7 @@ void Tracker::GetModifyPointers( } } -// Fix strange warnings about some +// Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed #if defined(_MSC_VER) diff --git a/embedserv/source/embed/xwin.cxx b/embedserv/source/embed/xwin.cxx index 473647419cb9..38840a7d71f1 100644 --- a/embedserv/source/embed/xwin.cxx +++ b/embedserv/source/embed/xwin.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 @@ -38,7 +38,7 @@ ContainerWindowWrapper::ContainerWindowWrapper(HWND aHwnd) m_pDisposeEventListeners(0) { } - + ContainerWindowWrapper::~ContainerWindowWrapper() { delete m_pDisposeEventListeners; @@ -47,31 +47,31 @@ ContainerWindowWrapper::~ContainerWindowWrapper() void SAL_CALL ContainerWindowWrapper::dispose( -) +) throw ( ::com::sun::star::uno::RuntimeException ) { cppu::OInterfaceContainerHelper *pDisposeEventListeners(0); - + { osl::MutexGuard aGuard(m_aMutex); pDisposeEventListeners = m_pDisposeEventListeners; } - + if(pDisposeEventListeners) { lang::EventObject aEvt; aEvt.Source = static_cast< awt::XWindow* >(this); - + pDisposeEventListeners->disposeAndClear(aEvt); } } void SAL_CALL -ContainerWindowWrapper::addEventListener( +ContainerWindowWrapper::addEventListener( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener >& Listener + ::com::sun::star::lang::XEventListener >& Listener ) throw ( ::com::sun::star::uno::RuntimeException @@ -82,14 +82,14 @@ ContainerWindowWrapper::addEventListener( osl::MutexGuard aGuard(m_aMutex); pDisposeEventListeners = m_pDisposeEventListeners; } - + if(! pDisposeEventListeners) { osl::MutexGuard aGuard(m_aMutex); pDisposeEventListeners = m_pDisposeEventListeners = new cppu::OInterfaceContainerHelper(m_aMutex); } - + pDisposeEventListeners->addInterface( Listener ); } @@ -98,11 +98,11 @@ void SAL_CALL ContainerWindowWrapper::removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& Listener -) +) throw ( ::com::sun::star::uno::RuntimeException ) -{ +{ cppu::OInterfaceContainerHelper *pDisposeEventListeners(0); { osl::MutexGuard aGuard(m_aMutex); @@ -117,15 +117,15 @@ ContainerWindowWrapper::removeEventListener( // XSystemDependentWindowPeer ::com::sun::star::uno::Any SAL_CALL -ContainerWindowWrapper::getWindowHandle( +ContainerWindowWrapper::getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType -) +) throw ( ::com::sun::star::uno::RuntimeException ) { - if(SystemType == lang::SystemDependent::SYSTEM_WIN32 || + if(SystemType == lang::SystemDependent::SYSTEM_WIN32 || SystemType == lang::SystemDependent::SYSTEM_WIN16) { uno::Any aAny; @@ -138,24 +138,24 @@ ContainerWindowWrapper::getWindowHandle( } - + void SAL_CALL -ContainerWindowWrapper::setPosSize( +ContainerWindowWrapper::setPosSize( sal_Int32 X, sal_Int32 Y, - sal_Int32 Width, - sal_Int32 Height, + sal_Int32 Width, + sal_Int32 Height, sal_Int16 Flags ) throw ( ::com::sun::star::uno::RuntimeException) { - + } ::com::sun::star::awt::Rectangle SAL_CALL -ContainerWindowWrapper::getPosSize( -) +ContainerWindowWrapper::getPosSize( +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -167,7 +167,7 @@ ContainerWindowWrapper::getPosSize( void SAL_CALL ContainerWindowWrapper::setVisible( sal_Bool Visible -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -177,9 +177,9 @@ ContainerWindowWrapper::setVisible( void SAL_CALL -ContainerWindowWrapper::setEnable( +ContainerWindowWrapper::setEnable( sal_Bool Enable -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -189,7 +189,7 @@ ContainerWindowWrapper::setEnable( void SAL_CALL ContainerWindowWrapper::setFocus( -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -198,22 +198,22 @@ ContainerWindowWrapper::setFocus( } void SAL_CALL -ContainerWindowWrapper::addWindowListener( - const ::com::sun::star::uno::Reference< +ContainerWindowWrapper::addWindowListener( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) { } - + void SAL_CALL ContainerWindowWrapper::removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -223,10 +223,10 @@ ContainerWindowWrapper::removeWindowListener( void SAL_CALL -ContainerWindowWrapper::addFocusListener( +ContainerWindowWrapper::addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -234,24 +234,24 @@ ContainerWindowWrapper::addFocusListener( } - + void SAL_CALL ContainerWindowWrapper::removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) { } - + void SAL_CALL ContainerWindowWrapper::addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -260,10 +260,10 @@ ContainerWindowWrapper::addKeyListener( } void SAL_CALL -ContainerWindowWrapper::removeKeyListener( +ContainerWindowWrapper::removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) @@ -271,21 +271,21 @@ ContainerWindowWrapper::removeKeyListener( } - + void SAL_CALL ContainerWindowWrapper::addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) { - + } + - -void SAL_CALL +void SAL_CALL ContainerWindowWrapper::removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener @@ -301,17 +301,17 @@ ContainerWindowWrapper::removeMouseListener( void SAL_CALL ContainerWindowWrapper::addMouseMotionListener( const ::com::sun::star::uno::Reference< - ::com::sun::star::awt::XMouseMotionListener >& xListener -) + ::com::sun::star::awt::XMouseMotionListener >& xListener +) throw ( ::com::sun::star::uno::RuntimeException ) { } - + void SAL_CALL -ContainerWindowWrapper::removeMouseMotionListener( +ContainerWindowWrapper::removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) @@ -326,19 +326,19 @@ void SAL_CALL ContainerWindowWrapper::addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) { - + } void SAL_CALL -ContainerWindowWrapper::removePaintListener( - const ::com::sun::star::uno::Reference< +ContainerWindowWrapper::removePaintListener( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener -) +) throw ( ::com::sun::star::uno::RuntimeException ) diff --git a/embedserv/source/inc/common.h b/embedserv/source/inc/common.h index aa9c703e5a88..e0d43c14652c 100644 --- a/embedserv/source/inc/common.h +++ b/embedserv/source/inc/common.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/embedserv/source/inc/docholder.hxx b/embedserv/source/inc/docholder.hxx index 9655f49606d9..3e51c7b6c55e 100644 --- a/embedserv/source/inc/docholder.hxx +++ b/embedserv/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 @@ -59,7 +59,7 @@ class DocumentHolder : ::com::sun::star::ui::XDockingAreaAcceptor> { private: - ::osl::Mutex m_aMutex; + ::osl::Mutex m_aMutex; BOOL m_bAllowInPlace; LPOLEINPLACESITE m_pIOleIPSite; @@ -107,14 +107,14 @@ private: sal_Bool m_bLink; - + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > DocumentFrame(); ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProviderInterceptor > CreateNewInterceptor(); - + void ClearInterceptorInternally(); void LoadDocInFrame( sal_Bool bPluginMode ); diff --git a/embedserv/source/inc/embeddoc.hxx b/embedserv/source/inc/embeddoc.hxx index 950dcda18122..4a4845691c2f 100644 --- a/embedserv/source/inc/embeddoc.hxx +++ b/embedserv/source/inc/embeddoc.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 @@ -164,29 +164,29 @@ public: HRESULT OLENotifyDeactivation(); protected: - oslInterlockedCount m_refCount; + oslInterlockedCount m_refCount; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; - DocumentHolder* m_pDocHolder; - ::rtl::OUString m_aFileName; + DocumentHolder* m_pDocHolder; + ::rtl::OUString m_aFileName; - CComPtr< IStorage > m_pMasterStorage; - CComPtr< IStream > m_pOwnStream; - CComPtr< IStream > m_pExtStream; - GUID m_guid; + CComPtr< IStorage > m_pMasterStorage; + CComPtr< IStream > m_pOwnStream; + CComPtr< IStream > m_pExtStream; + GUID m_guid; - sal_Bool m_bIsDirty; + sal_Bool m_bIsDirty; - CComPtr< IOleClientSite > m_pClientSite; - CComPtr< IDataAdviseHolder > m_pDAdviseHolder; + CComPtr< IOleClientSite > m_pClientSite; + CComPtr< IDataAdviseHolder > m_pDAdviseHolder; - AdviseSinkHashMap m_aAdviseHashMap; - DWORD m_nAdviseNum; + AdviseSinkHashMap m_aAdviseHashMap; + DWORD m_nAdviseNum; ::rtl::Reference< EmbeddedDocumentInstanceAccess_Impl > m_xOwnAccess; - sal_Bool m_bIsInVerbHandling; + sal_Bool m_bIsInVerbHandling; }; class BooleanGuard_Impl diff --git a/embedserv/source/inc/embeddocaccess.hxx b/embedserv/source/inc/embeddocaccess.hxx index ed59dff1ad6e..76f86cab9bcb 100644 --- a/embedserv/source/inc/embeddocaccess.hxx +++ b/embedserv/source/inc/embeddocaccess.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 @@ -31,12 +31,12 @@ #include <cppuhelper/weak.hxx> -#define OLESERV_SAVEOBJECT 1 -#define OLESERV_CLOSE 2 -#define OLESERV_NOTIFY 3 -#define OLESERV_NOTIFYCLOSING 4 -#define OLESERV_SHOWOBJECT 5 -#define OLESERV_DEACTIVATE 6 +#define OLESERV_SAVEOBJECT 1 +#define OLESERV_CLOSE 2 +#define OLESERV_NOTIFY 3 +#define OLESERV_NOTIFYCLOSING 4 +#define OLESERV_SHOWOBJECT 5 +#define OLESERV_DEACTIVATE 6 #include <oleidl.h> #ifndef __MINGW32__ diff --git a/embedserv/source/inc/embservconst.h b/embedserv/source/inc/embservconst.h index e682ec4aa5ee..ac4cdcf70853 100644 --- a/embedserv/source/inc/embservconst.h +++ b/embedserv/source/inc/embservconst.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 @@ -46,7 +46,7 @@ const sal_Int32 nConstBufferSize = 32000; #ifdef __MINGW32__ #define DECLSPEC_SELECTANY #endif -#if defined(__MINGW32__) && !defined(INITGUID) +#if defined(__MINGW32__) && !defined(INITGUID) EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterTextServer; EXTERN_C const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer; diff --git a/embedserv/source/inc/iipaobj.hxx b/embedserv/source/inc/iipaobj.hxx index e0d38ea3348d..54dabed9eb1d 100644 --- a/embedserv/source/inc/iipaobj.hxx +++ b/embedserv/source/inc/iipaobj.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 @@ -67,7 +67,7 @@ public: private: - oslInterlockedCount m_refCount; + oslInterlockedCount m_refCount; ::rtl::Reference< DocumentHolder > m_rDocHolder; }; diff --git a/embedserv/source/inc/intercept.hxx b/embedserv/source/inc/intercept.hxx index 267fe1a399cb..09e7601bf5bd 100644 --- a/embedserv/source/inc/intercept.hxx +++ b/embedserv/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 @@ -62,7 +62,7 @@ public: void DisconnectDocHolder(); void generateFeatureStateEvent(); - + // overwritten to release the statuslistner. @@ -71,108 +71,108 @@ 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 ); - + void SAL_CALL dispose() 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; - + ::rtl::Reference< EmbeddedDocumentInstanceAccess_Impl > m_xOleAccess; ::com::sun::star::uno::WeakReference< ::com::sun::star::uno::XInterface > m_xDocHLocker; @@ -180,11 +180,11 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatchProvider; - - ::com::sun::star::uno::Reference< + + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatchProvider; - static ::com::sun::star::uno::Sequence< ::rtl::OUString > + static ::com::sun::star::uno::Sequence< ::rtl::OUString > m_aInterceptedURL; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; diff --git a/embedserv/source/inc/servprov.hxx b/embedserv/source/inc/servprov.hxx index cc861d2cc8d0..4206148ee80c 100644 --- a/embedserv/source/inc/servprov.hxx +++ b/embedserv/source/inc/servprov.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 @@ -51,15 +51,15 @@ public: virtual ~EmbedServer_Impl(); // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL acquire() throw (); virtual void SAL_CALL release() throw (); // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException); protected: @@ -77,7 +77,7 @@ public: sal_Bool registerClass(); sal_Bool deregisterClass(); - + /* IUnknown methods */ STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj); STDMETHOD_(ULONG, AddRef)(); @@ -90,8 +90,8 @@ public: protected: oslInterlockedCount m_refCount; - GUID m_guid; - DWORD m_factoryHandle; + GUID m_guid; + DWORD m_factoryHandle; ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xFactory; }; diff --git a/embedserv/source/inc/stdafx.h b/embedserv/source/inc/stdafx.h index c1110ac8ab42..b6e553e7f65b 100644 --- a/embedserv/source/inc/stdafx.h +++ b/embedserv/source/inc/stdafx.h @@ -39,6 +39,6 @@ using ::std::max; #pragma warning(pop) #endif -#endif +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/embedserv/source/inc/syswinwrapper.hxx b/embedserv/source/inc/syswinwrapper.hxx index ce049c502200..0eff8b5d0df0 100644 --- a/embedserv/source/inc/syswinwrapper.hxx +++ b/embedserv/source/inc/syswinwrapper.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/embedserv/source/inc/xwin.hxx b/embedserv/source/inc/xwin.hxx index e7cdbac53117..d6abfaa93fa7 100644 --- a/embedserv/source/inc/xwin.hxx +++ b/embedserv/source/inc/xwin.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 @@ -39,163 +39,163 @@ class ContainerWindowWrapper: - public ::cppu::WeakImplHelper2< + public ::cppu::WeakImplHelper2< ::com::sun::star::awt::XWindow, ::com::sun::star::awt::XSystemDependentWindowPeer> { public: ContainerWindowWrapper(HWND aHwnd); - + ~ ContainerWindowWrapper(); - - + + // XComponent - + virtual void SAL_CALL dispose( - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - addEventListener( + addEventListener( const ::com::sun::star::uno::Reference< - ::com::sun::star::lang::XEventListener >& xListener + ::com::sun::star::lang::XEventListener >& xListener ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - removeEventListener( + removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - - + + // XSystemDependentWindowPeer - + virtual ::com::sun::star::uno::Any SAL_CALL - getWindowHandle( + getWindowHandle( const ::com::sun::star::uno::Sequence< sal_Int8 >& ProcessId, sal_Int16 SystemType - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); // XWindow - + virtual void SAL_CALL - setPosSize( + setPosSize( sal_Int32 X, sal_Int32 Y, - sal_Int32 Width, - sal_Int32 Height, + sal_Int32 Width, + sal_Int32 Height, sal_Int16 Flags ) throw ( ::com::sun::star::uno::RuntimeException); - + virtual ::com::sun::star::awt::Rectangle SAL_CALL - getPosSize( - ) + getPosSize( + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL setVisible( sal_Bool Visible - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - setEnable( + setEnable( sal_Bool Enable - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setFocus( - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - addWindowListener( - const ::com::sun::star::uno::Reference< + addWindowListener( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL - addFocusListener( + addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - removeKeyListener( + removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - - virtual void SAL_CALL + + virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener @@ -203,49 +203,49 @@ public: throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< - ::com::sun::star::awt::XMouseMotionListener >& xListener - ) + ::com::sun::star::awt::XMouseMotionListener >& xListener + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - removeMouseMotionListener( + removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + virtual void SAL_CALL - removePaintListener( - const ::com::sun::star::uno::Reference< + removePaintListener( + const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener - ) + ) throw ( ::com::sun::star::uno::RuntimeException ); - + private: - + osl::Mutex m_aMutex; cppu::OInterfaceContainerHelper *m_pDisposeEventListeners; - + HWND m_aHwnd; }; diff --git a/embedserv/source/inprocserv/advisesink.cxx b/embedserv/source/inprocserv/advisesink.cxx index 2922105a7e1d..03c63bb1c0af 100644 --- a/embedserv/source/inprocserv/advisesink.cxx +++ b/embedserv/source/inprocserv/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/embedserv/source/inprocserv/advisesink.hxx b/embedserv/source/inprocserv/advisesink.hxx index 2e699cf65d40..22246b1ef021 100644 --- a/embedserv/source/inprocserv/advisesink.hxx +++ b/embedserv/source/inprocserv/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 @@ -76,7 +76,7 @@ public: DWORD GetAspect() { return m_nAspect; } ComSmart< IAdviseSink >& GetOrigAdvise() { return m_pListener; } void DisconnectOrigAdvise() { m_pListener = NULL; } - + void SetClosed() { m_bClosed = TRUE; } void UnsetClosed() { m_bClosed = FALSE; } BOOL IsClosed() { return m_bClosed; } diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx index b54c2c6e42db..acb94fd5e67d 100644 --- a/embedserv/source/inprocserv/dllentry.cxx +++ b/embedserv/source/inprocserv/dllentry.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 @@ -69,10 +69,10 @@ namespace { int GetStringFromClassID( const GUID& guid, char* pBuf, int nLen ) { - // is not allowed to insert + // is not allowed to insert if ( nLen < 38 ) return 0; - + pBuf[0] = '{'; FillCharFromInt( guid.Data1, &pBuf[1], 8 ); pBuf[9] = '-'; @@ -157,7 +157,7 @@ public: protected: ULONG m_refCount; - GUID m_guid; + GUID m_guid; }; }; // namespace inprocserv @@ -331,7 +331,7 @@ STDMETHODIMP InprocEmbedProvider_Impl::CreateInstance(IUnknown FAR* punkOuter, if ( !SUCCEEDED( hr ) ) *ppv = NULL; - + return hr; } diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx index 32ea696554f5..6171ca741915 100644 --- a/embedserv/source/inprocserv/inprocembobj.cxx +++ b/embedserv/source/inprocserv/inprocembobj.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 @@ -42,7 +42,7 @@ void WriteDebugInfo( DWORD pThis, char* pString, DWORD nToWrite ) pNumber[0] = '0'; pNumber[1] = 'x'; for ( int nInd = 0; nInd < 8; nInd++ ) - pNumber[nInd+2] = (char)( ( pThis / ( 1 << ( 7 - nInd ) ) ) % 16 ) + 48; + pNumber[nInd+2] = (char)( ( pThis / ( 1 << ( 7 - nInd ) ) ) % 16 ) + 48; pNumber[10] = ' '; pNumber[11] = 0; @@ -206,7 +206,7 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() // // reinit the handler // ComSmart< IRunnableObject > pIRunObj; // hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); -// +// // if ( SUCCEEDED( hr ) && pIRunObj ) { // { @@ -268,7 +268,7 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( m_pClientSite ) pOleObject->SetClientSite( m_pClientSite ); - + WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); for ( DWORD nInd = 0; nInd < DEFAULT_ARRAY_LEN; nInd++ ) if ( m_pOleAdvises[nInd] ) @@ -550,7 +550,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::InitNew( IStorage *pStg ) m_pFileName = NULL; } } - + return hr; } } @@ -567,7 +567,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Load( IStorage *pStg ) WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( IStorage *pStg )" ); ComSmart< IPersistStorage > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) { @@ -587,7 +587,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Load( IStorage *pStg ) m_pFileName = NULL; } } - + return hr; } } @@ -607,7 +607,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoa { ComSmart< IPersistStorage > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) return pPersist->Save( pStgSave, fSameAsLoad ); @@ -633,7 +633,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew ) { ComSmart< IPersistStorage > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) { @@ -671,7 +671,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::HandsOffStorage() { ComSmart< IPersistStorage > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) { @@ -698,7 +698,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD dwMode { ComSmart< IPersistFile > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistFile, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) { @@ -729,7 +729,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Save( LPCOLESTR pszFileName, BOOL fRememb { ComSmart< IPersistFile > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistFile, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) return pPersist->Save( pszFileName, fRemember ); @@ -746,7 +746,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( LPCOLESTR pszFileName ) { ComSmart< IPersistFile > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistFile, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) { @@ -776,7 +776,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetCurFile( LPOLESTR *ppszFileName ) { ComSmart< IPersistFile > pPersist; HRESULT hr = m_pDefHandler->QueryInterface( IID_IPersistFile, (void**)&pPersist ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pPersist ) return pPersist->GetCurFile( ppszFileName ); @@ -807,7 +807,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetClientSite( IOleClientSite* pSite ) { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { @@ -821,7 +821,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetClientSite( IOleClientSite* pSite ) m_pOleContainer->LockContainer( FALSE ); m_pOleContainer = NULL; } - + m_pClientSite->GetContainer( &m_pOleContainer ); if ( m_pOleContainer ) m_pOleContainer->LockContainer( TRUE ); @@ -842,7 +842,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetClientSite( IOleClientSite** pSite ) { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetClientSite( pSite ); @@ -860,7 +860,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, L { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { @@ -881,7 +881,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Close( DWORD dwSaveOption ) // no need to close if there is no default handler. ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { @@ -904,7 +904,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetMoniker( DWORD dwWhichMoniker, IMonike { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->SetMoniker( dwWhichMoniker, pmk ); @@ -921,7 +921,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetMoniker( DWORD dwAssign, DWORD dwWhich { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetMoniker( dwAssign, dwWhichMoniker, ppmk ); @@ -938,7 +938,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::InitFromData( IDataObject * pDataObject, { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->InitFromData( pDataObject, fCreation, dwReserved ); @@ -955,7 +955,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetClipboardData( DWORD dwReserved, IData { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetClipboardData( dwReserved, ppDataObject ); @@ -979,7 +979,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::DoVerb( WRITEDEBUGINFO( "DoVerb" MY_STRING_LINE "n" ); ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + WRITEDEBUGINFO( "DoVerb" ); ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem WRITEDEBUGINFO( "DoVerb" ); @@ -1009,7 +1009,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumVerbs( IEnumOLEVERB ** ppEnumOleVerb { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->EnumVerbs( ppEnumOleVerb ); @@ -1027,7 +1027,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Update() { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->Update(); @@ -1044,7 +1044,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::IsUpToDate() { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->IsUpToDate(); @@ -1071,7 +1071,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetUserType( DWORD dwFormOfType, LPOLESTR { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetUserType( dwFormOfType, pszUserType ); @@ -1088,7 +1088,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetExtent( DWORD dwDrawAspect, SIZEL *psi { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->SetExtent( dwDrawAspect, psizel ); @@ -1105,7 +1105,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, SIZEL * ps { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetExtent( dwDrawAspect, psizel ); @@ -1118,7 +1118,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, SIZEL * ps STDMETHODIMP InprocEmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD *pdwConnection ) { WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD *pdwConnection )" ); - + if ( !pdwConnection ) return E_FAIL; @@ -1133,13 +1133,13 @@ STDMETHODIMP InprocEmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD *pdw { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { ComSmart< OleWrapperAdviseSink > pOwnAdvise( new OleWrapperAdviseSink( pAdvSink ) ); DWORD nRegID = 0; - + if ( SUCCEEDED( pOleObject->Advise( pOwnAdvise, &nRegID ) ) && nRegID > 0 ) { pOwnAdvise->SetRegID( nRegID ); @@ -1147,7 +1147,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Advise( IAdviseSink *pAdvSink, DWORD *pdw if ( *pdwConnection ) return S_OK; else - pOleObject->Unadvise( nRegID ); + pOleObject->Unadvise( nRegID ); } } } @@ -1165,7 +1165,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Unadvise( DWORD dwConnection ) { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { @@ -1209,7 +1209,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetMiscStatus( DWORD dwAspect, DWORD * pd { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->GetMiscStatus( dwAspect, pdwStatus ); @@ -1226,7 +1226,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetColorScheme( LOGPALETTE * pLogpal ) { ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) return pOleObject->SetColorScheme( pLogpal ); @@ -1244,7 +1244,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetData( FORMATETC * pFormatetc, STGMEDIU { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->GetData( pFormatetc, pMedium ); @@ -1261,7 +1261,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetDataHere( FORMATETC * pFormatetc, STGM { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->GetDataHere( pFormatetc, pMedium ); @@ -1278,7 +1278,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc ) { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->QueryGetData( pFormatetc ); @@ -1295,7 +1295,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pForma { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->GetCanonicalFormatEtc( pFormatetcIn, pFormatetcOut ); @@ -1312,7 +1312,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetData( FORMATETC * pFormatetc, STGMEDIU { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->SetData( pFormatetc, pMedium, fRelease ); @@ -1329,7 +1329,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumFormatEtc( DWORD dwDirection, IEnumFO { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->EnumFormatEtc( dwDirection, ppFormatetc ); @@ -1357,13 +1357,13 @@ STDMETHODIMP InprocEmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD ad { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) { ComSmart< OleWrapperAdviseSink > pOwnAdvise( new OleWrapperAdviseSink( ComSmart<IAdviseSink>( pAdvSink ), pFormatetc, advf ) ); DWORD nRegID = 0; - + if ( SUCCEEDED( pIDataObject->DAdvise( pFormatetc, advf, pOwnAdvise, &nRegID ) ) && nRegID > 0 ) { pOwnAdvise->SetRegID( nRegID ); @@ -1371,7 +1371,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD ad if ( *pdwConnection ) return S_OK; else - pIDataObject->DUnadvise( nRegID ); + pIDataObject->DUnadvise( nRegID ); } } } @@ -1390,7 +1390,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::DUnadvise( DWORD dwConnection ) { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) { @@ -1416,7 +1416,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumDAdvise( IEnumSTATDATA ** ppenumAdvis { ComSmart< IDataObject > pIDataObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIDataObject ) return pIDataObject->EnumDAdvise( ppenumAdvise ); @@ -1434,7 +1434,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetRunningClass( LPCLSID lpClsid ) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIRunObj ) return pIRunObj->GetRunningClass( lpClsid ); @@ -1451,7 +1451,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::Run( LPBINDCTX pbc ) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIRunObj ) return pIRunObj->Run( pbc ); @@ -1468,7 +1468,7 @@ BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIRunObj ) return pIRunObj->IsRunning(); @@ -1486,7 +1486,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlock { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIRunObj ) return pIRunObj->LockRunning( fLock, fLastUnlockCloses ); @@ -1503,7 +1503,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetContainedObject( BOOL fContained) { ComSmart< IRunnableObject > pIRunObj; HRESULT hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); - + ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pIRunObj ) return pIRunObj->SetContainedObject( fContained ); @@ -1603,7 +1603,7 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetAdvise( DWORD aspects, DWORD advf, IAd if ( SUCCEEDED( hr ) && pIViewObject ) { ComSmart< OleWrapperAdviseSink > pOwnAdvise( new OleWrapperAdviseSink( pAdvSink, aspects, advf ) ); - + if ( SUCCEEDED( pIViewObject->SetAdvise( aspects, advf, pOwnAdvise ) ) ) { m_pViewAdvise = pOwnAdvise; diff --git a/embedserv/source/inprocserv/inprocembobj.h b/embedserv/source/inprocserv/inprocembobj.h index 0592352dad49..ebbbd393ea13 100644 --- a/embedserv/source/inprocserv/inprocembobj.h +++ b/embedserv/source/inprocserv/inprocembobj.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 @@ -234,7 +234,7 @@ public: STDMETHOD(GetTypeInfo)( UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); STDMETHOD(GetIDsOfNames)( REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); STDMETHOD(Invoke)( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); - + }; } // namespace inprocserv diff --git a/embedserv/source/inprocserv/smartpointer.hxx b/embedserv/source/inprocserv/smartpointer.hxx index 776ec5305ed8..cc8b458ddbc2 100644 --- a/embedserv/source/inprocserv/smartpointer.hxx +++ b/embedserv/source/inprocserv/smartpointer.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 @@ -60,7 +60,7 @@ template< class T > class ComSmart pInterface->Release(); } } - + public: ComSmart() : m_pInterface( NULL ) @@ -79,7 +79,7 @@ public: if ( m_pInterface != NULL ) m_pInterface->AddRef(); } - + ~ComSmart() { OwnRelease(); @@ -96,7 +96,7 @@ public: return *this; } - + ComSmart<T>& operator=( T* pInterface ) { OwnRelease(); @@ -118,7 +118,7 @@ public: { return *m_pInterface; } - + T** operator&() { OwnRelease(); |