summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-09-04 02:55:34 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2016-09-04 11:47:57 +0300
commit0c3a9aa403c209e522dc5c32258c33381677c91e (patch)
tree51b3d2880efd9aeaa3b1ad4c9c9535fc58e075c4
parent331d3a8b23cdbff0e1434aa5a553efdcc2c7c822 (diff)
tdf#101779 Multiline tooltips in template manager
This time just set a flag to use Balloon style, instead of forcing extended tips. Change-Id: I170bbe4b1bb95aeb9fde00cbecc2bb46c9078e9d
-rw-r--r--include/sfx2/templatelocalview.hxx2
-rw-r--r--sfx2/source/control/templatelocalview.cxx14
2 files changed, 16 insertions, 0 deletions
diff --git a/include/sfx2/templatelocalview.hxx b/include/sfx2/templatelocalview.hxx
index f139b2608ac4..e83e71cbfa6c 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -139,6 +139,8 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
+ virtual void RequestHelp( const HelpEvent& rHEvt ) override;
+
virtual void Command( const CommandEvent& rCEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx
index ca0b3897e489..331c22293d29 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -22,6 +22,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/moduleoptions.hxx>
#include <vcl/builderfactory.hxx>
+#include <vcl/help.hxx>
#include <vcl/pngread.hxx>
#include <vcl/layout.hxx>
@@ -882,6 +883,19 @@ void TemplateLocalView::MouseButtonDown( const MouseEvent& rMEvt )
ThumbnailView::MouseButtonDown(rMEvt);
}
+void TemplateLocalView::RequestHelp( const HelpEvent& rHEvt )
+{
+ if ( rHEvt.GetMode() & HelpEventMode::QUICK )
+ {
+ Rectangle aRect( OutputToScreenPixel( GetPosPixel() ), GetSizePixel() );
+ Help::ShowQuickHelp( this, aRect, GetQuickHelpText(),
+ QuickHelpFlags::CtrlText | QuickHelpFlags::TipStyleBalloon );
+ return;
+ }
+
+ ThumbnailView::RequestHelp( rHEvt );
+}
+
void TemplateLocalView::Command( const CommandEvent& rCEvt )
{
if ( rCEvt.GetCommand() == CommandEventId::ContextMenu )