summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-02-21 16:26:55 +0200
committerNoel Grandin <noel@peralex.com>2014-02-25 15:16:59 +0200
commit651d52ca04eae72edb219f4f2977b94e5c8279c9 (patch)
tree8ae5ee0c4b464fbb5e8f96814dc9ed9c8ddaba6a /sc
parentf6cef562c01b34f88f54cff551e9ebe3e2f4fc2a (diff)
remove unused code ScFormulaCell::GetErrorOrString
and then the now unused code in ScFormulaResult::GetErrorOrString Change-Id: I95de8b5c24c0127cff61399eb6f38359040aace3
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/formulacell.hxx1
-rw-r--r--sc/inc/formularesult.hxx1
-rw-r--r--sc/source/core/data/formulacell.cxx11
-rw-r--r--sc/source/core/tool/formularesult.cxx36
4 files changed, 0 insertions, 49 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index e901c6e2b10e..d3e88534c9c0 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -284,7 +284,6 @@ public:
sal_uInt16 GetErrCode(); // interpret first if necessary
sal_uInt16 GetRawError(); // don't interpret, just return code or result error
bool GetErrorOrValue( sal_uInt16& rErr, double& rVal );
- bool GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr );
sc::FormulaResultValue GetResult();
sal_uInt8 GetMatrixFlag() const;
ScTokenArray* GetCode();
diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx
index 3708c8a7efe2..31bb990f162b 100644
--- a/sc/inc/formularesult.hxx
+++ b/sc/inc/formularesult.hxx
@@ -155,7 +155,6 @@ public:
bool IsMultiline() const;
bool GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const;
- bool GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr ) const;
sc::FormulaResultValue GetResult() const;
/** Get error code if set or GetCellResultType() is formula::svError or svUnknown,
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 88ca441d83ef..aa6e8b14e572 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -2348,17 +2348,6 @@ bool ScFormulaCell::GetErrorOrValue( sal_uInt16& rErr, double& rVal )
return aResult.GetErrorOrDouble(rErr, rVal);
}
-bool ScFormulaCell::GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr )
-{
- MaybeInterpret();
-
- rErr = pCode->GetCodeError();
- if (rErr)
- return true;
-
- return aResult.GetErrorOrString(rErr, rStr);
-}
-
sc::FormulaResultValue ScFormulaCell::GetResult()
{
MaybeInterpret();
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 35d58188b721..66ee0a98fc7c 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -345,42 +345,6 @@ bool ScFormulaResult::GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const
return true;
}
-bool ScFormulaResult::GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr ) const
-{
- if (mnError)
- {
- rErr = mnError;
- return true;
- }
-
- formula::StackVar sv = GetCellResultType();
- if (sv == formula::svError)
- {
- if (GetType() == formula::svMatrixCell)
- {
- // don't need to test for mpToken here, GetType() already did it
- rErr = static_cast<const ScMatrixCellResultToken*>(mpToken)->
- GetUpperLeftToken()->GetError();
- }
- else if (mpToken)
- {
- rErr = mpToken->GetError();
- }
- }
-
- if (rErr)
- return true;
-
- if (!mbToken)
- return false;
-
- if (!isString(sv))
- return false;
-
- rStr = GetString();
- return true;
-}
-
sc::FormulaResultValue ScFormulaResult::GetResult() const
{
if (mnError)