sw/source/ui/docvw/edtwin.cxx | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-)
New commits: commit 55920ce3e85c91f25d2ca8cf92b8a48f3fad04e3 Author: Oliver-Rainer Wittmann <o...@apache.org> Date: Fri Aug 23 08:25:14 2013 +0000 Resolves: #i123051# handling SHIFT-<arrow key> huge object move only when object is selected. (cherry picked from commit 09c64ae86baf3572856c845e0785692b2cbfe058) Related: #i123051# some minor code clean up (cherry picked from commit 4dd71466a9463d234b918ce2729c49a57293fb24) Conflicts: sw/source/ui/docvw/edtwin.cxx Change-Id: Ic681edc18194336fb082ca927457c4633473dbfd 5a692f8ce616a6f06bf4075a2f05cf700ef6fd6c diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index d72b270..ddeafd4 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -1725,8 +1725,10 @@ KEYINPUT_CHECKTABLE: case KEY_UP | KEY_SHIFT: case KEY_DOWN | KEY_SHIFT: { - if ( pFlyFmt - || ( (rSh.GetSelectionType() & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM)) + const int nSelectionType = rSh.GetSelectionType(); + if ( ( pFlyFmt + && ( nSelectionType & (nsSelectionType::SEL_FRM|nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) ) ) + || ( ( nSelectionType & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM) ) && rSh.GetDrawView()->AreObjectsMarked() ) ) { eKeyState = pFlyFmt ? KS_Fly_Change : KS_Draw_Change; @@ -2333,23 +2335,11 @@ KEYINPUT_CHECKTABLE_INSDEL: if(pFieldmark) { pFieldmark->SetChecked(!pFieldmark->IsChecked()); - SwDocShell* pDocSh = m_rView.GetDocShell(); - SwDoc *pDoc=pDocSh->GetDoc(); OSL_ENSURE(pFieldmark->IsExpanded(), "where is the otherpos?"); if (pFieldmark->IsExpanded()) { - SwPaM aPaM(pFieldmark->GetMarkPos(), pFieldmark->GetOtherMarkPos()); - if(0) - { - rSh.StartAllAction(); //$flr TODO: understand why this not works - pDoc->SetModified(aPaM); - rSh.EndAllAction(); - } - else - { - rSh.CalcLayout(); // workaround - } + rSh.CalcLayout(); } } eKeyState = KS_End; @@ -2869,6 +2859,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) 0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && !rSh.IsObjSelectable( aDocPos ) ) { + // Enhanced table selection if ( SW_TABSEL_HORI <= nMouseTabCol && SW_TABCOLSEL_VERT >= nMouseTabCol ) { rSh.EnterStdMode(); @@ -2931,9 +2922,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) } else { - // Make sure the pointer is set to 0, - // otherwise it may point to nowhere after deleting the corresponding - // text node. + // Make sure the pointer is set to 0, otherwise it may point to + // nowhere after deleting the corresponding text node. m_rView.SetNumRuleNodeFromDoc( NULL ); return; } @@ -3040,6 +3030,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) bExecHyperlinks = sal_True; } + // Enhanced selection sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4); if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() ) nNumberOfClicks = 4; @@ -3315,6 +3306,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if ( bMod ) rSh.EnterAddMode(); + // Enhanced selection if ( 3 == nNumberOfClicks ) rSh.SelSentence( &aDocPos ); else @@ -3743,6 +3735,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) nPointer = POINTER_HSIZEBAR; bChkTblSel = true; break; + // Enhanced table selection case SW_TABSEL_HORI : nPointer = POINTER_TAB_SELECT_SE; break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits