summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-01-26 08:52:19 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-01-26 12:07:18 +0100
commit6443c79170d0082142850262b293ddec5fcde84b (patch)
tree12aa5c2ee8b0ee14beb18d8aee498cab4594fc02 /include
parent26a750aac8e6bcf3d6d064ac6ef59005f95e34c3 (diff)
move ToolBoxItemId into its own header
Change-Id: I34838bee7ad27bfd60d92c26af7eb2de508686b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128974 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/framework/sfxhelperfunctions.hxx7
-rw-r--r--include/svtools/toolboxcontroller.hxx2
-rw-r--r--include/svx/colorwindow.hxx8
-rw-r--r--include/vcl/builder.hxx3
-rw-r--r--include/vcl/tabctrl.hxx2
-rw-r--r--include/vcl/toolbox.hxx11
-rw-r--r--include/vcl/toolboxid.hxx23
7 files changed, 33 insertions, 23 deletions
diff --git a/include/framework/sfxhelperfunctions.hxx b/include/framework/sfxhelperfunctions.hxx
index c7575fa53caa..92fd502683ea 100644
--- a/include/framework/sfxhelperfunctions.hxx
+++ b/include/framework/sfxhelperfunctions.hxx
@@ -17,13 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_FRAMEWORK_SFXHELPERFUNCTIONS_HXX
-#define INCLUDED_FRAMEWORK_SFXHELPERFUNCTIONS_HXX
+#pragma once
#include <framework/fwkdllapi.h>
#include <rtl/ustring.hxx>
#include <rtl/ref.hxx>
-#include <vcl/toolbox.hxx>
+#include <vcl/toolboxid.hxx>
namespace com::sun::star::frame { class XFrame; class XToolbarController; }
namespace com::sun::star::uno { template <typename > class Reference; }
@@ -105,6 +104,4 @@ FWK_DLLPUBLIC bool IsDockingWindowVisible(
const OUString& rResourceURL );
}
-#endif // INCLUDED_FRAMEWORK_SFXHELPERFUNCTIONS_HXX
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx
index 8490f69e185f..78a9b2282a3f 100644
--- a/include/svtools/toolboxcontroller.hxx
+++ b/include/svtools/toolboxcontroller.hxx
@@ -33,7 +33,7 @@
#include <comphelper/propertycontainer.hxx>
#include <cppuhelper/propshlp.hxx>
#include <tools/link.hxx>
-#include <vcl/toolbox.hxx>
+#include <vcl/toolboxid.hxx>
#include <unordered_map>
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index 5345c241730a..2fc23adde44d 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -17,20 +17,20 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef INCLUDED_SVX_SOURCE_TBXCTRLS_COLORWINDOW_HXX
-#define INCLUDED_SVX_SOURCE_TBXCTRLS_COLORWINDOW_HXX
+#pragma once
#include <svtools/toolbarmenu.hxx>
#include <rtl/ustring.hxx>
#include <svx/SvxColorValueSet.hxx>
#include <svx/Palette.hxx>
-#include <vcl/toolbox.hxx>
+#include <vcl/toolboxid.hxx>
typedef std::function<weld::Window*()> TopLevelParentFunction;
namespace com::sun::star::frame { class XFrame; }
class PaletteManager;
+class ToolBox;
class SVXCORE_DLLPUBLIC ColorStatus
{
@@ -134,6 +134,4 @@ public:
virtual void GrabFocus() override;
};
-#endif
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 4aeca1459f25..ddae54a1dc8d 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -17,7 +17,7 @@
#include <vcl/dllapi.h>
#include <vcl/window.hxx>
#include <vcl/vclptr.hxx>
-#include <vcl/toolbox.hxx>
+#include <vcl/toolboxid.hxx>
#include <tools/wintypes.hxx>
#include <vcl/EnumContext.hxx>
@@ -45,6 +45,7 @@ class SvTabListBox;
class Slider;
class DateField;
class TimeField;
+class ToolBox;
class VclExpander;
class VclMultiLineEdit;
struct NotebookBarAddonsItem;
diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx
index b749130fb6ff..1597845df562 100644
--- a/include/vcl/tabctrl.hxx
+++ b/include/vcl/tabctrl.hxx
@@ -23,7 +23,6 @@
#include <config_options.h>
#include <vcl/dllapi.h>
#include <vcl/ctrl.hxx>
-#include <vcl/toolbox.hxx>
#include <vcl/EnumContext.hxx>
#include <vcl/NotebookbarContextControl.hxx>
@@ -33,6 +32,7 @@ class TabPage;
class Button;
class PushButton;
class ListBox;
+class ToolBox;
#ifndef TAB_APPEND
#define TAB_APPEND (sal_uInt16(0xFFFF))
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index bddea3b01484..dda33ff02025 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -25,6 +25,7 @@
#include <vcl/dockwin.hxx>
#include <vcl/image.hxx>
#include <vcl/keycod.hxx>
+#include <vcl/toolboxid.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <tools/degree.hxx>
@@ -68,16 +69,6 @@ enum class ToolBoxLayoutMode
// Position of the text when icon and text are painted
enum class ToolBoxTextPosition { Right, Bottom };
-typedef o3tl::strong_int<sal_uInt16, struct ToolBoxItemIdTag> ToolBoxItemId;
-namespace std {
- template<>
- struct hash<ToolBoxItemId>
- {
- std::size_t operator()(ToolBoxItemId const & s) const
- { return std::size_t(sal_uInt16(s)); }
- };
-}
-
class Idle;
/// A toolbar: contains all those icons, typically below the menu bar.
diff --git a/include/vcl/toolboxid.hxx b/include/vcl/toolboxid.hxx
new file mode 100644
index 000000000000..009a10d74e7c
--- /dev/null
+++ b/include/vcl/toolboxid.hxx
@@ -0,0 +1,23 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#pragma once
+
+#include <o3tl/strong_int.hxx>
+
+typedef o3tl::strong_int<sal_uInt16, struct ToolBoxItemIdTag> ToolBoxItemId;
+namespace std
+{
+template <> struct hash<ToolBoxItemId>
+{
+ std::size_t operator()(ToolBoxItemId const& s) const { return std::size_t(sal_uInt16(s)); }
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */