1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_UNDOCOMMANDDISPATCH_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_UNDOCOMMANDDISPATCH_HXX
22 #include "CommandDispatch.hxx"
24 namespace com
{ namespace sun
{ namespace star
{ namespace document
{ class XUndoManager
; } } } }
25 namespace com
{ namespace sun
{ namespace star
{ namespace frame
{ class XModel
; } } } }
30 /** This is a CommandDispatch implementation for Undo and Redo.
32 class UndoCommandDispatch
: public CommandDispatch
35 explicit UndoCommandDispatch(
36 const css::uno::Reference
< css::uno::XComponentContext
> & xContext
,
37 const css::uno::Reference
< css::frame::XModel
> & xModel
);
38 virtual ~UndoCommandDispatch() override
;
40 // late initialisation, especially for adding as listener
41 virtual void initialize() override
;
44 // ____ XDispatch ____
45 virtual void SAL_CALL
dispatch(
46 const css::util::URL
& URL
,
47 const css::uno::Sequence
< css::beans::PropertyValue
>& Arguments
) override
;
49 // ____ WeakComponentImplHelperBase ____
50 /// is called when this is disposed
51 virtual void SAL_CALL
disposing() override
;
53 // ____ XEventListener (base of XModifyListener) ____
54 virtual void SAL_CALL
disposing(
55 const css::lang::EventObject
& Source
) override
;
57 virtual void fireStatusEvent(
58 const OUString
& rURL
,
59 const css::uno::Reference
< css::frame::XStatusListener
> & xSingleListener
) override
;
62 css::uno::Reference
< css::frame::XModel
> m_xModel
;
63 css::uno::Reference
< css::document::XUndoManager
> m_xUndoManager
;
68 // INCLUDED_CHART2_SOURCE_CONTROLLER_MAIN_UNDOCOMMANDDISPATCH_HXX
71 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */