accessibility/source/extended/accessiblelistbox.cxx | 2 chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx | 2 chart2/source/model/main/Diagram.cxx | 2 compilerplugins/clang/redundantcast.cxx | 42 ++++++++++ connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx | 2 connectivity/source/drivers/evoab2/NResultSet.cxx | 2 connectivity/source/drivers/evoab2/NStatement.cxx | 2 connectivity/source/drivers/file/FResultSet.cxx | 2 connectivity/source/drivers/file/FStatement.cxx | 2 connectivity/source/drivers/firebird/ResultSet.cxx | 2 connectivity/source/drivers/firebird/StatementCommonBase.cxx | 2 connectivity/source/drivers/hsqldb/HTable.cxx | 2 connectivity/source/drivers/jdbc/JStatement.cxx | 2 connectivity/source/drivers/jdbc/ResultSet.cxx | 2 connectivity/source/drivers/kab/KStatement.cxx | 2 connectivity/source/drivers/mork/MCatalog.cxx | 2 connectivity/source/drivers/mork/MResultSet.cxx | 2 connectivity/source/drivers/mork/MStatement.cxx | 2 connectivity/source/drivers/mysql/YTable.cxx | 2 connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx | 2 connectivity/source/drivers/odbc/OResultSet.cxx | 2 connectivity/source/drivers/odbc/OStatement.cxx | 2 connectivity/source/sdbcx/VGroup.cxx | 2 connectivity/source/sdbcx/VKey.cxx | 2 connectivity/source/sdbcx/VTable.cxx | 2 connectivity/source/sdbcx/VUser.cxx | 2 connectivity/source/sdbcx/VView.cxx | 2 cui/source/tabpages/tpbitmap.cxx | 2 dbaccess/source/core/api/RowSetBase.cxx | 2 dbaccess/source/ext/macromigration/macromigrationwizard.cxx | 2 dbaccess/source/ui/querydesign/querycontroller.cxx | 2 dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx | 2 dbaccess/source/ui/uno/DBTypeWizDlg.cxx | 2 dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx | 2 dbaccess/source/ui/uno/TableFilterDlg.cxx | 2 dbaccess/source/ui/uno/UserSettingsDlg.cxx | 2 dbaccess/source/ui/uno/admindlg.cxx | 2 dbaccess/source/ui/uno/unosqlmessage.cxx | 2 extensions/source/abpilot/unodialogabp.cxx | 2 extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 2 extensions/source/propctrlr/controlfontdialog.cxx | 2 extensions/source/propctrlr/formcomponenthandler.cxx | 2 extensions/source/propctrlr/pcrunodialogs.cxx | 2 extensions/source/propctrlr/submissionhandler.cxx | 2 filter/source/flash/swfdialog.cxx | 2 filter/source/pdf/pdfdialog.cxx | 2 filter/source/svg/svgdialog.cxx | 2 forms/source/component/Columns.hxx | 2 forms/source/component/FormComponent.cxx | 2 fpicker/source/office/commonpicker.cxx | 2 mysqlc/source/mysqlc_resultset.cxx | 2 mysqlc/source/mysqlc_statement.cxx | 2 reportdesign/source/core/api/ReportDefinition.cxx | 2 sc/source/ui/unoobj/fielduno.cxx | 4 sd/source/ui/slideshow/slideshowimpl.cxx | 2 starmath/source/document.cxx | 2 svtools/source/uno/toolboxcontroller.cxx | 2 svtools/source/uno/wizard/unowizard.cxx | 2 svx/source/accessibility/GraphCtlAccessibleContext.cxx | 2 svx/source/form/xfm_addcondition.cxx | 2 sw/source/core/doc/docedt.cxx | 2 sw/source/core/edit/editsh.cxx | 4 sw/source/core/layout/calcmove.cxx | 2 sw/source/core/layout/pagechg.cxx | 2 vcl/source/control/edit.cxx | 2 xmlsecurity/source/framework/buffernode.cxx | 2 66 files changed, 109 insertions(+), 67 deletions(-)
New commits: commit 373a9b9bb62c50072c06e28fd932afb6e71ba687 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Apr 13 12:35:57 2015 +0200 loplugin:redundantcast: redundant const_cast followed by implicit upcast Change-Id: I58297ba336d96358eb0683684bbd763870ef56cb diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 3b1800e..ad24412 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -69,7 +69,7 @@ namespace accessibility SvTreeListBox* AccessibleListBox::getListBox() const { - return static_cast< SvTreeListBox* >( const_cast<AccessibleListBox*>(this)->GetWindow() ); + return static_cast< SvTreeListBox* >( GetWindow() ); } void AccessibleListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx index ee3d904..fba9707 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx +++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx @@ -90,7 +90,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ChartTypeUnoDlg::getPropertySe ::cppu::IPropertyArrayHelper& ChartTypeUnoDlg::getInfoHelper() { - return *const_cast<ChartTypeUnoDlg*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* ChartTypeUnoDlg::createArrayHelper( ) const diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 0996f9f..aad77d8 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -703,7 +703,7 @@ void SAL_CALL Diagram::setFastPropertyValue( sal_Int32 nHandle, const Any& rValu if( rValue >>=nNewAngleDegree ) { sal_Int32 nHorizontal, nVertical; - ThreeDHelper::getRotationFromDiagram( const_cast< Diagram* >( this ), nHorizontal, nVertical ); + ThreeDHelper::getRotationFromDiagram( this, nHorizontal, nVertical ); if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle ) nHorizontal = nNewAngleDegree; else diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx index ee731e2..3abf66a 100644 --- a/compilerplugins/clang/redundantcast.cxx +++ b/compilerplugins/clang/redundantcast.cxx @@ -156,6 +156,48 @@ bool RedundantCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) { } } break; + case CK_DerivedToBase: + case CK_UncheckedDerivedToBase: + if (expr->getType()->isPointerType()) { + Expr const * e = expr->getSubExpr()->IgnoreParenImpCasts(); + while (isa<CXXConstCastExpr>(e)) { + auto cc = dyn_cast<CXXConstCastExpr>(e); + if (expr->getType()->getAs<PointerType>()->getPointeeType() + .isAtLeastAsQualifiedAs( + cc->getSubExpr()->getType() + ->getAs<PointerType>()->getPointeeType())) + { + report( + DiagnosticsEngine::Warning, + ("redundant const_cast from %0 to %1, result is" + " ultimately implictly cast to %2"), + cc->getExprLoc()) + << cc->getSubExprAsWritten()->getType() << cc->getType() + << expr->getType() << expr->getSourceRange(); + } + e = cc->getSubExpr()->IgnoreParenImpCasts(); + } + } else if (expr->getType()->isReferenceType()) { + Expr const * e = expr->getSubExpr()->IgnoreParenImpCasts(); + while (isa<CXXConstCastExpr>(e)) { + auto cc = dyn_cast<CXXConstCastExpr>(e); + if (expr->getType()->getAs<ReferenceType>()->getPointeeType() + .isAtLeastAsQualifiedAs( + cc->getSubExpr()->getType() + ->getAs<ReferenceType>()->getPointeeType())) + { + report( + DiagnosticsEngine::Warning, + ("redundant const_cast from %0 to %1, result is" + " ultimately implictly cast to %2"), + cc->getExprLoc()) + << cc->getSubExprAsWritten()->getType() << cc->getType() + << expr->getType() << expr->getSourceRange(); + } + e = cc->getSubExpr()->IgnoreParenImpCasts(); + } + } + break; default: break; } diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 04ddc35..3f9dfc9 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -511,7 +511,7 @@ Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( ) throw(SQLException, Run ::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper() { - return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } void ODatabaseMetaDataResultSet::setProceduresMap() diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index 0ea33b2..a6ce0a4 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -1135,7 +1135,7 @@ sal_Int32 SAL_CALL OEvoabResultSet::findColumn( const OUString& columnName ) thr ::cppu::IPropertyArrayHelper & OEvoabResultSet::getInfoHelper() { - return *const_cast<OEvoabResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } void SAL_CALL OEvoabResultSet::acquire() throw() diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx index 032ec33..d952d48 100644 --- a/connectivity/source/drivers/evoab2/NStatement.cxx +++ b/connectivity/source/drivers/evoab2/NStatement.cxx @@ -528,7 +528,7 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { - return *const_cast< OCommonStatement* >( this )->getArrayHelper(); + return *getArrayHelper(); } diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx index 1394f93..fd11265 100644 --- a/connectivity/source/drivers/file/FResultSet.cxx +++ b/connectivity/source/drivers/file/FResultSet.cxx @@ -798,7 +798,7 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const IPropertyArrayHelper & OResultSet::getInfoHelper() { - return *const_cast<OResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx index a112845..86d882b 100644 --- a/connectivity/source/drivers/file/FStatement.cxx +++ b/connectivity/source/drivers/file/FStatement.cxx @@ -230,7 +230,7 @@ void SAL_CALL OStatement_Base::clearWarnings( ) throw(SQLException, RuntimeExce ::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper() { - return *const_cast<OStatement_Base*>(this)->getArrayHelper(); + return *getArrayHelper(); } OResultSet* OStatement::createResultSet() diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index dd71674..4b14774 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -780,7 +780,7 @@ IPropertyArrayHelper* OResultSet::createArrayHelper() const IPropertyArrayHelper & OResultSet::getInfoHelper() { - return *const_cast<OResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } void SAL_CALL OResultSet::acquire() throw() diff --git a/connectivity/source/drivers/firebird/StatementCommonBase.cxx b/connectivity/source/drivers/firebird/StatementCommonBase.cxx index 6f83c85..9c56020 100644 --- a/connectivity/source/drivers/firebird/StatementCommonBase.cxx +++ b/connectivity/source/drivers/firebird/StatementCommonBase.cxx @@ -289,7 +289,7 @@ void SAL_CALL OStatementCommonBase::clearWarnings() throw(SQLException, RuntimeE ::cppu::IPropertyArrayHelper & OStatementCommonBase::getInfoHelper() { - return *const_cast<OStatementCommonBase*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OStatementCommonBase::convertFastPropertyValue( diff --git a/connectivity/source/drivers/hsqldb/HTable.cxx b/connectivity/source/drivers/hsqldb/HTable.cxx index 632a943..79b263d 100644 --- a/connectivity/source/drivers/hsqldb/HTable.cxx +++ b/connectivity/source/drivers/hsqldb/HTable.cxx @@ -106,7 +106,7 @@ void OHSQLTable::construct() ::cppu::IPropertyArrayHelper & OHSQLTable::getInfoHelper() { - return *static_cast<OHSQLTable_PROP*>(const_cast<OHSQLTable*>(this))->getArrayHelper(isNew() ? 1 : 0); + return *static_cast<OHSQLTable_PROP*>(this)->getArrayHelper(isNew() ? 1 : 0); } sdbcx::OCollection* OHSQLTable::createColumns(const TStringVector& _rNames) diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx index b0a6b1f..838eaa8 100644 --- a/connectivity/source/drivers/jdbc/JStatement.cxx +++ b/connectivity/source/drivers/jdbc/JStatement.cxx @@ -622,7 +622,7 @@ void java_sql_Statement_Base::setCursorName(const OUString &_par0) throw(SQLExce ::cppu::IPropertyArrayHelper & java_sql_Statement_Base::getInfoHelper() { - return *const_cast<java_sql_Statement_Base*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool java_sql_Statement_Base::convertFastPropertyValue( diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx index af3da44..0ad6bb2 100644 --- a/connectivity/source/drivers/jdbc/ResultSet.cxx +++ b/connectivity/source/drivers/jdbc/ResultSet.cxx @@ -891,7 +891,7 @@ void java_sql_ResultSet::setFetchSize(sal_Int32 _par0) throw(::com::sun::star::s ::cppu::IPropertyArrayHelper & java_sql_ResultSet::getInfoHelper() { - return *const_cast<java_sql_ResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool java_sql_ResultSet::convertFastPropertyValue( diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 24241fc..2ae8c25 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -506,7 +506,7 @@ void SAL_CALL KabCommonStatement::clearWarnings( ) throw(SQLException, RuntimeE ::cppu::IPropertyArrayHelper & KabCommonStatement::getInfoHelper() { - return *const_cast<KabCommonStatement*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool KabCommonStatement::convertFastPropertyValue( diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx index a8692ba..88d4c20 100644 --- a/connectivity/source/drivers/mork/MCatalog.cxx +++ b/connectivity/source/drivers/mork/MCatalog.cxx @@ -105,7 +105,7 @@ Reference< XNameAccess > SAL_CALL OCatalog::getTables( ) throw(RuntimeException // allowed } - return const_cast<OCatalog*>(this)->m_pTables; + return m_pTables; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx index 40078e6..d0c74f6 100644 --- a/connectivity/source/drivers/mork/MResultSet.cxx +++ b/connectivity/source/drivers/mork/MResultSet.cxx @@ -614,7 +614,7 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const IPropertyArrayHelper & OResultSet::getInfoHelper() { - return *const_cast<OResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OResultSet::convertFastPropertyValue( diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx index 12a6725..423d6c5 100644 --- a/connectivity/source/drivers/mork/MStatement.cxx +++ b/connectivity/source/drivers/mork/MStatement.cxx @@ -363,7 +363,7 @@ void SAL_CALL OCommonStatement::clearWarnings( ) throw(SQLException, RuntimeExc ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { - return *const_cast<OCommonStatement*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OCommonStatement::convertFastPropertyValue( diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx index 8268773..74a8744 100644 --- a/connectivity/source/drivers/mysql/YTable.cxx +++ b/connectivity/source/drivers/mysql/YTable.cxx @@ -125,7 +125,7 @@ void OMySQLTable::construct() ::cppu::IPropertyArrayHelper & OMySQLTable::getInfoHelper() { - return *static_cast<OMySQLTable_PROP*>(const_cast<OMySQLTable*>(this))->getArrayHelper(isNew() ? 1 : 0); + return *static_cast<OMySQLTable_PROP*>(this)->getArrayHelper(isNew() ? 1 : 0); } sdbcx::OCollection* OMySQLTable::createColumns(const TStringVector& _rNames) diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx index 25105b0..a4d019d 100644 --- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx +++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx @@ -729,7 +729,7 @@ OUString ODatabaseMetaDataResultSet::getCursorName() const throw(SQLException, R ::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper() { - return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool ODatabaseMetaDataResultSet::convertFastPropertyValue( diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx index c3eadb0..426b869 100644 --- a/connectivity/source/drivers/odbc/OResultSet.cxx +++ b/connectivity/source/drivers/odbc/OResultSet.cxx @@ -1434,7 +1434,7 @@ IPropertyArrayHelper* OResultSet::createArrayHelper( ) const IPropertyArrayHelper & OResultSet::getInfoHelper() { - return *const_cast<OResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OResultSet::convertFastPropertyValue( diff --git a/connectivity/source/drivers/odbc/OStatement.cxx b/connectivity/source/drivers/odbc/OStatement.cxx index ca6cec3..6ecadf4 100644 --- a/connectivity/source/drivers/odbc/OStatement.cxx +++ b/connectivity/source/drivers/odbc/OStatement.cxx @@ -915,7 +915,7 @@ void OStatement_Base::setUsingBookmarks(bool _bUseBookmark) ::cppu::IPropertyArrayHelper & OStatement_Base::getInfoHelper() { - return *const_cast<OStatement_Base*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OStatement_Base::convertFastPropertyValue( diff --git a/connectivity/source/sdbcx/VGroup.cxx b/connectivity/source/sdbcx/VGroup.cxx index c71f22e..1bf65b9 100644 --- a/connectivity/source/sdbcx/VGroup.cxx +++ b/connectivity/source/sdbcx/VGroup.cxx @@ -86,7 +86,7 @@ void OGroup::disposing(void) ::cppu::IPropertyArrayHelper & OGroup::getInfoHelper() { - return *const_cast<OGroup*>(this)->getArrayHelper(); + return *getArrayHelper(); } Reference< XNameAccess > SAL_CALL OGroup::getUsers( ) throw(RuntimeException, std::exception) diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx index ccd9e9b..59d8206 100644 --- a/connectivity/source/sdbcx/VKey.cxx +++ b/connectivity/source/sdbcx/VKey.cxx @@ -148,7 +148,7 @@ void SAL_CALL OKey::disposing() ::cppu::IPropertyArrayHelper & OKey::getInfoHelper() { - return *const_cast<OKey*>(this)->getArrayHelper(isNew() ? 1 : 0); + return *getArrayHelper(isNew() ? 1 : 0); } Reference< ::com::sun::star::container::XNameAccess > SAL_CALL OKey::getColumns( ) throw(RuntimeException, std::exception) diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index dffe47b..7828c7e 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -220,7 +220,7 @@ cppu::IPropertyArrayHelper* OTable::createArrayHelper( sal_Int32 /*_nId*/ ) cons cppu::IPropertyArrayHelper & OTable::getInfoHelper() { - return *const_cast<OTable*>(this)->getArrayHelper(isNew() ? 1 : 0); + return *getArrayHelper(isNew() ? 1 : 0); } Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(RuntimeException, std::exception) diff --git a/connectivity/source/sdbcx/VUser.cxx b/connectivity/source/sdbcx/VUser.cxx index 393493b..b74842c 100644 --- a/connectivity/source/sdbcx/VUser.cxx +++ b/connectivity/source/sdbcx/VUser.cxx @@ -86,7 +86,7 @@ Sequence< Type > SAL_CALL OUser::getTypes( ) throw(RuntimeException, std::excep ::cppu::IPropertyArrayHelper & OUser::getInfoHelper() { - return *const_cast<OUser*>(this)->getArrayHelper(); + return *getArrayHelper(); } // XUser diff --git a/connectivity/source/sdbcx/VView.cxx b/connectivity/source/sdbcx/VView.cxx index be69eb6..a1c9813 100644 --- a/connectivity/source/sdbcx/VView.cxx +++ b/connectivity/source/sdbcx/VView.cxx @@ -93,7 +93,7 @@ Any SAL_CALL OView::queryInterface( const Type & rType ) throw(RuntimeException, ::cppu::IPropertyArrayHelper & OView::getInfoHelper() { - return *const_cast<OView*>(this)->getArrayHelper(isNew() ? 1 : 0); + return *getArrayHelper(isNew() ? 1 : 0); } OUString SAL_CALL OView::getName() throw(::com::sun::star::uno::RuntimeException, std::exception) diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx index 54eecc0..fdca9bc 100644 --- a/cui/source/tabpages/tpbitmap.cxx +++ b/cui/source/tabpages/tpbitmap.cxx @@ -969,7 +969,7 @@ void SvxBitmapTabPage::PointChanged( vcl::Window* pWindow, RECT_POINT ) vcl::Window* SvxBitmapTabPage::GetParentLabeledBy( const vcl::Window* pLabeled ) const { if (pLabeled == m_pLbBitmaps) - return const_cast<FixedText*>(m_pLbBitmapsHidden); + return m_pLbBitmapsHidden; else return SvxTabPage::GetParentLabeledBy (pLabeled); } diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 43acaa9..cad73d9 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -182,7 +182,7 @@ void SAL_CALL ORowSetBase::disposing(void) // cppu::OPropertySetHelper ::cppu::IPropertyArrayHelper& SAL_CALL ORowSetBase::getInfoHelper() { - return *const_cast<ORowSetBase*>(this)->getArrayHelper(); + return *getArrayHelper(); } // XRow diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx index f610454..5966a9b 100644 --- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx @@ -197,7 +197,7 @@ namespace dbmm ::cppu::IPropertyArrayHelper& SAL_CALL MacroMigrationDialogService::getInfoHelper() { - return *const_cast< MacroMigrationDialogService* >( this )->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* MacroMigrationDialogService::createArrayHelper( ) const diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 74aeeda..c1f5fe7 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -413,7 +413,7 @@ void SAL_CALL OQueryController::getFastPropertyValue( Any& o_rValue, sal_Int32 i ::cppu::IPropertyArrayHelper& OQueryController::getInfoHelper() { - return *const_cast< OQueryController* >( this )->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OQueryController::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx index cf90db4..ec95940 100644 --- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx @@ -110,7 +110,7 @@ namespace dbaui ::cppu::IPropertyArrayHelper& OAdvancedSettingsDialog::getInfoHelper() { - return *const_cast<OAdvancedSettingsDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OAdvancedSettingsDialog::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx index bc18739..6c5d796 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx @@ -82,7 +82,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() thr ::cppu::IPropertyArrayHelper& ODBTypeWizDialog::getInfoHelper() { - return *const_cast<ODBTypeWizDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* ODBTypeWizDialog::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx index 15dcaa2..4c46903 100644 --- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx +++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx @@ -96,7 +96,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo( ::cppu::IPropertyArrayHelper& ODBTypeWizDialogSetup::getInfoHelper() { - return *const_cast<ODBTypeWizDialogSetup*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* ODBTypeWizDialogSetup::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx index 9f28426..475c664 100644 --- a/dbaccess/source/ui/uno/TableFilterDlg.cxx +++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx @@ -82,7 +82,7 @@ Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo() t ::cppu::IPropertyArrayHelper& OTableFilterDialog::getInfoHelper() { - return *const_cast<OTableFilterDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OTableFilterDialog::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx index e66d888..55bab9fc 100644 --- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx +++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx @@ -82,7 +82,7 @@ Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo() ::cppu::IPropertyArrayHelper& OUserSettingsDialog::getInfoHelper() { - return *const_cast<OUserSettingsDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OUserSettingsDialog::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx index f2f52d6..d6f7a98 100644 --- a/dbaccess/source/ui/uno/admindlg.cxx +++ b/dbaccess/source/ui/uno/admindlg.cxx @@ -82,7 +82,7 @@ Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetI ::cppu::IPropertyArrayHelper& ODataSourcePropertyDialog::getInfoHelper() { - return *const_cast<ODataSourcePropertyDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* ODataSourcePropertyDialog::createArrayHelper( ) const diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx index df63516..ec22c95 100644 --- a/dbaccess/source/ui/uno/unosqlmessage.cxx +++ b/dbaccess/source/ui/uno/unosqlmessage.cxx @@ -131,7 +131,7 @@ Reference<XPropertySetInfo> SAL_CALL OSQLMessageDialog::getPropertySetInfo() th ::cppu::IPropertyArrayHelper& OSQLMessageDialog::getInfoHelper() { - return *const_cast<OSQLMessageDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OSQLMessageDialog::createArrayHelper( ) const diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx index dd24e0c..f8afef0 100644 --- a/extensions/source/abpilot/unodialogabp.cxx +++ b/extensions/source/abpilot/unodialogabp.cxx @@ -128,7 +128,7 @@ namespace abp ::cppu::IPropertyArrayHelper& OABSPilotUno::getInfoHelper() { - return *const_cast<OABSPilotUno*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx index 351669a..8f7f24b 100644 --- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx +++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx @@ -91,7 +91,7 @@ namespace pcr ::cppu::IPropertyArrayHelper& MasterDetailLinkDialog::getInfoHelper() { - return *const_cast<MasterDetailLinkDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx index 66718f0..371ca6a 100644 --- a/extensions/source/propctrlr/controlfontdialog.cxx +++ b/extensions/source/propctrlr/controlfontdialog.cxx @@ -129,7 +129,7 @@ namespace pcr ::cppu::IPropertyArrayHelper& OControlFontDialog::getInfoHelper() { - return *const_cast<OControlFontDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 1059415..e453981 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -3314,7 +3314,7 @@ namespace pcr ::cppu::IPropertyArrayHelper & FormComponentPropertyHandler::getInfoHelper() { - return *const_cast<FormComponentPropertyHandler*>(this)->getArrayHelper(); + return *getArrayHelper(); } uno::Reference< beans::XPropertySetInfo > SAL_CALL FormComponentPropertyHandler::getPropertySetInfo( ) throw(uno::RuntimeException, std::exception) diff --git a/extensions/source/propctrlr/pcrunodialogs.cxx b/extensions/source/propctrlr/pcrunodialogs.cxx index 9c26eb5..2f2d560 100644 --- a/extensions/source/propctrlr/pcrunodialogs.cxx +++ b/extensions/source/propctrlr/pcrunodialogs.cxx @@ -118,7 +118,7 @@ namespace pcr ::cppu::IPropertyArrayHelper& OTabOrderDialog::getInfoHelper() { - return *const_cast< OTabOrderDialog* >( this )->getArrayHelper(); + return *getArrayHelper(); } diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index dd7432a..e338f58 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -292,7 +292,7 @@ namespace pcr switch ( nPropId ) { case PROPERTY_ID_SUBMISSION_ID: - const_cast< SubmissionHelper* >( m_pHelper.get() )->getAllElementUINames( EFormsHelper::Submission, aListEntries, false ); + m_pHelper.get()->getAllElementUINames( EFormsHelper::Submission, aListEntries, false ); break; case PROPERTY_ID_XFORMS_BUTTONTYPE: diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index 981731a..64a182f 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -201,7 +201,7 @@ Reference< XPropertySetInfo > SAL_CALL SWFDialog::getPropertySetInfo() ::cppu::IPropertyArrayHelper& SWFDialog::getInfoHelper() { - return *const_cast<SWFDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/filter/source/pdf/pdfdialog.cxx b/filter/source/pdf/pdfdialog.cxx index 9db0eb6..93de5b4 100644 --- a/filter/source/pdf/pdfdialog.cxx +++ b/filter/source/pdf/pdfdialog.cxx @@ -141,7 +141,7 @@ Reference< XPropertySetInfo > SAL_CALL PDFDialog::getPropertySetInfo() ::cppu::IPropertyArrayHelper& PDFDialog::getInfoHelper() { - return *const_cast<PDFDialog*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/filter/source/svg/svgdialog.cxx b/filter/source/svg/svgdialog.cxx index fe58a3a..ccc9b45 100644 --- a/filter/source/svg/svgdialog.cxx +++ b/filter/source/svg/svgdialog.cxx @@ -171,7 +171,7 @@ Reference< XPropertySetInfo > SAL_CALL SVGDialog::getPropertySetInfo() ::cppu::IPropertyArrayHelper& SVGDialog::getInfoHelper() { - return *const_cast< SVGDialog *>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx index d619b6e..ecfa789 100644 --- a/forms/source/component/Columns.hxx +++ b/forms/source/component/Columns.hxx @@ -150,7 +150,7 @@ ClassName::ClassName( const ClassName* _pCloneFrom ) \ } \ ::cppu::IPropertyArrayHelper& ClassName::getInfoHelper() \ { \ - return *const_cast<ClassName*>(this)->getArrayHelper(); \ + return *getArrayHelper(); \ } \ void ClassName::fillProperties( \ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rProps, \ diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 3e22d71..86ab00c 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -2027,7 +2027,7 @@ bool OBoundControlModel::approveDbColumnType(sal_Int32 _nColumnType) void OBoundControlModel::impl_determineAmbientForm_nothrow() { - Reference< XInterface > xParent( const_cast< OBoundControlModel* >( this )->getParent() ); + Reference< XInterface > xParent( getParent() ); m_xAmbientForm.set( xParent, UNO_QUERY ); if ( !m_xAmbientForm.is() ) { diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx index 84488d8..c6da4db 100644 --- a/fpicker/source/office/commonpicker.cxx +++ b/fpicker/source/office/commonpicker.cxx @@ -175,7 +175,7 @@ namespace svt ::cppu::IPropertyArrayHelper& SAL_CALL OCommonPicker::getInfoHelper() { - return *const_cast< OCommonPicker* >( this )->getArrayHelper(); + return *getArrayHelper(); } diff --git a/mysqlc/source/mysqlc_resultset.cxx b/mysqlc/source/mysqlc_resultset.cxx index ec75001..2ef646c 100644 --- a/mysqlc/source/mysqlc_resultset.cxx +++ b/mysqlc/source/mysqlc_resultset.cxx @@ -1120,7 +1120,7 @@ IPropertyArrayHelper * OResultSet::createArrayHelper() const IPropertyArrayHelper & OResultSet::getInfoHelper() { OSL_TRACE("OResultSet::getInfoHelper"); - return *const_cast<OResultSet*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OResultSet::convertFastPropertyValue(Any & /* rConvertedValue */, diff --git a/mysqlc/source/mysqlc_statement.cxx b/mysqlc/source/mysqlc_statement.cxx index 9bd069c..209d31a 100644 --- a/mysqlc/source/mysqlc_statement.cxx +++ b/mysqlc/source/mysqlc_statement.cxx @@ -327,7 +327,7 @@ void SAL_CALL OCommonStatement::clearWarnings() ::cppu::IPropertyArrayHelper & OCommonStatement::getInfoHelper() { OSL_TRACE("OCommonStatement::getInfoHelper"); - return *const_cast<OCommonStatement*>(this)->getArrayHelper(); + return *getArrayHelper(); } sal_Bool OCommonStatement::convertFastPropertyValue( diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 6dd1419..2b08c5d 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -407,7 +407,7 @@ void OStyle::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, uno::Any& /*_rD ::cppu::IPropertyArrayHelper& OStyle::getInfoHelper() { - return *const_cast<OStyle*>(this)->getArrayHelper(); + return *getArrayHelper(); } ::cppu::IPropertyArrayHelper* OStyle::createArrayHelper( ) const diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 0daeb81..94c29dc 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -418,7 +418,7 @@ void SAL_CALL ScCellFieldsObj::refresh( ) if (pInterfaces) { lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(const_cast<ScCellFieldsObj*>(this))); + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); sal_uInt32 i(0); while (i < nLength) { @@ -598,7 +598,7 @@ void SAL_CALL ScHeaderFieldsObj::refresh( ) if (pInterfaces) { lang::EventObject aEvent; - aEvent.Source.set(uno::Reference< util::XRefreshable >(const_cast<ScHeaderFieldsObj*>(this))); + aEvent.Source.set(uno::Reference< util::XRefreshable >(this)); sal_uInt32 i(0); while (i < nLength) { diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 207e01b..eac84da 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2500,7 +2500,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide ) for( SdCustomShow::PageVec::iterator it = pCustomShow->PagesVector().begin(); it != pCustomShow->PagesVector().end(); ++it, nSlideIndex++ ) { - const sal_uInt16 nSdSlide = ( const_cast<SdPage*>(*it)->GetPageNum() - 1 ) / 2; + const sal_uInt16 nSdSlide = ( (*it)->GetPageNum() - 1 ) / 2; if( !( mpDoc->GetSdPage( nSdSlide, PK_STANDARD ) )->IsExcluded()) mpSlideController->insertSlideNumber( nSdSlide ); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 6252dcd..c1fdc10 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -142,7 +142,7 @@ void SmDocShell::LoadSymbols() const OUString SmDocShell::GetComment() const { uno::Reference<document::XDocumentPropertiesSupplier> xDPS( - const_cast<SmDocShell*>(this)->GetModel(), uno::UNO_QUERY_THROW); + GetModel(), uno::UNO_QUERY_THROW); uno::Reference<document::XDocumentProperties> xDocProps( xDPS->getDocumentProperties()); return xDocProps->getDescription(); diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 5b21c44..a22fd41 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -708,7 +708,7 @@ com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > SAL_C ::cppu::IPropertyArrayHelper& ToolboxController::getInfoHelper() { - return *const_cast<ToolboxController*>(this)->getArrayHelper(); + return *getArrayHelper(); } diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index c9d4a8f..b0998a5 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -308,7 +308,7 @@ namespace { ::cppu::IPropertyArrayHelper& SAL_CALL Wizard::getInfoHelper() { - return *const_cast< Wizard* >( this )->getArrayHelper(); + return *getArrayHelper(); } diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx index 12d983a..ecb05b5 100644 --- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx +++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx @@ -116,7 +116,7 @@ SvxGraphCtrlAccessibleContext::SvxGraphCtrlAccessibleContext( maTreeInfo.SetSdrView( mpView ); maTreeInfo.SetWindow( mpControl ); - maTreeInfo.SetViewForwarder( const_cast<SvxGraphCtrlAccessibleContext*>(this) ); + maTreeInfo.SetViewForwarder( this ); } diff --git a/svx/source/form/xfm_addcondition.cxx b/svx/source/form/xfm_addcondition.cxx index 8a0c275..58e3fe5 100644 --- a/svx/source/form/xfm_addcondition.cxx +++ b/svx/source/form/xfm_addcondition.cxx @@ -133,7 +133,7 @@ namespace svxform ::cppu::IPropertyArrayHelper& OAddConditionDialog::getInfoHelper() { - return *const_cast< OAddConditionDialog* >( this )->getArrayHelper(); + return *getArrayHelper(); } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 4a59df7..9095f52 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -578,7 +578,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, uno::Reference< linguistic2::XProofreadingIterator > xGCIterator( GetGCIterator() ); if (xGCIterator.is()) { - uno::Reference< lang::XComponent > xDoc( const_cast<SwDocShell*>(GetDocShell())->GetBaseModel(), uno::UNO_QUERY ); + uno::Reference< lang::XComponent > xDoc( GetDocShell()->GetBaseModel(), uno::UNO_QUERY ); // Expand the string: const ModelToViewHelper aConversionMap(*pNd->GetTxtNode()); OUString aExpandText = aConversionMap.getViewText(); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 148ea26..08fb7de 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -321,7 +321,7 @@ void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) pNd->SetContour( pPoly ); SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper()); const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround(); - pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) ); + pFly->GetFmt()->NotifyClients( &rSur, &rSur ); GetDoc()->getIDocumentState().SetModified(); EndAllAction(); } @@ -336,7 +336,7 @@ void SwEditShell::ClearAutomaticContour() pNd->SetContour( NULL, false ); SwFlyFrm *pFly = static_cast<SwFlyFrm*>(pNd->getLayoutFrm(GetLayout())->GetUpper()); const SwFmtSurround &rSur = pFly->GetFmt()->GetSurround(); - pFly->GetFmt()->NotifyClients( const_cast<SwFmtSurround*>(&rSur), const_cast<SwFmtSurround*>(&rSur) ); + pFly->GetFmt()->NotifyClients( &rSur, &rSur ); GetDoc()->getIDocumentState().SetModified(); EndAllAction(); } diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index 9e951b6..d808f5c 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1549,7 +1549,7 @@ void SwCntntFrm::MakeAll() // Finally, we are able to split table rows. Therefore, bDontMoveMe // can be set to false: if( bDontMoveMe && IsInTab() && - 0 != const_cast<SwCntntFrm*>(this)->GetNextCellLeaf( MAKEPAGE_NONE ) ) + 0 != GetNextCellLeaf( MAKEPAGE_NONE ) ) bDontMoveMe = false; if ( bDontMoveMe && (Frm().*fnRect->fnGetHeight)() > diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index e4a55ac..6194044 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1479,7 +1479,7 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) nCnt != pPage->GetSortedObjs()->size(), "Object couldn't be reattached!" ); #else - rFmt.NotifyClients( 0, const_cast<SwFmtAnchor*>(&rAnch) ); + rFmt.NotifyClients( 0, &rAnch ); #endif // Do not increment index, in this case continue; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index a35327a..6c73742 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1304,7 +1304,7 @@ void Edit::ImplPaste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC OUString aText; aData >>= aText; if( ImplTruncateToMaxLen( aText, maSelection.Len() ) ) - ShowTruncationWarning( const_cast<Edit*>(this) ); + ShowTruncationWarning( this ); ReplaceSelected( aText ); } catch( const ::com::sun::star::uno::Exception& ) diff --git a/xmlsecurity/source/framework/buffernode.cxx b/xmlsecurity/source/framework/buffernode.cxx index 7b7b78a..cbe27e7 100644 --- a/xmlsecurity/source/framework/buffernode.cxx +++ b/xmlsecurity/source/framework/buffernode.cxx @@ -269,7 +269,7 @@ OUString BufferNode::printChildren() const rc += OUString( "(" ); rc += OUString( "SecID=" ); - rc += OUString::number(const_cast<ElementCollector*>(*ii)->getSecurityId()); + rc += OUString::number((*ii)->getSecurityId()); rc += OUString( ")" ); rc += OUString( " " ); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits