diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:13:39 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:22 +0100 |
commit | 89c4edc13f203db1641c63e22774262bbe61f36f (patch) | |
tree | 0aa28439045c19140ff51cd6cf1593d8cf515d89 /dbaccess/source/ui/browser | |
parent | b58d56c5109f4cf6cacfc8e9c424b179a65bf1f1 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I2bba104b1bff30910864e45b5b032533099742ff
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r-- | dbaccess/source/ui/browser/AsynchronousLink.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 40 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwview.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbexchange.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbloader.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreeview.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsbrowserDnD.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/exsrcbrw.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 26 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 100 |
13 files changed, 128 insertions, 128 deletions
diff --git a/dbaccess/source/ui/browser/AsynchronousLink.cxx b/dbaccess/source/ui/browser/AsynchronousLink.cxx index 7715c91bd5f0..7381437bd0ac 100644 --- a/dbaccess/source/ui/browser/AsynchronousLink.cxx +++ b/dbaccess/source/ui/browser/AsynchronousLink.cxx @@ -27,7 +27,7 @@ OAsynchronousLink::OAsynchronousLink( const Link<void*,void>& _rHandler ) :m_aHandler(_rHandler) ,m_aEventSafety() ,m_aDestructionSafety() - ,m_nEventId(0) + ,m_nEventId(nullptr) { } @@ -37,7 +37,7 @@ OAsynchronousLink::~OAsynchronousLink() ::osl::MutexGuard aEventGuard( m_aEventSafety ); if ( m_nEventId ) Application::RemoveUserEvent(m_nEventId); - m_nEventId = 0; + m_nEventId = nullptr; } { @@ -62,7 +62,7 @@ void OAsynchronousLink::CancelCall() ::osl::MutexGuard aEventGuard( m_aEventSafety ); if ( m_nEventId ) Application::RemoveUserEvent( m_nEventId ); - m_nEventId = 0; + m_nEventId = nullptr; } IMPL_LINK_TYPED(OAsynchronousLink, OnAsyncCall, void*, _pArg, void) @@ -75,7 +75,7 @@ IMPL_LINK_TYPED(OAsynchronousLink, OnAsyncCall, void*, _pArg, void) // our destructor deleted the event just while we are waiting for m_aEventSafety // -> get outta here return; - m_nEventId = 0; + m_nEventId = nullptr; } } m_aHandler.Call(_pArg); diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 546c17bcb707..8b63e0ca5df7 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -284,7 +284,7 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController( Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException, std::exception) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" ); - return NULL; + return nullptr; } void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException, std::exception) @@ -295,7 +295,7 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const R Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException, std::exception) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" ); - return NULL; + return nullptr; } void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException, std::exception) @@ -306,7 +306,7 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandl Reference< XInterface > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getParent( ) throw (RuntimeException, std::exception) { // don't have any parent form controllers - return NULL; + return nullptr; } void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException, std::exception) @@ -534,13 +534,13 @@ Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw SbaXDataBrowserController::SbaXDataBrowserController(const Reference< css::uno::XComponentContext >& _rM) :SbaXDataBrowserController_Base(_rM) ,m_nRowSetPrivileges(0) - ,m_pClipbordNotifier( NULL ) + ,m_pClipbordNotifier( nullptr ) ,m_aAsyncGetCellFocus(LINK(this, SbaXDataBrowserController, OnAsyncGetCellFocus)) ,m_aAsyncDisplayError( LINK( this, SbaXDataBrowserController, OnAsyncDisplayError ) ) ,m_sStateSaveRecord(ModuleRes(RID_STR_SAVE_CURRENT_RECORD)) ,m_sStateUndoRecord(ModuleRes(RID_STR_UNDO_MODIFY_RECORD)) ,m_sModuleIdentifier( OUString( "com.sun.star.sdb.DataSourceBrowser" ) ) - ,m_pFormControllerImpl(NULL) + ,m_pFormControllerImpl(nullptr) ,m_nFormActionNestingLevel(0) ,m_bLoadCanceled( false ) ,m_bCannotSelectUnfiltered( true ) @@ -695,7 +695,7 @@ void SbaXDataBrowserController::initFormatter() m_xFormatter->attachNumberFormatsSupplier(xSupplier); } else // clear the formatter - m_xFormatter = NULL; + m_xFormatter = nullptr; } void SbaXDataBrowserController::describeSupportedFeatures() @@ -1200,7 +1200,7 @@ void SbaXDataBrowserController::disposing() m_pClipbordNotifier->ClearCallbackLink(); m_pClipbordNotifier->AddRemoveListener( getView(), false ); m_pClipbordNotifier->release(); - m_pClipbordNotifier = NULL; + m_pClipbordNotifier = nullptr; } if (getBrowserView()) @@ -1218,9 +1218,9 @@ void SbaXDataBrowserController::disposing() { ::comphelper::disposeComponent(m_xRowSet); - m_xRowSet = NULL; - m_xColumnsSupplier = NULL; - m_xLoadable = NULL; + m_xRowSet = nullptr; + m_xColumnsSupplier = nullptr; + m_xLoadable = nullptr; } catch(Exception&) { @@ -1247,7 +1247,7 @@ void SbaXDataBrowserController::frameAction(const css::frame::FrameActionEvent& if (getBrowserView() && getBrowserView()->getVclControl() && !m_aInvalidateClipboard.IsActive()) { m_aInvalidateClipboard.Start(); - OnInvalidateClipboard( NULL ); + OnInvalidateClipboard( nullptr ); } break; case FrameAction_FRAME_DEACTIVATING: @@ -1256,7 +1256,7 @@ void SbaXDataBrowserController::frameAction(const css::frame::FrameActionEvent& if (getBrowserView() && getBrowserView()->getVclControl() && m_aInvalidateClipboard.IsActive()) { m_aInvalidateClipboard.Stop(); - OnInvalidateClipboard( NULL ); + OnInvalidateClipboard( nullptr ); } // remove the "get cell focus"-event m_aAsyncGetCellFocus.CancelCall(); @@ -1324,7 +1324,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const css::form::DatabasePa pParamRequest->addContinuation(pAbort); // create the handler, let it handle the request - Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(getORB(), 0) ); + Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(getORB(), nullptr) ); xHandler->handle(xParamRequest); if (!pParamValues->wasSelected()) @@ -1476,7 +1476,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const case ID_BROWSER_CUT: { CellControllerRef xCurrentController = getBrowserView()->getVclControl()->Controller(); - if (xCurrentController.Is() && 0 != dynamic_cast< const EditCellController* >(xCurrentController.get())) + if (xCurrentController.Is() && nullptr != dynamic_cast< const EditCellController* >(xCurrentController.get())) { Edit& rEdit = static_cast<Edit&>(xCurrentController->GetWindow()); bool bHasLen = (rEdit.GetSelection().Len() != 0); @@ -1842,7 +1842,7 @@ void SbaXDataBrowserController::ExecuteSearch() Reference< css::util::XNumberFormatsSupplier > xNFS(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), true, getORB())); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - AbstractFmSearchDialog* pDialog = NULL; + AbstractFmSearchDialog* pDialog = nullptr; if ( pFact ) { ::std::vector< OUString > aContextNames; @@ -2267,19 +2267,19 @@ void SbaXDataBrowserController::SelectionChanged() void SbaXDataBrowserController::CellActivated() { m_aInvalidateClipboard.Start(); - OnInvalidateClipboard( NULL ); + OnInvalidateClipboard( nullptr ); } void SbaXDataBrowserController::CellDeactivated() { m_aInvalidateClipboard.Stop(); - OnInvalidateClipboard( NULL ); + OnInvalidateClipboard( nullptr ); } IMPL_LINK_NOARG_TYPED(SbaXDataBrowserController, OnClipboardChanged, TransferableDataHelper*, void) { SolarMutexGuard aGuard; - OnInvalidateClipboard( NULL ); + OnInvalidateClipboard( nullptr ); } IMPL_LINK_TYPED(SbaXDataBrowserController, OnInvalidateClipboard, Timer*, _pTimer, void) @@ -2435,7 +2435,7 @@ IMPL_LINK_TYPED(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInfo IMPL_LINK_NOARG_TYPED(SbaXDataBrowserController, OnAsyncGetCellFocus, void*, void) { - SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() : NULL; + SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() : nullptr; // if we have a controller, but the window for the controller doesn't have the focus, we correct this if (pVclGrid && pVclGrid->IsEditing() && pVclGrid->HasChildPathFocus()) pVclGrid->Controller()->GetWindow().GrabFocus(); @@ -2492,7 +2492,7 @@ void SbaXDataBrowserController::initializeParser() const catch(Exception&) { DBG_UNHANDLED_EXCEPTION(); - m_xParser = NULL; + m_xParser = nullptr; // no further handling, we ignore the error } } diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index 4baa3b70ed73..148e428bc170 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -68,10 +68,10 @@ UnoDataBrowserView::UnoDataBrowserView( vcl::Window* pParent, IController& _rController, const Reference< css::uno::XComponentContext >& _rxContext) :ODataView(pParent,_rController,_rxContext) - ,m_pTreeView(NULL) - ,m_pSplitter(NULL) - ,m_pVclControl(NULL) - ,m_pStatus(NULL) + ,m_pTreeView(nullptr) + ,m_pSplitter(nullptr) + ,m_pVclControl(nullptr) + ,m_pStatus(nullptr) { } @@ -102,7 +102,7 @@ void UnoDataBrowserView::Construct(const Reference< css::awt::XControlModel >& x getContainer()->addControl(::comphelper::getString(xModelSet->getPropertyValue(PROPERTY_NAME)), m_xGrid); // get the VCL-control - m_pVclControl = NULL; + m_pVclControl = nullptr; getVclControl(); OSL_ENSURE(m_pVclControl != nullptr, "UnoDataBrowserView::Construct : no real grid control !"); @@ -122,7 +122,7 @@ UnoDataBrowserView::~UnoDataBrowserView() void UnoDataBrowserView::dispose() { m_pSplitter.disposeAndClear(); - setTreeView(NULL); + setTreeView(nullptr); m_pStatus.disposeAndClear(); @@ -292,7 +292,7 @@ void UnoDataBrowserView::GetFocus() void UnoDataBrowserView::_disposing( const css::lang::EventObject& /*_rSource*/ ) { stopComponentListening(Reference<XComponent>(VCLUnoHelper::GetInterface(m_pVclControl),UNO_QUERY)); - m_pVclControl = NULL; + m_pVclControl = nullptr; } bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 373ca72e7f98..9cf3126d0306 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -65,8 +65,8 @@ namespace dbaui const Reference< XNumberFormatter >& _rxFormatter, const Reference< XComponentContext >& _rxORB) :ODataAccessObjectTransferable( _rDatasource,OUString(), _nCommandType, _rCommand, _rxConnection ) - ,m_pHtml(NULL) - ,m_pRtf(NULL) + ,m_pHtml(nullptr) + ,m_pRtf(nullptr) { osl_atomic_increment( &m_refCount ); lcl_setListener( _rxConnection, this, true ); @@ -84,8 +84,8 @@ namespace dbaui const Reference< XNumberFormatter >& _rxFormatter, const Reference< XComponentContext >& _rxORB) :ODataAccessObjectTransferable( _rDatasource, OUString(),_nCommandType, _rCommand) - ,m_pHtml(NULL) - ,m_pRtf(NULL) + ,m_pHtml(nullptr) + ,m_pRtf(nullptr) { m_pHtml.set( new OHTMLImportExport( getDescriptor(),_rxORB, _rxFormatter ) ); m_pRtf.set( new ORTFImportExport( getDescriptor(),_rxORB, _rxFormatter ) ); @@ -96,8 +96,8 @@ namespace dbaui const bool i_bBookmarkSelection, const Reference< XComponentContext >& i_rORB ) :ODataAccessObjectTransferable( i_rAliveForm ) - ,m_pHtml(NULL) - ,m_pRtf(NULL) + ,m_pHtml(nullptr) + ,m_pRtf(nullptr) { OSL_PRECOND( i_rORB.is(), "ODataClipboard::ODataClipboard: having no factory is not good ..." ); diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index fbd33ce972db..51165c739459 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -241,7 +241,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU else if ( !sDataSourceName.isEmpty() ) { ::dbtools::SQLExceptionInfo aError; - xDataSource.set( getDataSourceByName( sDataSourceName, NULL, m_xContext, &aError ) ); + xDataSource.set( getDataSourceByName( sDataSourceName, nullptr, m_xContext, &aError ) ); xDatabaseDocument.set( getDataSourceOrModel( xDataSource ), UNO_QUERY ); } else if ( xConnection.is() ) diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 19d25d17f4cb..116b2051be6c 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -32,11 +32,11 @@ using namespace ::com::sun::star::lang; // class DBTreeView DBTreeView::DBTreeView( vcl::Window* pParent, WinBits nBits) : Window( pParent, nBits ) - , m_pTreeListBox(NULL) + , m_pTreeListBox(nullptr) { m_pTreeListBox = VclPtr<DBTreeListBox>::Create(this, WB_BORDER | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONS | WB_HSCROLL |WB_HASBUTTONSATROOT); - m_pTreeListBox->EnableCheckButton(NULL); + m_pTreeListBox->EnableCheckButton(nullptr); m_pTreeListBox->SetDragDropMode( DragDropMode::NONE ); m_pTreeListBox->EnableInplaceEditing( true ); m_pTreeListBox->SetHelpId(HID_TLB_TREELISTBOX); diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 85630214bb10..17ea461e8c0e 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -106,7 +106,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, bool _bSelect) { - SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; + SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr; if (pTextItem) { static_cast<OBoldListboxString*>(pTextItem)->emphasize(_bSelect); @@ -128,7 +128,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, bool _bSelect) bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) { - SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; + SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : nullptr; if (pTextItem) return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized(); else { diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index b249306b1bc1..d7e8e292bb18 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -68,12 +68,12 @@ namespace dbaui OUString aName = GetEntryText( _pApplyTo ); OUString aDSName = getDataSourceAcessor( m_pTreeView->getListBox().GetRootLevelParent( _pApplyTo ) ); - ODataClipboard* pData = NULL; + ODataClipboard* pData = nullptr; SharedConnection xConnection; if ( CommandType::QUERY != _nCommandType ) { if ( _bAllowConnection && !ensureConnection( _pApplyTo, xConnection) ) - return NULL; + return nullptr; pData = new ODataClipboard(aDSName, _nCommandType, aName, xConnection, getNumberFormatter(), getORB()); } else @@ -90,7 +90,7 @@ namespace dbaui { DBG_UNHANDLED_EXCEPTION(); } - return NULL; + return nullptr; } sal_Int8 SbaTableQueryBrowser::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) { @@ -133,13 +133,13 @@ namespace dbaui if ( m_nAsyncDrop ) Application::RemoveUserEvent(m_nAsyncDrop); - m_nAsyncDrop = 0; + m_nAsyncDrop = nullptr; m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = E_TABLE; m_aAsyncDrop.nAction = _rEvt.mnAction; m_aAsyncDrop.bError = false; m_aAsyncDrop.bHtml = false; - m_aAsyncDrop.pDroppedAt = NULL; + m_aAsyncDrop.pDroppedAt = nullptr; m_aAsyncDrop.aUrl.clear(); // loop through the available formats and see what we can do ... @@ -192,7 +192,7 @@ namespace dbaui if (pTransfer) pTransfer->StartDrag( &m_pTreeView->getListBox(), DND_ACTION_COPY ); - return NULL != pTransfer; + return nullptr != pTransfer; } IMPL_LINK_NOARG_TYPED(SbaTableQueryBrowser, OnCopyEntry, LinkParamNone*, void) { @@ -207,7 +207,7 @@ namespace dbaui } void SbaTableQueryBrowser::copyEntry(SvTreeListEntry* _pEntry) { - TransferableHelper* pTransfer = NULL; + TransferableHelper* pTransfer = nullptr; Reference< XTransferable> aEnsureDelete; EntryType eType = getEntryType(_pEntry); pTransfer = implCopyObject( _pEntry, eType == etQuery ? CommandType::QUERY : CommandType::TABLE); @@ -217,7 +217,7 @@ namespace dbaui } IMPL_LINK_NOARG_TYPED( SbaTableQueryBrowser, OnAsyncDrop, void*, void ) { - m_nAsyncDrop = 0; + m_nAsyncDrop = nullptr; SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( getMutex() ); @@ -244,7 +244,7 @@ namespace dbaui DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pEntryLoop->GetUserData()); if(pData) { - pEntryLoop->SetUserData(NULL); + pEntryLoop->SetUserData(nullptr); Reference< XContainer > xContainer(pData->xContainer, UNO_QUERY); if (xContainer.is()) xContainer->removeContainerListener(this); @@ -261,7 +261,7 @@ namespace dbaui pEntryLoop = m_pTreeModel->Next(pEntryLoop); } } - m_pCurrentlyDisplayed = NULL; + m_pCurrentlyDisplayed = nullptr; } } // namespace dbaui diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 901752e6ed4b..1b5d239eb9eb 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -62,7 +62,7 @@ Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< css::uno::XComponentContext >& _rM) :SbaXDataBrowserController(_rM) ,m_aModifyListeners(getMutex()) - ,m_pDataSourceImpl(NULL) + ,m_pDataSourceImpl(nullptr) ,m_bInQueryDispatch( false ) { diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 43e481ed4e7e..a25eefce39d5 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -685,7 +685,7 @@ Reference< XInterface > SAL_CALL SbaXFormAdapter::getStatement() throw( css::sdb { if (m_xMainForm.is()) return m_xMainForm->getStatement(); - return NULL; + return nullptr; } // css::sdbc::XResultSetUpdate diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 6f2b3526f2e6..29efea37a09c 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -158,7 +158,7 @@ struct OGenericUnoController_Data // OGenericUnoController OGenericUnoController::OGenericUnoController(const Reference< XComponentContext >& _rM) :OGenericUnoController_Base( getMutex() ) - ,m_pView(NULL) + ,m_pView(nullptr) #ifdef DBG_UTIL ,m_bDescribingSupportedFeatures( false ) #endif @@ -313,7 +313,7 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen catch(Exception&) { // no one clears my view if I won't - m_pView = NULL; + m_pView = nullptr; throw; } } @@ -370,7 +370,7 @@ Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw Reference<XSidebarProvider> SAL_CALL OGenericUnoController::getSidebar() throw (RuntimeException, std::exception) { - return NULL; + return nullptr; } OUString SAL_CALL OGenericUnoController::getViewControllerName() throw (css::uno::RuntimeException, std::exception) @@ -606,7 +606,7 @@ void OGenericUnoController::InvalidateFeature(sal_uInt16 _nId, const Reference< void OGenericUnoController::InvalidateAll() { - ImplInvalidateFeature( ALL_FEATURES, NULL, true ); + ImplInvalidateFeature( ALL_FEATURES, nullptr, true ); } void OGenericUnoController::InvalidateAll_Impl() @@ -617,7 +617,7 @@ void OGenericUnoController::InvalidateAll_Impl() aIter != m_aSupportedFeatures.end(); ++aIter ) - ImplBroadcastFeatureState( aIter->first, NULL, true ); + ImplBroadcastFeatureState( aIter->first, nullptr, true ); { ::osl::MutexGuard aGuard( m_aFeatureMutex); @@ -794,7 +794,7 @@ void OGenericUnoController::disposing() m_arrStatusListener.clear(); } - m_xDatabaseContext = NULL; + m_xDatabaseContext = nullptr; { ::osl::MutexGuard aGuard( m_aFeatureMutex); m_aAsyncInvalidateAll.CancelCall(); @@ -806,10 +806,10 @@ void OGenericUnoController::disposing() // check out from all the objects we are listening // the frame stopFrameListening( m_aCurrentFrame.getFrame() ); - m_aCurrentFrame.attachFrame( NULL ); + m_aCurrentFrame.attachFrame( nullptr ); - m_xMasterDispatcher = NULL; - m_xSlaveDispatcher = NULL; + m_xMasterDispatcher = nullptr; + m_xSlaveDispatcher = nullptr; m_xTitleHelper.clear(); m_xUrlTransformer.clear(); m_aInitParameters.clear(); @@ -979,7 +979,7 @@ void OGenericUnoController::setView( const VclPtr<ODataView> &i_rView ) void OGenericUnoController::clearView() { - m_pView = NULL; + m_pView = nullptr; } void OGenericUnoController::showError(const SQLExceptionInfo& _rInfo) @@ -1106,7 +1106,7 @@ namespace { OUString lcl_getModuleHelpModuleName( const Reference< XFrame >& _rxFrame ) { - const sal_Char* pReturn = NULL; + const sal_Char* pReturn = nullptr; try { diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 638dd5ff9c42..759c50ffaaa4 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -281,7 +281,7 @@ void SAL_CALL SbaXGridControl::dispose() throw( RuntimeException, std::exception { (*aIter).second->disposeAndClear(aEvt); (*aIter).second->release(); - (*aIter).second = NULL; + (*aIter).second = nullptr; } } StatusMultiplexerArray().swap(m_aStatusMultiplexer); @@ -453,7 +453,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa { // notify any status listeners that the dialog is now active (well, about to be active) MapDispatchToBool::iterator aThisURLState = m_aDispatchStates.insert( MapDispatchToBool::value_type( eURLType, sal_True ) ).first; - NotifyStatusChanged( aURL, NULL ); + NotifyStatusChanged( aURL, nullptr ); // execute the dialog switch ( eURLType ) @@ -490,7 +490,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa // notify any status listeners that the dialog vanished m_aDispatchStates.erase( aThisURLState ); - NotifyStatusChanged( aURL, NULL ); + NotifyStatusChanged( aURL, nullptr ); } } @@ -546,7 +546,7 @@ SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rx _rxIFace, UNO_QUERY); if (xTunnel.is()) return reinterpret_cast<SbaXGridPeer*>(xTunnel->getSomething(getUnoTunnelId())); - return NULL; + return nullptr; } VclPtr<FmGridControl> SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, WinBits nStyle) @@ -708,8 +708,8 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, vcl::Window* pParent, FmXGridPeer* _pPeer, WinBits nBits) :FmGridControl(_rM,pParent, _pPeer, nBits) - ,m_pMasterListener(NULL) - ,m_nAsyncDropEvent(0) + ,m_pMasterListener(nullptr) + ,m_nAsyncDropEvent(nullptr) ,m_nCurrentActionColId((sal_uInt16)-1) ,m_bActivatingForDrop(false) { @@ -735,7 +735,7 @@ VclPtr<BrowserHeader> SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent) CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol) { if ( m_bActivatingForDrop ) - return NULL; + return nullptr; return FmGridControl::GetController(nRow, nCol); } @@ -772,7 +772,7 @@ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() SvNumberFormatsSupplierObj* pSupplierImpl = SvNumberFormatsSupplierObj::getImplementation( xSupplier ); if ( !pSupplierImpl ) - return NULL; + return nullptr; SvNumberFormatter* pFormatter = pSupplierImpl->GetNumberFormatter(); return pFormatter; @@ -1395,7 +1395,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) ActivateCell(); CellControllerRef xCurrentController = Controller(); - if (!xCurrentController.Is() || 0 == dynamic_cast< const EditCellController* >(xCurrentController.get())) + if (!xCurrentController.Is() || nullptr == dynamic_cast< const EditCellController* >(xCurrentController.get())) return DND_ACTION_NONE; Edit& rEdit = static_cast<Edit&>(xCurrentController->GetWindow()); @@ -1422,7 +1422,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) m_aDataDescriptor = ODataAccessObjectTransferable::extractObjectDescriptor(aDropped); if (m_nAsyncDropEvent) Application::RemoveUserEvent(m_nAsyncDropEvent); - m_nAsyncDropEvent = Application::PostUserEvent(LINK(this, SbaGridControl, AsynchDropEvent), NULL, true); + m_nAsyncDropEvent = Application::PostUserEvent(LINK(this, SbaGridControl, AsynchDropEvent), nullptr, true); return DND_ACTION_COPY; } } @@ -1444,7 +1444,7 @@ Reference< XPropertySet > SbaGridControl::getDataSource() const IMPL_LINK_NOARG_TYPED(SbaGridControl, AsynchDropEvent, void*, void) { - m_nAsyncDropEvent = 0; + m_nAsyncDropEvent = nullptr; Reference< XPropertySet > xDataSource = getDataSource(); if ( xDataSource.is() ) @@ -1452,7 +1452,7 @@ IMPL_LINK_NOARG_TYPED(SbaGridControl, AsynchDropEvent, void*, void) bool bCountFinal = false; xDataSource->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bCountFinal; if ( !bCountFinal ) - setDataSource(NULL); // dettach from grid control + setDataSource(nullptr); // dettach from grid control Reference< XResultSetUpdate > xResultSetUpdate(xDataSource,UNO_QUERY); ODatabaseImportExport* pImExport = new ORowSetImportExport(this,xResultSetUpdate,m_aDataDescriptor, getContext()); Reference<XEventListener> xHolder = pImExport; @@ -1464,7 +1464,7 @@ IMPL_LINK_NOARG_TYPED(SbaGridControl, AsynchDropEvent, void*, void) if(!pImExport->Read()) { OUString sError = OUString(ModuleRes(STR_NO_COLUMNNAME_MATCHING)); - throwGenericSQLException(sError,NULL); + throwGenericSQLException(sError,nullptr); } AfterDrop(); Show(); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index d994894ace88..fd349e989ffe 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -213,11 +213,11 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& ,m_aSelectionListeners( getMutex() ) ,m_aContextMenuInterceptors( getMutex() ) ,m_aTableCopyHelper(this) - ,m_pTreeView(NULL) - ,m_pSplitter(NULL) - ,m_pTreeModel(NULL) - ,m_pCurrentlyDisplayed(NULL) - ,m_nAsyncDrop(0) + ,m_pTreeView(nullptr) + ,m_pSplitter(nullptr) + ,m_pTreeModel(nullptr) + ,m_pCurrentlyDisplayed(nullptr) + ,m_nAsyncDrop(nullptr) ,m_nBorder(1) ,m_bQueryEscapeProcessing( false ) ,m_bShowMenu(false) @@ -296,13 +296,13 @@ void SAL_CALL SbaTableQueryBrowser::disposing() // reset the content's tree view: it holds a reference to our model which is to be deleted immediately, // and it will live longer than we do. if (getBrowserView()) - getBrowserView()->setTreeView(NULL); + getBrowserView()->setTreeView(nullptr); clearTreeModel(); // clear the tree model { ::std::unique_ptr<SvTreeList> aTemp(m_pTreeModel); - m_pTreeModel = NULL; + m_pTreeModel = nullptr; } // remove ourself as status listener @@ -1036,20 +1036,20 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv void SbaTableQueryBrowser::checkDocumentDataSource() { - SvTreeListEntry* pDataSourceEntry = NULL; - SvTreeListEntry* pContainerEntry = NULL; + SvTreeListEntry* pDataSourceEntry = nullptr; + SvTreeListEntry* pContainerEntry = nullptr; SvTreeListEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, false ); - bool bKnownDocDataSource = (NULL != pObjectEntry); + bool bKnownDocDataSource = (nullptr != pObjectEntry); if (!bKnownDocDataSource) { - if (NULL != pDataSourceEntry) + if (nullptr != pDataSourceEntry) { // at least the data source is known - if (NULL != pContainerEntry) + if (nullptr != pContainerEntry) bKnownDocDataSource = true; // assume we know it. // TODO: should we expand the object container? This may be too expensive just for checking .... else { - if ((NULL == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand)) + if ((nullptr == pObjectEntry) && m_aDocumentDataSource.has(daCommandType) && m_aDocumentDataSource.has(daCommand)) { // maybe we have a command to be displayed ? sal_Int32 nCommandType = CommandType::TABLE; m_aDocumentDataSource[daCommandType] >>= nCommandType; @@ -1132,11 +1132,11 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour const SharedConnection& _rxConnection ) { if (_ppDataSourceEntry) - *_ppDataSourceEntry = NULL; + *_ppDataSourceEntry = nullptr; if (_ppContainerEntry) - *_ppContainerEntry = NULL; + *_ppContainerEntry = nullptr; - SvTreeListEntry* pObject = NULL; + SvTreeListEntry* pObject = nullptr; if ( m_pTreeView ) { // look for the data source entry @@ -1146,7 +1146,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour // #i33699# FilterByEntryDataId aFilter( sDataSourceId ); - SvTreeListEntry* pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter ); + SvTreeListEntry* pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, nullptr, &aFilter ); if ( !pDataSource ) // check if the data source name is a file location { if ( bIsDataSourceURL ) @@ -1154,7 +1154,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour // special case, the data source is a URL // add new entries to the list box model implAddDatasource( _rDataSource, _rxConnection ); - pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, NULL, &aFilter ); + pDataSource = m_pTreeView->getListBox().GetEntryPosByName( sDisplayName, nullptr, &aFilter ); OSL_ENSURE( pDataSource, "SbaTableQueryBrowser::getObjectEntry: hmm - did not find it again!" ); } } @@ -1169,7 +1169,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour m_pTreeView->getListBox().Expand(pDataSource); // look for the object container - SvTreeListEntry* pCommandType = NULL; + SvTreeListEntry* pCommandType = nullptr; switch (_nCommandType) { case CommandType::TABLE: @@ -1391,7 +1391,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const css::lang::EventObject& _rS { // our connection is in dispose so we have to find the entry equal with this connection // and close it what means to collapse the entry // get the top-level representing the removed data source - SvTreeListEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(NULL); + SvTreeListEntry* pDSLoop = m_pTreeView->getListBox().FirstChild(nullptr); while (pDSLoop) { DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pDSLoop->GetUserData()); @@ -1694,11 +1694,11 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const DBTreeListUserData* pDSData = pDataSourceEntry ? static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() ) - : NULL; + : nullptr; if ( nId == ID_TREE_CLOSE_CONN ) { - aReturn.bEnabled = ( pDSData != NULL ) && pDSData->xConnection.is(); + aReturn.bEnabled = ( pDSData != nullptr ) && pDSData->xConnection.is(); } else if ( nId == ID_TREE_EDIT_DATABASE ) { @@ -1706,7 +1706,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) ); bool bHaveEditDatabase( true ); OSL_VERIFY( aConfig.getNodeValue( "EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase ); - aReturn.bEnabled = getORB().is() && ( pDataSourceEntry != NULL ) && bHaveEditDatabase; + aReturn.bEnabled = getORB().is() && ( pDataSourceEntry != nullptr ) && bHaveEditDatabase; } else if ( nId == ID_BROWSER_COPY ) { @@ -1946,7 +1946,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue { // transfer the selected rows only if not all rows are selected // (all rows means the whole table) // #i3832# - if (pSelection != NULL) + if (pSelection != nullptr) { aSelection.realloc(pSelection->GetSelectCount()); long nIdx = pSelection->FirstSelected(); @@ -2452,8 +2452,8 @@ bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OU { if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType)) { - SvTreeListEntry* pDataSource = NULL; - SvTreeListEntry* pCommandType = NULL; + SvTreeListEntry* pDataSource = nullptr; + SvTreeListEntry* pCommandType = nullptr; SvTreeListEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, true, _rxConnection ); if (pCommand) @@ -2479,7 +2479,7 @@ bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OU if ( m_pCurrentlyDisplayed ) { // tell the old entry (if any) it has been deselected selectPath(m_pCurrentlyDisplayed, false); - m_pCurrentlyDisplayed = NULL; + m_pCurrentlyDisplayed = nullptr; } // we have a command and need to display this in the rowset @@ -2582,7 +2582,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) // tell the old entry it has been deselected selectPath(m_pCurrentlyDisplayed, false); - m_pCurrentlyDisplayed = NULL; + m_pCurrentlyDisplayed = nullptr; // not really loaded m_pCurrentlyDisplayed = _pEntry; @@ -2725,8 +2725,8 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess) { DBTreeListBox& rListBox = m_pTreeView->getListBox(); - SvTreeListEntry* pContainer = NULL; - SvTreeListEntry* pDSLoop = rListBox.FirstChild(NULL); + SvTreeListEntry* pContainer = nullptr; + SvTreeListEntry* pDSLoop = rListBox.FirstChild(nullptr); while (pDSLoop) { pContainer = rListBox.GetEntry(pDSLoop, CONTAINER_QUERIES); @@ -2740,7 +2740,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNa break; pDSLoop = SvTreeList::NextSibling(pDSLoop); - pContainer = NULL; + pContainer = nullptr; } return pContainer; } @@ -2812,7 +2812,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven unloadAndCleanup( false ); // don't dispose the connection DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData()); - pTemp->SetUserData(NULL); + pTemp->SetUserData(nullptr); delete pData; // the data could be null because we have a table which isn't correct m_pTreeModel->Remove(pTemp); @@ -2826,7 +2826,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven if (m_pTreeView->getListBox().GetEntryText(pChild) == aName) { DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pChild->GetUserData()); - pChild->SetUserData(NULL); + pChild->SetUserData(nullptr); delete pData; m_pTreeModel->Remove(pChild); break; @@ -2868,7 +2868,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve } else { - pTemp->SetUserData(NULL); + pTemp->SetUserData(nullptr); delete pData; } } @@ -2890,7 +2890,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve } else { - pChild->SetUserData(NULL); + pChild->SetUserData(nullptr); delete pData; } } @@ -2975,7 +2975,7 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry, bool _bDi SvTreeListEntry* pRemove = pElements; pElements = SvTreeList::NextSibling(pElements); DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pRemove->GetUserData()); - pRemove->SetUserData(NULL); + pRemove->SetUserData(nullptr); delete pData; m_pTreeModel->Remove(pRemove); } @@ -3001,7 +3001,7 @@ void SbaTableQueryBrowser::unloadAndCleanup( bool _bDisposeConnection ) { selectPath(m_pCurrentlyDisplayed, false); } - m_pCurrentlyDisplayed = NULL; + m_pCurrentlyDisplayed = nullptr; try { @@ -3287,7 +3287,7 @@ bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedC DBTreeListUserData* pDSData = pDSEntry ? static_cast<DBTreeListUserData*>(pDSEntry->GetUserData()) - : NULL; + : nullptr; return ensureConnection( pDSEntry, pDSData, _rConnection ); } @@ -3307,7 +3307,7 @@ bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry DBTreeListUserData* pDSData = pDSEntry ? static_cast< DBTreeListUserData* >( pDSEntry->GetUserData() ) - : NULL; + : nullptr; if ( pDSData ) _rConnection = pDSData->xConnection; return _rConnection.is(); @@ -3342,7 +3342,7 @@ bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* p // connect _rConnection.reset( - connect( getDataSourceAcessor( _pDSEntry ), sConnectingContext, NULL ), + connect( getDataSourceAcessor( _pDSEntry ), sConnectingContext, nullptr ), SharedConnection::TakeOwnership ); @@ -3438,13 +3438,13 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) if (pTopLevelSelected) sInitialSelection = getDataSourceAcessor( pTopLevelSelected ); - Reference< XDataSource > xDataSource( getDataSourceByName( sInitialSelection, getView(), getORB(), NULL ) ); + Reference< XDataSource > xDataSource( getDataSourceByName( sInitialSelection, getView(), getORB(), nullptr ) ); Reference< XModel > xDocumentModel( getDataSourceOrModel( xDataSource ), UNO_QUERY ); if ( xDocumentModel.is() ) { Reference< XInteractionHandler2 > xInteractionHandler( - InteractionHandler::createWithParent(getORB(), 0) ); + InteractionHandler::createWithParent(getORB(), nullptr) ); ::comphelper::NamedValueCollection aLoadArgs; aLoadArgs.put( "Model", xDocumentModel ); @@ -3484,7 +3484,7 @@ PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl, "SbaTableQueryBrowser::getContextMenu: where does this come from?" ); if ( &m_pTreeView->getListBox() != &_rControl ) - return NULL; + return nullptr; return new PopupMenu( ModuleRes( MENU_BROWSER_DEFAULTCONTEXT ) ); } @@ -3511,7 +3511,7 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const if ( !pSelected ) return Any(); - OSL_ENSURE( m_pTreeView->getListBox().NextSelected( pSelected ) == NULL, + OSL_ENSURE( m_pTreeView->getListBox().NextSelected( pSelected ) == nullptr, "SbaTableQueryBrowser::getCurrentSelection: single-selection is expected here!" ); NamedDatabaseObject aSelectedObject; @@ -3679,8 +3679,8 @@ bool SbaTableQueryBrowser::preReloadForm() extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing); if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) ) { - SvTreeListEntry* pDataSource = NULL; - SvTreeListEntry* pCommandType = NULL; + SvTreeListEntry* pDataSource = nullptr; + SvTreeListEntry* pCommandType = nullptr; m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, true, SharedConnection() ); bIni = true; } @@ -3740,7 +3740,7 @@ void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRe void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSourceName ) { // get the top-level representing the removed data source - SvTreeListEntry* pDataSourceEntry = m_pTreeView->getListBox().FirstChild( NULL ); + SvTreeListEntry* pDataSourceEntry = m_pTreeView->getListBox().FirstChild( nullptr ); while ( pDataSourceEntry ) { if ( m_pTreeView->getListBox().GetEntryText( pDataSourceEntry ) == _rDataSourceName ) @@ -3761,7 +3761,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo } else OSL_ENSURE( - ( NULL == m_pCurrentlyDisplayed ) + ( nullptr == m_pCurrentlyDisplayed ) || ( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) != pDataSourceEntry ), "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!"); @@ -3775,13 +3775,13 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo { SvTreeListEntry* pEntry = (*it).get(); const DBTreeListUserData* pData = static_cast<const DBTreeListUserData*>(pEntry->GetUserData()); - pEntry->SetUserData(NULL); + pEntry->SetUserData(nullptr); delete pData; } // remove the entry DBTreeListUserData* pData = static_cast< DBTreeListUserData* >( pDataSourceEntry->GetUserData() ); - pDataSourceEntry->SetUserData( NULL ); + pDataSourceEntry->SetUserData( nullptr ); delete pData; m_pTreeModel->Remove( pDataSourceEntry ); } |