Handle pasting disallowed clipboard contents on iOS
[LibreOffice.git] / include / dbaccess / dbaundomanager.hxx
blob364b91d6c79a4bf7e822360a1612f3f3f7b8091a
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 #ifndef INCLUDED_DBACCESS_DBAUNDOMANAGER_HXX
21 #define INCLUDED_DBACCESS_DBAUNDOMANAGER_HXX
23 #include <memory>
25 #include <com/sun/star/document/XUndoManager.hpp>
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <cppuhelper/implbase1.hxx>
29 #include <dbaccess/dbaccessdllapi.h>
30 #include <rtl/ustring.hxx>
31 #include <sal/types.h>
33 namespace com::sun::star {
34 namespace document { class XUndoAction; }
35 namespace document { class XUndoManagerListener; }
36 namespace uno { class XInterface; }
39 namespace cppu {
40 class OWeakObject;
43 namespace osl {
44 class Mutex;
47 class SfxUndoManager;
50 namespace dbaui
54 //= UndoManager
56 struct UndoManager_Impl;
57 typedef ::cppu::ImplHelper1< css::document::XUndoManager > UndoManager_Base;
58 class DBACCESS_DLLPUBLIC UndoManager final : public UndoManager_Base
60 public:
61 UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex );
62 virtual ~UndoManager();
64 SfxUndoManager& GetSfxUndoManager() const;
66 // XInterface
67 virtual void SAL_CALL acquire( ) noexcept override;
68 virtual void SAL_CALL release( ) noexcept override;
70 // XComponent equivalents
71 void disposing();
73 // XUndoManager
74 virtual void SAL_CALL enterUndoContext( const OUString& i_title ) override;
75 virtual void SAL_CALL enterHiddenUndoContext( ) override;
76 virtual void SAL_CALL leaveUndoContext( ) override;
77 virtual void SAL_CALL addUndoAction( const css::uno::Reference< css::document::XUndoAction >& i_action ) override;
78 virtual void SAL_CALL undo( ) override;
79 virtual void SAL_CALL redo( ) override;
80 virtual sal_Bool SAL_CALL isUndoPossible( ) override;
81 virtual sal_Bool SAL_CALL isRedoPossible( ) override;
82 virtual OUString SAL_CALL getCurrentUndoActionTitle( ) override;
83 virtual OUString SAL_CALL getCurrentRedoActionTitle( ) override;
84 virtual css::uno::Sequence< OUString > SAL_CALL getAllUndoActionTitles( ) override;
85 virtual css::uno::Sequence< OUString > SAL_CALL getAllRedoActionTitles( ) override;
86 virtual void SAL_CALL clear( ) override;
87 virtual void SAL_CALL clearRedo( ) override;
88 virtual void SAL_CALL reset( ) override;
89 virtual void SAL_CALL addUndoManagerListener( const css::uno::Reference< css::document::XUndoManagerListener >& i_listener ) override;
90 virtual void SAL_CALL removeUndoManagerListener( const css::uno::Reference< css::document::XUndoManagerListener >& i_listener ) override;
92 // XLockable (base of XUndoManager)
93 virtual void SAL_CALL lock( ) override;
94 virtual void SAL_CALL unlock( ) override;
95 virtual sal_Bool SAL_CALL isLocked( ) override;
97 // XChild (base of XUndoManager)
98 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
99 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
101 private:
102 std::unique_ptr< UndoManager_Impl > m_xImpl;
106 } // namespace dbaui
109 #endif // INCLUDED_DBACCESS_DBAUNDOMANAGER_HXX
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */