diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:03 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-15 09:04:03 +0100 |
commit | 3ffa72253ba027460232a6aeded8007ad029d125 (patch) | |
tree | 565b58e40527827ede2a6766ec1b55999f5abca3 /reportdesign | |
parent | 59d5d63498a781c8681ee8c3199f95253145b8b7 (diff) |
More loplugin:cstylecast: reportdesign
Change-Id: Ifa0f4e87a4cc5c71955b5dd7b572b6966cc209a5
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/inc/ReportHelperImpl.hxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptModel.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/core/sdr/RptObject.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/filter/xml/xmlHelper.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/inspection/GeometryHandler.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 6 |
6 files changed, 10 insertions, 10 deletions
diff --git a/reportdesign/source/core/inc/ReportHelperImpl.hxx b/reportdesign/source/core/inc/ReportHelperImpl.hxx index 67d59ba2703a..fa59c9c8a80f 100644 --- a/reportdesign/source/core/inc/ReportHelperImpl.hxx +++ b/reportdesign/source/core/inc/ReportHelperImpl.hxx @@ -226,12 +226,12 @@ void SAL_CALL clazz::setCharScaleWidth(::sal_Int16 the_value) \ sal_Int16 SAL_CALL clazz::getParaAdjust() \ { \ ::osl::MutexGuard aGuard(m_aMutex); \ - return (sal_Int16)varName.nAlign; \ + return static_cast<sal_Int16>(varName.nAlign); \ } \ \ void SAL_CALL clazz::setParaAdjust( sal_Int16 _align ) \ { \ - set(PROPERTY_PARAADJUST,(css::style::ParagraphAdjust)_align,varName.nAlign); \ + set(PROPERTY_PARAADJUST,static_cast<css::style::ParagraphAdjust>(_align),varName.nAlign); \ } \ \ awt::FontDescriptor SAL_CALL clazz::getFontDescriptor() \ diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx index 857e0823ab21..e3fc872227f4 100644 --- a/reportdesign/source/core/sdr/RptModel.cxx +++ b/reportdesign/source/core/sdr/RptModel.cxx @@ -121,7 +121,7 @@ SvxNumType OReportModel::GetPageNumType() const { uno::Reference< report::XReportDefinition > xReportDefinition( getReportDefinition() ); if ( xReportDefinition.is() ) - return (SvxNumType) getStyleProperty<sal_Int16>(xReportDefinition,PROPERTY_NUMBERINGTYPE); + return static_cast<SvxNumType>(getStyleProperty<sal_Int16>(xReportDefinition,PROPERTY_NUMBERINGTYPE)); return SVX_NUM_ARABIC; } diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx index a7cadc93e281..a63018c1ab9d 100644 --- a/reportdesign/source/core/sdr/RptObject.cxx +++ b/reportdesign/source/core/sdr/RptObject.cxx @@ -208,7 +208,7 @@ namespace sal_Int16 nTextAlign = 0; sal_Int16 eParagraphAdjust = 0; lhs >>= eParagraphAdjust; - switch((style::ParagraphAdjust)eParagraphAdjust) + switch(static_cast<style::ParagraphAdjust>(eParagraphAdjust)) { case style::ParagraphAdjust_LEFT: case style::ParagraphAdjust_BLOCK: diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index c9b2002dbd3b..949005ac6b09 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -82,7 +82,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 { XML_TOP, style::VerticalAlignment_TOP }, { XML_MIDDLE, style::VerticalAlignment_MIDDLE }, { XML_BOTTOM, style::VerticalAlignment_BOTTOM }, - { XML_TOKEN_INVALID, (style::VerticalAlignment)0 } + { XML_TOKEN_INVALID, style::VerticalAlignment(0) } }; pHandler = new XMLEnumPropertyHdl( pXML_VerticalAlign_Enum ); diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx index 50fc1ceba86c..d849d6e99791 100644 --- a/reportdesign/source/ui/inspection/GeometryHandler.cxx +++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx @@ -1249,12 +1249,12 @@ uno::Any SAL_CALL GeometryHandler::convertToControlValue(const OUString & Proper style::VerticalAlignment nParagraphVertAlign = style::VerticalAlignment_TOP; aPropertyValue >>= nParagraphVertAlign; if (sal_uInt32(nParagraphVertAlign) < SAL_N_ELEMENTS(RID_STR_VERTICAL_ALIGN_CONST) - 1) - aControlValue <<= RptResId(RID_STR_VERTICAL_ALIGN_CONST[(sal_uInt32)nParagraphVertAlign]); + aControlValue <<= RptResId(RID_STR_VERTICAL_ALIGN_CONST[static_cast<sal_uInt32>(nParagraphVertAlign)]); } break; case PROPERTY_ID_PARAADJUST: { - sal_Int16 nParagraphAdjust = (sal_Int16)style::ParagraphAdjust_LEFT; + sal_Int16 nParagraphAdjust = sal_Int16(style::ParagraphAdjust_LEFT); aPropertyValue >>= nParagraphAdjust; if (static_cast<sal_uInt32>(nParagraphAdjust) < SAL_N_ELEMENTS(RID_STR_PARAADJUST_CONST) - 1) aControlValue <<= RptResId(RID_STR_VERTICAL_ALIGN_CONST[nParagraphAdjust]); diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index b3200eeb0f93..e14c979ea9e5 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -858,7 +858,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const ::sal_Int16 nParaAdjust = 0; if ( aReturn.aValue >>= nParaAdjust ) { - switch((style::ParagraphAdjust)nParaAdjust) + switch(static_cast<style::ParagraphAdjust>(nParaAdjust)) { case style::ParagraphAdjust_LEFT: aReturn.bChecked = _nId == SID_ATTR_PARA_ADJUST_LEFT; @@ -1496,7 +1496,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue > eParagraphAdjust = style::ParagraphAdjust_BLOCK; break; } - impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny((sal_Int16)eParagraphAdjust),aArgs); + impl_setPropertyAtControls_throw(RID_STR_UNDO_ALIGNMENT,PROPERTY_PARAADJUST,uno::makeAny(static_cast<sal_Int16>(eParagraphAdjust)),aArgs); InvalidateFeature(SID_ATTR_PARA_ADJUST_LEFT); InvalidateFeature(SID_ATTR_PARA_ADJUST_CENTER); @@ -2423,7 +2423,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ uno::Reference<beans::XPropertySet> xProp(xPageStyle,uno::UNO_QUERY_THROW); aPageItem.PutValue(xProp->getPropertyValue(PROPERTY_PAGESTYLELAYOUT),MID_PAGE_LAYOUT); aPageItem.SetLandscape(getStyleProperty<bool>(m_xReportDefinition,PROPERTY_ISLANDSCAPE)); - aPageItem.SetNumType((SvxNumType)getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE)); + aPageItem.SetNumType(static_cast<SvxNumType>(getStyleProperty<sal_Int16>(m_xReportDefinition,PROPERTY_NUMBERINGTYPE))); pDescriptor->Put(aPageItem); pDescriptor->Put(SvxBrushItem(::Color(getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_BACKCOLOR)),RPTUI_ID_BRUSH)); } |