Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / include / sfx2 / sidebar / UnoDecks.hxx
blobb073033064c7a7d9d7ccfe18f2a0a5e82fe36012
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 */
11 #ifndef INCLUDED_SFX2_SIDEBAR_DECKS_HXX
12 #define INCLUDED_SFX2_SIDEBAR_DECKS_HXX
15 #include <com/sun/star/ui/XDecks.hpp>
17 #include <com/sun/star/container/XIndexAccess.hpp>
18 #include <com/sun/star/container/XNameAccess.hpp>
19 #include <com/sun/star/frame/XFrame.hpp>
21 #include <cppuhelper/compbase1.hxx>
22 #include <cppuhelper/weakref.hxx>
24 #include <sfx2/sidebar/SidebarController.hxx>
25 #include <sfx2/sidebar/ResourceManager.hxx>
27 /** get the decks
29 class SfxUnoDecks : public ::cppu::WeakImplHelper1< css::ui::XDecks >
32 public:
34 SfxUnoDecks(const css::uno::Reference<css::frame::XFrame>&);
35 virtual ~SfxUnoDecks() {};
37 // XNameAccess
39 virtual css::uno::Any SAL_CALL getByName( const OUString& aName )
40 throw(css::container::NoSuchElementException,
41 css::lang::WrappedTargetException,
42 css::uno::RuntimeException, std::exception) override;
44 virtual css::uno::Sequence< OUString > SAL_CALL getElementNames()
45 throw(css::uno::RuntimeException, std::exception) override;
47 virtual sal_Bool SAL_CALL hasByName( const OUString& aName )
48 throw(css::uno::RuntimeException, std::exception) override;
50 // XIndexAccess
52 virtual sal_Int32 SAL_CALL getCount()
53 throw(css::uno::RuntimeException, std::exception) override;
55 virtual css::uno::Any SAL_CALL getByIndex( sal_Int32 Index )
56 throw(css::lang::IndexOutOfBoundsException,
57 css::lang::WrappedTargetException,
58 css::uno::RuntimeException, std::exception) override;
60 // XElementAccess
61 virtual css::uno::Type SAL_CALL getElementType()
62 throw(css::uno::RuntimeException, std::exception) override;
63 virtual sal_Bool SAL_CALL hasElements()
64 throw(css::uno::RuntimeException, std::exception) override;
66 private:
68 const css::uno::Reference<css::frame::XFrame> xFrame;
69 sfx2::sidebar::SidebarController* getSidebarController();
73 #endif
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */