summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-03-03 10:17:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-03-03 12:27:18 +0100
commitb55bf0cbdfdc68200ebf191b828a912373f1b7dc (patch)
tree90348930d73214dd5481c9c399beeabc805d1c21 /sfx2
parent0045b6f36e5e1445d699f87a0f6597d665b4cfe4 (diff)
move some headers inside their module
Change-Id: I026f920d475c4ce56a12d6b29a702673e8bd7a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/pch/precompiled_sfx.hxx2
-rw-r--r--sfx2/inc/sidebar/Tools.hxx63
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx2
-rw-r--r--sfx2/source/sidebar/Paint.cxx2
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx2
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx2
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx2
-rw-r--r--sfx2/source/sidebar/Tools.cxx2
-rw-r--r--sfx2/source/sidebar/UnoSidebar.cxx2
11 files changed, 73 insertions, 10 deletions
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index 87d51ac85d54..ac2f242cc5ef 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -445,7 +445,7 @@
#include <sfx2/sidebar/SidebarDockingWindow.hxx>
#include <sfx2/sidebar/TabBar.hxx>
#include <sfx2/sidebar/Theme.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/signaturestate.hxx>
#include <sfx2/stbitem.hxx>
#include <sfx2/styfitem.hxx>
diff --git a/sfx2/inc/sidebar/Tools.hxx b/sfx2/inc/sidebar/Tools.hxx
new file mode 100644
index 000000000000..74941f539510
--- /dev/null
+++ b/sfx2/inc/sidebar/Tools.hxx
@@ -0,0 +1,63 @@
+/* -*- 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 .
+ */
+#pragma once
+
+#include <vcl/image.hxx>
+#include <vcl/gradient.hxx>
+
+#include <sfx2/dllapi.h>
+
+#include <com/sun/star/awt/Gradient.hpp>
+#include <com/sun/star/util/URL.hpp>
+
+namespace com::sun::star::frame { class XController; }
+namespace com::sun::star::frame { class XDispatch; }
+namespace com::sun::star::frame { class XFrame; }
+
+
+namespace sfx2 { namespace sidebar {
+
+class Tools
+{
+public:
+ static Image GetImage (
+ const OUString& rsImageURL,
+ const OUString& rsHighContrastImageURL,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ static Image GetImage (
+ const OUString& rsURL,
+ const css::uno::Reference<css::frame::XFrame>& rxFrame);
+
+ static css::awt::Gradient VclToAwtGradient (const Gradient& rGradient);
+ static Gradient AwtToVclGradient (const css::awt::Gradient& rGradient);
+
+ static css::util::URL GetURL (const OUString& rsCommand);
+ static css::uno::Reference<css::frame::XDispatch> GetDispatch (
+ const css::uno::Reference<css::frame::XFrame>& rxFrame,
+ const css::util::URL& rURL);
+
+ static OUString GetModuleName (
+ const css::uno::Reference<css::frame::XController>& rxFrame);
+};
+
+
+} } // end of namespace sfx2::sidebar
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx
index 54fc5b774674..ef07c0827f7b 100644
--- a/sfx2/source/sidebar/ControllerFactory.cxx
+++ b/sfx2/source/sidebar/ControllerFactory.cxx
@@ -18,7 +18,7 @@
*/
#include <sidebar/ControllerFactory.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <com/sun/star/frame/XToolbarController.hpp>
#include <com/sun/star/frame/XFrame.hpp>
diff --git a/sfx2/source/sidebar/Paint.cxx b/sfx2/source/sidebar/Paint.cxx
index a3f4012eab66..1ab8b5d6dfb0 100644
--- a/sfx2/source/sidebar/Paint.cxx
+++ b/sfx2/source/sidebar/Paint.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <sidebar/Paint.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <com/sun/star/awt/Gradient.hpp>
using namespace css;
diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx
index 78bd8bbe4123..21c423fcc34e 100644
--- a/sfx2/source/sidebar/PanelTitleBar.cxx
+++ b/sfx2/source/sidebar/PanelTitleBar.cxx
@@ -24,7 +24,7 @@
#include <sfx2/sidebar/Panel.hxx>
#include <sfx2/sidebar/Theme.hxx>
#include <sidebar/ControllerFactory.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <vcl/event.hxx>
#include <vcl/image.hxx>
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index 50da0dc46d54..45976530a9d3 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -20,7 +20,7 @@
#include <sidebar/DeckDescriptor.hxx>
#include <sidebar/PanelDescriptor.hxx>
#include <sfx2/sidebar/ResourceManager.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <officecfg/Office/UI/Sidebar.hxx>
#include <unotools/confignode.hxx>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 2e56b5d2b2b8..55b953b207df 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -26,7 +26,7 @@
#include <sfx2/sidebar/TabBar.hxx>
#include <sfx2/sidebar/Theme.hxx>
#include <sfx2/sidebar/SidebarChildWindow.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/sidebar/SidebarDockingWindow.hxx>
#include <sfx2/sidebar/Context.hxx>
diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index c5be30ca1122..515b2da36dba 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -22,7 +22,7 @@
#include <sidebar/DeckDescriptor.hxx>
#include <sidebar/Paint.hxx>
#include <sfx2/sidebar/Theme.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/sidebar/FocusManager.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
#include <sfx2/strings.hrc>
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 62c440807f63..7a4d6a785e5c 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -19,7 +19,7 @@
#include <sfx2/sidebar/Theme.hxx>
#include <sidebar/Paint.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/app.hxx>
#include <vcl/svapp.hxx>
diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index 27064e58af85..c49177e97a11 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/sidebar/Theme.hxx>
diff --git a/sfx2/source/sidebar/UnoSidebar.cxx b/sfx2/source/sidebar/UnoSidebar.cxx
index dcd8d6ee8f3e..c209c6766d03 100644
--- a/sfx2/source/sidebar/UnoSidebar.cxx
+++ b/sfx2/source/sidebar/UnoSidebar.cxx
@@ -9,7 +9,7 @@
*/
#include <sfx2/sidebar/UnoSidebar.hxx>
-#include <sfx2/sidebar/Tools.hxx>
+#include <sidebar/Tools.hxx>
#include <sfx2/sidebar/SidebarController.hxx>
#include <sidebar/UnoDecks.hxx>