diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-14 14:05:53 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-14 14:36:09 +0000 |
commit | 01ef12d173fb2c54a49186c8eb4fa40288b82945 (patch) | |
tree | 83c5266da0d4b14b2ccc23e21b3f973c6b7f7523 /sw/source | |
parent | e0ae7c786b8e1a2422c8c28ca3a2a35d93e018d1 (diff) |
Related: rhbz#1289394 always provide the screen area the tip applies to
this will make it easier to implement native help tips
Change-Id: I984dfadaf02e9b7bf542ba82cf070911c89cb699
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/draw/dpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin2.cxx | 17 |
2 files changed, 12 insertions, 11 deletions
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx index f8ad9f6253cf..c8773e8c7192 100644 --- a/sw/source/core/draw/dpage.cxx +++ b/sw/source/core/draw/dpage.cxx @@ -237,14 +237,14 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, sText = SwViewShell::GetShellRes()->aLinkClick + ": " + sText; } + // then display the help: + Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) ); if( rEvt.GetMode() & HelpEventMode::BALLOON ) { - Help::ShowBalloon( pWindow, rEvt.GetMousePosPixel(), sText ); + Help::ShowBalloon( pWindow, rEvt.GetMousePosPixel(), aRect, sText ); } else { - // then display the help: - Rectangle aRect( rEvt.GetMousePosPixel(), Size(1,1) ); Help::ShowQuickHelp( pWindow, aRect, sText ); } bContinue = false; diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index ba05744a930f..a15a681cbc03 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -364,18 +364,19 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) } if (!sText.isEmpty()) { + Rectangle aRect( aFieldRect.SVRect() ); + Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() ))); + aRect.Left() = aPt.X(); + aRect.Top() = aPt.Y(); + aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() )); + aRect.Right() = aPt.X(); + aRect.Bottom() = aPt.Y(); + if( bBalloon ) - Help::ShowBalloon( this, rEvt.GetMousePosPixel(), sText ); + Help::ShowBalloon( this, rEvt.GetMousePosPixel(), aRect, sText ); else { // the show the help - Rectangle aRect( aFieldRect.SVRect() ); - Point aPt( OutputToScreenPixel( LogicToPixel( aRect.TopLeft() ))); - aRect.Left() = aPt.X(); - aRect.Top() = aPt.Y(); - aPt = OutputToScreenPixel( LogicToPixel( aRect.BottomRight() )); - aRect.Right() = aPt.X(); - aRect.Bottom() = aPt.Y(); OUString sDisplayText(ClipLongToolTip(sText)); Help::ShowQuickHelp(this, aRect, sDisplayText, nStyle); } |