diff options
author | Oliver Specht <os@openoffice.org> | 2002-05-28 13:26:00 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2002-05-28 13:26:00 +0000 |
commit | 2fad0d404fc5bfdf910f7d48c8a3afb2c3abcba0 (patch) | |
tree | b7126b7844ca9205ddcec4102201b8962e2999bf /sw/source/ui/docvw | |
parent | a0b60051016103f7218407a09013933a793c459a (diff) |
#98388# move of anchor implemented
Diffstat (limited to 'sw/source/ui/docvw')
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 8ea9e915d570..fcc339ddc4e1 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: edtwin.cxx,v $ * - * $Revision: 1.44 $ + * $Revision: 1.45 $ * - * last change: $Author: os $ $Date: 2002-05-24 08:01:26 $ + * last change: $Author: os $ $Date: 2002-05-28 14:26:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -951,6 +951,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) long nX = 0; long nY = 0; sal_Bool bOnePixel = sal_False; + USHORT nAnchorDir = SW_MOVE_UP; switch(nDir) { case MOVE_LEFT_SMALL: @@ -958,6 +959,7 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) //no break; case MOVE_LEFT_BIG: nX = -1; + nAnchorDir = SW_MOVE_LEFT; break; case MOVE_UP_SMALL: bOnePixel = sal_True; @@ -970,12 +972,14 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) //no break; case MOVE_RIGHT_BIG: nX = +1; + nAnchorDir = SW_MOVE_RIGHT; break; case MOVE_DOWN_SMALL: bOnePixel = sal_True; //no break; case MOVE_DOWN_BIG: nY = +1; + nAnchorDir = SW_MOVE_DOWN; break; } @@ -1010,33 +1014,40 @@ void SwEditWin::ChangeDrawing( BYTE nDir ) // move handle with index nHandleIndex if(pHdl && (nX || nY)) { - // now move the Handle (nX, nY) - Point aStartPoint(pHdl->GetPos()); - Point aEndPoint(pHdl->GetPos() + Point(nX, nY)); - const SdrDragStat& rDragStat = pSdrView->GetDragStat(); + if(HDL_ANCHOR == pHdl->GetKind()) + { + rSh.MoveAnchor( nAnchorDir ); + } + else + { + // now move the Handle (nX, nY) + Point aStartPoint(pHdl->GetPos()); + Point aEndPoint(pHdl->GetPos() + Point(nX, nY)); + const SdrDragStat& rDragStat = pSdrView->GetDragStat(); - // start dragging - pSdrView->BegDragObj(aStartPoint, 0, pHdl, 0); + // start dragging + pSdrView->BegDragObj(aStartPoint, 0, pHdl, 0); - if(pSdrView->IsDragObj()) - { - FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); - BOOL bWasSnapEnabled = pSdrView->IsSnapEnabled(); - - // switch snapping off - if(!bWasNoSnap) - ((SdrDragStat&)rDragStat).SetNoSnap(TRUE); - if(bWasSnapEnabled) - pSdrView->SetSnapEnabled(FALSE); - - pSdrView->MovAction(aEndPoint); - pSdrView->EndDragObj(); - - // restore snap - if(!bWasNoSnap) - ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap); - if(bWasSnapEnabled) - pSdrView->SetSnapEnabled(bWasSnapEnabled); + if(pSdrView->IsDragObj()) + { + FASTBOOL bWasNoSnap = rDragStat.IsNoSnap(); + BOOL bWasSnapEnabled = pSdrView->IsSnapEnabled(); + + // switch snapping off + if(!bWasNoSnap) + ((SdrDragStat&)rDragStat).SetNoSnap(TRUE); + if(bWasSnapEnabled) + pSdrView->SetSnapEnabled(FALSE); + + pSdrView->MovAction(aEndPoint); + pSdrView->EndDragObj(); + + // restore snap + if(!bWasNoSnap) + ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap); + if(bWasSnapEnabled) + pSdrView->SetSnapEnabled(bWasSnapEnabled); + } } } } @@ -1173,9 +1184,8 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) } } - OfaAutoCorrCfg* pACfg = OFF_APP()->GetAutoCorrConfig(); + OfaAutoCorrCfg* pACfg = OFF_APP()->GetAutoCorrConfig(); SvxAutoCorrect* pACorr = pACfg->GetAutoCorrect(); - SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig(); /*TblChgWidthHeightType*/int eTblChgMode; |