Kaydet (Commit) 651d52ca authored tarafından Noel Grandin's avatar Noel Grandin

remove unused code ScFormulaCell::GetErrorOrString

and then the now unused code in ScFormulaResult::GetErrorOrString

Change-Id: I95de8b5c24c0127cff61399eb6f38359040aace3
üst f6cef562
...@@ -284,7 +284,6 @@ public: ...@@ -284,7 +284,6 @@ public:
sal_uInt16 GetErrCode(); // interpret first if necessary sal_uInt16 GetErrCode(); // interpret first if necessary
sal_uInt16 GetRawError(); // don't interpret, just return code or result error sal_uInt16 GetRawError(); // don't interpret, just return code or result error
bool GetErrorOrValue( sal_uInt16& rErr, double& rVal ); bool GetErrorOrValue( sal_uInt16& rErr, double& rVal );
bool GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr );
sc::FormulaResultValue GetResult(); sc::FormulaResultValue GetResult();
sal_uInt8 GetMatrixFlag() const; sal_uInt8 GetMatrixFlag() const;
ScTokenArray* GetCode(); ScTokenArray* GetCode();
......
...@@ -155,7 +155,6 @@ public: ...@@ -155,7 +155,6 @@ public:
bool IsMultiline() const; bool IsMultiline() const;
bool GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const; bool GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const;
bool GetErrorOrString( sal_uInt16& rErr, svl::SharedString& rStr ) const;
sc::FormulaResultValue GetResult() const; sc::FormulaResultValue GetResult() const;
/** Get error code if set or GetCellResultType() is formula::svError or svUnknown, /** Get error code if set or GetCellResultType() is formula::svError or svUnknown,
......
...@@ -2348,17 +2348,6 @@ bool ScFormulaCell::GetErrorOrValue( sal_uInt16& rErr, double& rVal ) ...@@ -2348,17 +2348,6 @@ bool ScFormulaCell::GetErrorOrValue( sal_uInt16& rErr, double& rVal )
return aResult.GetErrorOrDouble(rErr, 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() sc::FormulaResultValue ScFormulaCell::GetResult()
{ {
MaybeInterpret(); MaybeInterpret();
......
...@@ -345,42 +345,6 @@ bool ScFormulaResult::GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const ...@@ -345,42 +345,6 @@ bool ScFormulaResult::GetErrorOrDouble( sal_uInt16& rErr, double& rVal ) const
return true; 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 sc::FormulaResultValue ScFormulaResult::GetResult() const
{ {
if (mnError) if (mnError)
......
...@@ -88,7 +88,6 @@ ScDocument::RebuildFormulaGroups() ...@@ -88,7 +88,6 @@ ScDocument::RebuildFormulaGroups()
ScEditUtil::GetSpaceDelimitedString(EditTextObject const&) ScEditUtil::GetSpaceDelimitedString(EditTextObject const&)
ScExtIButton::GetSelected() const ScExtIButton::GetSelected() const
ScFlatBoolRowSegments::getValue(int) ScFlatBoolRowSegments::getValue(int)
ScFormulaCell::GetErrorOrString(unsigned short&, svl::SharedString&)
ScFormulaCell::HasColRowName() const ScFormulaCell::HasColRowName() const
ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short) ScGlobal::GetStandardFormat(double, SvNumberFormatter&, unsigned long, short)
ScGridWindow::HasScenarioRange(unsigned short, int, ScRange&) ScGridWindow::HasScenarioRange(unsigned short, int, ScRange&)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment