Kaydet (Commit) 93a364a8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

const_cast: convert some C-style casts and remove some redundant ones

Change-Id: Ic14584cdd1047b2cfc590861b623a7e1e8be4429
üst 0e9f7614
...@@ -131,7 +131,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool ...@@ -131,7 +131,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ), MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END() MAP_END()
}; };
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport); return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
} }
else else
{ {
...@@ -151,7 +151,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool ...@@ -151,7 +151,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ), MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END() MAP_END()
}; };
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport); return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
} }
} }
......
...@@ -336,7 +336,7 @@ Reference < XNameContainer > ...@@ -336,7 +336,7 @@ Reference < XNameContainer >
} }
break; break;
case XML_STYLE_FAMILY_SD_GRAPHICS_ID: case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
xStyles = ((SvXMLImport *)&GetImport())->GetTextImport()->GetFrameStyles(); xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetFrameStyles();
break; break;
default: default:
OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check."); OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
......
...@@ -548,7 +548,7 @@ bool OFieldExpressionControl::SeekRow( long _nRow ) ...@@ -548,7 +548,7 @@ bool OFieldExpressionControl::SeekRow( long _nRow )
void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{ {
OUString aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId ); OUString aText =GetCellText( m_nCurrentPos, nColumnId );
Point aPos( rRect.TopLeft() ); Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() ); Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
......
...@@ -157,7 +157,7 @@ namespace rptui ...@@ -157,7 +157,7 @@ namespace rptui
{ {
uno::Reference<awt::XControl> xControl; uno::Reference<awt::XControl> xControl;
OReportController *pController = (OReportController *)&m_rReportController; OReportController *pController = const_cast<OReportController *>(&m_rReportController);
::boost::shared_ptr<OReportModel> pModel = pController->getSdrModel(); ::boost::shared_ptr<OReportModel> pModel = pController->getSdrModel();
......
...@@ -160,7 +160,7 @@ namespace rptui ...@@ -160,7 +160,7 @@ namespace rptui
{ {
uno::Reference<awt::XVclWindowPeer> xVclWindowPeer; uno::Reference<awt::XVclWindowPeer> xVclWindowPeer;
::boost::shared_ptr<OReportModel> pModel = const_cast< OReportController& >( m_rReportController ).getSdrModel(); ::boost::shared_ptr<OReportModel> pModel = m_rReportController.getSdrModel();
uno::Reference<report::XSection> xSection(_xComponent->getSection()); uno::Reference<report::XSection> xSection(_xComponent->getSection());
if ( xSection.is() ) if ( xSection.is() )
......
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