summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-20 09:01:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-22 06:47:35 +0000
commit7299481834b15c920f996f4b0f3b5f821a82a10d (patch)
tree6cbc8a64399046dd2c83e4a4ef778c65ec00a34a /editeng
parente9c7d259e8ed3144d4226aef7c3de351e4706b79 (diff)
loplugin:redundantcast find redundant c-style enum casts
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349 Reviewed-on: https://gerrit.libreoffice.org/35467 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editdoc.cxx4
-rw-r--r--editeng/source/editeng/eertfpar.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/items/itemtype.cxx8
-rw-r--r--editeng/source/items/textitem.cxx2
5 files changed, 8 insertions, 10 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 95fbb4ddd850..2b2356d07745 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -941,8 +941,8 @@ void ConvertAndPutItems( SfxItemSet& rDest, const SfxItemSet& rSource, const Map
if ( rSource.GetItemState( nSourceWhich, false ) == SfxItemState::SET )
{
- MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : (MapUnit)pSourcePool->GetMetric( nSourceWhich );
- MapUnit eDestUnit = pDestUnit ? *pDestUnit : (MapUnit)pDestPool->GetMetric( nWhich );
+ MapUnit eSourceUnit = pSourceUnit ? *pSourceUnit : pSourcePool->GetMetric( nSourceWhich );
+ MapUnit eDestUnit = pDestUnit ? *pDestUnit : pDestPool->GetMetric( nWhich );
if ( eSourceUnit != eDestUnit )
{
SfxPoolItem* pItem = rSource.Get( nSourceWhich ).Clone();
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 65e24dd5adf0..22ca573a5588 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -305,7 +305,7 @@ void EditRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
const SfxPoolItem* pItem;
// #i66167# adapt font heights to destination MapUnit if necessary
- const MapUnit eDestUnit = (MapUnit)(mpEditEngine->GetEditDoc().GetItemPool().GetMetric(0));
+ const MapUnit eDestUnit = mpEditEngine->GetEditDoc().GetItemPool().GetMetric(0);
const MapUnit eSrcUnit = aRTFMapMode.GetMapUnit();
if (eDestUnit != eSrcUnit)
{
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index d7cb3c4a654f..5e01db42458a 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1224,7 +1224,7 @@ EditSelection ImpEditEngine::InsertTextObject( const EditTextObject& rTextObject
if (rTextObject.mpImpl->HasMetric())
{
eSourceUnit = (MapUnit)rTextObject.mpImpl->GetMetric();
- eDestUnit = (MapUnit)aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
+ eDestUnit = aEditDoc.GetItemPool().GetMetric( DEF_METRIC );
if ( eSourceUnit != eDestUnit )
bConvertMetricOfItems = true;
}
diff --git a/editeng/source/items/itemtype.cxx b/editeng/source/items/itemtype.cxx
index 7cb94d69e718..70036f7c2d34 100644
--- a/editeng/source/items/itemtype.cxx
+++ b/editeng/source/items/itemtype.cxx
@@ -44,8 +44,7 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
case MapUnit::MapMM:
case MapUnit::MapCM:
{
- nRet = (long)OutputDevice::LogicToLogic(
- nVal, (MapUnit)eSrcUnit, (MapUnit)MapUnit::Map100thMM );
+ nRet = (long)OutputDevice::LogicToLogic( nVal, eSrcUnit, MapUnit::Map100thMM );
switch ( eDestUnit )
{
@@ -62,8 +61,7 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
case MapUnit::Map10thInch:
case MapUnit::MapInch:
{
- nRet = OutputDevice::LogicToLogic(
- nVal, (MapUnit)eSrcUnit, (MapUnit)MapUnit::Map1000thInch );
+ nRet = OutputDevice::LogicToLogic( nVal, eSrcUnit, MapUnit::Map1000thInch );
switch ( eDestUnit )
{
@@ -79,7 +77,7 @@ OUString GetMetricText( long nVal, MapUnit eSrcUnit, MapUnit eDestUnit, const In
case MapUnit::MapTwip:
case MapUnit::MapPixel:
return OUString::number( (long)OutputDevice::LogicToLogic(
- nVal, (MapUnit)eSrcUnit, (MapUnit)eDestUnit ));
+ nVal, eSrcUnit, eDestUnit ));
default:
OSL_FAIL( "not supported mapunit" );
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index a5258e0563d8..ab5cd092dd92 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -752,7 +752,7 @@ SfxPoolItem* SvxFontHeightItem::Create( SvStream& rStrm,
}
SvxFontHeightItem* pItem = new SvxFontHeightItem( nsize, 100, Which() );
- pItem->SetProp( nprop, (MapUnit)nPropUnit );
+ pItem->SetProp( nprop, nPropUnit );
return pItem;
}