[Libreoffice-commits] .: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Sep 10 06:42:26 PDT 2012
sw/source/ui/docvw/edtwin.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 7eebbf5c642f548c635910262c86c5b2d00c5de1
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Mon Sep 10 15:38:07 2012 +0200
n#778148 SwEditWin::UpdatePointer: fix mouse pointer wrt. hyperlinks
This moves up the check introduced in commit
1223dd3bc84899d8f77c46340c46565ca74cbe1b, so that not only images are
handled, but also hyperlinks. With checking early, bCntAtPos is set to
True, then hyperlinks are handled properly.
Change-Id: I2dad38867c492d07ef0a1ce17824c114faa5decb
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 83b3e07..1188c61 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -492,10 +492,12 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
}
else
{
+ // Background images don't count.
+ SdrObject* pSelectableObj = rSh.GetObjAt(rLPt);
// dvo: IsObjSelectable() eventually calls SdrView::PickObj, so
// apparently this is used to determine whether this is a
// drawling layer object or not.
- if ( rSh.IsObjSelectable( rLPt ) )
+ if ( rSh.IsObjSelectable( rLPt ) && pSelectableObj->GetLayer() != rSh.GetDoc()->GetHellId())
{
if (pSdrView->IsTextEdit())
{
@@ -523,10 +525,7 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
(rSh.IsObjSelected() || rSh.IsFrmSelected()) &&
(!rSh.IsSelObjProtected(FLYPROTECT_POS));
- SdrObject* pSelectableObj = rSh.GetObjAt(rLPt);
- // Don't update pointer if this is a background image only.
- if (pSelectableObj->GetLayer() != rSh.GetDoc()->GetHellId())
- eStyle = bMovable ? POINTER_MOVE : POINTER_ARROW;
+ eStyle = bMovable ? POINTER_MOVE : POINTER_ARROW;
aActHitType = SDRHIT_OBJECT;
}
}
More information about the Libreoffice-commits
mailing list