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

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Jun 23 12:56:54 PDT 2013


 sc/inc/formulacell.hxx                |    7 -------
 sc/inc/formularesult.hxx              |    2 --
 sc/inc/token.hxx                      |   14 --------------
 sc/source/core/tool/formularesult.cxx |   17 -----------------
 sc/source/filter/xml/xmlcelli.cxx     |    5 +----
 5 files changed, 1 insertion(+), 44 deletions(-)

New commits:
commit 3f0b5770790dfcb408d169df1265546d6e8e3ece
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Jun 23 21:47:18 2013 +0200

    we don't need this hack without inherited number formats, fdo#66076
    
    Change-Id: If315ce28a4182019002141c7330475e0843f9a40

diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index c6d3aa7..747d67f 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -261,13 +261,6 @@ public:
                                     const formula::FormulaGrammar::Grammar eGrammar )
                         { aResult.SetHybridFormula( r); eTempGrammar = eGrammar; }
 
-    /**
-     * For import only: use for formula cells that return a number
-     * formatted as some kind of string
-     */
-    void SetHybridValueString( double nVal, const OUString& r )
-                        { aResult.SetHybridValueString( nVal, r ); }
-
     void SetResultMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL )
     {
         aResult.SetMatrix(nCols, nRows, pMat, pUL);
diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
index b337d2f..a88f82d 100644
--- a/sc/inc/formularesult.hxx
+++ b/sc/inc/formularesult.hxx
@@ -177,8 +177,6 @@ public:
         SetHybridFormula() for formula string to be compiled later. */
     SC_DLLPUBLIC void SetHybridFormula( const String & rFormula );
 
-    void SetHybridValueString( double nVal, const OUString& rStr );
-
     SC_DLLPUBLIC void SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL );
 
     /** Get the const ScMatrixFormulaCellToken* if token is of that type, else
diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx
index abd3cd5..109980f 100644
--- a/sc/inc/token.hxx
+++ b/sc/inc/token.hxx
@@ -430,20 +430,6 @@ public:
     virtual FormulaToken* Clone() const { return new ScHybridCellToken(*this); }
 };
 
-class SC_DLLPUBLIC ScHybridValueCellToken : public ScToken
-{
-private:
-    double mfValue;
-    String maString;
-public:
-    ScHybridValueCellToken (double f, const OUString& rStr ):
-        ScToken( formula::svHybridValueCell ),
-        mfValue( f ), maString( rStr ) {}
-
-    virtual double GetDouble() const { return mfValue; }
-    virtual const String & GetString() const { return maString; }
-};
-
 // Simplify argument passing to RefUpdate methods with ScSingleRefToken or
 // ScDoubleRefToken
 class SingleDoubleRefModifier
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index e0ca0be..a7c70e6 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -430,23 +430,6 @@ void ScFormulaResult::SetHybridFormula( const String & rFormula )
     mbToken = true;
 }
 
-void ScFormulaResult::SetHybridValueString( double nVal, const OUString& rStr )
-{
-    if(GetType() == formula::svMatrixCell)
-    {
-        SetDouble(nVal);
-        return;
-    }
-
-    ResetToDefaults();
-    if (mbToken && mpToken)
-        mpToken->DecRef();
-
-    mpToken = new ScHybridValueCellToken( nVal, rStr );
-    mpToken->IncRef();
-    mbToken = true;
-}
-
 void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRef& pMat, formula::FormulaToken* pUL )
 {
     ResetToDefaults();
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 1e838a0..0fef98f 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -993,10 +993,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
         }
         else if (!rtl::math::isNan(fValue))
         {
-            if (mbEditEngineHasText)
-                pFCell->SetHybridValueString(fValue, mpEditEngine->GetText(0));
-            else
-                pFCell->SetHybridDouble(fValue);
+            pFCell->SetHybridDouble(fValue);
             pFCell->ResetDirty();
         }
         pFCell->StartListeningTo(rXMLImport.GetDocument());


More information about the Libreoffice-commits mailing list