fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / dbaccess / source / ui / inc / singledoccontroller.hxx
blobfe9588ee69103a66c8af2fbc58fd4b6480f818b8
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_SOURCE_UI_INC_SINGLEDOCCONTROLLER_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_SINGLEDOCCONTROLLER_HXX
23 #include <dbaccess/dbsubcomponentcontroller.hxx>
25 #include <com/sun/star/document/XUndoManagerSupplier.hpp>
27 #include <cppuhelper/implbase1.hxx>
29 class SfxUndoAction;
30 class SfxUndoManager;
32 namespace dbaui
35 // OSingleDocumentController
36 struct OSingleDocumentController_Data;
37 typedef ::cppu::ImplInheritanceHelper1 < DBSubComponentController
38 , ::com::sun::star::document::XUndoManagerSupplier
39 > OSingleDocumentController_Base;
40 class OSingleDocumentController : public OSingleDocumentController_Base
42 protected:
43 OSingleDocumentController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxORB );
44 virtual ~OSingleDocumentController();
46 // OComponentHelper
47 virtual void SAL_CALL disposing() SAL_OVERRIDE;
49 public:
50 /// need for undo's and redo's
51 SfxUndoManager& GetUndoManager() const;
53 /// complete clears the Undo/Redo stacks
54 void ClearUndoManager();
56 /** addUndoActionAndInvalidate adds an undo action to the undoManager,
57 additionally invalidates the UNDO and REDO slot
58 @param pAction the undo action to add
60 void addUndoActionAndInvalidate( SfxUndoAction* pAction );
62 // OGenericUnoController
63 virtual FeatureState GetState( sal_uInt16 nId ) const SAL_OVERRIDE;
64 virtual void Execute( sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs ) SAL_OVERRIDE;
66 // XUndoManagerSupplier
67 virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManager > SAL_CALL getUndoManager( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 // XEventListener
70 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
72 private:
73 ::std::unique_ptr< OSingleDocumentController_Data > m_pData;
76 } // namespace dbaui
78 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_SINGLEDOCCONTROLLER_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */