Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / inc / StylesPreviewToolBoxControl.hxx
blobd8d12a0f20a86b0e22e51d45850e95521cd06c02
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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_SVX_SOURCE_INC_STYLES_PREVIEW_TOOLBOX_CONTROL_HXX
21 #define INCLUDED_SVX_SOURCE_INC_STYLES_PREVIEW_TOOLBOX_CONTROL_HXX
23 #include <svtools/toolboxcontroller.hxx>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include "StylesPreviewWindow.hxx"
26 #include <com/sun/star/frame/XModel.hpp>
27 #include <com/sun/star/frame/XDispatchProvider.hpp>
29 class StylesPreviewToolBoxControl final
30 : public cppu::ImplInheritanceHelper<svt::ToolboxController, css::lang::XServiceInfo>
32 VclPtr<StylesPreviewWindow_Impl> m_xVclBox;
33 std::unique_ptr<StylesPreviewWindow_Base> m_xWeldBox;
35 css::uno::Reference<css::frame::XDispatchProvider> m_xDispatchProvider;
37 std::vector<std::pair<OUString, OUString>> m_aDefaultStyles;
39 public:
40 StylesPreviewToolBoxControl();
41 virtual ~StylesPreviewToolBoxControl() override;
43 // XStatusListener
44 virtual void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override;
46 // XToolbarController
47 virtual css::uno::Reference<css::awt::XWindow>
48 SAL_CALL createItemWindow(const css::uno::Reference<css::awt::XWindow>& rParent) override;
50 // XInitialization
51 virtual void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& aArguments) override;
53 // XComponent
54 virtual void SAL_CALL dispose() override;
56 // XUpdatable
57 virtual void SAL_CALL update() override;
59 // XServiceInfo
60 virtual OUString SAL_CALL getImplementationName() override;
61 virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
62 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
64 private:
65 void InitializeStyles(const css::uno::Reference<css::frame::XModel>& xModel);
68 #endif
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */