[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

Michael Meeks michael.meeks at suse.com
Mon Mar 18 07:55:29 PDT 2013


 sc/source/core/data/column.cxx  |    3 ++-
 sc/source/core/data/column2.cxx |    1 -
 sc/source/core/data/column3.cxx |   15 +++++++++++++--
 3 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 54f57794cf73d09a3e9b1dc6308011e2c4286698
Author: Michael Meeks <michael.meeks at suse.com>
Date:   Mon Mar 18 14:54:24 2013 +0000

    don't re-build formula groups just yet.
    
    Change-Id: Ibd7677e9e4f695be883cb20d3182cc8a8501f855

diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index d8c3bcd..90f6efa 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -2033,7 +2033,6 @@ void ScColumn::UpdateCompile( bool bForceIfNameInUse )
                     Search( nRow, i );      // Listener deleted/inserted?
             }
         }
-        RebuildFormulaGroups();
     }
 }
 
@@ -2243,6 +2242,7 @@ void ScColumn::CalcAll()
 void ScColumn::CompileAll()
 {
     if ( !maItems.empty() )
+    {
         for (SCSIZE i = 0; i < maItems.size(); i++)
         {
             ScBaseCell* pCell = maItems[i].pCell;
@@ -2258,6 +2258,7 @@ void ScColumn::CompileAll()
                     Search( nRow, i );      // Listener deleted/inserted?
             }
         }
+    }
 }
 
 
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 81f65d4..3301542 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1431,7 +1431,6 @@ void ScColumn::CellStorageModified()
     }
     cout << "-- end" << endl;
 #endif
-    RebuildFormulaGroups();
 }
 
 void ScColumn::CopyScriptTypesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 633143d..5ddb3f1 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2009,7 +2009,7 @@ ScFormulaCellGroup::~ScFormulaCellGroup()
 // of similar formulae into a formulagroup
 void ScColumn::RebuildFormulaGroups()
 {
-    if ( maItems.empty() )
+    if ( maItems.empty() || !bDirtyGroups )
         return;
 
     // clear previous groups
@@ -2068,10 +2068,21 @@ void ScColumn::RebuildFormulaGroups()
         }
         else
         {
-            fprintf( stderr, "unusual incompatible extension of formulae\n" );
+            OUString aFormula;
+            pCur->GetFormula( aFormula );
+            ScAddress aAddr( nCol, rCur.nRow, nTab );
+            OUString aCellAddr;
+            aAddr.Format( aCellAddr, 0, pDocument );
+
+            fprintf( stderr, "unusual incompatible extension in cell '%s' of formulae '%s'\n" ,
+                     OUStringToOString( aCellAddr, RTL_TEXTENCODING_UTF8 ).getStr(),
+                     OUStringToOString( aFormula, RTL_TEXTENCODING_UTF8 ).getStr() );
+
             pCur->ReleaseDelta( pDelta );
         }
     }
+
+    bDirtyGroups = false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list