diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/api/OptimisticSet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/intercept.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/inc/apitools.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/exsrcbrw.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 18 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/TextConnectionHelper.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TableCopyHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/querycontroller.cxx | 2 |
15 files changed, 49 insertions, 49 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index b82e7311d07a..bf0b4589d817 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -323,7 +323,7 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet, const OUStrin // the first row is empty because it's now easier for us to distinguish when we are beforefirst or first // without extra variable to be set - OKeySetValue keySetValue((ORowSetValueVector *)NULL,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); + OKeySetValue keySetValue(nullptr,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); m_aKeyMap.insert(OKeySetMatrix::value_type(0, keySetValue)); m_aKeyIter = m_aKeyMap.begin(); } @@ -333,7 +333,7 @@ void OKeySet::reset(const Reference< XResultSet>& _xDriverSet) OCacheSet::construct(_xDriverSet, m_sRowSetFilter); m_bRowCountFinal = false; m_aKeyMap.clear(); - OKeySetValue keySetValue((ORowSetValueVector *)NULL,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); + OKeySetValue keySetValue(nullptr,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue)); m_aKeyIter = m_aKeyMap.begin(); } diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx index f48c0b101d7a..4a917821fcbf 100644 --- a/dbaccess/source/core/api/OptimisticSet.cxx +++ b/dbaccess/source/core/api/OptimisticSet.cxx @@ -125,7 +125,7 @@ void OptimisticSet::construct(const Reference< XResultSet>& _xDriverSet,const OU // the first row is empty because it's now easier for us to distinguish when we are beforefirst or first // without extra variable to be set - OKeySetValue keySetValue((ORowSetValueVector *)NULL,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); + OKeySetValue keySetValue(nullptr,::std::pair<sal_Int32,Reference<XRow> >(0,Reference<XRow>())); m_aKeyMap.insert(OKeySetMatrix::value_type(0,keySetValue)); m_aKeyIter = m_aKeyMap.begin(); diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx index d0560ab92c38..d6c05953941f 100644 --- a/dbaccess/source/core/dataaccess/intercept.cxx +++ b/dbaccess/source/core/dataaccess/intercept.cxx @@ -327,7 +327,7 @@ Reference< XDispatch > SAL_CALL OInterceptor::queryDispatch( const URL& _URL,con for(;pIter != pEnd;++pIter) { if ( _URL.Complete == *pIter ) - return (XDispatch*)this; + return static_cast<XDispatch*>(this); } if(m_xSlaveDispatchProvider.is()) @@ -353,7 +353,7 @@ Sequence< Reference< XDispatch > > SAL_CALL OInterceptor::queryDispatches( cons { if ( Requests[i].FeatureURL.Complete == *pIter ) { - aRet[i] = (XDispatch*) this; + aRet[i] = static_cast<XDispatch*>(this); break; } } diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx index bf3302337036..6672420abac6 100644 --- a/dbaccess/source/inc/apitools.hxx +++ b/dbaccess/source/inc/apitools.hxx @@ -54,7 +54,7 @@ public: virtual void SAL_CALL release() throw() SAL_OVERRIDE; inline operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () const - { return (::com::sun::star::uno::XWeak *)this; } + { return static_cast<com::sun::star::uno::XWeak *>(const_cast<OSubComponent *>(this)); } }; diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 4ba23fa758d6..892ed3500f79 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -617,7 +617,7 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx { ::connectivity::SQLError aError( getORB() ); ::connectivity::ErrorCode nErrorCode( connectivity::SQLError::getErrorCode( sdb::ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED ) ); - if ( ((const SQLException*)_rError)->ErrorCode == nErrorCode ) + if ( static_cast<const SQLException*>(_rError)->ErrorCode == nErrorCode ) { m_bCannotSelectUnfiltered = true; InvalidateFeature( ID_BROWSER_FILTERCRIT ); @@ -817,14 +817,14 @@ bool SbaXDataBrowserController::Construct(vcl::Window* pParent) } Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xFormError(getRowSet(), UNO_QUERY); if (xFormError.is()) - xFormError->addSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); + xFormError->addSQLErrorListener(static_cast<com::sun::star::sdb::XSQLErrorListener*>(this)); if (m_xLoadable.is()) m_xLoadable->addLoadListener(this); Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); if (xFormParameter.is()) - xFormParameter->addParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); + xFormParameter->addParameterListener(static_cast<com::sun::star::form::XDatabaseParameterListener*>(this)); addModelListeners(getControlModel()); addControlListeners(getBrowserView()->getGridControl()); @@ -870,11 +870,11 @@ void SbaXDataBrowserController::addModelListeners(const Reference< ::com::sun::s // (we are interested in all columns the grid has (and only in these) so we have to listen to the container, too) Reference< ::com::sun::star::container::XContainer > xColContainer(_xGridControlModel, UNO_QUERY); if (xColContainer.is()) - xColContainer->addContainerListener((::com::sun::star::container::XContainerListener*)this); + xColContainer->addContainerListener(static_cast<com::sun::star::container::XContainerListener*>(this)); Reference< ::com::sun::star::form::XReset > xReset(_xGridControlModel, UNO_QUERY); if (xReset.is()) - xReset->addResetListener((::com::sun::star::form::XResetListener*)this); + xReset->addResetListener(static_cast<com::sun::star::form::XResetListener*>(this)); } void SbaXDataBrowserController::removeModelListeners(const Reference< XControlModel > & _xGridControlModel) @@ -1002,14 +1002,14 @@ void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang: Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xFormError(Source.Source, UNO_QUERY); if (xFormError.is()) - xFormError->removeSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); + xFormError->removeSQLErrorListener(static_cast<com::sun::star::sdb::XSQLErrorListener*>(this)); if (m_xLoadable.is()) m_xLoadable->removeLoadListener(this); Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(Source.Source, UNO_QUERY); if (xFormParameter.is()) - xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); + xFormParameter->removeParameterListener(static_cast<com::sun::star::form::XDatabaseParameterListener*>(this)); } void SbaXDataBrowserController::disposingColumnModel(const ::com::sun::star::lang::EventObject& Source) @@ -1185,14 +1185,14 @@ void SbaXDataBrowserController::disposing() Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xFormError(getRowSet(), UNO_QUERY); if (xFormError.is()) - xFormError->removeSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); + xFormError->removeSQLErrorListener(static_cast<com::sun::star::sdb::XSQLErrorListener*>(this)); if (m_xLoadable.is()) m_xLoadable->removeLoadListener(this); Reference< ::com::sun::star::form::XDatabaseParameterBroadcaster > xFormParameter(getRowSet(), UNO_QUERY); if (xFormParameter.is()) - xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); + xFormParameter->removeParameterListener(static_cast<com::sun::star::form::XDatabaseParameterListener*>(this)); removeModelListeners(getControlModel()); @@ -2625,14 +2625,14 @@ void SbaXDataBrowserController::BeforeDrop() { Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xFormError(getRowSet(), UNO_QUERY); if (xFormError.is()) - xFormError->removeSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); + xFormError->removeSQLErrorListener(static_cast<com::sun::star::sdb::XSQLErrorListener*>(this)); } void SbaXDataBrowserController::AfterDrop() { Reference< ::com::sun::star::sdb::XSQLErrorBroadcaster > xFormError(getRowSet(), UNO_QUERY); if (xFormError.is()) - xFormError->addSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); + xFormError->addSQLErrorListener(static_cast<com::sun::star::sdb::XSQLErrorListener*>(this)); } void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 9630d4473565..0ca318147fe3 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -53,8 +53,8 @@ Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw Any aRet = SbaXDataBrowserController::queryInterface(_rType); if(!aRet.hasValue()) aRet = ::cppu::queryInterface(_rType, - (::com::sun::star::util::XModifyBroadcaster*)this, - (::com::sun::star::form::XLoadListener*)this); + static_cast<com::sun::star::util::XModifyBroadcaster*>(this), + static_cast<com::sun::star::form::XLoadListener*>(this)); return aRet; } @@ -253,7 +253,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows || ( aURL.Complete == ".uno:FormSlots/ClearView" ) // clear the grid ) - xReturn = (::com::sun::star::frame::XDispatch*)this; + xReturn = static_cast<com::sun::star::frame::XDispatch*>(this); if ( !xReturn.is() && ( (aURL.Complete == ".uno:FormSlots/moveToFirst" ) || (aURL.Complete == ".uno:FormSlots/moveToPrev" ) @@ -295,7 +295,7 @@ void SAL_CALL SbaExternalSourceBrowser::disposing() { // say our modify listeners goodbye ::com::sun::star::lang::EventObject aEvt; - aEvt.Source = (XWeak*) this; + aEvt.Source = static_cast<XWeak*>(this); m_aModifyListeners.disposeAndClear(aEvt); stopListening(); @@ -422,7 +422,7 @@ void SbaExternalSourceBrowser::startListening() if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) { Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); - xLoadable->addLoadListener((::com::sun::star::form::XLoadListener*)this); + xLoadable->addLoadListener(static_cast<com::sun::star::form::XLoadListener*>(this)); } } @@ -431,7 +431,7 @@ void SbaExternalSourceBrowser::stopListening() if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) { Reference< ::com::sun::star::form::XLoadable > xLoadable(m_pDataSourceImpl->getAttachedForm(), UNO_QUERY); - xLoadable->removeLoadListener((::com::sun::star::form::XLoadListener*)this); + xLoadable->removeLoadListener(static_cast<com::sun::star::form::XLoadListener*>(this)); } } diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index a8da57849df5..b695f818feb9 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -117,7 +117,7 @@ void SbaXFormAdapter::StopListening() // log off ourself Reference< ::com::sun::star::lang::XComponent > xComp(m_xMainForm, UNO_QUERY); if (xComp.is()) - xComp->removeEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); + xComp->removeEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<com::sun::star::beans::XPropertyChangeListener*>(this))); } void SbaXFormAdapter::StartListening() @@ -150,7 +150,7 @@ void SbaXFormAdapter::StartListening() // log off ourself Reference< ::com::sun::star::lang::XComponent > xComp(m_xMainForm, UNO_QUERY); if (xComp.is()) - xComp->addEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); + xComp->addEventListener(static_cast<com::sun::star::lang::XEventListener*>(static_cast<com::sun::star::beans::XPropertyChangeListener*>(this))); } void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSet >& xNewMaster) @@ -1094,7 +1094,7 @@ void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException, std::exception { Reference< ::com::sun::star::beans::XPropertySet > xSet(*aIter, UNO_QUERY); if (xSet.is()) - xSet->removePropertyChangeListener(PROPERTY_NAME, (::com::sun::star::beans::XPropertyChangeListener*)this); + xSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<com::sun::star::beans::XPropertyChangeListener*>(this)); Reference< ::com::sun::star::container::XChild > xChild(*aIter, UNO_QUERY); if (xChild.is()) @@ -1413,10 +1413,10 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU m_aChildNames.insert(m_aChildNames.begin() + nIndex, sName); // listen for a changes of the name - xElementSet->addPropertyChangeListener(PROPERTY_NAME, (::com::sun::star::beans::XPropertyChangeListener*)this); + xElementSet->addPropertyChangeListener(PROPERTY_NAME, static_cast<com::sun::star::beans::XPropertyChangeListener*>(this)); // we are now the parent of the new element - xElement->setParent((::com::sun::star::container::XContainer*)this); + xElement->setParent(static_cast<com::sun::star::container::XContainer*>(this)); // notify the container listeners ::com::sun::star::container::ContainerEvent aEvt; @@ -1519,7 +1519,7 @@ void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::su // no need to listen anymore Reference< ::com::sun::star::beans::XPropertySet > xAffectedSet(xAffected, UNO_QUERY); - xAffectedSet->removePropertyChangeListener(PROPERTY_NAME, (::com::sun::star::beans::XPropertyChangeListener*)this); + xAffectedSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<com::sun::star::beans::XPropertyChangeListener*>(this)); // we are no longer the parent xAffected->setParent(Reference< XInterface > ()); @@ -1577,12 +1577,12 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem // correct property change listening Reference< ::com::sun::star::beans::XPropertySet > xOldSet(xOld, UNO_QUERY); - xOldSet->removePropertyChangeListener(PROPERTY_NAME, (::com::sun::star::beans::XPropertyChangeListener*)this); - xElementSet->addPropertyChangeListener(PROPERTY_NAME, (::com::sun::star::beans::XPropertyChangeListener*)this); + xOldSet->removePropertyChangeListener(PROPERTY_NAME, static_cast<com::sun::star::beans::XPropertyChangeListener*>(this)); + xElementSet->addPropertyChangeListener(PROPERTY_NAME, static_cast<com::sun::star::beans::XPropertyChangeListener*>(this)); // parent reset xOld->setParent(Reference< XInterface > ()); - xElement->setParent((::com::sun::star::container::XContainer*)this); + xElement->setParent(static_cast<com::sun::star::container::XContainer*>(this)); // notify container listeners ::com::sun::star::container::ContainerEvent aEvt; diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 971e59d47869..d7a07ff25a98 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -472,7 +472,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, aEvent.FeatureURL.Complete = _rFeature; if (m_xUrlTransformer.is()) m_xUrlTransformer->parseStrict(aEvent.FeatureURL); - aEvent.Source = (XDispatch*)this; + aEvent.Source = static_cast<XDispatch*>(this); aEvent.IsEnabled = aFeatState.bEnabled; // collect all states to be notified diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index e7fbbd4bfcef..ab4cc0e7aab4 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -174,7 +174,7 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(vcl::Window* pParent) Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException, std::exception) { Any aRet = FmXGridControl::queryInterface(_rType); - return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); + return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,static_cast<com::sun::star::frame::XDispatch*>(this)); } Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException, std::exception) @@ -343,7 +343,7 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException, std::exception) { - Any aRet = ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); + Any aRet = ::cppu::queryInterface(_rType,static_cast<com::sun::star::frame::XDispatch*>(this)); if(aRet.hasValue()) return aRet; return FmXGridPeer::queryInterface(_rType); @@ -355,7 +355,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDis || ( aURL.Complete == ".uno:GridSlots/ColumnAttribs" ) || ( aURL.Complete == ".uno:GridSlots/ColumnWidth" ) ) { - return (::com::sun::star::frame::XDispatch*)this; + return static_cast<com::sun::star::frame::XDispatch*>(this); } return FmXGridPeer::queryDispatch(aURL, aTargetFrameName, nSearchFlags); @@ -1331,7 +1331,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) try { // assume that text can be dropped into a field if the column has a ::com::sun::star::awt::XTextComponent interface - Reference< XIndexAccess > xColumnControls((::com::sun::star::form::XGridPeer*)GetPeer(), UNO_QUERY); + Reference< XIndexAccess > xColumnControls(static_cast<com::sun::star::form::XGridPeer*>(GetPeer()), UNO_QUERY); if (xColumnControls.is()) { Reference< ::com::sun::star::awt::XTextComponent > xColControl( diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 4514ea3c0403..d8fcc49c4963 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -319,7 +319,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing() // check out from all the objects we are listening // the frame if (m_xCurrentFrameParent.is()) - m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); + m_xCurrentFrameParent->removeFrameActionListener(static_cast<com::sun::star::frame::XFrameActionListener*>(this)); SbaXDataBrowserController::disposing(); } @@ -1358,7 +1358,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::Event // our frame ? Reference< ::com::sun::star::frame::XFrame > xSourceFrame(_rSource.Source, UNO_QUERY); if (m_xCurrentFrameParent.is() && (xSourceFrame == m_xCurrentFrameParent)) - m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); + m_xCurrentFrameParent->removeFrameActionListener(static_cast<com::sun::star::frame::XFrameActionListener*>(this)); else { // search the external dispatcher causing this call in our map @@ -1504,7 +1504,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: implRemoveStatusListeners(); if (m_xCurrentFrameParent.is()) - m_xCurrentFrameParent->removeFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); + m_xCurrentFrameParent->removeFrameActionListener(static_cast<com::sun::star::frame::XFrameActionListener*>(this)); SbaXDataBrowserController::attachFrame(_xFrame); @@ -1513,7 +1513,7 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: { m_xCurrentFrameParent = xCurrentFrame->findFrame(OUString("_parent"),FrameSearchFlag::PARENT); if ( m_xCurrentFrameParent.is() ) - m_xCurrentFrameParent->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); + m_xCurrentFrameParent->addFrameActionListener(static_cast<com::sun::star::frame::XFrameActionListener*>(this)); // obtain our toolbox try diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx index 2d78a732232c..135e4dc53102 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.hxx @@ -80,7 +80,7 @@ namespace dbaui short m_nAvailableSections; protected: - void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call((void*)this); } + void callModifiedHdl() const { if (m_aModifiedHandler.IsSet()) m_aModifiedHandler.Call(const_cast<OTextConnectionHelper *>(this)); } Link<> getControlModifiedLink() { return LINK(this, OTextConnectionHelper, OnControlModified); } DECL_LINK(OnSetExtensionHdl,RadioButton*); DECL_LINK(OnControlModified,Control*); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 7dcf64813ef4..8218b58b3fe1 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -239,7 +239,7 @@ namespace SQLExceptionInfo aCurrentElement; iter.next( aCurrentElement ); - const SQLException* pCurrentError = (const SQLException*)aCurrentElement; + const SQLException* pCurrentError = static_cast<const SQLException*>(aCurrentElement); OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" ); // hasMoreElements should not have returned <TRUE/> in this case @@ -265,7 +265,7 @@ namespace if ( aCurrentElement.getType() == SQLExceptionInfo::SQL_CONTEXT ) { - const SQLContext* pContext = (const SQLContext*)aCurrentElement; + const SQLContext* pContext = static_cast<const SQLContext*>(aCurrentElement); if ( !pContext->Details.isEmpty() ) { ExceptionDisplayInfo aSubInfo( aCurrentElement.getType() ); diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index 4457f97d3e62..4dd0dd097c33 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -242,7 +242,7 @@ bool OTableCopyHelper::copyTagTable(OTableCopyHelper::DropDescriptor& _rDesc, bo pImport = new ORTFImportExport(_xConnection,getNumberFormatter(_xConnection, m_pController->getORB()),m_pController->getORB()); xEvt = pImport; - SvStream* pStream = (SvStream*)(SotStorageStream*)_rDesc.aHtmlRtfStorage; + SvStream* pStream = static_cast<SvStream*>(static_cast<SotStorageStream*>(_rDesc.aHtmlRtfStorage)); if ( _bCheck ) pImport->enableCheckOnly(); diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 6d670c3e9ff6..fb96739d3b41 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -154,7 +154,7 @@ void ODatabaseImportExport::dispose() Reference< XComponent > xComponent(m_xConnection, UNO_QUERY); if (xComponent.is()) { - Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY); + Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); xComponent->removeEventListener(xEvt); } m_xConnection.clear(); @@ -197,7 +197,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor { Reference< XConnection > xPureConn( _aDataDescriptor[daConnection], UNO_QUERY ); m_xConnection.reset( xPureConn, SharedConnection::NoTakeOwnership ); - Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY); + Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); Reference< XComponent > xComponent(m_xConnection, UNO_QUERY); if (xComponent.is() && xEvt.is()) xComponent->addEventListener(xEvt); @@ -255,7 +255,7 @@ void ODatabaseImportExport::initialize() { // we need a connection OSL_ENSURE(!m_sDataSourceName.isEmpty(),"There must be a datsource name!"); Reference<XNameAccess> xDatabaseContext( DatabaseContext::create(m_xContext), UNO_QUERY_THROW); - Reference< XEventListener> xEvt((::cppu::OWeakObject*)this,UNO_QUERY); + Reference< XEventListener> xEvt(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); Reference< XConnection > xConnection; SQLExceptionInfo aInfo = ::dbaui::createConnection( m_sDataSourceName, xDatabaseContext, m_xContext, xEvt, xConnection ); diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index e7b2088f66c2..3c727eb221d6 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1355,7 +1355,7 @@ void OQueryController::executeQuery() { OSL_ENSURE(Reference< XFrame >(xComponent, UNO_QUERY).get() == getContainer()->getPreviewFrame().get(), "OQueryController::executeQuery: oops ... which window do I have here?"); - Reference< XEventListener> xEvtL((::cppu::OWeakObject*)this,UNO_QUERY); + Reference< XEventListener> xEvtL(static_cast<cppu::OWeakObject*>(this),UNO_QUERY); xComponent->addEventListener(xEvtL); } } |