summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-01-15 21:02:49 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2017-01-16 13:07:58 +0000
commit535f2b2b0a21407c4412d14149d271a199c3e6b8 (patch)
tree934fbcebf62de9ace52d160f34ae018c99304058
parentc5555c1698665011457147b1f15ea00f04665a05 (diff)
Convert RID_MENU_NOTEBOOKBAR to xml
Brings a lot of features (icons, keyboard shortcuts, customization, context menu interception etc.) Other changes: - Make SfxDispatcher::ExecutePopup take PopupMenuFlags arg, to be able to pass NoMouseUpClose, so that the menu won't close on mouse-up under anything != gtk3. - Make .uno:OpenFromWriter and .uno:OpenFromCalc async slots, to avoid crash under gtk3 when recycling the current frame. - Don't show the menu in customization dialog, if experimental mode disabled. Change-Id: Ieea2f73f6b48fbaf4bdfc4acf1a33d25422357cb Reviewed-on: https://gerrit.libreoffice.org/33101 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
-rw-r--r--cui/source/customize/cfg.cxx8
-rw-r--r--include/sfx2/dispatch.hxx4
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu5
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu5
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu5
-rw-r--r--sc/UIConfig_scalc.mk1
-rw-r--r--sc/sdi/scalc.sdi1
-rw-r--r--sc/uiconfig/scalc/popupmenu/notebookbar.xml19
-rw-r--r--sd/UIConfig_simpress.mk1
-rw-r--r--sd/uiconfig/simpress/popupmenu/notebookbar.xml19
-rw-r--r--sfx2/Library_sfx.mk1
-rw-r--r--sfx2/source/control/dispatch.cxx4
-rw-r--r--sfx2/source/dialog/dialog.src55
-rw-r--r--sfx2/source/inc/sfxlocal.hrc2
-rw-r--r--sfx2/source/notebookbar/NotebookBarPopupMenu.cxx96
-rw-r--r--sfx2/source/notebookbar/NotebookBarPopupMenu.hxx23
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx17
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/sdi/swriter.sdi1
-rw-r--r--sw/uiconfig/swriter/popupmenu/notebookbar.xml19
20 files changed, 97 insertions, 190 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 695a51c64219..a3406f2f10e0 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1358,6 +1358,8 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
{
if ( !m_pRootEntry )
{
+ bool bExperimental = SvtMiscOptions().IsExperimentalMode();
+
typedef std::unordered_map< OUString, bool, OUStringHash > MenuInfo;
MenuInfo aMenuInfo;
@@ -1382,6 +1384,9 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
}
}
+ if ( !bExperimental && aUrl.endsWith("notebookbar") )
+ continue;
+
css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
try
{
@@ -1430,6 +1435,9 @@ SvxEntries* ContextMenuSaveInData::GetEntries()
}
}
+ if ( !bExperimental && aUrl.endsWith("notebookbar") )
+ continue;
+
css::uno::Reference< css::container::XIndexAccess > xPopupMenu;
try
{
diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index ac675cc242b3..92d0b42cb3fb 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -25,6 +25,7 @@
#include <sfx2/bindings.hxx>
#include <sfx2/viewfrm.hxx>
+#include <vcl/menu.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <initializer_list>
@@ -147,7 +148,8 @@ public:
SfxViewFrame* GetFrame() const;
SfxModule* GetModule() const;
- void ExecutePopup( const OUString &rResName, vcl::Window *pWin = nullptr, const Point *pPos = nullptr );
+ void ExecutePopup( const OUString &rResName, vcl::Window *pWin = nullptr, const Point *pPos = nullptr,
+ PopupMenuFlags nFlags = PopupMenuFlags::ExecuteDown );
static void ExecutePopup( vcl::Window *pWin = nullptr, const Point *pPosPixel = nullptr );
bool IsAppDispatcher() const;
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
index 0a797cdd0e07..0bbaab8d50d5 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcWindowState.xcu
@@ -75,6 +75,11 @@
<value xml:lang="en-US">Media</value>
</prop>
</node>
+ <node oor:name="private:resource/popupmenu/notebookbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Notebookbar</value>
+ </prop>
+ </node>
<node oor:name="private:resource/popupmenu/oleobject" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
<value xml:lang="en-US">OLE Object</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
index 9669f88a811d..2f81b1143f78 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu
@@ -100,6 +100,11 @@
<value xml:lang="en-US">Multiple Selection</value>
</prop>
</node>
+ <node oor:name="private:resource/popupmenu/notebookbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Notebookbar</value>
+ </prop>
+ </node>
<node oor:name="private:resource/popupmenu/oleobject" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
<value xml:lang="en-US">OLE Object</value>
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index f1eb33d19754..740462ad46c7 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -60,6 +60,11 @@
<value xml:lang="en-US">Media</value>
</prop>
</node>
+ <node oor:name="private:resource/popupmenu/notebookbar" oor:op="replace">
+ <prop oor:name="UIName" oor:type="xs:string">
+ <value xml:lang="en-US">Notebookbar</value>
+ </prop>
+ </node>
<node oor:name="private:resource/popupmenu/oleobject" oor:op="replace">
<prop oor:name="UIName" oor:type="xs:string">
<value xml:lang="en-US">OLE Object</value>
diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk
index 056dbdace4cb..89527f367a4f 100644
--- a/sc/UIConfig_scalc.mk
+++ b/sc/UIConfig_scalc.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\
sc/uiconfig/scalc/popupmenu/freezepanes \
sc/uiconfig/scalc/popupmenu/graphic \
sc/uiconfig/scalc/popupmenu/media \
+ sc/uiconfig/scalc/popupmenu/notebookbar \
sc/uiconfig/scalc/popupmenu/oleobject \
sc/uiconfig/scalc/popupmenu/pagebreak \
sc/uiconfig/scalc/popupmenu/pivot \
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index aff80507a625..2ca2a7b2b74d 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -6468,6 +6468,7 @@ SfxVoidItem OpenFromCalc SID_OPEN_CALC
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
+ Asynchron;
SlotType = SfxStringItem
diff --git a/sc/uiconfig/scalc/popupmenu/notebookbar.xml b/sc/uiconfig/scalc/popupmenu/notebookbar.xml
new file mode 100644
index 000000000000..29356d5c8281
--- /dev/null
+++ b/sc/uiconfig/scalc/popupmenu/notebookbar.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:OpenFromCalc"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:Menubar"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+</menu:menupopup>
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index a2930acd7b66..f268c0074d62 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/simpress,\
sd/uiconfig/simpress/popupmenu/measure \
sd/uiconfig/simpress/popupmenu/media \
sd/uiconfig/simpress/popupmenu/multiselect \
+ sd/uiconfig/simpress/popupmenu/notebookbar \
sd/uiconfig/simpress/popupmenu/oleobject \
sd/uiconfig/simpress/popupmenu/outlinetext \
sd/uiconfig/simpress/popupmenu/outline \
diff --git a/sd/uiconfig/simpress/popupmenu/notebookbar.xml b/sd/uiconfig/simpress/popupmenu/notebookbar.xml
new file mode 100644
index 000000000000..7814a63c3f71
--- /dev/null
+++ b/sd/uiconfig/simpress/popupmenu/notebookbar.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:Open"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:Menubar"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+</menu:menupopup>
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 642e96031230..65e52861d9c1 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -242,7 +242,6 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/notebookbar/BigToolBox \
sfx2/source/notebookbar/ContextVBox \
sfx2/source/notebookbar/DropdownBox \
- sfx2/source/notebookbar/NotebookBarPopupMenu \
sfx2/source/notebookbar/NotebookbarToolBox \
sfx2/source/notebookbar/PriorityHBox \
sfx2/source/notebookbar/SfxNotebookBar \
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index dbb4a7b9d360..93e5c778d8f2 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1941,7 +1941,7 @@ void SfxDispatcher::ExecutePopup( vcl::Window *pWin, const Point *pPos )
}
}
-void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window *pWin, const Point* pPos )
+void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window* pWin, const Point* pPos, PopupMenuFlags nFlags )
{
css::uno::Sequence< css::uno::Any > aArgs( 3 );
aArgs[0] <<= comphelper::makePropertyValue( "Value", rResName );
@@ -1986,7 +1986,7 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window *pWin, c
OUString aMenuURL = "private:resource/popupmenu/" + rResName;
if (pVCLMenu && GetFrame()->GetViewShell()->TryContextMenuInterception(*pVCLMenu, aMenuURL, aEvent))
{
- pVCLMenu->Execute(pWindow, aPos);
+ pVCLMenu->Execute(pWindow, Rectangle(aPos, aPos), nFlags);
}
}
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index 1c77c86e6ec6..60128b6c3884 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -126,59 +126,4 @@ String STR_PREVIEW_CHECKBOX
Text [ en-US ] = "Show Previews";
};
-Menu RID_MENU_NOTEBOOKBAR
-{
- ItemList =
- {
- MenuItem
- {
- Identifier = SID_OPENDOC;
- Command = ".uno:Open";
- Text [ en-US ] = "Open..." ;
- };
- MenuItem
- {
- Identifier = SID_SAVEDOC;
- Command = ".uno:Save";
- Text [ en-US ] = "Save" ;
- };
- MenuItem
- {
- Identifier = SID_UNDO;
- Command = ".uno:Undo";
- Text [ en-US ] = "Undo" ;
- };
- MenuItem
- {
- Identifier = SID_REDO;
- Command = ".uno:Redo";
- Text [ en-US ] = "Redo" ;
- };
- MenuItem
- {
- Identifier = SID_PRINTDOC;
- Command = ".uno:Print";
- Text [ en-US ] = "Print" ;
- };
- MenuItem
- {
- Identifier = SID_MENUBAR;
- Command = ".uno:Menubar";
- Text [ en-US ] = "Menubar" ;
- };
- MenuItem
- {
- Identifier = SID_OPTIONS;
- Command = ".uno:OptionsTreeDialog";
- Text [ en-US ] = "Options" ;
- };
- MenuItem
- {
- Identifier = SID_CLOSEDOC;
- Command = ".uno:CloseDoc";
- Text [ en-US ] = "Close" ;
- };
- };
-};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/inc/sfxlocal.hrc b/sfx2/source/inc/sfxlocal.hrc
index ea9f8354f18a..f1fa47483d98 100644
--- a/sfx2/source/inc/sfxlocal.hrc
+++ b/sfx2/source/inc/sfxlocal.hrc
@@ -43,8 +43,6 @@
#define SFX_IMG_PROPERTY_REMOVE (RID_SFX_SFXLOCAL_START + 0)
#define SFX_IMG_CLOSE_DOC (RID_SFX_SFXLOCAL_START + 2)
-#define RID_MENU_NOTEBOOKBAR (RID_SFX_SFXLOCAL_START + 10)
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/notebookbar/NotebookBarPopupMenu.cxx b/sfx2/source/notebookbar/NotebookBarPopupMenu.cxx
deleted file mode 100644
index 9d36d015fe18..000000000000
--- a/sfx2/source/notebookbar/NotebookBarPopupMenu.cxx
+++ /dev/null
@@ -1,96 +0,0 @@
-/* -*- 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/.
- */
-
-#include <sfx2/dispatch.hxx>
-#include <vcl/notebookbar.hxx>
-#include <vcl/menu.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/util/URLTransformer.hpp>
-#include <sfxlocal.hrc>
-#include <sfx2/sfxresid.hxx>
-#include "NotebookBarPopupMenu.hxx"
-#include <vcl/tabctrl.hxx>
-#include <sfx2/notebookbar/SfxNotebookBar.hxx>
-
-using namespace sfx2;
-using namespace css::uno;
-using namespace css::ui;
-
-NotebookBarPopupMenu::NotebookBarPopupMenu()
- : PopupMenu(SfxResId(RID_MENU_NOTEBOOKBAR))
-{
- if (SfxViewFrame::Current())
- {
- SfxDispatcher* pDispatcher = SfxViewFrame::Current()->GetBindings().GetDispatcher();
- if (pDispatcher)
- {
- for (int i = 0; i < GetItemCount(); ++i)
- {
- const SfxPoolItem* pItem;
- SfxItemState eState = pDispatcher->QueryState(GetItemId(i), pItem);
- if (eState == SfxItemState::DISABLED)
- this->EnableItem(GetItemId(i), false);
- else
- this->EnableItem(GetItemId(i));
- }
- }
- }
- else
- {
- HideItem(SID_UNDO);
- HideItem(SID_REDO);
- HideItem(SID_PRINTDOC);
- HideItem(SID_SAVEDOC);
- }
- EnableItem(SID_OPTIONS);
-}
-
-void NotebookBarPopupMenu::Execute(NotebookBar* pNotebookbar,
- const Reference<css::frame::XFrame>& xFrame)
-{
- if (pNotebookbar)
- {
- sal_uInt16 nTop = NotebookbarTabControl::GetHeaderHeight();
- sal_uInt16 nSelected = PopupMenu::Execute(pNotebookbar,
- Rectangle(0, nTop, 0, nTop),
- PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose);
-
- if (nSelected)
- {
- OUString aCommandURL = GetItemCommand(nSelected);
- css::util::URL aUrl;
- aUrl.Complete = aCommandURL;
-
- Reference<css::util::XURLTransformer> xURLTransformer(
- css::util::URLTransformer::create(comphelper::getProcessComponentContext()));
- if (xURLTransformer.is())
- xURLTransformer->parseStrict(aUrl);
-
- if (xFrame.is())
- {
- css::uno::Reference<css::frame::XDispatch> xDispatch;
- css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(xFrame, UNO_QUERY);
-
- if (xDispatchProvider.is())
- {
- xDispatch = xDispatchProvider->queryDispatch(aUrl, OUString(), 0);
- }
- if (xDispatch.is())
- {
- Sequence<com::sun::star::beans::PropertyValue> aArgs;
- xDispatch->dispatch(aUrl, aArgs);
- }
- }
- else
- SAL_WARN("sfx", "Can't create XDispatchProvider");
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/notebookbar/NotebookBarPopupMenu.hxx b/sfx2/source/notebookbar/NotebookBarPopupMenu.hxx
deleted file mode 100644
index 0d06a6e788d6..000000000000
--- a/sfx2/source/notebookbar/NotebookBarPopupMenu.hxx
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- 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/.
- */
-
-#include <vcl/notebookbar.hxx>
-#include <vcl/menu.hxx>
-#include <sfxlocal.hrc>
-#include <sfx2/sfxresid.hxx>
-
-class NotebookBarPopupMenu : public PopupMenu
-{
-public:
- explicit NotebookBarPopupMenu();
- void Execute(NotebookBar* pNotebookbar,
- const css::uno::Reference<css::frame::XFrame>& xFrame);
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 8adf1c0c3493..203c0f93f729 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -13,14 +13,13 @@
#include <unotools/viewoptions.hxx>
#include <vcl/notebookbar.hxx>
#include <vcl/syswin.hxx>
-#include <vcl/menu.hxx>
+#include <vcl/tabctrl.hxx>
#include <sfx2/viewfrm.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
#include <com/sun/star/ui/XContextChangeEventMultiplexer.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
-#include "NotebookBarPopupMenu.hxx"
#include <officecfg/Office/UI/Notebookbar.hxx>
#include <com/sun/star/frame/XModuleManager.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
@@ -336,15 +335,13 @@ void SfxNotebookBar::RemoveListeners(SystemWindow* pSysWindow)
IMPL_STATIC_LINK(SfxNotebookBar, OpenNotebookbarPopupMenu, NotebookBar*, pNotebookbar, void)
{
- if (pNotebookbar)
+ SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : nullptr;
+ if (pNotebookbar && pDispatcher)
{
- ScopedVclPtrInstance<NotebookBarPopupMenu> pMenu;
- if (SfxViewFrame::Current())
- {
- const Reference<frame::XFrame>& xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
- if (xFrame.is())
- pMenu->Execute(pNotebookbar, xFrame);
- }
+ Point aPos(0, NotebookbarTabControl::GetHeaderHeight());
+ pDispatcher->ExecutePopup("notebookbar", pNotebookbar, &aPos,
+ PopupMenuFlags::ExecuteDown|PopupMenuFlags::NoMouseUpClose);
}
}
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 2ff017fe3b6a..532f0ba409cb 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/swriter,\
sw/uiconfig/swriter/popupmenu/graphic \
sw/uiconfig/swriter/popupmenu/insertfield \
sw/uiconfig/swriter/popupmenu/media \
+ sw/uiconfig/swriter/popupmenu/notebookbar \
sw/uiconfig/swriter/popupmenu/oleobject \
sw/uiconfig/swriter/popupmenu/preview \
sw/uiconfig/swriter/popupmenu/table \
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 494068ac9968..4de6cbba33d0 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -7408,6 +7408,7 @@ SfxVoidItem OpenFromWriter FN_OPEN_FILE
Container = FALSE,
RecordAbsolute = FALSE,
RecordPerSet;
+ Asynchron;
SlotType = SfxStringItem
diff --git a/sw/uiconfig/swriter/popupmenu/notebookbar.xml b/sw/uiconfig/swriter/popupmenu/notebookbar.xml
new file mode 100644
index 000000000000..d37082e53a14
--- /dev/null
+++ b/sw/uiconfig/swriter/popupmenu/notebookbar.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu">
+ <menu:menuitem menu:id=".uno:OpenFromWriter"/>
+ <menu:menuitem menu:id=".uno:Save"/>
+ <menu:menuitem menu:id=".uno:Undo"/>
+ <menu:menuitem menu:id=".uno:Redo"/>
+ <menu:menuitem menu:id=".uno:Print"/>
+ <menu:menuitem menu:id=".uno:Menubar"/>
+ <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
+ <menu:menuitem menu:id=".uno:CloseDoc"/>
+</menu:menupopup>