nss: upgrade to release 3.73
[LibreOffice.git] / chart2 / source / model / main / UndoManager.hxx
blobf9343d67bc6c8da2c151d37298345a4cdf88b3ff
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 .
20 #pragma once
22 #include <com/sun/star/document/XUndoManager.hpp>
23 #include <com/sun/star/util/XModifyBroadcaster.hpp>
25 #include <cppuhelper/implbase2.hxx>
27 #include <memory>
29 namespace chart
32 namespace impl
34 class UndoManager_Impl;
35 typedef ::cppu::ImplHelper2 < css::document::XUndoManager
36 , css::util::XModifyBroadcaster
37 > UndoManager_Base;
40 class UndoManager : public impl::UndoManager_Base
42 public:
43 UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex );
44 virtual ~UndoManager();
46 // XInterface
47 virtual void SAL_CALL acquire( ) throw () override;
48 virtual void SAL_CALL release( ) throw () override;
50 // XComponent equivalents
51 void disposing();
53 // XUndoManager
54 virtual void SAL_CALL enterUndoContext( const OUString& i_title ) override;
55 virtual void SAL_CALL enterHiddenUndoContext( ) override;
56 virtual void SAL_CALL leaveUndoContext( ) override;
57 virtual void SAL_CALL addUndoAction( const css::uno::Reference< css::document::XUndoAction >& i_action ) override;
58 virtual void SAL_CALL undo( ) override;
59 virtual void SAL_CALL redo( ) override;
60 virtual sal_Bool SAL_CALL isUndoPossible( ) override;
61 virtual sal_Bool SAL_CALL isRedoPossible( ) override;
62 virtual OUString SAL_CALL getCurrentUndoActionTitle( ) override;
63 virtual OUString SAL_CALL getCurrentRedoActionTitle( ) override;
64 virtual css::uno::Sequence< OUString > SAL_CALL getAllUndoActionTitles( ) override;
65 virtual css::uno::Sequence< OUString > SAL_CALL getAllRedoActionTitles( ) override;
66 virtual void SAL_CALL clear( ) override;
67 virtual void SAL_CALL clearRedo( ) override;
68 virtual void SAL_CALL reset( ) override;
69 virtual void SAL_CALL addUndoManagerListener( const css::uno::Reference< css::document::XUndoManagerListener >& i_listener ) override;
70 virtual void SAL_CALL removeUndoManagerListener( const css::uno::Reference< css::document::XUndoManagerListener >& i_listener ) override;
72 // XLockable (base of XUndoManager)
73 virtual void SAL_CALL lock( ) override;
74 virtual void SAL_CALL unlock( ) override;
75 virtual sal_Bool SAL_CALL isLocked( ) override;
77 // XChild (base of XUndoManager)
78 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
79 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
81 // XModifyBroadcaster
82 virtual void SAL_CALL addModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
83 virtual void SAL_CALL removeModifyListener( const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
85 private:
86 std::unique_ptr< impl::UndoManager_Impl > m_pImpl;
89 } // namespace chart
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */