Kaydet (Commit) 3ffa7225 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

More loplugin:cstylecast: reportdesign

Change-Id: Ifa0f4e87a4cc5c71955b5dd7b572b6966cc209a5
üst 59d5d634
......@@ -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() \
......
......@@ -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;
}
......
......@@ -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:
......
......@@ -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 );
......
......@@ -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]);
......
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment