diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2003-11-14 14:33:20 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2003-11-14 14:33:20 +0000 |
commit | f7b502b6764314edfd26e1b84b7f6e62beda0fbc (patch) | |
tree | 06ae26bcc04e3c2c6978089d30490b0be57c7551 /embeddedobj | |
parent | 4569e1b95c0ec4058d00a04f6df8d496aac91f38 (diff) |
#112923# notify client in case of activation/deactivation
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index aebcc37fdb71..107693b94992 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -2,9 +2,9 @@ * * $RCSfile: embedobj.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: mav $ $Date: 2003-11-14 15:24:24 $ + * last change: $Author: mav $ $Date: 2003-11-14 15:33:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -162,9 +162,14 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } else if ( nNextState == embed::EmbedStates::EMBED_ACTIVE ) { + if ( !m_xClientSite.is() ) + throw embed::WrongStateException(); //TODO: client site is not set! + // create frame and load document in the frame m_pDocHolder->Show(); + m_xClientSite->onShowWindow( sal_True ); + m_nObjectState = nNextState; } else @@ -203,6 +208,8 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) } m_pDocHolder->CloseFrame(); + + m_xClientSite->onShowWindow( sal_False ); // when Hide() method is fixed the frame will not be closed but hided // m_pDocHolder->Hide(); |