diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-21 16:26:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-02-25 15:16:59 +0200 |
commit | 651d52ca04eae72edb219f4f2977b94e5c8279c9 (patch) | |
tree | 8ae5ee0c4b464fbb5e8f96814dc9ed9c8ddaba6a | |
parent | f6cef562c01b34f88f54cff551e9ebe3e2f4fc2a (diff) |
remove unused code ScFormulaCell::GetErrorOrString
and then the now unused code in ScFormulaResult::GetErrorOrString
Change-Id: I95de8b5c24c0127cff61399eb6f38359040aace3
-rw-r--r-- | sc/inc/formulacell.hxx | 1 | ||||
-rw-r--r-- | sc/inc/formularesult.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/tool/formularesult.cxx | 36 | ||||
-rw-r--r-- | unusedcode.easy | 1 |
5 files changed, 0 insertions, 50 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) diff --git a/unusedcode.easy b/unusedcode.easy index 7086fdf0814d..2d7c3b7c3717 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -88,7 +88,6 @@ ScDocument::RebuildFormulaGroups() ScEditUtil::GetSpaceDelimitedString(EditTextObject const&) ScExtIButton::GetSelected() const ScFlatBoolRowSegments::getValue(int) -ScFormulaCell::GetErrorOrString(unsigned short&, svl::SharedString&) ScFormulaCell::HasColRowName() const ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short) ScGridWindow::HasScenarioRange(unsigned short, int, ScRange&) |