From 0ffaf416ba6ec1d5955008467a5bf46a40ac6640 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 15 Jan 2018 09:01:08 +0100 Subject: More loplugin:cstylecast: writerfilter Change-Id: I06ab6063a4d349859851065b96442564598f9d14 --- writerfilter/source/dmapper/ConversionHelper.cxx | 2 +- writerfilter/source/dmapper/DomainMapper.cxx | 2 +- writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 2 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 2 +- writerfilter/source/dmapper/FormControlHelper.cxx | 2 +- writerfilter/source/dmapper/GraphicImport.cxx | 4 ++-- writerfilter/source/dmapper/OLEHandler.cxx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) (limited to 'writerfilter') diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx index 777fbf9b83da..91b1fb47266f 100644 --- a/writerfilter/source/dmapper/ConversionHelper.cxx +++ b/writerfilter/source/dmapper/ConversionHelper.cxx @@ -264,7 +264,7 @@ void MakeBorderLine( sal_Int32 nLineThickness, sal_Int32 nLineToken, // object size SvxBorderLineStyle const nLineStyle( ::editeng::ConvertBorderStyleFromWord(nLineType)); - rToFill.LineStyle = (sal_Int16)nLineStyle; + rToFill.LineStyle = static_cast(nLineStyle); double const fConverted( (SvxBorderLineStyle::NONE == nLineStyle) ? 0.0 : ::editeng::ConvertBorderWidthFromWord(nLineStyle, nLineThickness, nLineType)); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 12ab244f6604..f79809c78fcd 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2796,7 +2796,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext ) { rContext->Insert(PROP_RUBY_TEXT, uno::makeAny(aInfo.sRubyText)); rContext->Insert(PROP_RUBY_STYLE, uno::makeAny(aInfo.sRubyStyle)); - rContext->Insert(PROP_RUBY_ADJUST, uno::makeAny((sal_Int16)ConversionHelper::convertRubyAlign(aInfo.nRubyAlign))); + rContext->Insert(PROP_RUBY_ADJUST, uno::makeAny(static_cast(ConversionHelper::convertRubyAlign(aInfo.nRubyAlign)))); m_pImpl->SetRubySprmId(0); } } diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 1f8564422e63..88b6b8de7c49 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -863,7 +863,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl { // btLr, so map ParagraphAdjust_CENTER to VertOrientation::CENTER. uno::Reference xPropertySet(m_aTableRanges[nRow][nCell][0], uno::UNO_QUERY); - if (xPropertySet->getPropertyValue("ParaAdjust").get() == (sal_Int16)style::ParagraphAdjust_CENTER) + if (xPropertySet->getPropertyValue("ParaAdjust").get() == sal_Int16(style::ParagraphAdjust_CENTER)) (*aCellIterator)->Insert(PROP_VERT_ORIENT, uno::makeAny(text::VertOrientation::CENTER)); } (*aCellIterator)->Erase(PROP_CELL_DIRECTION); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 5f514dc67709..44287d6ee681 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -3183,7 +3183,7 @@ void DomainMapper_Impl::handleRubyEQField( const FieldContextPtr& pContext) pCharContext->InsertProps(m_pLastCharacterContext); pCharContext->InsertProps(pContext->getProperties()); pCharContext->Insert(PROP_RUBY_TEXT, uno::makeAny( aInfo.sRubyText ) ); - pCharContext->Insert(PROP_RUBY_ADJUST, uno::makeAny((sal_Int16)ConversionHelper::convertRubyAlign(aInfo.nRubyAlign))); + pCharContext->Insert(PROP_RUBY_ADJUST, uno::makeAny(static_cast(ConversionHelper::convertRubyAlign(aInfo.nRubyAlign)))); pCharContext->Insert(PROP_RUBY_STYLE, uno::makeAny(aInfo.sRubyStyle)); appendTextPortion(sPart2, pCharContext); diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx index 13e64697f6b0..a520a81dd7ab 100644 --- a/writerfilter/source/dmapper/FormControlHelper.cxx +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -307,7 +307,7 @@ void FormControlHelper::insertControl(uno::Reference const& xT uno::Reference xShapeProps(xShape, uno::UNO_QUERY); - sal_uInt16 nTmp = (sal_uInt16)text::TextContentAnchorType_AS_CHARACTER; + sal_uInt16 nTmp = sal_uInt16(text::TextContentAnchorType_AS_CHARACTER); xShapeProps->setPropertyValue("AnchorType", uno::makeAny(nTmp)); nTmp = text::VertOrientation::CENTER; diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 3309f8caedd1..56eac22866a2 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -833,7 +833,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) xShapeProps->setPropertyValue("SurroundContour", uno::makeAny(m_pImpl->bContour)); m_pImpl->applyMargins(xShapeProps); xShapeProps->setPropertyValue("Opaque", uno::makeAny(m_pImpl->bOpaque)); - xShapeProps->setPropertyValue("Surround", uno::makeAny((sal_Int32)m_pImpl->nWrap)); + xShapeProps->setPropertyValue("Surround", uno::makeAny(static_cast(m_pImpl->nWrap))); m_pImpl->applyZOrder(xShapeProps); m_pImpl->applyName(xShapeProps); @@ -1253,7 +1253,7 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_OPAQUE ), uno::makeAny(m_pImpl->bOpaque)); } xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_SURROUND ), - uno::makeAny((sal_Int32)m_pImpl->nWrap)); + uno::makeAny(static_cast(m_pImpl->nWrap))); if( m_pImpl->rDomainMapper.IsInTable() && m_pImpl->bLayoutInCell && m_pImpl->nWrap != text::WrapTextMode_THROUGH ) xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_FOLLOW_TEXT_FLOW ), uno::makeAny(true)); diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx index c4fe3337d847..9ddeedd0461a 100644 --- a/writerfilter/source/dmapper/OLEHandler.cxx +++ b/writerfilter/source/dmapper/OLEHandler.cxx @@ -167,7 +167,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm) xShapeProps->setPropertyValue( getPropertyName( PROP_SURROUND ), - uno::makeAny( (sal_Int32)m_nWrapMode ) ); + uno::makeAny( static_cast(m_nWrapMode) ) ); // Through shapes in the header or footer(that spill into the body) should be in the background. // It is just assumed that all shapes will spill into the body. -- cgit