[Libreoffice-commits] .: sc/inc sc/source

Muthu Subramanian sumuthu at kemper.freedesktop.org
Wed Jun 29 10:17:27 PDT 2011


 sc/inc/cell.hxx                  |    1 -
 sc/inc/cellsuno.hxx              |    4 ----
 sc/source/core/data/cell.cxx     |    7 +------
 sc/source/ui/docshell/docsh4.cxx |    2 +-
 sc/source/ui/unoobj/cellsuno.cxx |   25 -------------------------
 sc/source/ui/unoobj/docuno.cxx   |   11 +++--------
 6 files changed, 5 insertions(+), 45 deletions(-)

New commits:
commit 77bfeb81a35825f076917b964f6dc0eca53e2a4e
Author: Muthu Subramanian <sumuthu at novell.com>
Date:   Wed Jun 29 23:01:26 2011 +0530

    Revert patch to change .idl

diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index 4c92203..55a72b0 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -404,7 +404,6 @@ public:
     void			SetTableOpDirty();
     sal_Bool			IsDirtyOrInTableOpDirty() const;
     sal_Bool			GetDirty() const { return bDirty; }
-    void                ResetDirty() { bDirty = false; }
     sal_Bool            NeedsListening() const { return bNeedListening; }
     void            SetNeedsListening( sal_Bool bVar ) { bNeedListening = bVar; }
     void			Compile(const String& rFormula,
diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx
index 379d087..c90b306 100644
--- a/sc/inc/cellsuno.hxx
+++ b/sc/inc/cellsuno.hxx
@@ -929,10 +929,6 @@ public:
     virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL	setFormula( const ::rtl::OUString& aFormula )
                                 throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL	setFormulaResult( const double nValue )
-                                throw(::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL	setFormulaString( const ::rtl::OUString& aFormula )
-                                throw(::com::sun::star::uno::RuntimeException);
     virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL	setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException);
     virtual ::com::sun::star::table::CellContentType SAL_CALL getType()
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index b3c7373..5374f94 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -1400,12 +1400,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
             pCode->SetCodeError( errNoCode );
             // This is worth an assertion; if encountered in daily work
             // documents we might need another solution. Or just confirm correctness.
-            OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but string -> Try compiling it." );
-            // Force Compilation
-            String aFormula = aResult.GetHybridFormula();
-            aResult.SetHybridFormula( String() );
-            Compile( aFormula );
-            InterpretTail( eTailParam );
+            OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but string" );
             return;
         }
         CompileTokenArray();
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e4c86c5..0660421 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1240,7 +1240,7 @@ void ScDocShell::DoRecalc( sal_Bool bApi )
     if (!bDone)							// sonst Dokument neu berechnen
     {
         WaitObject aWaitObj( GetActiveDialogParent() );
-        aDocument.CalcFormulaTree( sal_True );
+        aDocument.CalcFormulaTree();
         if ( pSh )
             pSh->UpdateCharts(sal_True);
 
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 67622b2..2027960 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -6512,31 +6512,6 @@ void SAL_CALL ScCellObj::setValue( double nValue ) throw(uno::RuntimeException)
     SetValue_Impl(nValue);
 }
 
-void SAL_CALL ScCellObj::setFormulaString( const rtl::OUString& aFormula) throw(uno::RuntimeException)
-{
-    SolarMutexGuard aGuard;
-    ScDocShell *pDocSh = GetDocShell();
-    if( pDocSh )
-    {
-        ScDocFunc aFunc( *pDocSh );
-        ScFormulaCell* pCell = new ScFormulaCell( pDocSh->GetDocument(), aCellPos );
-        pCell->SetHybridFormula( aFormula, formula::FormulaGrammar::GRAM_NATIVE );
-        aFunc.PutCell( aCellPos, pCell, sal_True );
-    }
-}
-void SAL_CALL ScCellObj::setFormulaResult( double nValue ) throw(uno::RuntimeException)
-{
-    SolarMutexGuard aGuard;
-    ScDocShell* pDocSh = GetDocShell();
-    if ( pDocSh && pDocSh->GetDocument()->GetCellType( aCellPos ) == CELLTYPE_FORMULA )
-    {
-        ScFormulaCell* pCell = (ScFormulaCell *)pDocSh->GetDocument()->GetCell( aCellPos );
-        pCell->SetHybridDouble( nValue );
-        pCell->ResetDirty();
-        pCell->ResetChanged();
-    }
-}
-
 table::CellContentType SAL_CALL ScCellObj::getType() throw(uno::RuntimeException)
 {
     SolarMutexGuard aGuard;
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index b597aaf..0c15e65 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1602,18 +1602,11 @@ void SAL_CALL ScModelObj::setPropertyValue(
         ScDocument* pDoc = pDocShell->GetDocument();
         const ScDocOptions& rOldOpt = pDoc->GetDocOptions();
         ScDocOptions aNewOpt = rOldOpt;
-        //  Don't recalculate while loading XML, when the formula text is stored
-        //  Recalculation after loading is handled separately.
-        bool bHardRecalc = !pDoc->IsImportingXML();
 
         sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue );
         if (bOpt)
         {
             // done...
-            if ( aString.EqualsAscii( SC_UNO_IGNORECASE ) ||
-                 aString.EqualsAscii( SC_UNONAME_REGEXP ) ||
-                 aString.EqualsAscii( SC_UNO_LOOKUPLABELS ) )
-                bHardRecalc = false;
         }
         else if ( aString.EqualsAscii( SC_UNONAME_CLOCAL ) )
         {
@@ -1720,8 +1713,10 @@ void SAL_CALL ScModelObj::setPropertyValue(
         if ( aNewOpt != rOldOpt )
         {
             pDoc->SetDocOptions( aNewOpt );
+            //  Don't recalculate while loading XML, when the formula text is stored.
+            //  Recalculation after loading is handled separately.
             //! Recalc only for options that need it?
-            if ( bHardRecalc )
+            if ( !pDoc->IsImportingXML() )
                 pDocShell->DoHardRecalc( sal_True );
             pDocShell->SetDocumentModified();
         }


More information about the Libreoffice-commits mailing list