diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-09-10 15:38:07 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-10 15:41:58 +0200 |
commit | 7eebbf5c642f548c635910262c86c5b2d00c5de1 (patch) | |
tree | d6579b2060ee9f2683a2af466731904d1c29c2b0 | |
parent | b410acd1369609107eb3d99db767d7e779c393ce (diff) |
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
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 83b3e072b114..1188c61d2639 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; } } |