diff options
Diffstat (limited to 'embedserv/source')
-rw-r--r-- | embedserv/source/embed/docholder.cxx | 112 | ||||
-rwxr-xr-x | embedserv/source/embed/makefile.mk | 4 | ||||
-rw-r--r-- | embedserv/source/inc/embeddoc.hxx | 6 | ||||
-rw-r--r-- | embedserv/source/inprocserv/advisesink.cxx | 5 | ||||
-rw-r--r-- | embedserv/source/inprocserv/inprocembobj.cxx | 168 | ||||
-rw-r--r-- | embedserv/source/inprocserv/smartpointer.hxx | 14 |
6 files changed, 4 insertions, 305 deletions
diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 4efa9f6db750..3bafde9e67ae 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -496,17 +496,7 @@ void DocumentHolder::InPlaceDeactivate(void) m_xLayoutManager->setVisible(false); if (NULL!=m_pIOleIPSite) - { - // The following workaround should let the object be stored in case of inplace editing -// CComPtr< IOleClientSite > pClientSite; -// -// m_pIOleIPSite->QueryInterface( -// IID_IOleClientSite, (void**)&pClientSite ); -// if ( pClientSite ) -// pClientSite->SaveObject(); - m_pIOleIPSite->OnInPlaceDeactivate(); - } if(m_pIOleIPFrame) m_pIOleIPFrame->Release(); m_pIOleIPFrame = 0; if(m_pIOleIPUIWindow) m_pIOleIPUIWindow->Release(); m_pIOleIPUIWindow = 0; @@ -1162,62 +1152,6 @@ IDispatch* DocumentHolder::GetIDispatch() return m_pIDispatch; } -#if 0 -HRESULT DocumentHolder::SetVisArea( const RECTL *pRect ) -{ - if ( pRect && m_xDocument.is() ) - { - uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); - for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WinExtent" ) ) ) - { - // should allways be there - uno::Sequence< sal_Int32 > aRect(4); - - aRect[0] = pRect->left; - aRect[1] = pRect->top; - aRect[2] = pRect->right; - aRect[3] = pRect->bottom; - - aArgs[nInd].Value <<= aRect; - - m_xDocument->attachResource( m_xDocument->getURL(), aArgs ); - return S_OK; - } - - OSL_ENSURE( sal_False, "WinExtent seems not to be implemented!\n" ); - } - - return E_FAIL; -} - -HRESULT DocumentHolder::GetVisArea( RECTL *pRect ) -{ - if ( pRect && m_xDocument.is() ) - { - uno::Sequence< beans::PropertyValue > aArgs = m_xDocument->getArgs(); - for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) - if ( aArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WinExtent" ) ) ) - { - uno::Sequence< sal_Int32 > aRect; - if ( ( aArgs[nInd].Value >>= aRect ) && aRect.getLength() == 4 ) - { - pRect->left = aRect[0]; - pRect->top = aRect[1]; - pRect->right = aRect[2]; - pRect->bottom = aRect[3]; - - return S_OK; - } - - break; - } - } - - return E_FAIL; -} -#endif - HRESULT DocumentHolder::GetDocumentBorder( RECT *pRect ) { if ( pRect && m_xDocument.is() ) @@ -1589,52 +1523,6 @@ void SAL_CALL DocumentHolder::modified( const lang::EventObject& /*aEvent*/ ) } } - - -// if(m_pOLEInterface->GetGUID() == OID_WriterTextServer) { -// // edit group -// CopyToOLEMenu(m_nMenuHandle,1,hMenu,(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,2,hMenu,1+(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,3,hMenu,2+(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,4,hMenu,3+(WORD)mgw.width[0]); -// mgw.width[1]=4; - -// // object group -// CopyToOLEMenu( -// m_nMenuHandle,5, -// hMenu,4+(WORD)mgw.width[0]+(WORD)mgw.width[2]); -// mgw.width[3]=1; - -// // help group -// CopyToOLEMenu( -// m_nMenuHandle,7, -// hMenu,5+(WORD)mgw.width[0]+(WORD)mgw.width[2]+(WORD)mgw.width[4]); -// mgw.width[5]=1; -// } -// else if(m_pOLEInterface->GetGUID() == OID_CalcServer) { -// // edit group -// CopyToOLEMenu(m_nMenuHandle,1,hMenu,(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,2,hMenu,1+(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,3,hMenu,2+(WORD)mgw.width[0]); -// CopyToOLEMenu(m_nMenuHandle,4,hMenu,3+(WORD)mgw.width[0]); -// mgw.width[1]=4; - -// // object group -// CopyToOLEMenu( -// m_nMenuHandle,5, -// hMenu,4+(WORD)mgw.width[0]+(WORD)mgw.width[2]); -// CopyToOLEMenu( -// m_nMenuHandle,6, -// hMenu,5+(WORD)mgw.width[0]+(WORD)mgw.width[2]); -// mgw.width[3]=2; - -// // help group -// CopyToOLEMenu( -// m_nMenuHandle,8, -// hMenu,6+(WORD)mgw.width[0]+(WORD)mgw.width[2]+(WORD)mgw.width[4]); -// mgw.width[5]=1; -// } - // Fix strange warnings about some // ATL::CAxHostWindow::QueryInterface|AddRef|Releae functions. // warning C4505: 'xxx' : unreferenced local function has been removed diff --git a/embedserv/source/embed/makefile.mk b/embedserv/source/embed/makefile.mk index 9156b6a8e88a..a531858bcf22 100755 --- a/embedserv/source/embed/makefile.mk +++ b/embedserv/source/embed/makefile.mk @@ -25,8 +25,6 @@ # #************************************************************************* -#MKDEPENDSOLVER=YES - PRJ=..$/.. PRJNAME=embedserv @@ -36,7 +34,6 @@ TARGET=emser # --- Settings ----------------------------------------------------- .INCLUDE : settings.mk -#.INCLUDE : $(PRJ)$/util$/makefile.pmk .IF "$(DISABLE_ATL)"=="" @@ -75,6 +72,7 @@ EXCEPTIONSFILES= \ $(SLO)$/tracker.obj .ENDIF + # --- Targets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/embedserv/source/inc/embeddoc.hxx b/embedserv/source/inc/embeddoc.hxx index 950dcda18122..40081abefb4b 100644 --- a/embedserv/source/inc/embeddoc.hxx +++ b/embedserv/source/inc/embeddoc.hxx @@ -39,15 +39,15 @@ #include <oleidl.h> #include <objidl.h> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/SEQUENCE.h> #include "embeddocaccess.hxx" #include "docholder.hxx" -typedef ::std::hash_map< DWORD, IAdviseSink* > AdviseSinkHashMap; -typedef ::std::hash_map< DWORD, IAdviseSink* >::iterator AdviseSinkHashMapIterator; +typedef ::boost::unordered_map< DWORD, IAdviseSink* > AdviseSinkHashMap; +typedef ::boost::unordered_map< DWORD, IAdviseSink* >::iterator AdviseSinkHashMapIterator; class GDIMetaFile; class CIIAObj; diff --git a/embedserv/source/inprocserv/advisesink.cxx b/embedserv/source/inprocserv/advisesink.cxx index 2922105a7e1d..72d00bbef142 100644 --- a/embedserv/source/inprocserv/advisesink.cxx +++ b/embedserv/source/inprocserv/advisesink.cxx @@ -140,7 +140,6 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnDataChange( LPFORMATETC pFetc, LPSTG { if ( m_pListener ) { - WRITEDEBUGINFO( "OleWrapperAdviseSink::OnDataChange():" ); m_pListener->OnDataChange( pFetc, pMedium ); } } @@ -149,7 +148,6 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnViewChange( DWORD dwAspect, LONG lin { if ( m_pListener ) { - WRITEDEBUGINFO( "OleWrapperAdviseSink::OnViewChange():" ); m_pListener->OnViewChange( dwAspect, lindex ); } } @@ -158,7 +156,6 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnRename( LPMONIKER pMoniker ) { if ( m_pListener ) { - WRITEDEBUGINFO( "OleWrapperAdviseSink::OnRename():" ); m_pListener->OnRename( pMoniker ); } } @@ -167,7 +164,6 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnSave(void) { if ( m_pListener ) { - WRITEDEBUGINFO( "OleWrapperAdviseSink::OnSave():" ); m_pListener->OnSave(); } } @@ -176,7 +172,6 @@ STDMETHODIMP_(void) OleWrapperAdviseSink::OnClose(void) { if ( m_pListener ) { - WRITEDEBUGINFO( "OleWrapperAdviseSink::OnClose():" ); m_pListener->OnClose(); } diff --git a/embedserv/source/inprocserv/inprocembobj.cxx b/embedserv/source/inprocserv/inprocembobj.cxx index 32ea696554f5..a8b69fc3944e 100644 --- a/embedserv/source/inprocserv/inprocembobj.cxx +++ b/embedserv/source/inprocserv/inprocembobj.cxx @@ -32,33 +32,6 @@ namespace inprocserv { -#ifdef OWNDEBUG -//------------------------------------------------------------------------------- -void WriteDebugInfo( DWORD pThis, char* pString, DWORD nToWrite ) -{ - if ( nToWrite ) - { - char pNumber[12]; - pNumber[0] = '0'; - pNumber[1] = 'x'; - for ( int nInd = 0; nInd < 8; nInd++ ) - pNumber[nInd+2] = (char)( ( pThis / ( 1 << ( 7 - nInd ) ) ) % 16 ) + 48; - pNumber[10] = ' '; - pNumber[11] = 0; - - HANDLE pFile = CreateFileA( "h:\\inproc.log", GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, 0, NULL ); - if ( pFile ) - { - DWORD dwWritten = 0; - SetFilePointer( pFile, 0, 0, FILE_END ); - WriteFile( pFile, pNumber, 11, &dwWritten, NULL ); - WriteFile( pFile, pString, nToWrite - 1, &dwWritten, NULL ); - CloseHandle( pFile ); - } - } -} -#endif - //------------------------------------------------------------------------------- BOOL StringsEqual( LPCOLESTR pszNameFromOutside, wchar_t* pOwnName ) { @@ -113,29 +86,23 @@ void InprocEmbedDocument_Impl::SetName( LPCOLESTR pszNameFromOutside, wchar_t*& //------------------------------------------------------------------------------- BOOL InprocEmbedDocument_Impl::CheckDefHandler() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); // set the own listener if ( m_pOleAdvises[0] == NULL ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); m_pOleAdvises[0] = new OleWrapperAdviseSink(); } else { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( m_pOleAdvises[0]->IsClosed() ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( m_pDefHandler ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); // deregister all the listeners ComSmart< IOleObject > pOleObject; HRESULT hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); if ( SUCCEEDED( hr ) && pOleObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); for ( DWORD nInd = 0; nInd < DEFAULT_ARRAY_LEN; nInd++ ) if ( m_pOleAdvises[nInd] ) { @@ -147,12 +114,10 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() pOleObject->SetClientSite( NULL ); } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IDataObject > pIDataObject; hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); if ( SUCCEEDED( hr ) && pIDataObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); for ( DWORD nInd = 0; nInd < DEFAULT_ARRAY_LEN; nInd++ ) if ( m_pDataAdvises[nInd] ) { @@ -162,23 +127,18 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() } } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IViewObject > pIViewObject; hr = m_pDefHandler->QueryInterface( IID_IViewObject, (void**)&pIViewObject ); if ( SUCCEEDED( hr ) && pIViewObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( m_pViewAdvise ) pIViewObject->SetAdvise( m_pViewAdvise->GetAspect(), m_pViewAdvise->GetViewAdviseFlag(), NULL ); - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IPersistStorage > pPersist; hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); if ( SUCCEEDED( hr ) && pPersist ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); // disconnect the old wrapper from the storage pPersist->HandsOffStorage(); } @@ -186,7 +146,6 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() m_pDefHandler = NULL; } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); m_pOleAdvises[0]->UnsetClosed(); } } @@ -194,31 +153,15 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() if ( m_nCallsOnStack ) return FALSE; - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( !m_pDefHandler ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); // create a new default inprocess handler HRESULT hr = OleCreateDefaultHandler( m_guid, NULL, IID_IUnknown, (void**)&m_pDefHandler ); if ( SUCCEEDED( hr ) ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); -// // reinit the handler -// ComSmart< IRunnableObject > pIRunObj; -// hr = m_pDefHandler->QueryInterface( IID_IRunnableObject, (void**)&pIRunObj ); -// -// if ( SUCCEEDED( hr ) && pIRunObj ) { -// { -// ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem -// hr = pIRunObj->Run( NULL ); -// } -// -// if ( SUCCEEDED( hr ) ) - { if ( m_nInitMode == INIT_FROM_STORAGE ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IPersistStorage > pPersist; hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); @@ -228,7 +171,6 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() } else if ( m_nInitMode == LOAD_FROM_STORAGE ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IPersistStorage > pPersist; hr = m_pDefHandler->QueryInterface( IID_IPersistStorage, (void**)&pPersist ); @@ -238,7 +180,6 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() } else if ( m_nInitMode == LOAD_FROM_FILE ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IPersistFile > pPersistFile; hr = m_pDefHandler->QueryInterface( IID_IPersistFile, (void**)&pPersistFile ); @@ -246,15 +187,11 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() if ( SUCCEEDED( hr ) && pPersistFile && m_pFileName ) hr = pPersistFile->Load( m_pFileName, m_nFileOpenMode ); } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); - } } } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( !SUCCEEDED( hr ) || !m_pDefHandler ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); m_pDefHandler = NULL; return FALSE; } @@ -265,11 +202,9 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() hr = m_pDefHandler->QueryInterface( IID_IOleObject, (void**)&pOleObject ); if ( SUCCEEDED( hr ) && pOleObject ) { - 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] ) { @@ -279,36 +214,28 @@ BOOL InprocEmbedDocument_Impl::CheckDefHandler() } } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IDataObject > pIDataObject; hr = m_pDefHandler->QueryInterface( IID_IDataObject, (void**)&pIDataObject ); if ( SUCCEEDED( hr ) && pIDataObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); for ( DWORD nInd = 0; nInd < DEFAULT_ARRAY_LEN; nInd++ ) if ( m_pDataAdvises[nInd] ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); DWORD nRegID = 0; if ( SUCCEEDED( pIDataObject->DAdvise( m_pDataAdvises[nInd]->GetFormatEtc(), m_pDataAdvises[nInd]->GetDataAdviseFlag(), m_pDataAdvises[nInd], &nRegID ) ) && nRegID > 0 ) m_pDataAdvises[nInd]->SetRegID( nRegID ); - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); } } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); ComSmart< IViewObject > pIViewObject; hr = m_pDefHandler->QueryInterface( IID_IViewObject, (void**)&pIViewObject ); if ( SUCCEEDED( hr ) && pIViewObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); if ( m_pViewAdvise ) pIViewObject->SetAdvise( m_pViewAdvise->GetAspect(), m_pViewAdvise->GetViewAdviseFlag(), m_pViewAdvise ); - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); } } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::CheckDefHandler()" ); return TRUE; } @@ -507,11 +434,9 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetClassID( CLSID* pClassId ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::IsDirty() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::IsDirty()1" ); if ( m_pDefHandler == NULL || m_pOleAdvises[0] == NULL || m_pOleAdvises[0]->IsClosed() ) return S_FALSE; - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::IsDirty()2" ); if ( CheckDefHandler() ) { ComSmart< IPersistStorage > pPersist; @@ -528,7 +453,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::IsDirty() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InitNew( IStorage *pStg ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InitNew( IStorage *pStg )" ); if ( CheckDefHandler() ) { ComSmart< IPersistStorage > pPersist; @@ -561,28 +485,23 @@ STDMETHODIMP InprocEmbedDocument_Impl::InitNew( IStorage *pStg ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Load( IStorage *pStg ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( IStorage *pStg )" ); if ( CheckDefHandler() ) { - 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 ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( IStorage *pStg )" ); hr = pPersist->Load( pStg ); if ( SUCCEEDED( hr ) ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( IStorage *pStg )" ); m_nInitMode = LOAD_FROM_STORAGE; m_pStorage = pStg; m_nFileOpenMode = 0; if ( m_pFileName ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( IStorage *pStg )" ); delete[] m_pFileName; m_pFileName = NULL; } @@ -598,11 +517,9 @@ STDMETHODIMP InprocEmbedDocument_Impl::Load( IStorage *pStg ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad )" ); if ( fSameAsLoad && ( m_pDefHandler == NULL || m_pOleAdvises[0] == NULL || m_pOleAdvises[0]->IsClosed() ) ) return S_OK; - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad )" ); if ( CheckDefHandler() ) { ComSmart< IPersistStorage > pPersist; @@ -619,7 +536,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoa //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew )" ); if ( m_pDefHandler == NULL || m_pOleAdvises[0] == NULL || m_pOleAdvises[0]->IsClosed() ) { if ( pStgNew ) @@ -628,7 +544,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew ) return S_OK; } - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew )" ); if ( CheckDefHandler() ) { ComSmart< IPersistStorage > pPersist; @@ -640,11 +555,9 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew ) hr = pPersist->SaveCompleted( pStgNew ); if ( SUCCEEDED( hr ) ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew )" ); m_nInitMode = LOAD_FROM_STORAGE; if ( pStgNew ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew )" ); m_pStorage = pStgNew; } @@ -666,7 +579,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( IStorage *pStgNew ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::HandsOffStorage() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::HandsOffStorage()" ); if ( CheckDefHandler() ) { ComSmart< IPersistStorage > pPersist; @@ -679,7 +591,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::HandsOffStorage() if ( SUCCEEDED( hr ) ) { m_pStorage = NULL; - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::HandsOffStorage()" ); } return hr; @@ -693,7 +604,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::HandsOffStorage() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD dwMode ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD dwMode )" ); if ( CheckDefHandler() && pszFileName ) { ComSmart< IPersistFile > pPersist; @@ -724,7 +634,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Load( LPCOLESTR pszFileName, DWORD dwMode //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Save( LPCOLESTR pszFileName, BOOL fRemember ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Save( LPCOLESTR pszFileName, BOOL fRemember )" ); if ( CheckDefHandler() ) { ComSmart< IPersistFile > pPersist; @@ -741,7 +650,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Save( LPCOLESTR pszFileName, BOOL fRememb //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( LPCOLESTR pszFileName ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SaveCompleted( LPCOLESTR pszFileName )" ); if ( CheckDefHandler() ) { ComSmart< IPersistFile > pPersist; @@ -771,7 +679,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SaveCompleted( LPCOLESTR pszFileName ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetCurFile( LPOLESTR *ppszFileName ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetCurFile( LPOLESTR *ppszFileName )" ); if ( CheckDefHandler() ) { ComSmart< IPersistFile > pPersist; @@ -789,7 +696,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetCurFile( LPOLESTR *ppszFileName ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetClientSite( IOleClientSite* pSite ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetClientSite( IOleClientSite* pSite )" ); if ( pSite == m_pClientSite ) return S_OK; @@ -837,7 +743,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetClientSite( IOleClientSite* pSite ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetClientSite( IOleClientSite** pSite ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetClientSite( IOleClientSite** pSite )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -854,7 +759,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetClientSite( IOleClientSite** pSite ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLESTR szContainerObj ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLESTR szContainerObj )" ); if ( CheckDefHandler() ) { @@ -864,7 +768,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, L ULONGGuard aGuard( &m_nCallsOnStack ); // avoid reentrance problem if ( SUCCEEDED( hr ) && pOleObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, LPCOLESTR szContainerObj )" ); hr = pOleObject->SetHostNames( szContainerApp, szContainerObj ); } } @@ -875,7 +778,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetHostNames( LPCOLESTR szContainerApp, L //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Close( DWORD dwSaveOption ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Close( DWORD dwSaveOption )" ); if ( m_pDefHandler && CheckDefHandler() ) { // no need to close if there is no default handler. @@ -899,7 +801,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Close( DWORD dwSaveOption ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetMoniker( DWORD dwWhichMoniker, IMoniker * pmk ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetMoniker( DWORD dwWhichMoniker, IMoniker * pmk )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -916,7 +817,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetMoniker( DWORD dwWhichMoniker, IMonike //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetMoniker( DWORD dwAssign, DWORD dwWhichMoniker, IMoniker ** ppmk ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetMoniker( DWORD dwAssign, DWORD dwWhichMoniker, IMoniker ** ppmk )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -933,7 +833,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetMoniker( DWORD dwAssign, DWORD dwWhich //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InitFromData( IDataObject * pDataObject, BOOL fCreation, DWORD dwReserved ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InitFromData( IDataObject * pDataObject, BOOL fCreation, DWORD dwReserved )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -950,7 +849,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InitFromData( IDataObject * pDataObject, //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetClipboardData( DWORD dwReserved, IDataObject ** ppDataObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetClipboardData( DWORD dwReserved, IDataObject ** ppDataObject )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -973,29 +871,22 @@ STDMETHODIMP InprocEmbedDocument_Impl::DoVerb( HWND hWin, LPCRECT pRect ) { - WRITEDEBUGINFO( "DoVerb" ); if ( CheckDefHandler() ) { - 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" ); if ( SUCCEEDED( hr ) && pOleObject ) { - WRITEDEBUGINFO( "DoVerb" ); hr = pOleObject->DoVerb( iVerb, pMsg, pActiveSite, nLong, hWin, pRect ); if ( SUCCEEDED( hr ) ) { - WRITEDEBUGINFO( "DoVerb" ); } return hr; } - WRITEDEBUGINFO( "DoVerb" ); } return E_FAIL; @@ -1004,7 +895,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::DoVerb( //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::EnumVerbs( IEnumOLEVERB ** ppEnumOleVerb ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::EnumVerbs( IEnumOLEVERB ** ppEnumOleVerb )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1021,7 +911,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumVerbs( IEnumOLEVERB ** ppEnumOleVerb //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Update() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Update()" ); if ( m_pDefHandler && CheckDefHandler() ) { @@ -1039,7 +928,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Update() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::IsUpToDate() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::IsUpToDate()" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1056,7 +944,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::IsUpToDate() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetUserClassID( CLSID *pClsid ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetUserClassID( CLSID *pClsid )" ); if ( pClsid ) *pClsid = m_guid; @@ -1066,7 +953,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetUserClassID( CLSID *pClsid ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetUserType( DWORD dwFormOfType, LPOLESTR * pszUserType ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetUserType( DWORD dwFormOfType, LPOLESTR * pszUserType )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1083,7 +969,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetUserType( DWORD dwFormOfType, LPOLESTR //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetExtent( DWORD dwDrawAspect, SIZEL *psizel ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetExtent( DWORD dwDrawAspect, SIZEL *psizel )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1100,7 +985,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetExtent( DWORD dwDrawAspect, SIZEL *psi //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, SIZEL * psizel ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, SIZEL * psizel )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1117,7 +1001,6 @@ 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; @@ -1187,24 +1070,11 @@ STDMETHODIMP InprocEmbedDocument_Impl::Unadvise( DWORD dwConnection ) STDMETHODIMP InprocEmbedDocument_Impl::EnumAdvise( IEnumSTATDATA ** /*ppenumAdvise*/ ) { return E_NOTIMPL; - -// if ( CheckDefHandler() ) -// { -// 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->EnumAdvise( ppenumAdvise ); -// } -// -// return E_FAIL; } //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetMiscStatus( DWORD dwAspect, DWORD * pdwStatus ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetMiscStatus( DWORD dwAspect, DWORD * pdwStatus )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1221,7 +1091,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetMiscStatus( DWORD dwAspect, DWORD * pd //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetColorScheme( LOGPALETTE * pLogpal ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetColorScheme( LOGPALETTE * pLogpal )" ); if ( CheckDefHandler() ) { ComSmart< IOleObject > pOleObject; @@ -1239,7 +1108,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetColorScheme( LOGPALETTE * pLogpal ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetData( FORMATETC * pFormatetc, STGMEDIUM * pMedium ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetData( FORMATETC * pFormatetc, STGMEDIUM * pMedium )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1256,7 +1124,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetData( FORMATETC * pFormatetc, STGMEDIU //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetDataHere( FORMATETC * pFormatetc, STGMEDIUM * pMedium ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetDataHere( FORMATETC * pFormatetc, STGMEDIUM * pMedium )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1273,7 +1140,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetDataHere( FORMATETC * pFormatetc, STGM //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1290,7 +1156,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::QueryGetData( FORMATETC * pFormatetc ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pFormatetcIn, FORMATETC * pFormatetcOut ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pFormatetcIn, FORMATETC * pFormatetcOut )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1307,7 +1172,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetCanonicalFormatEtc( FORMATETC * pForma //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetData( FORMATETC * pFormatetc, STGMEDIUM * pMedium, BOOL fRelease ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetData( FORMATETC * pFormatetc, STGMEDIUM * pMedium, BOOL fRelease )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1324,7 +1188,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetData( FORMATETC * pFormatetc, STGMEDIU //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC ** ppFormatetc ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC ** ppFormatetc )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1341,7 +1204,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumFormatEtc( DWORD dwDirection, IEnumFO //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD advf, IAdviseSink * pAdvSink, DWORD * pdwConnection ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD advf, IAdviseSink * pAdvSink, DWORD * pdwConnection )" ); if ( !pdwConnection ) return E_FAIL; @@ -1383,7 +1245,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::DAdvise( FORMATETC * pFormatetc, DWORD ad //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::DUnadvise( DWORD dwConnection ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::DUnadvise( DWORD dwConnection )" ); if ( m_pDefHandler && DEFAULT_ARRAY_LEN > dwConnection && dwConnection > 0 && m_pDataAdvises[dwConnection] ) { if ( CheckDefHandler() ) @@ -1411,7 +1272,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::DUnadvise( DWORD dwConnection ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::EnumDAdvise( IEnumSTATDATA ** ppenumAdvise ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::EnumDAdvise( IEnumSTATDATA ** ppenumAdvise )" ); if ( CheckDefHandler() ) { ComSmart< IDataObject > pIDataObject; @@ -1429,7 +1289,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::EnumDAdvise( IEnumSTATDATA ** ppenumAdvis //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetRunningClass( LPCLSID lpClsid ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetRunningClass( LPCLSID lpClsid )" ); if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; @@ -1446,7 +1305,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetRunningClass( LPCLSID lpClsid ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Run( LPBINDCTX pbc ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Run( LPBINDCTX pbc )" ); if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; @@ -1463,7 +1321,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Run( LPBINDCTX pbc ) //------------------------------------------------------------------------------- BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::IsRunning()" ); if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; @@ -1481,7 +1338,6 @@ BOOL STDMETHODCALLTYPE InprocEmbedDocument_Impl::IsRunning() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlockCloses ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlockCloses )" ); if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; @@ -1498,7 +1354,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::LockRunning( BOOL fLock, BOOL fLastUnlock //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetContainedObject( BOOL fContained) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetContainedObject( BOOL fContained)" ); if ( CheckDefHandler() ) { ComSmart< IRunnableObject > pIRunObj; @@ -1517,7 +1372,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetContainedObject( BOOL fContained) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Draw( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL ( STDMETHODCALLTYPE *pfnContinue )( ULONG_PTR dwContinue ), ULONG_PTR dwContinue ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Draw( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, BOOL ( STDMETHODCALLTYPE *pfnContinue )( ULONG_PTR dwContinue ), ULONG_PTR dwContinue )" ); if ( CheckDefHandler() ) { ComSmart< IViewObject > pIViewObject; @@ -1534,7 +1388,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Draw( DWORD dwDrawAspect, LONG lindex, vo //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetColorSet( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetColorSet( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet )" ); if ( CheckDefHandler() ) { ComSmart< IViewObject > pIViewObject; @@ -1551,7 +1404,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetColorSet( DWORD dwDrawAspect, LONG lin //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Freeze( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Freeze( DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze )" ); if ( CheckDefHandler() ) { ComSmart< IViewObject > pIViewObject; @@ -1568,7 +1420,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Freeze( DWORD dwDrawAspect, LONG lindex, //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Unfreeze( DWORD dwFreeze ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Unfreeze( DWORD dwFreeze )" ); if ( CheckDefHandler() ) { ComSmart< IViewObject > pIViewObject; @@ -1585,7 +1436,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::Unfreeze( DWORD dwFreeze ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetAdvise( DWORD aspects, DWORD advf, IAdviseSink *pAdvSink ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetAdvise( DWORD aspects, DWORD advf, IAdviseSink *pAdvSink )" ); // CheckDefHandler will set the listener, avoid reusing of old listener if ( m_pViewAdvise ) @@ -1643,7 +1493,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetAdvise( DWORD *pAspects, DWORD *pAdvf, //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, LONG lindex, DVTARGETDEVICE *ptd, LPSIZEL lpsizel )" ); if ( CheckDefHandler() ) { ComSmart< IViewObject2 > pIViewObject2; @@ -1663,7 +1512,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetExtent( DWORD dwDrawAspect, LONG linde //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetWindow( HWND *phwnd ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetWindow( HWND *phwnd )" ); if ( CheckDefHandler() ) { ComSmart< IOleWindow > pIOleWindow; @@ -1680,7 +1528,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetWindow( HWND *phwnd ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::ContextSensitiveHelp( BOOL fEnterMode ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::ContextSensitiveHelp( BOOL fEnterMode )" ); if ( CheckDefHandler() ) { ComSmart< IOleWindow > pIOleWindow; @@ -1699,7 +1546,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::ContextSensitiveHelp( BOOL fEnterMode ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InPlaceDeactivate( void ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InPlaceDeactivate( void )" ); if ( CheckDefHandler() ) { ComSmart< IOleInPlaceObject > pIOleInPlaceObject; @@ -1716,7 +1562,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InPlaceDeactivate( void ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::UIDeactivate( void ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::UIDeactivate( void )" ); if ( CheckDefHandler() ) { ComSmart< IOleInPlaceObject > pIOleInPlaceObject; @@ -1733,7 +1578,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::UIDeactivate( void ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::SetObjectRects( LPCRECT lprcPosRect, LPCRECT lprcClipRect ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::SetObjectRects( LPCRECT lprcPosRect, LPCRECT lprcClipRect )" ); if ( CheckDefHandler() ) { ComSmart< IOleInPlaceObject > pIOleInPlaceObject; @@ -1750,7 +1594,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::SetObjectRects( LPCRECT lprcPosRect, LPCR //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::ReactivateAndUndo( void ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::ReactivateAndUndo( void )" ); if ( CheckDefHandler() ) { ComSmart< IOleInPlaceObject > pIOleInPlaceObject; @@ -1769,7 +1612,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::ReactivateAndUndo( void ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetTypeInfoCount( UINT *pctinfo ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetTypeInfoCount( UINT *pctinfo )" ); if ( CheckDefHandler() ) { ComSmart< IDispatch > pIDispatch; @@ -1786,7 +1628,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetTypeInfoCount( UINT *pctinfo ) //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetTypeInfo( UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo )" ); if ( CheckDefHandler() ) { ComSmart< IDispatch > pIDispatch; @@ -1803,7 +1644,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetTypeInfo( UINT iTInfo, LCID lcid, ITyp //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::GetIDsOfNames( REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::GetIDsOfNames( REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId )" ); if ( CheckDefHandler() ) { ComSmart< IDispatch > pIDispatch; @@ -1820,7 +1660,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::GetIDsOfNames( REFIID riid, LPOLESTR *rgs //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::Invoke( DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr )" ); if ( CheckDefHandler() ) { ComSmart< IDispatch > pIDispatch; @@ -1862,7 +1701,6 @@ STDMETHODIMP_(ULONG) InprocEmbedDocument_Impl::InternalCacheWrapper::Release() //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::Cache( FORMATETC *pformatetc, DWORD advf, DWORD *pdwConnection ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::Cache( FORMATETC *pformatetc, DWORD advf, DWORD *pdwConnection )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache > pIOleCache; @@ -1879,7 +1717,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::Cache( FORMATETC *p //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::Uncache( DWORD dwConnection ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::Uncache( DWORD dwConnection )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache > pIOleCache; @@ -1896,7 +1733,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::Uncache( DWORD dwCo //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::EnumCache( IEnumSTATDATA **ppenumSTATDATA ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::EnumCache( IEnumSTATDATA **ppenumSTATDATA )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache > pIOleCache; @@ -1913,7 +1749,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::EnumCache( IEnumSTA //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::InitCache( IDataObject *pDataObject ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::InitCache( IDataObject *pDataObject )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache > pIOleCache; @@ -1930,7 +1765,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::InitCache( IDataObj //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::SetData( FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::SetData( FORMATETC *pformatetc, STGMEDIUM *pmedium, BOOL fRelease )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache > pIOleCache; @@ -1948,7 +1782,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::SetData( FORMATETC //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::UpdateCache( LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::UpdateCache( LPDATAOBJECT pDataObject, DWORD grfUpdf, LPVOID pReserved )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache2 > pIOleCache2; @@ -1965,7 +1798,6 @@ STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::UpdateCache( LPDATA //------------------------------------------------------------------------------- STDMETHODIMP InprocEmbedDocument_Impl::InternalCacheWrapper::DiscardCache( DWORD dwDiscardOptions ) { - WRITEDEBUGINFO( "InprocEmbedDocument_Impl::InternalCacheWrapper::DiscardCache( DWORD dwDiscardOptions )" ); if ( m_rOwnDocument.CheckDefHandler() ) { ComSmart< IOleCache2 > pIOleCache2; diff --git a/embedserv/source/inprocserv/smartpointer.hxx b/embedserv/source/inprocserv/smartpointer.hxx index 776ec5305ed8..02290a4a08c0 100644 --- a/embedserv/source/inprocserv/smartpointer.hxx +++ b/embedserv/source/inprocserv/smartpointer.hxx @@ -29,20 +29,6 @@ #ifndef _INPROCSERV_SMARTPOINTER_HXX_ #define _INPROCSERV_SMARTPOINTER_HXX_ -// #define OWNDEBUG - -#ifdef OWNDEBUG -#define WRITEDEBUGINFOINTERN( x ) WriteDebugInfo( (DWORD)this, x, sizeof( x ) ) -#define WRITEDEBUGINFO( x ) WRITEDEBUGINFOINTERN( x ":" MY_STRING_LINE "\n" ) -#define TO_STRING( x ) #x -#define MACRO_VALUE_TO_STRING( x ) TO_STRING( x ) -#define MY_STRING_LINE MACRO_VALUE_TO_STRING( __LINE__ ) -#else -#define WRITEDEBUGINFO( x ) void() -#define MY_STRING_LINE -#endif - - namespace inprocserv{ void WriteDebugInfo( DWORD pThis, char* pString, DWORD nToWrite ); |