diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-06 17:14:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:46 +0200 |
commit | 851067c2684c68758afeaa7da23bb6dd69c51358 (patch) | |
tree | 2d20baf149274f6e5f2345ab757aafc9799dbb8f /vcl/ios | |
parent | 2969846c29402baec792e43cfd4524366fb05613 (diff) |
fdo#46808, use constructor for datatransfer::MimeContentTypeFactory
Change-Id: I576a472e22ad0e3798f4b34d808ac320f13d3e6d
Diffstat (limited to 'vcl/ios')
-rw-r--r-- | vcl/ios/source/dtrans/ios_clipboard.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/vcl/ios/source/dtrans/ios_clipboard.cxx b/vcl/ios/source/dtrans/ios_clipboard.cxx index 03c8c9c7e629..03e493713bef 100644 --- a/vcl/ios/source/dtrans/ios_clipboard.cxx +++ b/vcl/ios/source/dtrans/ios_clipboard.cxx @@ -20,7 +20,7 @@ #include "ios_clipboard.hxx" #include "iOSTransferable.hxx" - +#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp> #include "comphelper/makesequence.hxx" #include "comphelper/processfactory.hxx" @@ -84,17 +84,10 @@ IosClipboard::IosClipboard(UIPasteboard* pasteboard, bool bUseSystemPasteboard) WeakComponentImplHelper3<XSystemClipboard, XFlushableClipboard, XServiceInfo>(m_aMutex), mIsSystemPasteboard(bUseSystemPasteboard) { - Reference<XMultiServiceFactory> mrServiceMgr = comphelper::getProcessServiceFactory(); + Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); - mrXMimeCntFactory = Reference<XMimeContentTypeFactory>(mrServiceMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.datatransfer.MimeContentTypeFactory"))), UNO_QUERY); + mrXMimeCntFactory = MimeContentTypeFactory::create(xContext); - if (!mrXMimeCntFactory.is()) - { - throw RuntimeException(OUString( - RTL_CONSTASCII_USTRINGPARAM("IosClipboard: Cannot create com.sun.star.datatransfer.MimeContentTypeFactory")), - static_cast<XClipboardEx*>(this)); - } #if 0 // ??? mpDataFlavorMapper = DataFlavorMapperPtr_t(new DataFlavorMapper()); #endif |