tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / controller / main / UndoCommandDispatch.hxx
blobf872387c761b6ffd972e449ff3952f03691c6e72
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #pragma once
21 #include "CommandDispatch.hxx"
22 #include <rtl/ref.hxx>
24 namespace com::sun::star::document { class XUndoManager; }
25 namespace com::sun::star::frame { class XModel; }
27 namespace chart
29 class ChartModel;
31 /** This is a CommandDispatch implementation for Undo and Redo.
33 class UndoCommandDispatch : public CommandDispatch
35 public:
36 explicit UndoCommandDispatch(
37 const css::uno::Reference< css::uno::XComponentContext > & xContext,
38 rtl::Reference<::chart::ChartModel> xModel );
39 virtual ~UndoCommandDispatch() override;
41 // late initialisation, especially for adding as listener
42 virtual void initialize() override;
44 protected:
45 // ____ XDispatch ____
46 virtual void SAL_CALL dispatch(
47 const css::util::URL& URL,
48 const css::uno::Sequence< css::beans::PropertyValue >& Arguments ) override;
50 // ____ WeakComponentImplHelperBase ____
51 /// is called when this is disposed
52 virtual void disposing(std::unique_lock<std::mutex>& rGuard) override;
54 // ____ XEventListener (base of XModifyListener) ____
55 virtual void SAL_CALL disposing(
56 const css::lang::EventObject& Source ) override;
58 virtual void fireStatusEvent(
59 const OUString & rURL,
60 const css::uno::Reference< css::frame::XStatusListener > & xSingleListener ) override;
62 private:
63 rtl::Reference<::chart::ChartModel> m_xModel;
64 css::uno::Reference< css::document::XUndoManager > m_xUndoManager;
67 } // namespace chart
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */