summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:30:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:34 +0100
commit93a364a8aee1fcf5c3f6185dfe067f06929ab4e7 (patch)
tree8f37be07e0e1ae4c1d1ef8456aec997bae1fe86f /reportdesign
parent0e9f7614893405dd27a00ccd7274ed3097ac73d7 (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: Ic14584cdd1047b2cfc590861b623a7e1e8be4429
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlHelper.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlStyleImport.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/report/FixedTextColor.cxx2
-rw-r--r--reportdesign/source/ui/report/FormattedFieldBeautifier.cxx2
5 files changed, 6 insertions, 6 deletions
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index e2c57547f17c..0540ca6b1f7d 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -131,7 +131,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
+ return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
else
{
@@ -151,7 +151,7 @@ rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
+ return new XMLPropertySetMapper(s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
}
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index b94085932fea..5ccd4e5eb0c0 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -336,7 +336,7 @@ Reference < XNameContainer >
}
break;
case XML_STYLE_FAMILY_SD_GRAPHICS_ID:
- xStyles = ((SvXMLImport *)&GetImport())->GetTextImport()->GetFrameStyles();
+ xStyles = const_cast<SvXMLImport *>(&GetImport())->GetTextImport()->GetFrameStyles();
break;
default:
OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 5b3dbf20bd0d..b6e687dc7c55 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -548,7 +548,7 @@ bool OFieldExpressionControl::SeekRow( long _nRow )
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() );
Size aTextSize( GetDataWindow().GetTextWidth( aText ), GetDataWindow().GetTextHeight() );
diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx
index 17273c60d498..ca3029b0ad31 100644
--- a/reportdesign/source/ui/report/FixedTextColor.cxx
+++ b/reportdesign/source/ui/report/FixedTextColor.cxx
@@ -157,7 +157,7 @@ namespace rptui
{
uno::Reference<awt::XControl> xControl;
- OReportController *pController = (OReportController *)&m_rReportController;
+ OReportController *pController = const_cast<OReportController *>(&m_rReportController);
::boost::shared_ptr<OReportModel> pModel = pController->getSdrModel();
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index 217d725d2820..a2ca68daba83 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -160,7 +160,7 @@ namespace rptui
{
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());
if ( xSection.is() )