Kaydet (Commit) 135d20ca authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert SystemClipboardExt service to new style

Service already existed, just needed an IDL file

Change-Id: Icde7c41e48b8c511976c2a65a87dca064546fa95
üst e4f37435
......@@ -94,6 +94,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransf
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/datatransfer/clipboard,\
SystemClipboard \
SystemClipboardExt \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/deployment,\
ExtensionManager \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef __com_sun_star_datatransfer_clipboard_SystemClipboardExt_idl__
#define __com_sun_star_datatransfer_clipboard_SystemClipboardExt_idl__
#include <com/sun/star/datatransfer/clipboard/XClipboard.idl>
module com { module sun { module star { module datatransfer { module clipboard {
/**
@since LibreOffice 4.1
*/
published service SystemClipboardExt : XClipboard;
}; }; }; }; };
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -84,6 +84,7 @@
#include "com/sun/star/datatransfer/dnd/XDropTarget.hpp"
#include "com/sun/star/datatransfer/clipboard/XClipboard.hpp"
#include "com/sun/star/datatransfer/clipboard/SystemClipboard.hpp"
#include "com/sun/star/datatransfer/clipboard/SystemClipboardExt.hpp"
#include "com/sun/star/awt/XTopWindow.hpp"
#include "com/sun/star/awt/XDisplayConnection.hpp"
#include "com/sun/star/lang/XInitialization.hpp"
......@@ -8403,10 +8404,9 @@ uno::Reference< XClipboard > Window::GetClipboard()
{
try
{
uno::Reference< XMultiServiceFactory > xFactory( comphelper::getProcessServiceFactory() );
uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
mpWindowImpl->mpFrameData->mxClipboard = uno::Reference< XClipboard >( xFactory->createInstance( OUString("com.sun.star.datatransfer.clipboard.SystemClipboardExt") ), UNO_QUERY );
mpWindowImpl->mpFrameData->mxClipboard = SystemClipboardExt::create( xContext );;
if( !mpWindowImpl->mpFrameData->mxClipboard.is() )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment