summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-05-06 15:00:41 +0300
committerTor Lillqvist <tml@collabora.com>2014-05-06 15:01:31 +0300
commit5e80dd672fe64d44e05a2025e9569afdd62bb0d7 (patch)
tree6b54ec79069ed0dcd7e7425663a1912d6fe50282 /sfx2
parentaa8abbe736b0c8ad54f208916b0eca2d04ebd396 (diff)
Move a few more headers that are included only in sfx2 to sfx2
Change-Id: I8bd81a45f5ef1b76fce1563b06e05a4eefcff0ec
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sidebar/ContextChangeBroadcaster.hxx68
-rw-r--r--sfx2/inc/sidebar/PopupContainer.hxx40
-rw-r--r--sfx2/source/control/shell.cxx2
-rw-r--r--sfx2/source/sidebar/ContextChangeBroadcaster.cxx2
-rw-r--r--sfx2/source/sidebar/PopupContainer.cxx2
5 files changed, 111 insertions, 3 deletions
diff --git a/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx
new file mode 100644
index 000000000000..de381929c05d
--- /dev/null
+++ b/sfx2/inc/sidebar/ContextChangeBroadcaster.hxx
@@ -0,0 +1,68 @@
+/* -*- 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_SFX2_SIDEBAR_CONTEXTCHANGEBROADCASTER_HXX
+#define INCLUDED_SFX2_SIDEBAR_CONTEXTCHANGEBROADCASTER_HXX
+
+#include <com/sun/star/frame/XFrame.hpp>
+
+namespace cssu = ::com::sun::star::uno;
+
+namespace sfx2 { namespace sidebar {
+
+
+/** This class is a helper for broadcasting context changes that are
+ tied to shells being activated or deactivated.
+*/
+class ContextChangeBroadcaster
+{
+public:
+ ContextChangeBroadcaster (void);
+ ~ContextChangeBroadcaster (void);
+
+ void Initialize (const ::rtl::OUString& rsContextName);
+
+ void Activate (const cssu::Reference<css::frame::XFrame>& rxFrame);
+ void Deactivate (const cssu::Reference<css::frame::XFrame>& rxFrame);
+
+ /** Enable or disable the broadcaster.
+ @param bIsEnabled
+ The new value of the "enabled" state.
+ @return
+ The old value of the "enabled" state is returned.
+ */
+ bool SetBroadcasterEnabled (const bool bIsEnabled);
+
+private:
+ rtl::OUString msContextName;
+ bool mbIsBroadcasterEnabled;
+
+ void BroadcastContextChange (
+ const cssu::Reference<css::frame::XFrame>& rxFrame,
+ const ::rtl::OUString& rsModuleName,
+ const ::rtl::OUString& rsContextName);
+ ::rtl::OUString GetModuleName (
+ const cssu::Reference<css::frame::XFrame>& rxFrame);
+};
+
+
+} } // end of namespace ::sd::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/inc/sidebar/PopupContainer.hxx b/sfx2/inc/sidebar/PopupContainer.hxx
new file mode 100644
index 000000000000..435b43b00969
--- /dev/null
+++ b/sfx2/inc/sidebar/PopupContainer.hxx
@@ -0,0 +1,40 @@
+/* -*- 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_SFX2_SIDEBAR_POPUPCONTAINER_HXX
+#define INCLUDED_SFX2_SIDEBAR_POPUPCONTAINER_HXX
+
+#include <sfx2/dllapi.h>
+#include <vcl/floatwin.hxx>
+
+namespace sfx2 { namespace sidebar {
+
+class SFX2_DLLPUBLIC PopupContainer : public FloatingWindow
+{
+public:
+ PopupContainer (Window* pParent);
+ virtual ~PopupContainer (void);
+
+ virtual long Notify (NotifyEvent& rNEvt);
+};
+
+} } // end of namespace sfx2::sidebar
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index b1f0aa2ebfbd..49e9ebacc27e 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -42,7 +42,7 @@
#include <sfx2/mnumgr.hxx>
#include "statcach.hxx"
#include <sfx2/msgpool.hxx>
-#include <sfx2/sidebar/ContextChangeBroadcaster.hxx>
+#include <sidebar/ContextChangeBroadcaster.hxx>
#include <map>
diff --git a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
index f29fffaa03fa..975fb3e27856 100644
--- a/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
+++ b/sfx2/source/sidebar/ContextChangeBroadcaster.cxx
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <sfx2/sidebar/ContextChangeBroadcaster.hxx>
+#include <sidebar/ContextChangeBroadcaster.hxx>
#include <sfx2/sidebar/EnumContext.hxx>
#include <com/sun/star/ui/ContextChangeEventObject.hpp>
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
diff --git a/sfx2/source/sidebar/PopupContainer.cxx b/sfx2/source/sidebar/PopupContainer.cxx
index 2ec4c56f495c..9167dd61d965 100644
--- a/sfx2/source/sidebar/PopupContainer.cxx
+++ b/sfx2/source/sidebar/PopupContainer.cxx
@@ -18,7 +18,7 @@
*/
#include "precompiled_sfx2.hxx"
-#include <sfx2/sidebar/PopupContainer.hxx>
+#include <sidebar/PopupContainer.hxx>
namespace sfx2 { namespace sidebar {