diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-12-11 20:57:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-12-12 21:12:10 +0100 |
commit | 2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch) | |
tree | 6f676441983e9b3c8440600d09a49478353e1faf /sc/source/ui/view | |
parent | 23cfd3d1004f5ddda8cd79878c00b6c64f20068c (diff) |
use covariant return type for SfxPoolItem::Clone
and can then remove some casting
Change-Id: Id821c32ca2cbcdb7f57ef7a5fa1960042e630ffc
Reviewed-on: https://gerrit.libreoffice.org/85022
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 61888c663ef4..c5d94206969d 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -414,7 +414,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) } else { - aNewItem.reset(static_cast<SvxFontItem*>(rItem.Clone())); + aNewItem.reset(rItem.Clone()); } // tdf#125054 force Item to correct intended ID diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 76b7e288c803..37d7fc1e2100 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -505,8 +505,8 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName //Fix border incorrect for RTL fdo#62399 if( pDoc->IsLayoutRTL( GetViewData().GetTabNo() ) ) { - std::shared_ptr<SvxBoxItem> aNewFrame(static_cast<SvxBoxItem*>(aLineOuter->Clone())); - std::shared_ptr<SvxBoxInfoItem> aTempInfo(static_cast<SvxBoxInfoItem*>(aLineInner->Clone())); + std::shared_ptr<SvxBoxItem> aNewFrame(aLineOuter->Clone()); + std::shared_ptr<SvxBoxInfoItem> aTempInfo(aLineInner->Clone()); if ( aLineInner->IsValid(SvxBoxInfoItemValidFlags::LEFT) ) aNewFrame->SetLine( aLineOuter->GetLeft(), SvxBoxItemLine::RIGHT ); diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 1dbb1c17221e..34ab3558c791 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -874,8 +874,8 @@ void ScViewFunc::GetSelectionFrame( GetViewData().GetCurY(), GetViewData().GetTabNo() ); - rLineOuter.reset(static_cast<SvxBoxItem*>(pAttrs->GetItem(ATTR_BORDER).Clone())); - rLineInner.reset(static_cast<SvxBoxInfoItem*>(pAttrs->GetItem(ATTR_BORDER_INNER).Clone())); + rLineOuter.reset(pAttrs->GetItem(ATTR_BORDER).Clone()); + rLineInner.reset(pAttrs->GetItem(ATTR_BORDER_INNER).Clone()); rLineInner->SetTable(false); rLineInner->SetDist(true); |