/* -*- 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 namespace com::sun::star::embed { class XActionsApproval; } class OLockListener; // the service is implemented as a wrapper to be able to die by refcount // the disposing mechanics is required for java related scenarios class OInstanceLocker : public ::cppu::WeakImplHelper< css::lang::XComponent, css::lang::XInitialization, css::lang::XServiceInfo > { std::mutex m_aMutex; rtl::Reference< OLockListener > m_xLockListener; comphelper::OInterfaceContainerHelper4 m_aListenersContainer; // list of listeners bool m_bDisposed; bool m_bInitialized; public: explicit OInstanceLocker(); virtual ~OInstanceLocker() override; // XComponent virtual void SAL_CALL dispose() override; virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override; virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override; // XInitialization virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) override; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override; virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; class OLockListener : public ::cppu::WeakImplHelper< css::util::XCloseListener, css::frame::XTerminateListener > { std::mutex m_aMutex; css::uno::Reference< css::uno::XInterface > m_xInstance; css::uno::Reference< css::embed::XActionsApproval > m_xApproval; css::uno::WeakReference< css::lang::XComponent > m_xWrapper; bool m_bDisposed; bool m_bInitialized; sal_Int32 m_nMode; public: OLockListener( css::uno::WeakReference< css::lang::XComponent > xWrapper, css::uno::Reference< css::uno::XInterface > xInstance, sal_Int32 nMode, css::uno::Reference< css::embed::XActionsApproval > xApproval ); virtual ~OLockListener() override; void Init(); void Dispose(); // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override; // XCloseListener virtual void SAL_CALL queryClosing( const css::lang::EventObject& Source, sal_Bool GetsOwnership ) override; virtual void SAL_CALL notifyClosing( const css::lang::EventObject& Source ) override; // XTerminateListener virtual void SAL_CALL queryTermination( const css::lang::EventObject& Event ) override; virtual void SAL_CALL notifyTermination( const css::lang::EventObject& Event ) override; }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ option> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2021-04-19notebookbar: minify for onlineSzymon Kłos
2020-09-18Resolves tdf#97918 - Individual UNO commands for distribution optionsHeiko Tietze
2019-12-04tdf#124258 Draw NB groupedbar_full not available for drawandreas kainz
2019-06-25NB impress add tabbed compact layoutandreas kainz
2019-06-11tdf#120844 Remove tabletext.xml from sdraw and from simpressRoman Kuznetsov
2019-05-28NB: add tabbed_compact and contextual NB to Drawandreas kainz
2019-03-13tdf#112411 Merge "Form controls" and "More controls" into one toolbarRoman Kuznetsov
2019-02-23Add style options to redaction exportMuhammet Kara
2019-01-25Add Redaction ToolbarMuhammet Kara
2018-10-22sd: Use the regular textbox popupmenu for outline text objectsMaxim Monastirsky
2018-08-02Notebookbar: Added shortcuts toolbox in drawKshitij Pathania
2018-05-21Activated notebookbar in drawKshitij Pathania
2018-05-11draw has a sidebar, so impress/draw can use same table properties paneCaolán McNamara
2017-08-04draw vs impress printer option pagesCaolán McNamara
2016-11-10tdf#103826 Missing master page pane context menus in DrawMaxim Monastirsky
2016-02-28tdf#93837 sd: Initial import of context menu xml filesMaxim Monastirsky
2016-02-21tdf#93837 Convert RID_FM_TEXTATTRIBUTE_MENU to xmlMaxim Monastirsky
2013-12-27convert unlink image querybox to .uiManal Alhassoun
2013-11-15convert 500th dialog (vectorize) to .uiCaolán McNamara
2013-11-15convert bullets and numbering dialog to .uiCaolán McNamara
2013-11-15convert draw table design dialog to .uiCaolán McNamara
2013-11-14convert cross-fade dialog to .uiCaolán McNamara
2013-11-14convert insert slides dialog to .uiCaolán McNamara
2013-11-13convert name html design to .uiCaolán McNamara
2013-11-13convert break dialog to .uiCaolán McNamara
2013-09-30Convert Draw object & background dialog to new UIOlivier Hallot
2013-09-30Convert Draw char dialog to widget UIOlivier Hallot
2013-09-30Convert Draw page dialog to Widget UIOlivier Hallot
2013-07-12Convert Draw paragraph dialog to widget .uiOlivier Hallot
2013-04-29adapt code to duplicate object dialogCaolán McNamara
2013-04-29adapt code to use snap object dialog .ui conversionCaolán McNamara
2013-04-24adapt code to insert layer .ui conversionCaolán McNamara
2013-04-11deliver all uiconfig files by UIConfigDavid Tardon
2013-04-11rename UI to UIConfigDavid Tardon