summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-30 16:44:56 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-09-28 14:50:55 +0200
commit4da461814f158a6ec150700474a191adbce21e9a (patch)
tree8c3104e582fc51f68e8cc131d8e37a330a40299d /sw/source
parentce3063ae2eba1fa283677b4889024bc265d63dd9 (diff)
n#777337 SwEditWin::UpdatePointer: fix mouse pointer wrt. background images
When the image is in the background, just show the normal text cursor, since we're able to select text as well in that situation. Change-Id: I4b4303834245e402d40567cff4a2bf53a0a13e5e (cherry picked from commit 1223dd3bc84899d8f77c46340c46565ca74cbe1b)
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/frmedt/feshview.cxx17
-rw-r--r--sw/source/ui/docvw/edtwin.cxx5
2 files changed, 21 insertions, 1 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index be852a900e1b..ccd1d00d75b1 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1113,6 +1113,23 @@ bool SwFEShell::IsObjSelectable( const Point& rPt )
return bRet;
}
+SdrObject* SwFEShell::GetObjAt( const Point& rPt )
+{
+ SdrObject* pRet = 0;
+ SET_CURR_SHELL(this);
+ SwDrawView *pDView = Imp()->GetDrawView();
+ if( pDView )
+ {
+ SdrPageView* pPV;
+ sal_uInt16 nOld = pDView->GetHitTolerancePixel();
+ pDView->SetHitTolerancePixel( pDView->GetMarkHdlSizePixel()/2 );
+
+ pDView->PickObj( rPt, pDView->getHitTolLog(), pRet, pPV, SDRSEARCH_PICKMARKABLE );
+ pDView->SetHitTolerancePixel( nOld );
+ }
+ return pRet;
+}
+
// Test if there is a object at that position and if it should be selected.
sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
{
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index dd58e446730d..3d0d382dfe5b 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -513,7 +513,10 @@ void SwEditWin::UpdatePointer(const Point &rLPt, sal_uInt16 nModifier )
(rSh.IsObjSelected() || rSh.IsFrmSelected()) &&
(!rSh.IsSelObjProtected(FLYPROTECT_POS));
- eStyle = bMovable ? POINTER_MOVE : POINTER_ARROW;
+ 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;
aActHitType = SDRHIT_OBJECT;
}
}