diff options
author | Christian Lippka <cl@openoffice.org> | 2009-10-23 13:35:52 +0000 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2009-10-23 13:35:52 +0000 |
commit | f00b397c4b5393a5ce352fee8a4a528dc637e0ad (patch) | |
tree | b031cbdebf64a970615db5283b0f873102e2c108 /sd/source/ui/func | |
parent | a7d2dd5d5dcfa2056b82856a0b5a42758000a689 (diff) |
#i88371# allow format paintbrush to format empty presentation object
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r-- | sd/source/ui/func/fuformatpaintbrush.cxx | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx index 4333429e9356..457248201813 100644 --- a/sd/source/ui/func/fuformatpaintbrush.cxx +++ b/sd/source/ui/func/fuformatpaintbrush.cxx @@ -111,7 +111,6 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) { if(mpView&&mpWindow) { - BOOL bTextEdit = FALSE; SdrViewEvent aVEvt; SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt); @@ -147,23 +146,19 @@ BOOL FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt) MouseEvent aMEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(), 0 ); return FuText::MouseButtonDown(aMEvt); } - else - { - unmarkimpl( mpView ); - } + if( aVEvt.pObj == 0 ) + aVEvt.pObj = pPickObj; } - else - { - unmarkimpl( mpView ); - if( aVEvt.pObj && !aVEvt.pObj->IsEmptyPresObj() ) - { - USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); - BOOL bToggle = FALSE; - mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); - return TRUE; - } + unmarkimpl( mpView ); + + if( aVEvt.pObj ) + { + USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); + BOOL bToggle = FALSE; + mpView->MarkObj(mpWindow->PixelToLogic( rMEvt.GetPosPixel() ), nHitLog, bToggle, FALSE); + return TRUE; } } return FALSE; @@ -186,7 +181,7 @@ BOOL FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt) SdrPageView* pPV=0; BOOL bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SDRSEARCH_PICKMARKABLE); - if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) && !pObj->IsEmptyPresObj() ) + if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) ) mpWindow->SetPointer(Pointer(POINTER_FILL)); else mpWindow->SetPointer(Pointer(POINTER_ARROW)); |