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 /basctl | |
parent | fdo#46808, convert some code to XComponentContext (diff) | |
download | core-851067c2684c68758afeaa7da23bb6dd69c51358.tar.gz core-851067c2684c68758afeaa7da23bb6dd69c51358.zip |
fdo#46808, use constructor for datatransfer::MimeContentTypeFactory
Change-Id: I576a472e22ad0e3798f4b34d808ac320f13d3e6d
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/dlged/dlgedclip.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx index 54cd68b9e00b..68fbf4fb3896 100644 --- a/basctl/source/dlged/dlgedclip.cxx +++ b/basctl/source/dlged/dlgedclip.cxx @@ -22,7 +22,7 @@ #include <vcl/svapp.hxx> #include <comphelper/processfactory.hxx> #include <com/sun/star/datatransfer/XMimeContentType.hpp> -#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> +#include <com/sun/star/datatransfer/MimeContentTypeFactory.hpp> namespace basctl { @@ -56,21 +56,18 @@ sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, c bool bRet = false; // compare mime content types - Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); + Reference< uno::XComponentContext > xContext = getProcessComponentContext(); Reference< datatransfer::XMimeContentTypeFactory > - xMCntTypeFactory( xMSF->createInstance( "com.sun.star.datatransfer.MimeContentTypeFactory" ), UNO_QUERY ); + xMCntTypeFactory = MimeContentTypeFactory::create(xContext);; - if ( xMCntTypeFactory.is( ) ) - { - // compare full media types - Reference< datatransfer::XMimeContentType > xLType = xMCntTypeFactory->createMimeContentType( lFlavor.MimeType ); - Reference< datatransfer::XMimeContentType > xRType = xMCntTypeFactory->createMimeContentType( rFlavor.MimeType ); + // compare full media types + Reference< datatransfer::XMimeContentType > xLType = xMCntTypeFactory->createMimeContentType( lFlavor.MimeType ); + Reference< datatransfer::XMimeContentType > xRType = xMCntTypeFactory->createMimeContentType( rFlavor.MimeType ); - OUString aLFullMediaType = xLType->getFullMediaType(); - OUString aRFullMediaType = xRType->getFullMediaType(); + OUString aLFullMediaType = xLType->getFullMediaType(); + OUString aRFullMediaType = xRType->getFullMediaType(); - bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType ); - } + bRet = aLFullMediaType.equalsIgnoreAsciiCase( aRFullMediaType ); return bRet; } |