summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-02-06 17:14:00 +0200
committerNoel Grandin <noel@peralex.com>2013-02-12 10:14:46 +0200
commit851067c2684c68758afeaa7da23bb6dd69c51358 (patch)
tree2d20baf149274f6e5f2345ab757aafc9799dbb8f /basctl
parent2969846c29402baec792e43cfd4524366fb05613 (diff)
fdo#46808, use constructor for datatransfer::MimeContentTypeFactory
Change-Id: I576a472e22ad0e3798f4b34d808ac320f13d3e6d
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/dlged/dlgedclip.cxx21
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;
}