diff options
author | Niklas Nebel <nn@openoffice.org> | 2011-03-01 14:05:40 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-12-04 07:17:07 +0000 |
commit | 51ab4a0979895d03711f4b7da58365185aec08ad (patch) | |
tree | 4f6b344afb83b2d6dc41095e2da60e87ac37b38a /sc | |
parent | cad7570522e1822810a876fc6aa9ad9c5aa277b5 (diff) |
calc66: #i114511# don't count cursor movement or clipboard copy
as modification when editing a cell
Conflicts:
sc/source/ui/app/inputhdl.cxx
sc/source/ui/inc/inputhdl.hxx
sc/source/ui/view/editsh.cxx
Diffstat (limited to 'sc')
-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 | 7 |
3 files changed, 12 insertions, 6 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 172dd54ce03c..dc4621aebe66 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2185,7 +2185,7 @@ bool ScInputHandler::DataChanging( sal_Unicode cTyped, bool bFromCommand ) return false; } -void ScInputHandler::DataChanged( bool bFromTopNotify ) +void ScInputHandler::DataChanged( bool bFromTopNotify, bool bSetModified ) { ImplCreateEditEngine(); @@ -2204,7 +2204,8 @@ void ScInputHandler::DataChanged( bool bFromTopNotify ) pTopView->ShowCursor(); } - bModified = true; + if (bSetModified) + bModified = true; bSelIsRef = false; if ( pRangeFindList && !bInRangeUpdate ) @@ -3324,7 +3325,9 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, bool bStartEdit /* = false } } - 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 402a2da16771..84ccf497a42e 100644 --- a/sc/source/ui/inc/inputhdl.hxx +++ b/sc/source/ui/inc/inputhdl.hxx @@ -223,7 +223,7 @@ public: EditView* GetTopView() { return pTopView; } bool DataChanging( sal_Unicode cTyped = 0, bool bFromCommand = false ); - void DataChanged( bool bFromTopNotify = false ); + void DataChanged( bool bFromTopNotify = false, bool bSetModified = true ); bool TakesReturn() const { return ( nTipVisible != 0 ); } diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index a9681cbc2bd2..f28784335f5e 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -187,6 +187,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) pHdl->DataChanging(); sal_Bool bSetSelIsRef = false; + bool bSetModified = true; switch ( nSlot ) { @@ -222,7 +223,8 @@ void ScEditShell::Execute( SfxRequest& rReq ) case SID_COPY: pTableView->Copy(); - return; + bSetModified = false; + break; case SID_CUT: pTableView->Cut(); @@ -319,6 +321,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) if (pTopView) pTopView->SetSelection(ESelection(0,0,nPar-1,nLen)); } + bSetModified = sal_False; } return; @@ -617,7 +620,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) break; } - pHdl->DataChanged(); + pHdl->DataChanged(sal_False, bSetModified); if (bSetSelIsRef) pHdl->SetSelIsRef(sal_True); } |