diff options
Diffstat (limited to 'sw/source/ui/docvw/edtdd.cxx')
-rw-r--r-- | sw/source/ui/docvw/edtdd.cxx | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/sw/source/ui/docvw/edtdd.cxx b/sw/source/ui/docvw/edtdd.cxx index 8e11e5117c27..501394255fde 100644 --- a/sw/source/ui/docvw/edtdd.cxx +++ b/sw/source/ui/docvw/edtdd.cxx @@ -63,27 +63,27 @@ using namespace ::com::sun::star; // no include "dbgoutsw.hxx" here!!!!!! -extern BOOL bNoInterrupt; -extern BOOL bFrmDrag; -extern BOOL bDDTimerStarted; +extern sal_Bool bNoInterrupt; +extern sal_Bool bFrmDrag; +extern sal_Bool bDDTimerStarted; -BOOL bExecuteDrag = FALSE; +sal_Bool bExecuteDrag = sal_False; void SwEditWin::StartDDTimer() { aTimer.SetTimeoutHdl(LINK(this, SwEditWin, DDHandler)); aTimer.SetTimeout(480); aTimer.Start(); - bDDTimerStarted = TRUE; + bDDTimerStarted = sal_True; } void SwEditWin::StopDDTimer(SwWrtShell *pSh, const Point &rPt) { aTimer.Stop(); - bDDTimerStarted = FALSE; + bDDTimerStarted = sal_False; if(!pSh->IsSelFrmMode()) - (pSh->*pSh->fnSetCrsr)(&rPt,FALSE); + (pSh->*pSh->fnSetCrsr)(&rPt,sal_False); aTimer.SetTimeoutHdl(LINK(this,SwEditWin, TimerHandler)); } @@ -92,37 +92,37 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) SwWrtShell &rSh = rView.GetWrtShell(); if( rSh.GetDrawView() ) { - CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, TRUE ); + CommandEvent aDragEvent( rPosPixel, COMMAND_STARTDRAG, sal_True ); if( rSh.GetDrawView()->Command( aDragEvent, this ) ) { - rView.GetViewFrame()->GetBindings().InvalidateAll(FALSE); + rView.GetViewFrame()->GetBindings().InvalidateAll(sal_False); return; // Event von der SdrView ausgewertet } } if ( !pApplyTempl && !rSh.IsDrawCreate() && !IsDrawAction()) { - BOOL bStart = FALSE, bDelSelect = FALSE; + sal_Bool bStart = sal_False, bDelSelect = sal_False; SdrObject *pObj = NULL; Point aDocPos( PixelToLogic( rPosPixel ) ); - if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, TRUE, TRUE)) + if ( !rSh.IsInSelect() && rSh.ChgCurrPam( aDocPos, sal_True, sal_True)) //Wir sind nicht beim Selektieren und stehen auf einer //Selektion - bStart = TRUE; + bStart = sal_True; else if ( !bFrmDrag && rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( aDocPos ) ) { //Wir sind nicht am internen Draggen und stehen auf //einem Objekt (Rahmen, Zeichenobjekt) - bStart = TRUE; + bStart = sal_True; } else if( !bFrmDrag && rView.GetDocShell()->IsReadOnly() && OBJCNT_NONE != rSh.GetObjCntType( aDocPos, pObj )) { rSh.LockPaint(); if( rSh.SelectObj( aDocPos, 0, pObj )) - bStart = bDelSelect = TRUE; + bStart = bDelSelect = sal_True; else rSh.UnlockPaint(); } @@ -131,15 +131,15 @@ void SwEditWin::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) SwContentAtPos aSwContentAtPos( SwContentAtPos::SW_INETATTR ); bStart = rSh.GetContentAtPos( aDocPos, aSwContentAtPos, - FALSE ); + sal_False ); } if ( bStart && !bIsInDrag ) { - bMBPressed = FALSE; + bMBPressed = sal_False; ReleaseMouse(); - bFrmDrag = FALSE; - bExecuteDrag = TRUE; + bFrmDrag = sal_False; + bExecuteDrag = sal_True; SwEditWin::nDDStartPosY = aDocPos.Y(); SwEditWin::nDDStartPosX = aDocPos.X(); aMovePos = aDocPos; @@ -158,7 +158,7 @@ void SwEditWin::StartExecuteDrag() if( !bExecuteDrag || bIsInDrag ) return; - bIsInDrag = TRUE; + bIsInDrag = sal_True; SwTransferable* pTransfer = new SwTransferable( rView.GetWrtShell() ); uno::Reference< @@ -171,7 +171,7 @@ void SwEditWin::DragFinished() { DropCleanup(); aTimer.SetTimeoutHdl( LINK(this,SwEditWin, TimerHandler) ); - bIsInDrag = FALSE; + bIsInDrag = sal_False; } @@ -180,11 +180,11 @@ void SwEditWin::DropCleanup() SwWrtShell &rSh = rView.GetWrtShell(); // Stati zuruecksetzen - bNoInterrupt = FALSE; + bNoInterrupt = sal_False; if ( bOldIdleSet ) { ((SwViewOption*)rSh.GetViewOptions())->SetIdle( bOldIdle ); - bOldIdleSet = FALSE; + bOldIdleSet = sal_False; } if ( pUserMarker ) CleanupDropUserMarker(); @@ -246,7 +246,7 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) // (according to KA due to Java D&D), we'll have to // reevaluate the drop action once more _with_ the // Transferable. - USHORT nEventAction; + sal_uInt16 nEventAction; sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT : rEvt.mnAction; m_nDropAction = SotExchange::GetExchangeAction( @@ -261,18 +261,18 @@ sal_Int8 SwEditWin::ExecuteDrop( const ExecuteDropEvent& rEvt ) TransferableDataHelper aData( rEvt.maDropEvent.Transferable ); nRet = rEvt.mnAction; if( !SwTransferable::PasteData( aData, rSh, m_nDropAction, m_nDropFormat, - m_nDropDestination, FALSE, rEvt.mbDefault, &aDocPt, nRet)) + m_nDropDestination, sal_False, rEvt.mbDefault, &aDocPt, nRet)) //!! nRet = SFX_APP()->ExecuteDrop( rEvt ); nRet = DND_ACTION_NONE; else if ( SW_MOD()->pDragDrop ) //Bei internem D&D nicht mehr aufraeumen! - SW_MOD()->pDragDrop->SetCleanUp( FALSE ); + SW_MOD()->pDragDrop->SetCleanUp( sal_False ); return nRet; } -USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) +sal_uInt16 SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) { SwWrtShell &rSh = rView.GetWrtShell(); const Point aDocPt( PixelToLogic( rPixPnt ) ); @@ -297,7 +297,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) } //Auf was wollen wir denn gerade droppen? - USHORT nDropDestination = 0; + sal_uInt16 nDropDestination = 0; //Sonst etwas aus der DrawingEngine getroffen? if( OBJCNT_NONE != eType ) @@ -306,7 +306,7 @@ USHORT SwEditWin::GetDropDestination( const Point& rPixPnt, SdrObject ** ppObj ) { case OBJCNT_GRF: { - BOOL bLink, + sal_Bool bLink, bIMap = 0 != rSh.GetFmtFromObj( aDocPt )->GetURL().GetMap(); String aDummy; rSh.GetGrfAtPos( aDocPt, aDummy, bLink ); @@ -372,14 +372,14 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) aWin.Right() -= nMargin; aWin.Bottom() -= nMargin; if(!aWin.IsInside(aPixPt)) { - static ULONG last_tick = 0; - ULONG current_tick = Time::GetSystemTicks(); + static sal_uLong last_tick = 0; + sal_uLong current_tick = Time::GetSystemTicks(); if((current_tick-last_tick) > 500) { last_tick = current_tick; if(!bOldIdleSet) { bOldIdle = rSh.GetViewOptions()->IsIdle(); - ((SwViewOption *)rSh.GetViewOptions())->SetIdle(FALSE); - bOldIdleSet = TRUE; + ((SwViewOption *)rSh.GetViewOptions())->SetIdle(sal_False); + bOldIdleSet = sal_True; } CleanupDropUserMarker(); if(aPixPt.X() > aWin.Right()) aPixPt.X() += nMargin; @@ -394,7 +394,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if(bOldIdleSet) { ((SwViewOption *)rSh.GetViewOptions())->SetIdle( bOldIdle ); - bOldIdleSet = FALSE; + bOldIdleSet = sal_False; } SdrObject *pObj = NULL; @@ -402,7 +402,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) if( !m_nDropDestination ) return DND_ACTION_NONE; - USHORT nEventAction; + sal_uInt16 nEventAction; sal_Int8 nUserOpt = rEvt.mbDefault ? EXCHG_IN_ACTION_DEFAULT : rEvt.mnAction; @@ -421,21 +421,21 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) SwModule *pMod = SW_MOD(); if( pMod->pDragDrop ) { - BOOL bCleanup = FALSE; + sal_Bool bCleanup = sal_False; //Zeichenobjekte in Kopf-/Fusszeilen sind nicht erlaubt SwWrtShell *pSrcSh = pMod->pDragDrop->GetShell(); if( (pSrcSh->GetSelFrmType() == FRMTYPE_DRAWOBJ) && pSrcSh->IsSelContainsControl() && - (rSh.GetFrmType( &aDocPt, FALSE ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) ) + (rSh.GetFrmType( &aDocPt, sal_False ) & (FRMTYPE_HEADER|FRMTYPE_FOOTER)) ) { - bCleanup = TRUE; + bCleanup = sal_True; } // keine positionsgeschuetzten Objecte verschieben! else if( DND_ACTION_MOVE == rEvt.mnAction && pSrcSh->IsSelObjProtected( FLYPROTECT_POS ) ) { - bCleanup = TRUE; + bCleanup = sal_True; } else if( rEvt.mbDefault ) { @@ -508,16 +508,16 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt ) IMPL_LINK( SwEditWin, DDHandler, Timer *, EMPTYARG ) { - bDDTimerStarted = FALSE; + bDDTimerStarted = sal_False; aTimer.Stop(); aTimer.SetTimeout(240); - bMBPressed = FALSE; + bMBPressed = sal_False; ReleaseMouse(); - bFrmDrag = FALSE; + bFrmDrag = sal_False; if ( rView.GetViewFrame() ) { - bExecuteDrag = TRUE; + bExecuteDrag = sal_True; StartExecuteDrag(); } return 0; |