summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/gridwin5.cxx2
-rw-r--r--sw/source/core/draw/dpage.cxx13
2 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 198543e5ffcb..b940ffe200b1 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -326,7 +326,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( !aHelpText.isEmpty() )
{
tools::Rectangle aScreenRect(OutputToScreenPixel(aPixRect.TopLeft()),
- OutputToScreenPixel(aPixRect.BottomRight()));
+ OutputToScreenPixel(aPixRect.BottomRight()));
if ( rHEvt.GetMode() & HelpEventMode::BALLOON )
Help::ShowBalloon(this,rHEvt.GetMousePosPixel(), aScreenRect, aHelpText);
diff --git a/sw/source/core/draw/dpage.cxx b/sw/source/core/draw/dpage.cxx
index 36d887aa6cbf..b5f1698eebfe 100644
--- a/sw/source/core/draw/dpage.cxx
+++ b/sw/source/core/draw/dpage.cxx
@@ -166,9 +166,13 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView,
SdrObject* pObj = pView->PickObj(aPos, 0, pPV, SdrSearchOptions::PICKMACRO);
SwVirtFlyDrawObj* pDrawObj = dynamic_cast<SwVirtFlyDrawObj*>(pObj);
OUString sText;
+ tools::Rectangle aPixRect;
if (pDrawObj)
{
SwFlyFrame *pFly = pDrawObj->GetFlyFrame();
+
+ aPixRect = pWindow->LogicToPixel(pFly->getFrameArea().SVRect());
+
const SwFormatURL &rURL = pFly->GetFormat()->GetURL();
if( rURL.GetMap() )
{
@@ -211,6 +215,7 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView,
if (aVEvt.eEvent == SdrEventKind::ExecuteUrl)
{
sText = aVEvt.pURLField->GetURL();
+ aPixRect = pWindow->LogicToPixel(aVEvt.pObj->GetLogicRect());
}
}
@@ -222,11 +227,13 @@ bool SwDPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView,
sText = SfxHelp::GetURLHelpText(sText);
// then display the help:
- tools::Rectangle aRect(rEvt.GetMousePosPixel(), Size(1, 1));
+ tools::Rectangle aScreenRect(pWindow->OutputToScreenPixel(aPixRect.TopLeft()),
+ pWindow->OutputToScreenPixel(aPixRect.BottomRight()));
+
if (rEvt.GetMode() & HelpEventMode::BALLOON)
- Help::ShowBalloon(pWindow, rEvt.GetMousePosPixel(), aRect, sText);
+ Help::ShowBalloon(pWindow, rEvt.GetMousePosPixel(), aScreenRect, sText);
else
- Help::ShowQuickHelp(pWindow, aRect, sText);
+ Help::ShowQuickHelp(pWindow, aScreenRect, sText);
bContinue = false;
}
}