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

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

Change-Id: I2b69af91ad6dac306f626bdd5a434c75be574617
üst 02b4e4cc
......@@ -78,7 +78,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMap
MAP_END()
};
rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac, bForExport);
return new XMLPropertySetMapper(s_aTableStylesProperties, xFac, bForExport);
}
rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper( bool bForExport )
......@@ -92,7 +92,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMa
MAP_END()
};
rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac, bForExport);
return new XMLPropertySetMapper(s_aColumnStylesProperties, xFac, bForExport);
}
rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper( bool bForExport )
......@@ -133,7 +133,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapp
MAP_END()
};
rtl::Reference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory();
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac, bForExport);
return new XMLPropertySetMapper(s_aCellStylesProperties, xFac, bForExport);
}
rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport )
......@@ -145,7 +145,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMappe
MAP_END()
};
rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac, bForExport);
return new XMLPropertySetMapper(s_aStylesProperties, xFac, bForExport);
}
}
......
......@@ -1942,7 +1942,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
// first fill the selection
SbaGridControl* pGrid = getBrowserView()->getVclControl();
MultiSelection* pSelection = (MultiSelection*)pGrid->GetSelection();
MultiSelection* pSelection = const_cast<MultiSelection*>(pGrid->GetSelection());
Sequence< Any > aSelection;
if ( !pGrid->IsAllSelected() )
{ // transfer the selected rows only if not all rows are selected
......
......@@ -345,7 +345,7 @@ namespace dbaui
void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
OUString aText = const_cast< ORelationControl*>(this)->GetCellText( m_nDataPos, nColumnId );
OUString aText = GetCellText( m_nDataPos, nColumnId );
Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
......
......@@ -400,7 +400,7 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
}
else
{
OUString aText(((OTableGrantControl*)this)->GetCellText( m_nDataPos, nColumnId ));
OUString aText(GetCellText( m_nDataPos, nColumnId ));
Point aPos( rRect.TopLeft() );
sal_Int32 nWidth = GetDataWindow().GetTextWidth( aText );
sal_Int32 nHeight = GetDataWindow().GetTextHeight();
......
......@@ -124,22 +124,22 @@ TOTypeInfoSP OTableFieldControl::getTypeInfo(sal_Int32 _nPos)
const OTypeInfoMap* OTableFieldControl::getTypeInfo() const
{
return &const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().getTypeInfo();
return &GetCtrl()->GetView()->getController().getTypeInfo();
}
Locale OTableFieldControl::GetLocale() const
{
return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getLocale();
return GetCtrl()->GetView()->getLocale();
}
bool OTableFieldControl::isAutoIncrementValueEnabled() const
{
return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().isAutoIncrementValueEnabled();
return GetCtrl()->GetView()->getController().isAutoIncrementValueEnabled();
}
OUString OTableFieldControl::getAutoIncrementValue() const
{
return const_cast<OTableFieldControl*>(this)->GetCtrl()->GetView()->getController().getAutoIncrementValue();
return GetCtrl()->GetView()->getController().getAutoIncrementValue();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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