summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/align.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-12-11 20:57:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-12-12 21:12:10 +0100
commit2431477337f4ac4384ba615f76bfb5904f1a3b47 (patch)
tree6f676441983e9b3c8440600d09a49478353e1faf /cui/source/tabpages/align.cxx
parent23cfd3d1004f5ddda8cd79878c00b6c64f20068c (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 'cui/source/tabpages/align.cxx')
-rw-r--r--cui/source/tabpages/align.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index d0dbae16e685..6af362814cbd 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -216,7 +216,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SfxUInt16Item* pIndentItem = static_cast<const SfxUInt16Item*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_INDENT));
assert(pIndentItem);
- std::unique_ptr<SfxUInt16Item> pNewIndentItem(static_cast<SfxUInt16Item*>(pIndentItem->Clone()));
+ std::unique_ptr<SfxUInt16Item> pNewIndentItem(pIndentItem->Clone());
pNewIndentItem->SetValue(m_xEdIndent->get_value(FieldUnit::TWIP));
rSet->Put(*pNewIndentItem);
bChanged = true;
@@ -259,7 +259,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SdrAngleItem* pAngleItem = static_cast<const SdrAngleItem*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_DEGREES));
assert(pAngleItem);
- std::unique_ptr<SdrAngleItem> pNewAngleItem(static_cast<SdrAngleItem*>(pAngleItem->Clone()));
+ std::unique_ptr<SdrAngleItem> pNewAngleItem(pAngleItem->Clone());
pNewAngleItem->SetValue(m_aCtrlDial.GetRotation());
rSet->Put(*pNewAngleItem);
bChanged = true;
@@ -296,7 +296,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SfxBoolItem* pStackItem = static_cast<const SfxBoolItem*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_STACKED));
assert(pStackItem);
- std::unique_ptr<SfxBoolItem> pNewStackItem(static_cast<SfxBoolItem*>(pStackItem->Clone()));
+ std::unique_ptr<SfxBoolItem> pNewStackItem(pStackItem->Clone());
pNewStackItem->SetValue(m_xCbStacked->get_active());
rSet->Put(*pNewStackItem);
bChanged = true;
@@ -319,7 +319,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SfxBoolItem* pWrapItem = static_cast<const SfxBoolItem*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_LINEBREAK));
assert(pWrapItem);
- std::unique_ptr<SfxBoolItem> pNewWrapItem(static_cast<SfxBoolItem*>(pWrapItem->Clone()));
+ std::unique_ptr<SfxBoolItem> pNewWrapItem(pWrapItem->Clone());
pNewWrapItem->SetValue(m_xBtnWrap->get_active());
rSet->Put(*pNewWrapItem);
bChanged = true;
@@ -333,7 +333,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SfxBoolItem* pHyphItem = static_cast<const SfxBoolItem*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_HYPHENATION));
assert(pHyphItem);
- std::unique_ptr<SfxBoolItem> pNewHyphItem(static_cast<SfxBoolItem*>(pHyphItem->Clone()));
+ std::unique_ptr<SfxBoolItem> pNewHyphItem(pHyphItem->Clone());
pNewHyphItem->SetValue(m_xBtnHyphen->get_active());
rSet->Put(*pNewHyphItem);
bChanged = true;
@@ -347,7 +347,7 @@ bool AlignmentTabPage::FillItemSet( SfxItemSet* rSet )
const SfxBoolItem* pShrinkItem = static_cast<const SfxBoolItem*>(GetOldItem(
*rSet, SID_ATTR_ALIGN_SHRINKTOFIT));
assert(pShrinkItem);
- std::unique_ptr<SfxBoolItem> pNewShrinkItem(static_cast<SfxBoolItem*>(pShrinkItem->Clone()));
+ std::unique_ptr<SfxBoolItem> pNewShrinkItem(pShrinkItem->Clone());
pNewShrinkItem->SetValue(m_xBtnShrink->get_active());
rSet->Put(*pNewShrinkItem);
bChanged = true;