[Libreoffice-commits] core.git: include/formula sc/inc sc/source
Eike Rathke
erack at redhat.com
Wed Nov 16 18:24:59 UTC 2016
include/formula/token.hxx | 3 ---
sc/inc/formulacell.hxx | 1 -
sc/source/core/data/formulacell.cxx | 9 ++-------
sc/source/core/opencl/formulagroupcl.cxx | 1 -
sc/source/core/tool/cellform.cxx | 2 --
sc/source/core/tool/formularesult.cxx | 6 +-----
sc/source/core/tool/token.cxx | 1 -
7 files changed, 3 insertions(+), 20 deletions(-)
New commits:
commit 2a91304bddf3b1a7b788b120e6374cc1fb9ea045
Author: Eike Rathke <erack at redhat.com>
Date: Wed Nov 16 19:24:01 2016 +0100
remove anything svHybridValueCell related, it's nowhere set anymore
Change-Id: I9887d7ca83ffc012fec1a78ef9ef537d2188a7e3
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 767fa21..a2376bc 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -69,9 +69,6 @@ enum StackVarEnum
// and/or string result and a formula
// string to be compiled.
- svHybridValueCell, // A temporary formula cell with an value
- // and possibily a string representation
-
svExternalSingleRef,
svExternalDoubleRef,
svExternalName,
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index d17e1e0..960a753 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -289,7 +289,6 @@ public:
bool IsValue(); // also true if formula::svEmptyCell
bool IsValueNoError();
bool IsValueNoError() const;
- bool IsHybridValueCell(); // for cells after import to deal with inherited number formats
double GetValue();
svl::SharedString GetString();
const ScMatrix* GetMatrix();
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 1c95096..f59ad09 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2024,7 +2024,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
}
else
{
- if ( eOld == svHybridCell || eOld == svHybridValueCell ) // string result from SetFormulaResultString?
+ if ( eOld == svHybridCell ) // string result from SetFormulaResultString?
eOld = svString; // ScHybridCellToken has a valid GetString method
// #i106045# use approxEqual to compare with stored value
@@ -2049,7 +2049,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if ( bChanged && !bContentChanged && pDocument->IsStreamValid(aPos.Tab()) )
{
if ((eOld == svUnknown && (eNew == svError || (eNew == svDouble && aNewResult.GetDouble() == 0.0))) ||
- ((eOld == svHybridCell || eOld == svHybridValueCell) &&
+ ((eOld == svHybridCell) &&
eNew == svString && aResult.GetString() == aNewResult.GetString()) ||
(eOld == svDouble && eNew == svDouble &&
rtl::math::approxEqual( aResult.GetDouble(), aNewResult.GetDouble())))
@@ -2598,11 +2598,6 @@ bool ScFormulaCell::IsValueNoError() const
return aResult.IsValueNoError();
}
-bool ScFormulaCell::IsHybridValueCell()
-{
- return aResult.GetType() == formula::svHybridValueCell;
-}
-
double ScFormulaCell::GetValue()
{
MaybeInterpret();
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 7701c2c..54ae0d1 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -116,7 +116,6 @@ std::string StackVarEnumToString(StackVar const e)
case svEmptyCell: return "EmptyCell";
case svMatrixCell: return "MatrixCell";
case svHybridCell: return "HybridCell";
- case svHybridValueCell: return "HybridValueCell";
case svExternalSingleRef: return "ExternalSingleRef";
case svExternalDoubleRef: return "ExternalDoubleRef";
case svExternalName: return "ExternalName";
diff --git a/sc/source/core/tool/cellform.cxx b/sc/source/core/tool/cellform.cxx
index afa9eea..dab0d2d 100644
--- a/sc/source/core/tool/cellform.cxx
+++ b/sc/source/core/tool/cellform.cxx
@@ -90,8 +90,6 @@ void ScCellFormat::GetString( ScRefCellValue& rCell, sal_uLong nFormat, OUString
double fValue = pFCell->GetValue();
if ( !bNullVals && fValue == 0.0 )
rString.clear();
- else if ( pFCell->IsHybridValueCell() )
- rString = pFCell->GetString().getString();
else
rFormatter.GetOutputString( fValue, nFormat, rString, ppColor, bUseStarFormat );
}
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 7af64f3..95b8ded 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -273,7 +273,7 @@ namespace {
inline bool isValue( formula::StackVar sv )
{
return sv == formula::svDouble || sv == formula::svError
- || sv == formula::svEmptyCell || sv == formula::svHybridValueCell;
+ || sv == formula::svEmptyCell;
}
inline bool isString( formula::StackVar sv )
@@ -282,7 +282,6 @@ inline bool isString( formula::StackVar sv )
{
case formula::svString:
case formula::svHybridCell:
- case formula::svHybridValueCell:
return true;
default:
break;
@@ -304,7 +303,6 @@ bool ScFormulaResult::IsValueNoError() const
{
case formula::svDouble:
case formula::svEmptyCell:
- case formula::svHybridValueCell:
return true;
default:
return false;
@@ -442,7 +440,6 @@ double ScFormulaResult::GetDouble() const
switch (mpToken->GetType())
{
case formula::svHybridCell:
- case formula::svHybridValueCell:
return mpToken->GetDouble();
case formula::svMatrixCell:
{
@@ -471,7 +468,6 @@ svl::SharedString ScFormulaResult::GetString() const
{
case formula::svString:
case formula::svHybridCell:
- case formula::svHybridValueCell:
return mpToken->GetString();
case formula::svMatrixCell:
{
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 880be09..2f6354e 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1560,7 +1560,6 @@ void ScTokenArray::CheckToken( const FormulaToken& r )
case svExternalSingleRef:
case svFAP:
case svHybridCell:
- case svHybridValueCell:
case svIndex:
case svJump:
case svJumpMatrix:
More information about the Libreoffice-commits
mailing list