summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-07-26 12:35:11 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2020-07-28 00:44:46 +0200
commit2446fdba3ec4a81d6e3b619a1d9e91b3c6dcbd54 (patch)
treecd669f0646152ad90756bc06e31fc6eb5d9e9a4b /include
parenta10e3987e61b7fcc1a3f7ce3f34fe75a51bff87e (diff)
tdf#134887 Rework last item handling in NewToolbarController
Just store the last used menu id, and consistently get all the information (command name, image id, target frame etc.) from the menu instance. Also implement the XSubToolbarController interface, so we get a chance to update the image on icon size or theme change. The initial action and icon of the button are based on the url passed by the .uno:AddDirect status update, given that there is a corresponding menu item. The only defined fallback now is to .uno:AddDirect itself for both executing and getting the icon, but this shouldn't happen normally, as I fixed all the affected cases I found so far, namely Base (including windows like table design etc.) and the Basic IDE. Actually these cases were partially broken anyway, and as a result now completely fixed: - In Base main app window, the button used to default to a new Writer document, although its tooltip advertises Ctrl+N as the kb shortcut, and pressing that shortcut actually opens the database creation wizard (as expected). - In the Basic IDE, the button was working, but not the Ctrl+N shortcut. Change-Id: I6537b3f38e7d7001ec1b39d78285445464fd8cbe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99514 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/app.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index f08855ee8d18..481dc9dd5650 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -188,6 +188,7 @@ public:
// Slot Methods
// TODO/CLEANUP: still needed?
SAL_DLLPRIVATE void NewDocDirectExec_Impl(SfxRequest &);
+ SAL_DLLPRIVATE static void NewDocDirectState_Impl(SfxItemSet &);
SAL_DLLPRIVATE void NewDocExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void OpenDocExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void OpenRemoteExec_Impl(SfxRequest &);