summaryrefslogtreecommitdiff
path: root/framework/inc
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2019-10-18 13:57:22 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-11-01 00:24:05 +0100
commitc538764082f29ef98fb859cae37a895cee2de889 (patch)
tree7c7374c81a77f88ae2c11408c2b4fbd6a205494e /framework/inc
parentc720ad95d0c375d217db2816877a6d25d825163a (diff)
Toolbar: add usage of FixedText as toolbar control
Change-Id: I26a79c485fa2e168058025e058bcfb793af7515f Reviewed-on: https://gerrit.libreoffice.org/81039 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de> Tested-by: Serge Krot (CIB) <Serge.Krot@cib.de> (cherry picked from commit c2682ba52ea0cbb7af95e80f6d67b286061aeae2) Reviewed-on: https://gerrit.libreoffice.org/81643 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'framework/inc')
-rw-r--r--framework/inc/uielement/FixedTextToolbarController.hxx55
-rw-r--r--framework/inc/uielement/toolbarmerger.hxx1
2 files changed, 56 insertions, 0 deletions
diff --git a/framework/inc/uielement/FixedTextToolbarController.hxx b/framework/inc/uielement/FixedTextToolbarController.hxx
new file mode 100644
index 000000000000..cd8afb9499eb
--- /dev/null
+++ b/framework/inc/uielement/FixedTextToolbarController.hxx
@@ -0,0 +1,55 @@
+/* -*- 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_FIXEDTEXTTOOLBARCONTROLLER_HXX
+#define INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDTEXTTOOLBARCONTROLLER_HXX
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/frame/ControlCommand.hpp>
+
+#include <uielement/complextoolbarcontroller.hxx>
+
+class ToolBox;
+class FixedText;
+
+namespace framework
+{
+class FixedTextToolbarController : public ComplexToolbarController
+{
+public:
+ FixedTextToolbarController(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
+ const css::uno::Reference<css::frame::XFrame>& rFrame,
+ ToolBox* pToolBar, sal_uInt16 nID, const OUString& aCommand);
+
+ // XComponent
+ virtual void SAL_CALL dispose() override;
+
+protected:
+ virtual void executeControlCommand(const css::frame::ControlCommand& rControlCommand) override;
+ virtual css::uno::Sequence<css::beans::PropertyValue>
+ getExecuteArgs(sal_Int16 KeyModifier) const override;
+
+private:
+ VclPtr<FixedText> m_pFixedTextControl;
+};
+}
+
+#endif // INCLUDED_FRAMEWORK_INC_UIELEMENT_FIXEDTEXTTOOLBARCONTROLLER_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 cc0448a8f76f..cfe236f8328a 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -27,6 +27,7 @@
#include <uielement/spinfieldtoolbarcontroller.hxx>
#include <uielement/edittoolbarcontroller.hxx>
#include <uielement/dropdownboxtoolbarcontroller.hxx>
+#include <uielement/FixedTextToolbarController.hxx>
#include <uielement/commandinfo.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>