include/sfx2/sidebar/ControllerItem.hxx | 5 ++++ sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 1 sfx2/source/sidebar/ControllerItem.cxx | 19 ++++++++++++++++ 3 files changed, 25 insertions(+)
New commits: commit a1929fb6282e33770bced4c6a1cd9e0760947f9f Author: Andre Fischer <a...@apache.org> Date: Mon Jun 3 12:33:38 2013 +0000 Resolves: #i122433# The sidebar ControllerItem can now... give access to the extended help text for commands (cherry picked from commit 3f483a9219b9135f9f854d62b4ad0512d3752660) Conflicts: sfx2/inc/sfx2/sidebar/ControllerItem.hxx Change-Id: I22668e6f9c1c7aed174a43d7d3e04829dc6733ae Related: #i122433# fix build breaker invalid use of incomplete type 'struct Help' (cherry picked from commit 797e399967ffb1c28b8c32d328f5f57d79a8caf3) Change-Id: Ifde6fede9b91eb828c665a5a720b93171108e17b (cherry picked from commit 3b55196fb07c9101f0f0f51895a8083cbf5e78fc) diff --git a/include/sfx2/sidebar/ControllerItem.hxx b/include/sfx2/sidebar/ControllerItem.hxx index 61d21ba..70b4c3d 100644 --- a/include/sfx2/sidebar/ControllerItem.hxx +++ b/include/sfx2/sidebar/ControllerItem.hxx @@ -100,6 +100,11 @@ public: */ ::rtl::OUString GetLabel (void) const; + /** Return the extended help text for the command. + Returns an empty string when the UNO command name is not available. + */ + ::rtl::OUString GetHelpText (void) const; + /** Return the icon for the command. */ Image GetIcon (void) const; diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index 5abc109..eb22a18 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -25,6 +25,7 @@ #include "sfx2/sidebar/CommandInfoProvider.hxx" #include <vcl/svapp.hxx> #include <vcl/toolbox.hxx> +#include <vcl/help.hxx> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrameActionListener.hpp> @@ -202,6 +203,23 @@ void ControllerItem::ResetFrame (void) +::rtl::OUString ControllerItem::GetHelpText (void) const +{ + Help* pHelp = Application::GetHelp(); + if (pHelp != NULL) + { + if (msCommandName.getLength() > 0) + { + const ::rtl::OUString sHelp (pHelp->GetHelpText(A2S(".uno:")+msCommandName, NULL)); + return sHelp; + } + } + return ::rtl::OUString(); +} + + + + Image ControllerItem::GetIcon (void) const { return GetImage(mxFrame, A2S(".uno:")+msCommandName, sal_False); @@ -218,6 +236,7 @@ ControllerItem::ItemUpdateReceiverInterface::~ItemUpdateReceiverInterface() void ControllerItem::SetupToolBoxItem (ToolBox& rToolBox, const sal_uInt16 nIndex) { rToolBox.SetQuickHelpText(nIndex, GetLabel()); + rToolBox.SetHelpText(nIndex, GetHelpText()); rToolBox.SetItemImage(nIndex, GetIcon()); } commit ebacea41751ed59b53a76aec70dddfd2d88aae84 Author: Andre Fischer <a...@apache.org> Date: Mon Jun 3 10:38:19 2013 +0000 Resolves: #i122437# Fixed context notification for Draw documents (cherry picked from commit 88914c616747693083819ec44ea81c9d96fa5136) Change-Id: I6d5c7365cfe51ba7c6ce57f589264aac8b066742 (cherry picked from commit b269b4ee7c44ec33e63838412bdf4d2a0e1b4887) diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index e9c627f..b32b4a2 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -567,6 +567,7 @@ void SlideSorterViewShell::Activate (sal_Bool bIsMDIActivate) case ViewShell::ST_IMPRESS: case ViewShell::ST_SLIDE_SORTER: case ViewShell::ST_NOTES: + case ViewShell::ST_DRAW: eContext = EnumContext::Context_DrawPage; if (pMainViewShell->ISA(DrawViewShell)) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits