[Libreoffice-commits] .: Branch 'feature/tubes' - 2 commits - sc/source

Eike Rathke erack at kemper.freedesktop.org
Mon Jul 16 13:47:00 PDT 2012


 sc/source/ui/docshell/docfunc.cxx |    6 +++++-
 sc/source/ui/view/viewfunc.cxx    |    1 -
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f3e9ba27602a947a94162b5accc65e4dd9eb0f2a
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 16 22:44:12 2012 +0200

    tubes: do the "interpret once" only if not API in ScDocFunc::PutCell()
    
    Change-Id: Ib8bcb89b83f0fd98f1b01f72308d07af1f7777f9

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 5f67874..72227ed 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -855,7 +855,11 @@ sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bo
 
     pDoc->PutCell( rPos, pNewCell );
 
-    if ( !bXMLLoading && pNewCell->GetCellType() == CELLTYPE_FORMULA && !pDoc->GetAutoCalc() )
+    // This "interpret once" block was moved from ScViewFunc::EnterData() where
+    // it was never executed from API, so don't do it here. For performance
+    // reasons API calls may disable calculation while operating and
+    // recalculate once when done.
+    if ( !bXMLLoading && !bApi && pNewCell->GetCellType() == CELLTYPE_FORMULA && !pDoc->GetAutoCalc() )
     {
         ScFormulaCell *pFormCell = static_cast<ScFormulaCell *>( pNewCell );
         // calculate just the cell once and set Dirty again
commit 4173967030efc78da451e8ccb7575dcbc1f77361
Author: Eike Rathke <erack at redhat.com>
Date:   Mon Jul 16 22:27:46 2012 +0200

    tubes: removed duplicated iterator initialization in ScViewFunc::EnterData()
    
    Change-Id: I322e937e9c3e0bc478d566e1b14499cc610bd273

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index d2b10b4..18659f0 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -557,7 +557,6 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
         {
             ScRangeList aChangeRanges;
             ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
-            itr = rMark.begin();
             for (; itr != itrEnd; ++itr)
                 aChangeRanges.Append( ScRange( nCol, nRow, *itr ) );
 


More information about the Libreoffice-commits mailing list