From 2187cff2d452e20aa1fdfd5d8aa7473242cd1eb6 Mon Sep 17 00:00:00 2001 From: Serge Krot Date: Fri, 18 Oct 2019 17:40:11 +0200 Subject: Toolbar: Added usage of ImageControl as toolbar control Reviewed-on: https://gerrit.libreoffice.org/81064 Reviewed-by: Serge Krot (CIB) Tested-by: Serge Krot (CIB) (cherry picked from commit 48f945a3be16ee0eba0c526e51280dc8deafc316) Change-Id: I2536a505650b6e4c98e79f749c3b237518cc995d Reviewed-on: https://gerrit.libreoffice.org/81872 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- .../inc/uielement/FixedImageToolbarController.hxx | 59 ++++++++++++++++++++++ framework/inc/uielement/toolbarmerger.hxx | 1 + 2 files changed, 60 insertions(+) create mode 100644 framework/inc/uielement/FixedImageToolbarController.hxx (limited to 'framework/inc') diff --git a/framework/inc/uielement/FixedImageToolbarController.hxx b/framework/inc/uielement/FixedImageToolbarController.hxx new file mode 100644 index 000000000000..2fa55e4e8cc5 --- /dev/null +++ b/framework/inc/uielement/FixedImageToolbarController.hxx @@ -0,0 +1,59 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX +#define INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX + +#include +#include + +#include + +class ToolBox; +class ImageControl; + +namespace framework +{ +class FixedImageToolbarController : public ComplexToolbarController +{ +public: + FixedImageToolbarController(const css::uno::Reference& rxContext, + const css::uno::Reference& rFrame, + ToolBox* pToolBar, sal_uInt16 nID, const OUString& aCommand); + + // XComponent + virtual void SAL_CALL dispose() override; + + void CheckAndUpdateImages(); + +protected: + virtual void executeControlCommand(const css::frame::ControlCommand& rControlCommand) override; + +protected: + DECL_LINK(MiscOptionsChanged, LinkParamNone*, void); + +private: + VclPtr m_pFixedImageControl; + sal_Int16 m_eSymbolSize; +}; +} // namespace framework + +#endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDIMAGETOOLBARCONTROLLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx index cfe236f8328a..bb41a2bece60 100644 --- a/framework/inc/uielement/toolbarmerger.hxx +++ b/framework/inc/uielement/toolbarmerger.hxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include -- cgit