/* -*- 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 . */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "MtaOleClipb.hxx" #include "XNotifyingDataObject.hxx" // implements the XClipboard[Ex] ... interfaces // for the clipboard viewer mechanism we need a static callback function // and a static member to reassociate from this static function to the // class instance // watch out: we are using only one static member variable and not a list // because we assume to be instantiated only once // this will be assured by a OneInstanceFactory of the service and not // by this class! class CWinClipboard final : public comphelper::WeakComponentImplHelper { friend CXNotifyingDataObject::~CXNotifyingDataObject(); css::uno::Reference m_xContext; const OUString m_itsName; CMtaOleClipboard m_MtaOleClipboard; CXNotifyingDataObject* m_pNewOwnClipContent = nullptr; // until onClipboardContentChanged CXNotifyingDataObject* m_pCurrentOwnClipContent = nullptr; css::uno::Reference m_foreignContent; comphelper::OInterfaceContainerHelper4 maClipboardListeners; CXNotifyingDataObject* getOwnClipContent() const; void handleClipboardContentChanged(); void onReleaseDataObject(CXNotifyingDataObject& theCaller); void registerClipboardViewer(); void unregisterClipboardViewer(); static void WINAPI onClipboardContentChanged(); css::uno::Reference getContents_noLock(); public: CWinClipboard(const css::uno::Reference& rxContext, const OUString& aClipboardName); virtual ~CWinClipboard() override; // XClipboard virtual css::uno::Reference SAL_CALL getContents() override; virtual void SAL_CALL setContents( const css::uno::Reference& xTransferable, const css::uno::Reference& xClipboardOwner) override; virtual OUString SAL_CALL getName() override; // XFlushableClipboard virtual void SAL_CALL flushClipboard() override; // XClipboardEx virtual sal_Int8 SAL_CALL getRenderingCapabilities() override; // XClipboardNotifier virtual void SAL_CALL addClipboardListener( const css::uno::Reference& listener) override; virtual void SAL_CALL removeClipboardListener( const css::uno::Reference& listener) override; // XServiceInfo virtual OUString SAL_CALL getImplementationName() override; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override; virtual css::uno::Sequence SAL_CALL getSupportedServiceNames() override; IDataObjectPtr getIDataObject(); virtual void disposing(std::unique_lock&) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 'distro/collabora/lof-4.3'>distro/collabora/lof-4.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
2020-10-26Remove unmaintained Executable_libtestStephan Bergmann
2020-10-22long->tools::Long in slideshow..starmathNoel
2020-10-17Removed duplicated includeAndrea Gelmini
2020-10-16fix some *printf which are using "%l" ie. long specifiersNoel
2020-05-06Move all public Java classes to libreoffice.jarSamuel Mehrbrodt
2020-03-12Revert "loplugin:constfields in smoketest..sot"Noel Grandin
2020-02-04tdf#117331 Merge jurt and unoil into ridlSamuel Mehrbrodt
2019-08-12Fix typosAndrea Gelmini
2019-04-25Cut down on -pthread/-lpthread proliferationStephan Bergmann
2018-11-25tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski
2018-10-09loplugin:constfields in smoketest..sotNoel Grandin
2018-09-24loplugin:external (clang-cl)Stephan Bergmann
2018-09-17New loplugin:externalStephan Bergmann
2018-04-14Fix typosAndrea Gelmini
2017-10-23loplugin:includeform: smoketestStephan Bergmann
2017-08-31loplugin:constparams: smoketest (clang-cl)Stephan Bergmann
2017-07-28loplugin:constparams handle constructorsNoel Grandin
2017-07-06Translate German comments/debug strings (leftovers in dirs sdext to soltools)Johnny_M
2017-06-12cleanup unused css/frame/* includesJochen Nitschke
2017-05-07revert OSL_ASSERT changesChris Sherlock
2017-05-07tdf#43157: convert smoketest codebase away from OSL_ASSERT to assertChris Sherlock
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
2017-03-11Fix typosAndrea Gelmini
2017-03-02Fix typosAndrea Gelmini
2017-01-26Remove dynamic exception specificationsStephan Bergmann
2016-12-20Fix smoketest under right-to-left localesKhaled Hosny
2016-06-09tdf#94698 cleanup Makefiles. Get rid of udkapi and offapiGleb Mishchenko
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann
2016-04-18coverity#1358588 Uninitialized scalar fieldCaolán McNamara
2016-04-13tdf#94306 replace boost::noncopyable in sfx2 to sotJochen Nitschke
2016-03-22tdf#84323: Make osl::Condition::wait more readableGurkaran
2016-02-15WaE: loplugin:cstylecastTor Lillqvist
2016-02-15smoketest: loplugin:nullptrMichael Stahl
2016-02-15Introduce lok_preinit() to preload all registered UNO implementationsHenry Castro
2016-02-09Remove excess newlinesChris Sherlock
2015-12-10More smoketest notes.Michael Meeks
2015-11-30Use -ldl -pthread only on LinuxTor Lillqvist
2015-11-26smoketest: improve docs.Michael Meeks
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-11-06loplugin:stringconstant: elide explicit ctor usage (manually due to macros)Stephan Bergmann
2015-11-04yyyyyNoel Grandin
2015-10-29com::sun::star->css in smoketest,sotNoel Grandin
2015-10-15coverity#1326133 Logically dead codeCaolán McNamara
2015-10-14cid#1326675 DLS: Dead local storeNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-09-15Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
2015-08-07cppcheck:noExplicitConstructorNoel Grandin