summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2021-01-26 11:19:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-26 12:33:56 +0100
commitd4d87c35e7e166cc6df92aa5be83eb3a65c2d02a (patch)
tree43020084da2b13c2afeec7d5ec0cfb348b600b08 /sc
parent7383b518af160d89cba19429980141c4d400387f (diff)
dynamic_cast unnecessary here
Change-Id: I25b2c174bab07117849104fbc77fe3568c7f3d6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/formularesult.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sc/source/core/tool/formularesult.cxx b/sc/source/core/tool/formularesult.cxx
index 0b91a1a20d02..396f0408c27b 100644
--- a/sc/source/core/tool/formularesult.cxx
+++ b/sc/source/core/tool/formularesult.cxx
@@ -545,9 +545,8 @@ const OUString& ScFormulaResult::GetHybridFormula() const
{
if (GetType() == formula::svHybridCell)
{
- const ScHybridCellToken* p = dynamic_cast<const ScHybridCellToken*>(mpToken);
- if (p)
- return p->GetFormula();
+ const ScHybridCellToken* p = static_cast<const ScHybridCellToken*>(mpToken);
+ return p->GetFormula();
}
return EMPTY_OUSTRING;
}
@@ -633,7 +632,7 @@ void ScFormulaResult::SetMatrix( SCCOL nCols, SCROW nRows, const ScConstMatrixRe
const ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellToken() const
{
return (GetType() == formula::svMatrixCell ?
- dynamic_cast<const ScMatrixFormulaCellToken*>(mpToken) : nullptr);
+ static_cast<const ScMatrixFormulaCellToken*>(mpToken) : nullptr);
}
ScMatrixFormulaCellToken* ScFormulaResult::GetMatrixFormulaCellTokenNonConst()