diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-06-17 10:34:39 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-06-17 10:34:39 +0000 |
commit | 3779ecf04988c781a6792bbf51cfcef2e49b0fed (patch) | |
tree | 7eb8fa901107698238a5008645b26b4437fb624f /shell/source/cmdmail | |
parent | 686cdea5ac408ba78cf3c52dfcc43e2baef149e1 (diff) |
INTEGRATION: CWS sb17 (1.5.166); FILE MERGED
2004/06/02 10:56:00 sb 1.5.166.1: #109735# Adapted to ExternalUriReferenceTranslator service.
Diffstat (limited to 'shell/source/cmdmail')
-rwxr-xr-x | shell/source/cmdmail/cmdmailsuppl.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 20545872ffea..a900627686f6 100755 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cmdmailsuppl.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obr $ $Date: 2001-10-12 12:05:56 $ + * last change: $Author: rt $ $Date: 2004-06-17 11:34:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,14 @@ #include <com/sun/star/beans/PropertyValue.hpp> #endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif + +#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ +#include <com/sun/star/uno/XComponentContext.hpp> +#endif + //------------------------------------------------------------------------ // namespace directives //------------------------------------------------------------------------ @@ -163,7 +171,15 @@ Reference< XSimpleMailClient > SAL_CALL CmdMailSuppl::querySimpleMailClient( ) Reference< XSimpleMailMessage > SAL_CALL CmdMailSuppl::createSimpleMailMessage( ) throw (::com::sun::star::uno::RuntimeException) { - return Reference< XSimpleMailMessage >( new CmdMailMsg() ); + //TODO Instead of obtaining the component context from the service manager + // here, it would be better if the CmdMailSuppl service were instantiated + // with a component context, from which it would obtain a service manager: + Reference< XComponentContext > xContext( + Reference< com::sun::star::beans::XPropertySet >( + m_xServiceManager, UNO_QUERY_THROW )->getPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), + UNO_QUERY_THROW ); + return Reference< XSimpleMailMessage >( new CmdMailMsg( xContext ) ); } //------------------------------------------------ |