summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/chgtrack.cxx5
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx5
2 files changed, 4 insertions, 6 deletions
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 5f165aab0172..4900c4d28b1b 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -4483,9 +4483,8 @@ ScChangeTrack* ScChangeTrack::Clone( ScDocument* pDocument ) const
break;
case SC_CAT_MOVE:
{
- assert(dynamic_cast<const ScChangeActionMove*>(pAction)
- && "ScChangeTrack::Clone: pMove is null!");
- auto pMove = static_cast<const ScChangeActionMove*>(pAction);
+ auto pMove = dynamic_cast<const ScChangeActionMove*>(pAction);
+ assert(pMove && "ScChangeTrack::Clone: pMove is null!");
pClonedAction = new ScChangeActionMove(
pAction->GetActionNumber(),
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index de0196609adf..25552871e396 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -124,9 +124,8 @@ ScPrintAreasDlg::ScPrintAreasDlg( SfxBindings* pB, SfxChildWindow* pCW, vcl::Win
get(pBtnCancel,"cancel");
ScTabViewShell* pScViewSh = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() );
- SfxObjectShell* pSfxObjSh = SfxObjectShell::Current();
- assert(dynamic_cast<ScDocShell*>(pSfxObjSh) && "Current DocumentShell not found :-(");
- ScDocShell* pScDocSh = static_cast<ScDocShell*>(pSfxObjSh);
+ ScDocShell* pScDocSh = dynamic_cast<ScDocShell*>(SfxObjectShell::Current());
+ assert(pScDocSh && "Current DocumentShell not found :-(");
pDoc = &pScDocSh->GetDocument();