summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-09-28 11:10:36 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-09-28 11:10:36 +0000
commit3da17f9e3e6c9aeb7f2ffd7f31f8345ab861d7a6 (patch)
tree646448919b7cf6b86a98bfc77bdc1bac7bccdd66
parentca13c622acbe9f6726c67295727901b25a07dc55 (diff)
INTEGRATION: CWS dr37 (1.14.36); FILE MERGED
2005/05/12 15:20:19 dr 1.14.36.1: #i42981# do not close new note object when clicked on its border
-rw-r--r--sc/source/ui/drawfunc/fudraw.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 7ab597bd3dfe..310b4e6db25c 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: fudraw.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 20:56:32 $
+ * last change: $Author: hr $ $Date: 2005-09-28 12:10:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -178,7 +178,7 @@ BOOL __EXPORT FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
SetMouseButtonCode(rMEvt.GetButtons());
DoModifiers( rMEvt );
- if(!IsReSizingNote( rMEvt ))
+ if( !IsSizingOrMovingNote( rMEvt ) )
CheckVisibleNote();
return FALSE;
}
@@ -898,24 +898,25 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
}
}
-BOOL FuDraw::IsReSizingNote( const MouseEvent& rMEvt) const
+BOOL FuDraw::IsSizingOrMovingNote( const MouseEvent& rMEvt ) const
{
- BOOL bReSizingNote = FALSE;
- const SdrMarkList& rNoteMarkList = pView->GetMarkedObjectList();
- if(rNoteMarkList.GetMarkCount() == 1)
+ BOOL bIsSizingOrMoving = FALSE;
+ if ( rMEvt.IsLeft() )
{
- SdrObject* pObj = rNoteMarkList.GetMark( 0 )->GetObj();
- if ( pObj && pObj->GetLayer() == SC_LAYER_INTERN && pObj->ISA(SdrCaptionObj) )
+ const SdrMarkList& rNoteMarkList = pView->GetMarkedObjectList();
+ if(rNoteMarkList.GetMarkCount() == 1)
{
- if ( rMEvt.IsLeft() )
+ SdrObject* pObj = rNoteMarkList.GetMark( 0 )->GetObj();
+ if ( pObj && pObj->GetLayer() == SC_LAYER_INTERN && pObj->ISA(SdrCaptionObj) )
{
Point aMPos = pWindow->PixelToLogic( rMEvt.GetPosPixel() );
- if(SdrHdl* pHdl = pView->HitHandle(aMPos, *pWindow))
- bReSizingNote= TRUE;
+ bIsSizingOrMoving =
+ pView->HitHandle( aMPos, *pWindow ) || // handles to resize the note
+ pView->IsTextEditFrameHit( aMPos ); // frame for moving the note
}
}
}
- return bReSizingNote;
+ return bIsSizingOrMoving;
}
// we can arrive here if a Note set to 'not shown' has changed its