[Libreoffice-commits] core.git: cui/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 21 18:30:58 UTC 2021
cui/source/tabpages/textattr.cxx | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 134d59017fa61afff4248d1eeebb24ba336add07
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri May 21 15:01:58 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri May 21 20:30:19 2021 +0200
Don't upcast only to downcast immediately
Change-Id: I6d331708c281851f28e9800b7deeaee634310c21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115848
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 679bb8dce740..2e2c42bfa540 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -111,32 +111,32 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs )
DBG_ASSERT( pPool, "Where is the pool?" );
MapUnit eUnit = pPool->GetMetric( SDRATTR_TEXT_LEFTDIST );
- const SfxPoolItem* pItem = GetItem( *rAttrs, SDRATTR_TEXT_LEFTDIST );
+ const SdrMetricItem* pItem = GetItem(*rAttrs, SDRATTR_TEXT_LEFTDIST);
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LEFTDIST );
- SetMetricValue(*m_xMtrFldLeft, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
+ SetMetricValue(*m_xMtrFldLeft, pItem->GetValue(), eUnit);
m_xMtrFldLeft->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_RIGHTDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_RIGHTDIST );
- SetMetricValue(*m_xMtrFldRight, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
+ SetMetricValue(*m_xMtrFldRight, pItem->GetValue(), eUnit);
m_xMtrFldRight->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_UPPERDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_UPPERDIST );
- SetMetricValue(*m_xMtrFldTop, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
+ SetMetricValue(*m_xMtrFldTop, pItem->GetValue(), eUnit);
m_xMtrFldTop->save_value();
pItem = GetItem( *rAttrs, SDRATTR_TEXT_LOWERDIST );
if( !pItem )
pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_LOWERDIST );
- SetMetricValue(*m_xMtrFldBottom, static_cast<const SdrMetricItem*>(pItem)->GetValue(), eUnit);
+ SetMetricValue(*m_xMtrFldBottom, pItem->GetValue(), eUnit);
m_xMtrFldBottom->save_value();
// adjust to height and autogrowsize
More information about the Libreoffice-commits
mailing list