summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-23 21:47:18 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-06-23 21:55:09 +0200
commit3f0b5770790dfcb408d169df1265546d6e8e3ece (patch)
tree90acf2110494ad68e40c0f1b0f65f5b88a588c60
parentFix linking error of app for iOS in optimized build (diff)
downloadcore-3f0b5770790dfcb408d169df1265546d6e8e3ece.tar.gz
core-3f0b5770790dfcb408d169df1265546d6e8e3ece.zip
we don't need this hack without inherited number formats, fdo#66076
Change-Id: If315ce28a4182019002141c7330475e0843f9a40
-rw-r--r--sc/inc/formulacell.hxx7
-rw-r--r--sc/inc/formularesult.hxx2
-rw-r--r--sc/inc/token.hxx14
-rw-r--r--sc/source/core/tool/formularesult.cxx17
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx5
5 files changed, 1 insertions, 44 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index c6d3aa7bfdf6..747d67f977d6 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 b337d2f73d49..a88f82de0705 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 abd3cd5c06cc..109980fce92a 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 e0ca0beefc63..a7c70e64b8d6 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 1e838a0f350c..0fef98fac854 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());