summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding/embedobj.cxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-03-23 13:19:45 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-03-23 13:19:45 +0000
commit773473648a505114b03dee119e984640accb1cca (patch)
treeef630147719ec0eadb70638d41bc17ea67e6b299 /embeddedobj/source/commonembedding/embedobj.cxx
parent41cb2741576c3be29c579ca4daa0c6080229e7ce (diff)
INTEGRATION: CWS fwkfinal1 (1.11.2); FILE MERGED
2005/03/04 13:12:41 mav 1.11.2.1: #i38064# provide the module name
Diffstat (limited to 'embeddedobj/source/commonembedding/embedobj.cxx')
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx27
1 files changed, 24 insertions, 3 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index e23a494c3b..2a59ee5b8d 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: embedobj.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: kz $ $Date: 2005-03-01 19:52:37 $
+ * last change: $Author: vg $ $Date: 2005-03-23 14:19:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,6 +106,10 @@
#include <com/sun/star/frame/XDispatchProviderInterception.hpp>
#endif
+#ifndef _COM_SUN_STAR_FRAME_XMODULEMANAGER_HPP_
+#include <com/sun/star/frame/XModuleManager.hpp>
+#endif
+
#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
#include <com/sun/star/lang/DisposedException.hpp>
#endif
@@ -361,8 +365,25 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
// dispatch provider may not be provided
uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider();
+ // get the container module name
+ ::rtl::OUString aModuleName;
+ try
+ {
+ uno::Reference< embed::XComponentSupplier > xCompSupl( m_xClientSite, uno::UNO_QUERY_THROW );
+ uno::Reference< uno::XInterface > xContDoc( xCompSupl->getComponent(), uno::UNO_QUERY_THROW );
+
+ uno::Reference< frame::XModuleManager > xManager(
+ m_xFactory->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ModuleManager" ) ) ),
+ uno::UNO_QUERY_THROW );
+
+ aModuleName = xManager->identify( xContDoc );
+ }
+ catch( uno::Exception& )
+ {}
+
// TODO/LATER: wrong order of calls; but with the correct order the statusbar is set to the wrong place
- sal_Bool bOk = m_pDocHolder->ShowUI( xContainerLM, xContainerDP );
+ sal_Bool bOk = m_pDocHolder->ShowUI( xContainerLM, xContainerDP, aModuleName );
xInplaceClient->activatingUI();
if ( bOk )