diff options
author | Niklas Nebel <nn@openoffice.org> | 2011-03-01 14:05:40 +0100 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2011-03-01 14:05:40 +0100 |
commit | 20dc7550d91515a71646dd3865934c20db8a8b6d (patch) | |
tree | d8f6f05a6c5243f943c01c41ca954a104f146f5f | |
parent | 371f12e8b5f9bea2e22a50e5d7766a186634bb7f (diff) |
calc66: #i114511# don't count cursor movement or clipboard copy as modification when editing a cell
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 9 | ||||
-rw-r--r-- | sc/source/ui/inc/inputhdl.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 5 |
3 files changed, 11 insertions, 5 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index ed4971fa00ee..429ecc4a3445 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2092,7 +2092,7 @@ sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand return sal_False; } -void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) +void ScInputHandler::DataChanged( sal_Bool bFromTopNotify, sal_Bool bSetModified ) { ImplCreateEditEngine(); @@ -2111,7 +2111,8 @@ void ScInputHandler::DataChanged( sal_Bool bFromTopNotify ) pTopView->ShowCursor(); } - bModified = sal_True; + if (bSetModified) + bModified = sal_True; bSelIsRef = sal_False; if ( pRangeFindList && !bInRangeUpdate ) @@ -3202,7 +3203,9 @@ sal_Bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, sal_Bool bStartEdit /* } } - DataChanged(); // ruft auch UpdateParenthesis() + // #i114511# don't count cursor keys as modification + sal_Bool bSetModified = !bCursorKey; + DataChanged(sal_False, bSetModified); // also calls UpdateParenthesis() InvalidateAttribs(); //! in DataChanged ? } } diff --git a/sc/source/ui/inc/inputhdl.hxx b/sc/source/ui/inc/inputhdl.hxx index 8291877bbc57..9f745b4cd96c 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -211,7 +211,7 @@ public: EditView* GetTopView() { return pTopView; } sal_Bool DataChanging( sal_Unicode cTyped = 0, sal_Bool bFromCommand = sal_False ); - void DataChanged( sal_Bool bFromTopNotify = sal_False ); + void DataChanged( sal_Bool bFromTopNotify = sal_False, sal_Bool bSetModified = sal_True ); sal_Bool TakesReturn() const { return ( nTipVisible != 0 ); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index e07e15267198..f75ebcbe770f 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -199,6 +199,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) pHdl->DataChanging(); sal_Bool bSetSelIsRef = sal_False; + sal_Bool bSetModified = sal_True; switch ( nSlot ) { @@ -234,6 +235,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_COPY: pTableView->Copy(); + bSetModified = sal_False; break; case SID_CUT: @@ -334,6 +336,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) if (pTopView) pTopView->SetSelection(ESelection(0,0,nPar-1,nLen)); } + bSetModified = sal_False; } break; @@ -615,7 +618,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) break; } - pHdl->DataChanged(); + pHdl->DataChanged(sal_False, bSetModified); if (bSetSelIsRef) pHdl->SetSelIsRef(sal_True); } |