diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2006-05-05 08:55:59 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2006-05-05 08:55:59 +0000 |
commit | 0b0ae5770391dda06aae6fead5a5a84272d92a8d (patch) | |
tree | 872a33b5e374f0e45c02be06ac8f612cb10b4b2e /embedserv/source/embed/iipaobj.cxx | |
parent | db51b5f53d458a48c1a82f19571698123923c939 (diff) |
INTEGRATION: CWS fwkc03fixes (1.2.54); FILE MERGED
2006/04/28 13:11:40 mav 1.2.54.1: #134455# fix objects crosslinking
Diffstat (limited to 'embedserv/source/embed/iipaobj.cxx')
-rw-r--r-- | embedserv/source/embed/iipaobj.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/embedserv/source/embed/iipaobj.cxx b/embedserv/source/embed/iipaobj.cxx index 3f717f34d..52ddae560 100644 --- a/embedserv/source/embed/iipaobj.cxx +++ b/embedserv/source/embed/iipaobj.cxx @@ -3,10 +3,9 @@ -CIIAObj::CIIAObj(EmbedDocument_Impl *pEmbDoc,DocumentHolder* pDocHolder) - : m_cRef(0), - m_pEmbDoc(pEmbDoc), - m_pDocHolder(pDocHolder) +CIIAObj::CIIAObj(DocumentHolder* pDocHolder) + : m_refCount( 0L ), + m_rDocHolder( pDocHolder ) { } @@ -40,17 +39,17 @@ STDMETHODIMP CIIAObj::QueryInterface(REFIID riid, LPVOID FAR *ppv) STDMETHODIMP_(ULONG) CIIAObj::AddRef(void) { - ++m_cRef; - return m_pEmbDoc->AddRef(); + return osl_incrementInterlockedCount( &m_refCount); } STDMETHODIMP_(ULONG) CIIAObj::Release(void) { - --m_cRef; - return m_pEmbDoc->Release(); -} - + sal_Int32 nCount = osl_decrementInterlockedCount( &m_refCount); + if ( nCount == 0 ) + delete this; + return nCount; +} /* IOleInPlaceActiveObject methods*/ @@ -84,7 +83,10 @@ STDMETHODIMP CIIAObj::ResizeBorder( { if(!bFrame) return NOERROR; - return m_pDocHolder->SetContRects(pRect); + if ( !m_rDocHolder.is() ) + return E_FAIL; + + return m_rDocHolder->SetContRects(pRect); } |