diff options
Diffstat (limited to 'svx/source/form')
32 files changed, 373 insertions, 373 deletions
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx index 310ed7d18053..56e68c269f8e 100644 --- a/svx/source/form/ParseContext.cxx +++ b/svx/source/form/ParseContext.cxx @@ -161,9 +161,9 @@ namespace return s_nCounter; } - OSystemParseContext* getSharedContext(OSystemParseContext* _pContext = NULL,bool _bSet = false) + OSystemParseContext* getSharedContext(OSystemParseContext* _pContext = nullptr,bool _bSet = false) { - static OSystemParseContext* s_pSharedContext = NULL; + static OSystemParseContext* s_pSharedContext = nullptr; if ( _pContext && !s_pSharedContext ) { s_pSharedContext = _pContext; @@ -195,7 +195,7 @@ OParseContextClient::~OParseContextClient() { ::osl::MutexGuard aGuard( getSafteyMutex() ); if ( 0 == osl_atomic_decrement( &getCounter() ) ) - delete getSharedContext(NULL,true); + delete getSharedContext(nullptr,true); } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 4de50cfad24b..e28f9bf3814e 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -130,7 +130,7 @@ namespace svxform DataTreeListBox::DataTreeListBox(vcl::Window* pParent, WinBits nBits) : SvTreeListBox(pParent, nBits) - , m_pXFormsPage(NULL) + , m_pXFormsPage(nullptr) , m_eGroup(DGTUnknown) , m_nAddId(0) , m_nAddElementId(0) @@ -197,7 +197,7 @@ namespace svxform DBG_ASSERT( pSelected && !GetParent( pSelected ), "DataTreeListBox::StartDrag: what kind of entry *is* this?" ); // on the submission page, we have only top-level entries (the submission themself) // plus direct children of those (facets of a submission) - pItemNode = pSelected ? static_cast< ItemNode* >( pSelected->GetUserData() ) : NULL; + pItemNode = pSelected ? static_cast< ItemNode* >( pSelected->GetUserData() ) : nullptr; if ( !pItemNode ) return; } @@ -397,7 +397,7 @@ namespace svxform IMPL_LINK_NOARG_TYPED(XFormsPage, ItemSelectHdl, SvTreeListBox*, void) { - EnableMenuItems( NULL ); + EnableMenuItems( nullptr ); } void XFormsPage::AddChildren( @@ -506,7 +506,7 @@ namespace svxform { DataItemType eType = DITElement; SvTreeListEntry* pEntry = m_pItemList->FirstSelected(); - ItemNode* pNode = NULL; + ItemNode* pNode = nullptr; Reference< css::xml::dom::XNode > xParentNode; Reference< XPropertySet > xNewBinding; sal_uInt16 nResId = 0; @@ -780,7 +780,7 @@ namespace svxform } m_pNaviWin->DisableNotify( false ); - EnableMenuItems( NULL ); + EnableMenuItems( nullptr ); if ( bIsDocModified ) svxform::DataNavigatorWindow::SetDocModified(); return bHandled; @@ -810,7 +810,7 @@ namespace svxform SvTreeListEntry* XFormsPage::AddEntry( const Reference< XPropertySet >& _rEntry ) { - SvTreeListEntry* pEntry = NULL; + SvTreeListEntry* pEntry = nullptr; const ImageList& rImageList = m_pNaviWin->GetItemImageList(); Image aImage = rImageList.GetImage( IID_ELEMENT ); @@ -823,7 +823,7 @@ namespace svxform { // ID _rEntry->getPropertyValue( PN_SUBMISSION_ID ) >>= sTemp; - pEntry = m_pItemList->InsertEntry( sTemp, aImage, aImage, NULL, false, TREELIST_APPEND, pNode ); + pEntry = m_pItemList->InsertEntry( sTemp, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode ); // Action _rEntry->getPropertyValue( PN_SUBMISSION_ACTION ) >>= sTemp; OUString sEntry = SVX_RESSTR( RID_STR_DATANAV_SUBM_ACTION ); @@ -867,7 +867,7 @@ namespace svxform _rEntry->getPropertyValue( PN_BINDING_EXPR ) >>= sTemp; sName += sTemp; pEntry = m_pItemList->InsertEntry( - sName, aImage, aImage, NULL, false, TREELIST_APPEND, pNode ); + sName, aImage, aImage, nullptr, false, TREELIST_APPEND, pNode ); } catch ( Exception& ) { @@ -892,7 +892,7 @@ namespace svxform // #i36262# may be called for submission entry *or* for // submission children. If we don't have any children, we // assume the latter case and use the parent - if( m_pItemList->GetEntry( pEntry, 0 ) == NULL ) + if( m_pItemList->GetEntry( pEntry, 0 ) == nullptr ) { pEntry = m_pItemList->GetModel()->GetParent( pEntry ); } @@ -1181,7 +1181,7 @@ namespace svxform ItemNode* pNode = new ItemNode( xPropSet ); m_pItemList->InsertEntry( - sEntry, aImage1, aImage2, NULL, false, TREELIST_APPEND, pNode ); + sEntry, aImage1, aImage2, nullptr, false, TREELIST_APPEND, pNode ); } } } @@ -1198,7 +1198,7 @@ namespace svxform break; } - EnableMenuItems( NULL ); + EnableMenuItems( nullptr ); return sRet; } @@ -1240,7 +1240,7 @@ namespace svxform if ( sNodeName.isEmpty() ) sNodeName = xRoot->getNodeName(); if ( xRoot->hasChildNodes() ) - AddChildren( NULL, _rImgLst, xRoot ); + AddChildren( nullptr, _rImgLst, xRoot ); } catch ( Exception& ) { @@ -1358,9 +1358,9 @@ namespace svxform DataNavigatorWindow::DataNavigatorWindow(vcl::Window* pParent, SfxBindings* pBindings) : Window(pParent) - , m_pInstPage(NULL) - , m_pSubmissionPage(NULL) - , m_pBindingPage(NULL) + , m_pInstPage(nullptr) + , m_pSubmissionPage(nullptr) + , m_pBindingPage(nullptr) , m_nLastSelectedPos(LISTBOX_ENTRY_NOTFOUND) , m_bShowDetails(false) , m_bIsNotifyDisabled(false) @@ -1404,7 +1404,7 @@ namespace svxform ActivatePageHdl(m_pTabCtrl); // get our frame - DBG_ASSERT( pBindings != NULL, + DBG_ASSERT( pBindings != nullptr, "DataNavigatorWindow::LoadModels(): no SfxBindings; can't get frame" ); m_xFrame.set( pBindings->GetDispatcher()->GetFrame()->GetFrame().GetFrameInterface(), UNO_QUERY ); @@ -1465,7 +1465,7 @@ namespace svxform if ( nPos != m_nLastSelectedPos || !pBox ) { m_nLastSelectedPos = nPos; - ClearAllPageModels( pBox != NULL ); + ClearAllPageModels( pBox != nullptr ); InitPages(); SetPageModel(); } @@ -1649,7 +1649,7 @@ namespace svxform { SAL_WARN( "svx.form", "DataNavigatorWindow::MenuSelectHdl(): exception caught" ); } - ModelSelectHdl( NULL ); + ModelSelectHdl( nullptr ); m_pTabCtrl->SetCurPageId( nInst ); XFormsPage* pPage = GetCurrentPage( nInst ); pPage->SetInstanceName(sName); @@ -1739,7 +1739,7 @@ namespace svxform } m_pTabCtrl->RemovePage( nId ); m_pTabCtrl->SetCurPageId(m_pTabCtrl->GetPageId("instance")); - ModelSelectHdl( NULL ); + ModelSelectHdl( nullptr ); bIsDocModified = true; } } @@ -1811,13 +1811,13 @@ namespace svxform IMPL_LINK_NOARG_TYPED(DataNavigatorWindow, UpdateHdl, Timer *, void) { - ModelSelectHdl( NULL ); + ModelSelectHdl( nullptr ); } XFormsPage* DataNavigatorWindow::GetCurrentPage( sal_uInt16& rCurId ) { rCurId = m_pTabCtrl->GetCurPageId(); - XFormsPage* pPage = NULL; + XFormsPage* pPage = nullptr; OString sName(m_pTabCtrl->GetPageName(rCurId)); if (sName == "submissions") { @@ -2290,7 +2290,7 @@ namespace svxform InitDialog(); InitFromNode(); InitDataTypeBox(); - CheckHdl( NULL ); + CheckHdl( nullptr ); } @@ -2949,7 +2949,7 @@ namespace svxform IMPL_LINK_NOARG_TYPED( NamespaceItemDialog, SelectHdl, SvTreeListBox *, void) { - bool bEnable = ( m_pNamespacesList->FirstSelected() != NULL ); + bool bEnable = ( m_pNamespacesList->FirstSelected() != nullptr ); m_pEditNamespaceBtn->Enable( bEnable ); m_pDeleteNamespaceBtn->Enable( bEnable ); } diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx index a61ba0beb1fb..57845711a496 100644 --- a/svx/source/form/delayedevent.cxx +++ b/svx/source/form/delayedevent.cxx @@ -25,7 +25,7 @@ namespace svxform void DelayedEvent::Call() { CancelPendingCall(); - SAL_WARN_IF( m_nEventId != 0, "svx.form", "DelayedEvent::Call: CancelPendingCall did not work!" ); + SAL_WARN_IF( m_nEventId != nullptr, "svx.form", "DelayedEvent::Call: CancelPendingCall did not work!" ); m_nEventId = Application::PostUserEvent( LINK( this, DelayedEvent, OnCall ) ); } @@ -34,12 +34,12 @@ namespace svxform { if ( m_nEventId ) Application::RemoveUserEvent( m_nEventId ); - m_nEventId = 0; + m_nEventId = nullptr; } IMPL_LINK_TYPED( DelayedEvent, OnCall, void*, _pArg, void ) { - m_nEventId = 0; + m_nEventId = nullptr; m_aHandler.Call( _pArg ); } } diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 2f2310d935e3..4626178567ea 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -107,7 +107,7 @@ namespace svxform OFilterItemExchange::OFilterItemExchange() - : m_pFormItem(NULL) + : m_pFormItem(nullptr) { } @@ -175,7 +175,7 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) co if ( _nFilterComponentIndex == rCondition.GetComponentIndex() ) return &rCondition; } - return NULL; + return nullptr; } @@ -503,10 +503,10 @@ void SAL_CALL FmFilterAdapter::disjunctiveTermAdded( const FilterEvent& _Event ) TYPEINIT1(FmFilterModel, FmParentData); FmFilterModel::FmFilterModel() - :FmParentData(NULL, OUString()) + :FmParentData(nullptr, OUString()) ,OSQLParserClient(comphelper::getProcessComponentContext()) - ,m_pAdapter(NULL) - ,m_pCurrentItems(NULL) + ,m_pAdapter(nullptr) + ,m_pCurrentItems(nullptr) { } @@ -528,12 +528,12 @@ void FmFilterModel::Clear() { m_pAdapter->dispose(); m_pAdapter->release(); - m_pAdapter= NULL; + m_pAdapter= nullptr; } - m_pCurrentItems = NULL; - m_xController = NULL; - m_xControllers = NULL; + m_pCurrentItems = nullptr; + m_xController = nullptr; + m_xControllers = nullptr; for (::std::vector<FmFilterData*>::const_iterator i = m_aChildren.begin(); i != m_aChildren.end(); ++i) @@ -662,7 +662,7 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons } } } - return NULL; + return nullptr; } @@ -684,7 +684,7 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons } } } - return NULL; + return nullptr; } @@ -942,10 +942,10 @@ void FmFilterModel::SetCurrentItems(FmFilterItems* pCurrent) m_pCurrentItems = pCurrent; } else - m_pCurrentItems = NULL; + m_pCurrentItems = nullptr; } else - m_pCurrentItems = NULL; + m_pCurrentItems = nullptr; // UI benachrichtigen @@ -1100,8 +1100,8 @@ void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderCo FmFilterNavigator::FmFilterNavigator( vcl::Window* pParent ) :SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HASBUTTONSATROOT ) - ,m_pModel( NULL ) - ,m_pEditingCurrently( NULL ) + ,m_pModel( nullptr ) + ,m_pEditingCurrently( nullptr ) ,m_aControlExchange( this ) ,m_aTimerCounter( 0 ) ,m_aDropActionType( DA_SCROLLUP ) @@ -1181,7 +1181,7 @@ bool FmFilterNavigator::EditingEntry( SvTreeListEntry* pEntry, Selection& rSelec bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) { DBG_ASSERT(pEntry == m_pEditingCurrently, "FmFilterNavigator::EditedEntry: suspicious entry!"); - m_pEditingCurrently = NULL; + m_pEditingCurrently = nullptr; if (EditingCanceled()) return true; @@ -1327,7 +1327,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) return DND_ACTION_NONE; FmFilterData* pData = static_cast<FmFilterData*>(pDropTarget->GetUserData()); - FmFormItem* pForm = NULL; + FmFormItem* pForm = nullptr; if (dynamic_cast<const FmFilterItem*>(pData) != nullptr) { pForm = dynamic_cast<FmFormItem*>( pData->GetParent()->GetParent() ); @@ -1414,7 +1414,7 @@ bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, bool bSelect ) { if (bSelect) { - FmFormItem* pFormItem = NULL; + FmFormItem* pFormItem = nullptr; if ( dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr) pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent()); else if (dynamic_cast<const FmFilterItems*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr) @@ -1462,7 +1462,7 @@ void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) else if( dynamic_cast<const FmFilterCurrentChangedHint*>(&rHint) ) { // invalidate the entries - for (SvTreeListEntry* pEntry = First(); pEntry != NULL; + for (SvTreeListEntry* pEntry = First(); pEntry != nullptr; pEntry = Next(pEntry)) GetModel()->InvalidateEntry( pEntry ); } @@ -1470,10 +1470,10 @@ void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) SvTreeListEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const { - SvTreeListEntry* pEntry = NULL; + SvTreeListEntry* pEntry = nullptr; if (pItem) { - for (pEntry = First(); pEntry != NULL; pEntry = Next( pEntry )) + for (pEntry = First(); pEntry != nullptr; pEntry = Next( pEntry )) { FmFilterData* pEntryItem = static_cast<FmFilterData*>(pEntry->GetUserData()); if (pEntryItem == pItem) @@ -1512,12 +1512,12 @@ void FmFilterNavigator::Remove(FmFilterData* pItem) FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem*>& _rItemList) { // be sure that the data is only used within only one form! - FmFormItem* pFirstItem = NULL; + FmFormItem* pFirstItem = nullptr; bool bHandled = true; bool bFoundSomething = false; for (SvTreeListEntry* pEntry = FirstSelected(); - bHandled && pEntry != NULL; + bHandled && pEntry != nullptr; pEntry = NextSelected(pEntry)) { FmFilterItem* pFilter = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) ); @@ -1539,7 +1539,7 @@ FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem } } if ( !bHandled || !bFoundSomething ) - pFirstItem = NULL; + pFirstItem = nullptr; return pFirstItem; } @@ -1600,12 +1600,12 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) { // die Stelle, an der geklickt wurde Point aWhere; - SvTreeListEntry* pClicked = NULL; + SvTreeListEntry* pClicked = nullptr; if (rEvt.IsMouseEvent()) { aWhere = rEvt.GetMousePosPixel(); pClicked = GetEntry(aWhere); - if (pClicked == NULL) + if (pClicked == nullptr) break; if (!IsSelected(pClicked)) @@ -1625,7 +1625,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) ::std::vector<FmFilterData*> aSelectList; for (SvTreeListEntry* pEntry = FirstSelected(); - pEntry != NULL; + pEntry != nullptr; pEntry = NextSelected(pEntry)) { // don't delete forms @@ -1648,7 +1648,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) aContextMenu.EnableItem( SID_FM_DELETE, !aSelectList.empty() ); - bool bEdit = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pClicked->GetUserData()) ) != NULL && + bool bEdit = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pClicked->GetUserData()) ) != nullptr && IsSelected(pClicked) && GetSelectionCount() == 1; aContextMenu.EnableItem( SID_FM_FILTER_EDIT, @@ -1715,7 +1715,7 @@ SvTreeListEntry* FmFilterNavigator::getPrevEntry(SvTreeListEntry* _pStartWith) pEntry = Prev(pEntry); // if the entry is still no leaf return if ( pEntry && GetChildCount( pEntry ) != 0 ) - pEntry = NULL; + pEntry = nullptr; } return pEntry; } @@ -1740,7 +1740,7 @@ void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt) if ( rKeyCode.GetCode() == KEY_UP ) getter = ::std::mem_fun(&FmFilterNavigator::getPrevEntry); - SvTreeListEntry* pTarget = getter( this, NULL ); + SvTreeListEntry* pTarget = getter( this, nullptr ); if ( !pTarget ) break; @@ -1810,7 +1810,7 @@ void FmFilterNavigator::DeleteSelection() // the deletion of its child, I have to shrink the selecton list ::std::vector<SvTreeListEntry*> aEntryList; for (SvTreeListEntry* pEntry = FirstSelected(); - pEntry != NULL; + pEntry != nullptr; pEntry = NextSelected(pEntry)) { FmFilterItem* pFilterItem = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) ); @@ -1866,7 +1866,7 @@ void FmFilterNavigatorWin::UpdateContent(FmFormShell* pFormShell) return; if (!pFormShell) - m_pNavigator->UpdateContent( NULL, NULL ); + m_pNavigator->UpdateContent( nullptr, nullptr ); else { Reference< XFormController > xController(pFormShell->GetImpl()->getActiveInternalController()); @@ -1898,7 +1898,7 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c UpdateContent( pShell ); } else - UpdateContent( NULL ); + UpdateContent( nullptr ); } @@ -1911,7 +1911,7 @@ bool FmFilterNavigatorWin::Close() // the EndEditing was vetoed (perhaps of an syntax error or such) return false; - UpdateContent( NULL ); + UpdateContent( nullptr ); return SfxDockingWindow::Close(); } diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index 8caf6c64d98a..8fb2af8dd263 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -314,7 +314,7 @@ void FmPropBrw::implDetachController() { try { - m_xMeAsFrame->setComponent(NULL, NULL); + m_xMeAsFrame->setComponent(nullptr, nullptr); } catch( const Exception& ) { @@ -324,7 +324,7 @@ void FmPropBrw::implDetachController() // we attached a frame to the controller manually, so we need to manually tell it that it's detached, too if ( m_xBrowserController.is() ) - m_xBrowserController->attachFrame( NULL ); + m_xBrowserController->attachFrame( nullptr ); m_xBrowserController.clear(); m_xInspectorModel.clear(); @@ -535,7 +535,7 @@ void FmPropBrw::impl_createPropertyBrowser_throw( FmFormShell* _pFormShell ) // the mapping from control models to control shapes Reference< XMap > xControlMap; - FmFormPage* pFormPage = _pFormShell ? _pFormShell->GetCurPage() : NULL; + FmFormPage* pFormPage = _pFormShell ? _pFormShell->GetCurPage() : nullptr; if ( pFormPage ) xControlMap = pFormPage->GetImpl().getControlToShapeMap(); @@ -592,7 +592,7 @@ void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell* _pFormShell ) { // the document in which we live Reference< XInterface > xDocument; - SfxObjectShell* pObjectShell = _pFormShell ? _pFormShell->GetObjectShell() : NULL; + SfxObjectShell* pObjectShell = _pFormShell ? _pFormShell->GetObjectShell() : nullptr; if ( pObjectShell ) xDocument = pObjectShell->GetModel(); if ( ( xDocument == m_xLastKnownDocument ) && m_xBrowserController.is() ) @@ -603,7 +603,7 @@ void FmPropBrw::impl_ensurePropertyBrowser_nothrow( FmFormShell* _pFormShell ) { // clean up any previous instances of the object inspector if ( m_xMeAsFrame.is() ) - m_xMeAsFrame->setComponent( NULL, NULL ); + m_xMeAsFrame->setComponent( nullptr, nullptr ); else ::comphelper::disposeComponent( m_xBrowserController ); m_xBrowserController.clear(); @@ -645,7 +645,7 @@ void FmPropBrw::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPool if ( m_bInitialStateChange ) { // if we're just newly created, we want to have the focus - PostUserEvent( LINK( this, FmPropBrw, OnAsyncGetFocus ), NULL, true ); + PostUserEvent( LINK( this, FmPropBrw, OnAsyncGetFocus ), nullptr, true ); // and additionally, we want to show the page which was active during // our previous incarnation diff --git a/svx/source/form/fmdocumentclassification.cxx b/svx/source/form/fmdocumentclassification.cxx index c937685c9cd3..a61abcfb923d 100644 --- a/svx/source/form/fmdocumentclassification.cxx +++ b/svx/source/form/fmdocumentclassification.cxx @@ -98,7 +98,7 @@ namespace svxform { "com.sun.star.sdb.FormDesign", eDatabaseForm }, { "com.sun.star.sdb.TextReportDesign", eDatabaseReport }, { "com.sun.star.text.GlobalDocument", eTextDocument }, - { NULL, eUnknownDocumentType } + { nullptr, eUnknownDocumentType } }; return aModuleInfo; } diff --git a/svx/source/form/fmexch.cxx b/svx/source/form/fmexch.cxx index b4fcca3c956b..58428a6ced0a 100644 --- a/svx/source/form/fmexch.cxx +++ b/svx/source/form/fmexch.cxx @@ -63,7 +63,7 @@ namespace svxform { Reference< clipboard::XClipboard > xClipBoard( getOwnClipboard() ); if ( xClipBoard.is() ) - xClipBoard->setContents( NULL, NULL ); + xClipBoard->setContents( nullptr, nullptr ); } catch( const Exception& ) { @@ -115,13 +115,13 @@ namespace svxform } OControlTransferData::OControlTransferData( ) - :m_pFocusEntry( NULL ) + :m_pFocusEntry( nullptr ) { } OControlTransferData::OControlTransferData( const Reference< XTransferable >& _rxTransferable ) - :m_pFocusEntry( NULL ) + :m_pFocusEntry( nullptr ) { TransferableDataHelper aExchangedData( _rxTransferable ); @@ -235,7 +235,7 @@ namespace svxform { aCurrentPath.push_back(pLoop->GetChildListPos()); pLoop = pTreeBox->GetParent(pLoop); - DBG_ASSERT((pLoop != NULL) || (pRoot == 0), "OControlTransferData::buildPathFormat: invalid root or entry !"); + DBG_ASSERT((pLoop != nullptr) || (pRoot == nullptr), "OControlTransferData::buildPathFormat: invalid root or entry !"); // pLoop == NULL heisst, dass ich am oberen Ende angelangt bin, dann sollte das Ganze abbrechen, was nur bei pRoot == NULL der Fall sein wird } @@ -360,7 +360,7 @@ namespace svxform OLocalExchangeHelper::OLocalExchangeHelper(vcl::Window* _pDragSource) :m_pDragSource(_pDragSource) - ,m_pTransferable(NULL) + ,m_pTransferable(nullptr) { } @@ -391,7 +391,7 @@ namespace svxform { m_pTransferable->setClipboardListener( Link<OLocalExchange&,void>() ); m_pTransferable->release(); - m_pTransferable = NULL; + m_pTransferable = nullptr; } } diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index 6bdc2d70bdb0..67b033b54a5a 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -542,7 +542,7 @@ namespace svxform UpdateContent( pShell ); } else - UpdateContent( NULL ); + UpdateContent( nullptr ); } @@ -557,7 +557,7 @@ namespace svxform bool NavigatorFrame::Close() { - UpdateContent( NULL ); + UpdateContent( nullptr ); return SfxDockingWindow::Close(); } diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index 0fff0a493447..03ae492e69b3 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -45,7 +45,7 @@ struct FmFormModelImplData aControlsUseRefDevice; FmFormModelImplData() - :pUndoEnv( NULL ) + :pUndoEnv( nullptr ) ,bOpenInDesignIsDefaulted( true ) ,bMovingPage( false ) ,aControlsUseRefDevice() @@ -55,8 +55,8 @@ struct FmFormModelImplData FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers) : SdrModel(pPool, pPers, false, LOADREFCOUNTS) - , m_pImpl(NULL) - , m_pObjShell(0) + , m_pImpl(nullptr) + , m_pObjShell(nullptr) , m_bOpenInDesignMode(false) , m_bAutoControlFocus(false) { @@ -67,8 +67,8 @@ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers) FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShell* pPers) : SdrModel(rPath, pPool, pPers, false, LOADREFCOUNTS) - , m_pImpl(NULL) - , m_pObjShell(0) + , m_pImpl(nullptr) + , m_pObjShell(nullptr) , m_bOpenInDesignMode(false) , m_bAutoControlFocus(false) { @@ -80,8 +80,8 @@ FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShe FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShell* pPers, bool bUseExtColorTable) : SdrModel(rPath, pPool, pPers, bUseExtColorTable, LOADREFCOUNTS) - , m_pImpl(NULL) - , m_pObjShell(0) + , m_pImpl(nullptr) + , m_pObjShell(nullptr) , m_bOpenInDesignMode(false) , m_bAutoControlFocus(false) { @@ -93,7 +93,7 @@ FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShe FmFormModel::~FmFormModel() { if (m_pObjShell && m_pImpl->pUndoEnv->IsListening(*m_pObjShell)) - SetObjectShell(NULL); + SetObjectShell(nullptr); ClearUndoBuffer(); // minimale grenze fuer undos diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx index 6b4a14b797de..5d93ce213f27 100644 --- a/svx/source/form/fmobj.cxx +++ b/svx/source/form/fmobj.cxx @@ -60,7 +60,7 @@ TYPEINIT1(FmFormObj, SdrUnoObj); FmFormObj::FmFormObj(const OUString& rModelName) :SdrUnoObj ( rModelName ) ,m_nPos ( -1 ) - ,m_pLastKnownRefDevice ( NULL ) + ,m_pLastKnownRefDevice ( nullptr ) { // normally, this is done in SetUnoControlModel, but if the call happened in the base class ctor, @@ -72,7 +72,7 @@ FmFormObj::FmFormObj(const OUString& rModelName) FmFormObj::FmFormObj() :SdrUnoObj ( "" ) ,m_nPos ( -1 ) - ,m_pLastKnownRefDevice ( NULL ) + ,m_pLastKnownRefDevice ( nullptr ) { } @@ -83,7 +83,7 @@ FmFormObj::~FmFormObj() if (m_xEnvironmentHistory.is()) m_xEnvironmentHistory->dispose(); - m_xEnvironmentHistory = NULL; + m_xEnvironmentHistory = nullptr; m_aEventsHistory.realloc(0); } @@ -111,7 +111,7 @@ void FmFormObj::impl_checkRefDevice_nothrow( bool _force ) if ( !pFormModel || !pFormModel->ControlsUseRefDevice() ) return; - OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : NULL; + OutputDevice* pCurrentRefDevice = pFormModel ? pFormModel->GetRefDevice() : nullptr; if ( ( m_pLastKnownRefDevice.get() == pCurrentRefDevice ) && !_force ) return; @@ -316,7 +316,7 @@ void FmFormObj::SetPage(SdrPage* _pNewPage) if (m_xEnvironmentHistory.is()) m_xEnvironmentHistory->dispose(); - m_xEnvironmentHistory = NULL; + m_xEnvironmentHistory = nullptr; m_aEventsHistory.realloc(0); if ( pNewFormPage ) @@ -338,11 +338,11 @@ sal_uInt16 FmFormObj::GetObjIdentifier() const void FmFormObj::clonedFrom(const FmFormObj* _pSource) { - DBG_ASSERT(_pSource != NULL, "FmFormObj::clonedFrom : invalid source !"); + DBG_ASSERT(_pSource != nullptr, "FmFormObj::clonedFrom : invalid source !"); if (m_xEnvironmentHistory.is()) m_xEnvironmentHistory->dispose(); - m_xEnvironmentHistory = NULL; + m_xEnvironmentHistory = nullptr; m_aEventsHistory.realloc(0); Reference< XChild > xSourceAsChild(_pSource->GetUnoControlModel(), UNO_QUERY); @@ -362,7 +362,7 @@ void FmFormObj::clonedFrom(const FmFormObj* _pSource) FmFormObj* FmFormObj::Clone() const { FmFormObj* pFormObject = CloneHelper< FmFormObj >(); - DBG_ASSERT(pFormObject != NULL, "FmFormObj::Clone : invalid clone !"); + DBG_ASSERT(pFormObject != nullptr, "FmFormObj::Clone : invalid clone !"); if (pFormObject) pFormObject->clonedFrom(this); @@ -665,7 +665,7 @@ bool FmFormObj::EndCreate( SdrDragStat& rStat, SdrCreateCmd eCmd ) } FmFormView* pView( dynamic_cast< FmFormView* >( rStat.GetView() ) ); - FmXFormView* pViewImpl = pView ? pView->GetImpl() : NULL; + FmXFormView* pViewImpl = pView ? pView->GetImpl() : nullptr; OSL_ENSURE( pViewImpl, "FmFormObj::EndCreate: no view!?" ); if ( pViewImpl ) pViewImpl->onCreatedFormObject( *this ); @@ -680,7 +680,7 @@ void FmFormObj::BrkCreate( SdrDragStat& rStat ) impl_isolateControlModel_nothrow(); FmFormView* pView( dynamic_cast< FmFormView* >( rStat.GetView() ) ); - FmXFormView* pViewImpl = pView ? pView->GetImpl() : NULL; + FmXFormView* pViewImpl = pView ? pView->GetImpl() : nullptr; OSL_ENSURE( pViewImpl, "FmFormObj::EndCreate: no view!?" ); if ( pViewImpl ) pViewImpl->breakCreateFormObject(); diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx index f0721b4e2687..34ed152f8500 100644 --- a/svx/source/form/fmpage.cxx +++ b/svx/source/form/fmpage.cxx @@ -119,13 +119,13 @@ void FmFormPage::SetModel(SdrModel* pNewModel) SdrPage* FmFormPage::Clone() const { - return Clone(0); + return Clone(nullptr); } SdrPage* FmFormPage::Clone(SdrModel* const pNewModel) const { FmFormPage* const pNewPage = new FmFormPage(*this); - FmFormModel* pFormModel = 0; + FmFormModel* pFormModel = nullptr; if (pNewModel) { pFormModel = dynamic_cast<FmFormModel*>(pNewModel); @@ -167,8 +167,8 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView* pView, aPos = pWindow->ScreenToOutputPixel( aPos ); aPos = pWindow->PixelToLogic( aPos ); - SdrObject* pObj = NULL; - SdrPageView* pPV = NULL; + SdrObject* pObj = nullptr; + SdrPageView* pPV = nullptr; if ( !pView->PickObj( aPos, 0, pObj, pPV, SdrSearchOptions::DEEP ) ) return false; diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index b125490cf75f..a403d0834a4c 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -322,7 +322,7 @@ const Reference< css::form::XForms >& FmFormPageImpl::getForms( bool _bForceCrea FmFormModel* pFormsModel = dynamic_cast<FmFormModel*>( m_rPage.GetModel() ); // give the newly created collection a place in the universe - SfxObjectShell* pObjShell = pFormsModel ? pFormsModel->GetObjectShell() : NULL; + SfxObjectShell* pObjShell = pFormsModel ? pFormsModel->GetObjectShell() : nullptr; if ( pObjShell ) m_xForms->setParent( pObjShell->GetModel() ); @@ -336,7 +336,7 @@ const Reference< css::form::XForms >& FmFormPageImpl::getForms( bool _bForceCrea FmFormPageImpl::~FmFormPageImpl() { - xCurrentForm = NULL; + xCurrentForm = nullptr; ::comphelper::disposeComponent( m_xForms ); } @@ -452,7 +452,7 @@ Reference< css::form::XForm > FmFormPageImpl::findPlaceInFormComponentHierarchy { // if the control already is child of a form, don't do anything if (!rContent.is() || rContent->getParent().is()) - return NULL; + return nullptr; Reference< XForm > xForm; diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index ba7c924d621c..f12265025ff6 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -736,7 +736,7 @@ namespace svxform if ( !impl_allowAsynchronousCall_nothrow( _rEvent.ListenerType.getTypeName(), _rEvent.MethodName ) ) { - impl_doFireScriptEvent_nothrow( aGuard, _rEvent, NULL ); + impl_doFireScriptEvent_nothrow( aGuard, _rEvent, nullptr ); return; } @@ -766,14 +766,14 @@ namespace svxform void SAL_CALL FormScriptListener::dispose() { ::osl::MutexGuard aGuard( m_aMutex ); - m_pScriptExecutor = NULL; + m_pScriptExecutor = nullptr; } IMPL_LINK_TYPED( FormScriptListener, OnAsyncScriptEvent, void*, p, void ) { ScriptEvent* _pEvent = static_cast<ScriptEvent*>(p); - OSL_PRECOND( _pEvent != NULL, "FormScriptListener::OnAsyncScriptEvent: invalid event!" ); + OSL_PRECOND( _pEvent != nullptr, "FormScriptListener::OnAsyncScriptEvent: invalid event!" ); if ( !_pEvent ) return; @@ -781,7 +781,7 @@ namespace svxform ::osl::ClearableMutexGuard aGuard( m_aMutex ); if ( !impl_isDisposed_nothrow() ) - impl_doFireScriptEvent_nothrow( aGuard, *_pEvent, NULL ); + impl_doFireScriptEvent_nothrow( aGuard, *_pEvent, nullptr ); } delete _pEvent; @@ -790,7 +790,7 @@ namespace svxform } FormScriptingEnvironment::FormScriptingEnvironment( FmFormModel& _rModel ) - :m_pScriptListener( NULL ) + :m_pScriptListener( nullptr ) ,m_rFormModel( _rModel ) ,m_bDisposed( false ) { @@ -893,7 +893,7 @@ namespace svxform } catch( Exception& ) {} } - m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : 0 ); + m_rObjectShell.CallXScript( m_sScriptCode, _rArguments, _rSynchronousResult, aOutArgsIndex, aOutArgs, true, aCaller.hasValue() ? &aCaller : nullptr ); } } @@ -979,7 +979,7 @@ namespace svxform { // object shells are not thread safe, so guard the destruction SolarMutexGuard aSolarGuarsReset; - xObjectShell = NULL; + xObjectShell = nullptr; } #endif } diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx index 5cbca72bf1dd..a0b4115d11d2 100644 --- a/svx/source/form/fmshell.cxx +++ b/svx/source/form/fmshell.cxx @@ -207,7 +207,7 @@ FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView ) :SfxShell(_pParent) ,m_pImpl(new FmXFormShell(*this, _pParent->GetViewFrame())) ,m_pFormView( pView ) - ,m_pFormModel( NULL ) + ,m_pFormModel( nullptr ) ,m_pParentShell(_pParent) ,m_nLastSlot( 0 ) ,m_bDesignMode( true ) @@ -224,11 +224,11 @@ FmFormShell::FmFormShell( SfxViewShell* _pParent, FmFormView* pView ) FmFormShell::~FmFormShell() { if ( m_pFormView ) - SetView( NULL ); + SetView( nullptr ); m_pImpl->dispose(); m_pImpl->release(); - m_pImpl = NULL; + m_pImpl = nullptr; } @@ -254,7 +254,7 @@ bool FmFormShell::PrepareClose(bool bUI) SdrPageView* pCurPageView = m_pFormView->GetSdrPageView(); // sal_uInt16 nPos = pCurPageView ? pCurPageView->GetWinList().Find((OutputDevice*)m_pFormView->GetActualOutDev()) : SDRPAGEVIEWWIN_NOTFOUND; - SdrPageWindow* pWindow = pCurPageView ? pCurPageView->FindPageWindow(*const_cast<OutputDevice*>(m_pFormView->GetActualOutDev())) : 0L; + SdrPageWindow* pWindow = pCurPageView ? pCurPageView->FindPageWindow(*const_cast<OutputDevice*>(m_pFormView->GetActualOutDev())) : nullptr; if(pWindow) { @@ -495,7 +495,7 @@ void FmFormShell::Execute(SfxRequest &rReq) if ( pGrabFocusItem && pGrabFocusItem->GetValue() ) { // see below SfxViewShell* pShell = GetViewShell(); - vcl::Window* pShellWnd = pShell ? pShell->GetWindow() : NULL; + vcl::Window* pShellWnd = pShell ? pShell->GetWindow() : nullptr; if ( pShellWnd ) pShellWnd->GrabFocus(); break; @@ -505,11 +505,11 @@ void FmFormShell::Execute(SfxRequest &rReq) SfxUInt32Item aInventorItem( SID_FM_CONTROL_INVENTOR, FmFormInventor ); const SfxPoolItem* pArgs[] = { - &aIdentifierItem, &aInventorItem, NULL + &aIdentifierItem, &aInventorItem, nullptr }; const SfxPoolItem* pInternalArgs[] = { - NULL + nullptr }; GetViewShell()->GetViewFrame()->GetDispatcher()->Execute( SID_FM_CREATE_CONTROL, SfxCallMode::ASYNCHRON, @@ -752,7 +752,7 @@ void FmFormShell::Execute(SfxRequest &rReq) DBG_ASSERT( pFact, "no dialog factory!" ); if ( pFact ) { - std::unique_ptr< AbstractFmInputRecordNoDialog > dlg( pFact->CreateFmInputRecordNoDialog( NULL ) ); + std::unique_ptr< AbstractFmInputRecordNoDialog > dlg( pFact->CreateFmInputRecordNoDialog( nullptr ) ); DBG_ASSERT( dlg.get(), "Dialog creation failed!" ); dlg->SetValue( rController->getCursor()->getRow() ); if ( dlg->Execute() == RET_OK ) @@ -904,7 +904,7 @@ void FmFormShell::GetState(SfxItemSet &rSet) { // Ist der css::drawing::Layer gelocked, so m???ssen die Slots disabled werden. #36897 SdrPageView* pPV = m_pFormView->GetSdrPageView(); - if (pPV != NULL) + if (pPV != nullptr) bLayerLocked = pPV->IsLayerLocked(m_pFormView->GetActiveLayer()); } if (bLayerLocked) @@ -1182,7 +1182,7 @@ void FmFormShell::GetFormState(SfxItemSet &rSet, sal_uInt16 nWhich) FmFormPage* FmFormShell::GetCurPage() const { - FmFormPage* pP = NULL; + FmFormPage* pP = nullptr; if (m_pFormView && m_pFormView->GetSdrPageView()) pP = dynamic_cast<FmFormPage*>( m_pFormView->GetSdrPageView()->GetPage() ); return pP; @@ -1196,9 +1196,9 @@ void FmFormShell::SetView( FmFormView* _pView ) if ( IsActive() ) GetImpl()->viewDeactivated( *m_pFormView ); - m_pFormView->SetFormShell( NULL, FmFormView::FormShellAccess() ); - m_pFormView = NULL; - m_pFormModel = NULL; + m_pFormView->SetFormShell( nullptr, FmFormView::FormShellAccess() ); + m_pFormView = nullptr; + m_pFormModel = nullptr; } if ( !_pView ) @@ -1300,7 +1300,7 @@ namespace while ( aIter.IsMore() ) { SdrObject* pObject = aIter.Next(); - SdrUnoObj* pUnoObject = pObject ? dynamic_cast<SdrUnoObj*>( pObject ) : NULL; + SdrUnoObj* pUnoObject = pObject ? dynamic_cast<SdrUnoObj*>( pObject ) : nullptr; if ( !pUnoObject ) continue; @@ -1311,7 +1311,7 @@ namespace if ( _rxModel == xControlModel ) return pUnoObject; } - return NULL; + return nullptr; } } @@ -1391,14 +1391,14 @@ namespace SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxModel, const SdrView& _rView, const OutputDevice& _rDevice, Reference< XControl >& _out_rxControl ) const { if ( !_rxModel.is() ) - return NULL; + return nullptr; // we can only retrieve controls for SdrObjects which belong to page which is actually displayed in the given view SdrPageView* pPageView = _rView.GetSdrPageView(); - SdrPage* pPage = pPageView ? pPageView->GetPage() : NULL; + SdrPage* pPage = pPageView ? pPageView->GetPage() : nullptr; OSL_ENSURE( pPage, "FmFormShell::GetFormControl: no page displayed in the given view!" ); if ( !pPage ) - return NULL; + return nullptr; SdrUnoObj* pUnoObject = lcl_findUnoObject( *pPage, _rxModel ); if ( pUnoObject ) @@ -1429,7 +1429,7 @@ SdrUnoObj* FmFormShell::GetFormControl( const Reference< XControlModel >& _rxMod (void) this; // avoid loplugin:staticmethods #endif - return NULL; + return nullptr; } @@ -1437,7 +1437,7 @@ Reference< runtime::XFormController > FmFormShell::GetFormController( const Refe { const FmFormView* pFormView = dynamic_cast< const FmFormView* >( &_rView ); if ( !pFormView ) - return NULL; + return nullptr; return pFormView->GetFormController( _rxForm, _rDevice ); } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 8bf812d8980f..0c6e7c2ad611 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -289,7 +289,7 @@ namespace if ( pCurrent->IsGroupObject() ) { pGroupIterator.reset(new SdrObjListIter( *pCurrent->GetSubList() )); - pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } while ( pCurrent ) @@ -305,7 +305,7 @@ namespace } // next element - pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator && pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } } } @@ -400,7 +400,7 @@ namespace // search the model/control idl classes for the event described by pCurrent for ( Sequence< Type>* pCurrentArray = &aModelListeners; pCurrentArray; - pCurrentArray = (pCurrentArray == &aModelListeners) ? &aControlListeners : NULL + pCurrentArray = (pCurrentArray == &aModelListeners) ? &aControlListeners : nullptr ) { const Type* pCurrentListeners = pCurrentArray->getConstArray(); @@ -629,8 +629,8 @@ FmXFormShell::FmXFormShell( FmFormShell& _rShell, SfxViewFrame* _pViewFrame ) :FmXFormShell_BASE(m_aMutex) ,FmXFormShell_CFGBASE(OUString("Office.Common/Misc"), ConfigItemMode::DelayedUpdate) ,m_eNavigate( NavigationBarMode_NONE ) - ,m_nInvalidationEvent( 0 ) - ,m_nActivationEvent( 0 ) + ,m_nInvalidationEvent( nullptr ) + ,m_nActivationEvent( nullptr ) ,m_pShell( &_rShell ) ,m_pTextShell( new svx::FmTextControlShell( _pViewFrame ) ) ,m_aActiveControllerFeatures( this ) @@ -752,9 +752,9 @@ void SAL_CALL FmXFormShell::disposing(const lang::EventObject& e) throw( Runtime { // wird der Controller freigeben dann alles loslassen stopListening(); - m_xActiveForm = NULL; - m_xActiveController = NULL; - m_xNavigationController = NULL; + m_xActiveForm = nullptr; + m_xActiveController = nullptr; + m_xNavigationController = nullptr; m_aActiveControllerFeatures.dispose(); m_aNavControllerFeatures.dispose(); @@ -774,9 +774,9 @@ void SAL_CALL FmXFormShell::disposing(const lang::EventObject& e) throw( Runtime if (xComp.is()) xComp->removeEventListener(static_cast<XEventListener*>(static_cast<XPropertyChangeListener*>(this))); - m_xExternalViewController = NULL; - m_xExternalDisplayedForm = NULL; - m_xExtViewTriggerController = NULL; + m_xExternalViewController = nullptr; + m_xExternalDisplayedForm = nullptr; + m_xExtViewTriggerController = nullptr; InvalidateSlot( SID_FM_VIEW_AS_GRID, false ); } @@ -875,7 +875,7 @@ void FmXFormShell::disposing() FmXFormShell_BASE::disposing(); if ( m_pShell && !m_pShell->IsDesignMode() ) - setActiveController( NULL, true ); + setActiveController( nullptr, true ); // do NOT save the content of the old form (the second parameter tells this) // if we're here, then we expect that PrepareClose has been called, and thus the user // got a chance to commit or reject any changes. So in case we're here and there @@ -883,7 +883,7 @@ void FmXFormShell::disposing() m_pTextShell->dispose(); - m_xAttachedFrame = NULL; + m_xAttachedFrame = nullptr; CloseExternalFormViewer(); @@ -898,12 +898,12 @@ void FmXFormShell::disposing() if (m_nInvalidationEvent) { Application::RemoveUserEvent(m_nInvalidationEvent); - m_nInvalidationEvent = 0; + m_nInvalidationEvent = nullptr; } if ( m_nActivationEvent ) { Application::RemoveUserEvent( m_nActivationEvent ); - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; } } @@ -923,18 +923,18 @@ void FmXFormShell::disposing() m_xForms.clear(); impl_switchActiveControllerListening( false ); - m_xActiveController = NULL; - m_xActiveForm = NULL; - - m_pShell = NULL; - m_xNavigationController = NULL; - m_xCurrentForm = NULL; - m_xLastGridFound = NULL; - m_xAttachedFrame = NULL; - m_xExternalViewController = NULL; - m_xExtViewTriggerController = NULL; - m_xExternalDisplayedForm = NULL; - m_xLastGridFound = NULL; + m_xActiveController = nullptr; + m_xActiveForm = nullptr; + + m_pShell = nullptr; + m_xNavigationController = nullptr; + m_xCurrentForm = nullptr; + m_xLastGridFound = nullptr; + m_xAttachedFrame = nullptr; + m_xExternalViewController = nullptr; + m_xExtViewTriggerController = nullptr; + m_xExternalDisplayedForm = nullptr; + m_xLastGridFound = nullptr; InterfaceBag aEmpty; m_aCurrentSelection.swap( aEmpty ); @@ -1009,7 +1009,7 @@ IMPL_LINK_NOARG_TYPED(FmXFormShell, OnInvalidateSlots, void*,void) return; ::osl::MutexGuard aGuard(m_aInvalidationSafety); - m_nInvalidationEvent = 0; + m_nInvalidationEvent = nullptr; for (std::vector<InvalidSlotInfo>::const_iterator i = m_arrInvalidSlots.begin(); i < m_arrInvalidSlots.end(); ++i) { @@ -1089,7 +1089,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent return false; SdrPage* pPage = m_pShell->GetCurPage(); - FmFormPage* pFormPage = pPage ? dynamic_cast< FmFormPage* >( pPage ) : NULL; + FmFormPage* pFormPage = pPage ? dynamic_cast< FmFormPage* >( pPage ) : nullptr; OSL_ENSURE( pFormPage, "FmXFormShell::executeControlConversionSlot: no current (form) page!" ); if ( !pFormPage ) return false; @@ -1103,7 +1103,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent { Reference< XInterface > xNormalizedObject( _rxObject, UNO_QUERY ); - FmFormObj* pFormObject = NULL; + FmFormObj* pFormObject = nullptr; SdrObjListIter aPageIter( *pFormPage ); while ( aPageIter.IsMore() ) { @@ -1116,7 +1116,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent if ( xCurrentNormalized.get() == xNormalizedObject.get() ) break; - pFormObject = NULL; + pFormObject = nullptr; } if ( !pFormObject ) @@ -1240,7 +1240,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent { if ( xNewBindable.is() ) xNewBindable->setValueBinding( xOldBindable->getValueBinding() ); - xOldBindable->setValueBinding( NULL ); + xOldBindable->setValueBinding( nullptr ); } catch(const Exception&) { @@ -1258,7 +1258,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent { if ( xNewSink.is() ) xNewSink->setListEntrySource( xOldSink->getListEntrySource() ); - xOldSink->setListEntrySource( NULL ); + xOldSink->setListEntrySource( nullptr ); } catch(const Exception&) { @@ -1269,7 +1269,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent // create an undo action FmFormModel* pModel = m_pShell->GetFormModel(); - DBG_ASSERT(pModel != NULL, "FmXFormShell::executeControlConversionSlot: my shell has no model !"); + DBG_ASSERT(pModel != nullptr, "FmXFormShell::executeControlConversionSlot: my shell has no model !"); if (pModel && pModel->IsUndoEnabled() ) { pModel->AddUndo(new FmUndoModelReplaceAction(*pModel, pFormObject, xOldModel)); @@ -1398,9 +1398,9 @@ void FmXFormShell::LoopGrids(LoopGridsSync nSync, LoopGridsFlags nFlags) Reference< XControlContainer > FmXFormShell::getControlContainerForView() { if ( impl_checkDisposed() ) - return NULL; + return nullptr; - SdrPageView* pPageView = NULL; + SdrPageView* pPageView = nullptr; if ( m_pShell && m_pShell->GetFormView() ) pPageView = m_pShell->GetFormView()->GetSdrPageView(); @@ -1715,18 +1715,18 @@ void FmXFormShell::CloseExternalFormViewer() if (!xCommLink.is()) return; - xExternalViewFrame->setComponent(NULL,NULL); + xExternalViewFrame->setComponent(nullptr,nullptr); ::comphelper::disposeComponent(xExternalViewFrame); - m_xExternalViewController = NULL; - m_xExtViewTriggerController = NULL; - m_xExternalDisplayedForm = NULL; + m_xExternalViewController = nullptr; + m_xExtViewTriggerController = nullptr; + m_xExternalDisplayedForm = nullptr; } Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet>& _xForm) const { if ( impl_checkDisposed() ) - return NULL; + return nullptr; Reference< runtime::XFormController> xExternalCtrlr(m_xExternalViewController, UNO_QUERY); if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel())) @@ -1741,7 +1741,7 @@ Reference< XResultSet> FmXFormShell::getInternalForm(const Reference< XResultSet Reference< XForm> FmXFormShell::getInternalForm(const Reference< XForm>& _xForm) const { if ( impl_checkDisposed() ) - return NULL; + return nullptr; Reference< runtime::XFormController > xExternalCtrlr(m_xExternalViewController, UNO_QUERY); if (xExternalCtrlr.is() && (_xForm == xExternalCtrlr->getModel())) @@ -1918,12 +1918,12 @@ void FmXFormShell::setActiveController( const Reference< runtime::XFormControlle if ( m_xActiveController.is() ) m_xActiveForm = getInternalForm( Reference< XForm >( m_xActiveController->getModel(), UNO_QUERY ) ); else - m_xActiveForm = NULL; + m_xActiveForm = nullptr; startListening(); // activate all dispatchers belonging to form of the new navigation controller - xNavigationForm = NULL; + xNavigationForm = nullptr; if (m_xNavigationController.is()) xNavigationForm.set(m_xNavigationController->getModel(), UNO_QUERY); @@ -2053,7 +2053,7 @@ void FmXFormShell::forgetCurrentForm() return; // reset ... - impl_updateCurrentForm( NULL ); + impl_updateCurrentForm( nullptr ); // ... and try finding a new current form // #i88186# / 2008-04-12 / frank.schoenheit@sun.com @@ -2131,7 +2131,7 @@ void FmXFormShell::startListening() break; default: - m_xNavigationController = NULL; + m_xNavigationController = nullptr; m_bDatabaseBar = false; } @@ -2154,7 +2154,7 @@ void FmXFormShell::startListening() m_eNavigate = NavigationBarMode_NONE; m_bDatabaseBar = false; - m_xNavigationController = NULL; + m_xNavigationController = nullptr; } @@ -2177,7 +2177,7 @@ void FmXFormShell::stopListening() m_bDatabaseBar = false; m_eNavigate = NavigationBarMode_NONE; - m_xNavigationController = NULL; + m_xNavigationController = nullptr; } @@ -2488,7 +2488,7 @@ IMPL_LINK_TYPED(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscCon if (rfmscContextInfo.arrFields.empty()) { rfmscContextInfo.arrFields.clear(); - rfmscContextInfo.xCursor = NULL; + rfmscContextInfo.xCursor = nullptr; rfmscContextInfo.strUsedFields.clear(); return 0L; } @@ -2841,7 +2841,7 @@ void FmXFormShell::SetDesignMode(bool bDesign) Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlModel >& i_rxModel, const FmFormObj& i_rKnownFormObj ) { if ( impl_checkDisposed() ) - return NULL; + return nullptr; Reference< XControl > xControl; try @@ -2867,7 +2867,7 @@ Reference< XControl> FmXFormShell::impl_getControl( const Reference< XControlMod const vcl::Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerControl->getPeer() ); ENSURE_OR_THROW( pContainerWindow, "unexpected control container implementation" ); - const SdrView* pSdrView = m_pShell ? m_pShell->GetFormView() : NULL; + const SdrView* pSdrView = m_pShell ? m_pShell->GetFormView() : nullptr; ENSURE_OR_THROW( pSdrView, "no current view" ); xControl.set( i_rKnownFormObj.GetUnoControl( *pSdrView, *pContainerWindow ), UNO_QUERY_THROW ); @@ -3200,7 +3200,7 @@ void FmXFormShell::CreateExternalView() if ( m_xExternalViewController == getActiveController() ) { Reference< runtime::XFormController > xAsFormController( m_xExternalViewController, UNO_QUERY ); - ControllerFeatures aHelper( xAsFormController, NULL ); + ControllerFeatures aHelper( xAsFormController, nullptr ); (void)aHelper->commitCurrentControl(); } @@ -3617,7 +3617,7 @@ IMPL_LINK_NOARG_TYPED( FmXFormShell, OnFirstTimeActivation, void*, void ) if ( impl_checkDisposed() ) return; - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; SfxObjectShell* pDocument = m_pShell->GetObjectShell(); if ( pDocument && !pDocument->HasName() ) @@ -3696,7 +3696,7 @@ void FmXFormShell::impl_defaultCurrentForm_nothrow() return; FmFormView* pFormView = m_pShell->GetFormView(); - FmFormPage* pPage = pFormView ? pFormView->GetCurPage() : NULL; + FmFormPage* pPage = pFormView ? pFormView->GetCurPage() : nullptr; if ( !pPage ) return; @@ -4026,7 +4026,7 @@ SFX_IMPL_MENU_CONTROL(ControlConversionMenuController, SfxBoolItem); ControlConversionMenuController::ControlConversionMenuController( sal_uInt16 _nId, Menu& _rMenu, SfxBindings& _rBindings ) :SfxMenuControl( _nId, _rBindings ) ,m_pMainMenu( &_rMenu ) - ,m_pConversionMenu( NULL ) + ,m_pConversionMenu( nullptr ) { if ( _nId == SID_FM_CHANGECONTROLTYPE ) { @@ -4045,7 +4045,7 @@ ControlConversionMenuController::ControlConversionMenuController( sal_uInt16 _nI ControlConversionMenuController::~ControlConversionMenuController() { - m_pMainMenu->SetPopupMenu(SID_FM_CHANGECONTROLTYPE, NULL); + m_pMainMenu->SetPopupMenu(SID_FM_CHANGECONTROLTYPE, nullptr); delete m_pConversionMenu; } diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx index ca58fe62c2fa..bf563e705ea9 100644 --- a/svx/source/form/fmsrccfg.cxx +++ b/svx/source/form/fmsrccfg.cxx @@ -87,7 +87,7 @@ namespace svxform { "text", 0 }, { "null", 1 }, { "non-null", 2 }, - { NULL, -1 } + { nullptr, -1 } }; return s_aSearchForTypeMap; } @@ -100,7 +100,7 @@ namespace svxform { "beginning-of-field", MATCHING_BEGINNING }, { "end-of-field", MATCHING_END }, { "complete-field", MATCHING_WHOLETEXT }, - { NULL, -1 } + { nullptr, -1 } }; return s_aSearchPositionMap; } diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index d96ef9390d7a..ac5f78dbd59f 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -97,7 +97,7 @@ FmRecordCountListener::FmRecordCountListener(const Reference< css::sdbc::XResult if (::comphelper::getBOOL(m_xListening->getPropertyValue(FM_PROP_ROWCOUNTFINAL))) { - m_xListening = NULL; + m_xListening = nullptr; // there's nothing to do as the record count is already known return; } @@ -128,7 +128,7 @@ void FmRecordCountListener::DisConnect() { if(m_xListening.is()) m_xListening->removePropertyChangeListener(FM_PROP_ROWCOUNT, static_cast<css::beans::XPropertyChangeListener*>(this)); - m_xListening = NULL; + m_xListening = nullptr; } @@ -364,7 +364,7 @@ OUString FmSearchEngine::FormatField(sal_Int32 nWhich) if (m_bUsingTextComponents) { DBG_ASSERT((sal_uInt32)nWhich < m_aControlTexts.size(), "FmSearchEngine::FormatField(sal_Int32) : invalid position !"); - DBG_ASSERT(m_aControlTexts[nWhich] != NULL, "FmSearchEngine::FormatField(sal_Int32) : invalid object in array !"); + DBG_ASSERT(m_aControlTexts[nWhich] != nullptr, "FmSearchEngine::FormatField(sal_Int32) : invalid object in array !"); DBG_ASSERT(m_aControlTexts[nWhich]->getControl().is(), "FmSearchEngine::FormatField : invalid control !"); if (m_nCurrentFieldIndex != -1) @@ -1170,7 +1170,7 @@ void FmSearchEngine::ImplStartNextSearch() else { SearchNextImpl(); - LINK(this, FmSearchEngine, OnSearchTerminated).Call(NULL); + LINK(this, FmSearchEngine, OnSearchTerminated).Call(nullptr); } } @@ -1232,7 +1232,7 @@ void FmSearchEngine::StartOverSpecial(bool _bSearchForNull) void FmSearchEngine::InvalidatePreviousLoc() { - m_aPreviousLocBookmark.setValue(0,cppu::UnoType<void>::get()); + m_aPreviousLocBookmark.setValue(nullptr,cppu::UnoType<void>::get()); m_iterPreviousLocField = m_arrUsedFields.end(); } diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 280d0ac3ba83..89a608b80a82 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -419,7 +419,7 @@ namespace svx SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool(); const SfxSlot* pSlot = rSlotPool.GetSlot( _nSlotId ); - const sal_Char* pAsciiUnoName = NULL; + const sal_Char* pAsciiUnoName = nullptr; if ( pSlot ) { pAsciiUnoName = pSlot->GetUnoName(); @@ -486,7 +486,7 @@ namespace svx static vcl::Window* lcl_getWindow( const Reference< XControl >& _rxControl ) { - vcl::Window* pWindow = NULL; + vcl::Window* pWindow = nullptr; try { Reference< XWindowPeer > xControlPeer; @@ -1223,7 +1223,7 @@ namespace svx // if we found a rich text control, we need context menu support if ( m_bActiveControlIsRichText ) { - DBG_ASSERT( NULL == m_aContextMenuObserver.get(), "FmTextControlShell::controlActivated: already have an observer!" ); + DBG_ASSERT( nullptr == m_aContextMenuObserver.get(), "FmTextControlShell::controlActivated: already have an observer!" ); m_aContextMenuObserver = MouseListenerAdapter( new FmMouseListenerAdapter( _rxControl, this ) ); } @@ -1256,7 +1256,7 @@ namespace svx // #i51621# / 2005-08-19 / frank.schoenheit@sun.com // bool bHaveAnyServeableSlots = m_xActiveTextComponent.is() || !m_aControlFeatures.empty(); // LEM: not calling m_aControlActivatonHandler causes fdo#63695, so disable this hack for now. - m_aControlActivationHandler.Call( NULL ); + m_aControlActivationHandler.Call( nullptr ); m_bNeedClipboardInvalidation = true; } @@ -1310,7 +1310,7 @@ namespace svx Reference< XDispatch > xDispatcher = _rxProvider->queryDispatch( aFeatureURL, OUString(), 0xFF ); if ( xDispatcher.is() ) return new FmTextControlFeature( xDispatcher, aFeatureURL, _nSlot, this ); - return NULL; + return nullptr; } diff --git a/svx/source/form/fmtools.cxx b/svx/source/form/fmtools.cxx index 233cc82eeba0..8db5d5346f65 100644 --- a/svx/source/form/fmtools.cxx +++ b/svx/source/form/fmtools.cxx @@ -251,9 +251,9 @@ void CursorWrapper::ImplConstruct(const Reference< css::sdbc::XResultSet>& _rxCu if ( !m_xMoveOperations.is() || !m_xBookmarkOperations.is() || !m_xColumnsSupplier.is() || !m_xPropertyAccess.is() ) { // all or nothing !! - m_xMoveOperations = NULL; - m_xBookmarkOperations = NULL; - m_xColumnsSupplier = NULL; + m_xMoveOperations = nullptr; + m_xBookmarkOperations = nullptr; + m_xColumnsSupplier = nullptr; } else m_xGeneric = m_xMoveOperations.get(); @@ -267,9 +267,9 @@ const CursorWrapper& CursorWrapper::operator=(const Reference< css::sdbc::XRowSe m_xColumnsSupplier.set(_rxCursor, UNO_QUERY); if (!m_xMoveOperations.is() || !m_xBookmarkOperations.is() || !m_xColumnsSupplier.is()) { // all or nothing !! - m_xMoveOperations = NULL; - m_xBookmarkOperations = NULL; - m_xColumnsSupplier = NULL; + m_xMoveOperations = nullptr; + m_xBookmarkOperations = nullptr; + m_xColumnsSupplier = nullptr; } return *this; } @@ -277,7 +277,7 @@ const CursorWrapper& CursorWrapper::operator=(const Reference< css::sdbc::XRowSe FmXDisposeListener::~FmXDisposeListener() { - setAdapter(NULL); + setAdapter(nullptr); } @@ -287,7 +287,7 @@ void FmXDisposeListener::setAdapter(FmXDisposeMultiplexer* pAdapter) { ::osl::MutexGuard aGuard(m_rMutex); m_pAdapter->release(); - m_pAdapter = NULL; + m_pAdapter = nullptr; } if (pAdapter) @@ -325,10 +325,10 @@ void FmXDisposeMultiplexer::disposing(const css::lang::EventObject& _Source) thr if (m_pListener) { m_pListener->disposing(_Source, m_nId); - m_pListener->setAdapter(NULL); - m_pListener = NULL; + m_pListener->setAdapter(nullptr); + m_pListener = nullptr; } - m_xObject = NULL; + m_xObject = nullptr; } @@ -339,10 +339,10 @@ void FmXDisposeMultiplexer::dispose() Reference< css::lang::XEventListener> xPreventDelete(this); m_xObject->removeEventListener(this); - m_xObject = NULL; + m_xObject = nullptr; - m_pListener->setAdapter(NULL); - m_pListener = NULL; + m_pListener->setAdapter(nullptr); + m_pListener = nullptr; } } diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx index b4bc5688af17..0be8b170021d 100644 --- a/svx/source/form/fmundo.cxx +++ b/svx/source/form/fmundo.cxx @@ -170,7 +170,7 @@ OUString static_STR_UNDO_PROPERTY; FmXUndoEnvironment::FmXUndoEnvironment(FmFormModel& _rModel) :rModel( _rModel ) - ,m_pPropertySetCache( NULL ) + ,m_pPropertySetCache( nullptr ) ,m_pScriptingEnv( ::svxform::createDefaultFormScriptingEnvironment( _rModel ) ) ,m_Locks( 0 ) ,bReadOnly( false ) @@ -315,7 +315,7 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) { case SFX_HINT_DYING: dispose(); - rModel.SetObjectShell( NULL ); + rModel.SetObjectShell( nullptr ); break; case SFX_HINT_MODECHANGED: ModeChanged(); @@ -1056,7 +1056,7 @@ FmUndoContainerAction::FmUndoContainerAction(FmFormModel& _rMod, m_aEvents = xManager->getScriptEvents(m_nIndex); } else - m_xElement = NULL; + m_xElement = nullptr; // we now own the element m_xOwnElement = m_xElement; @@ -1111,7 +1111,7 @@ void FmUndoContainerAction::implReInsert( ) xManager->registerScriptEvents( m_nIndex, m_aEvents ); // we don't own the object anymore - m_xOwnElement = NULL; + m_xOwnElement = nullptr; } } diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx index 0422871d55d1..788d7d62dbd5 100644 --- a/svx/source/form/fmview.cxx +++ b/svx/source/form/fmview.cxx @@ -92,7 +92,7 @@ FmFormView::FmFormView( FmFormModel* pModel, OutputDevice* pOut ) void FmFormView::Init() { - pFormShell = NULL; + pFormShell = nullptr; pImpl = new FmXFormView(this); pImpl->acquire(); @@ -122,7 +122,7 @@ void FmFormView::Init() SfxObjectShell* pObjShell = pFormModel->GetObjectShell(); if ( pObjShell && pObjShell->GetMedium() ) { - const SfxPoolItem *pItem=0; + const SfxPoolItem *pItem=nullptr; if ( pObjShell->GetMedium()->GetItemSet()->GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET ) { ::comphelper::NamedValueCollection aComponentData( static_cast<const SfxUnoAnyItem*>(pItem)->GetValue() ); @@ -139,18 +139,18 @@ void FmFormView::Init() FmFormView::~FmFormView() { if( pFormShell ) - pFormShell->SetView( NULL ); + pFormShell->SetView( nullptr ); pImpl->notifyViewDying(); pImpl->release(); - pImpl = NULL; + pImpl = nullptr; } FmFormPage* FmFormView::GetCurPage() { SdrPageView* pPageView = GetSdrPageView(); - FmFormPage* pCurPage = pPageView ? dynamic_cast<FmFormPage*>( pPageView->GetPage() ) : NULL; + FmFormPage* pCurPage = pPageView ? dynamic_cast<FmFormPage*>( pPageView->GetPage() ) : nullptr; return pCurPage; } @@ -164,11 +164,11 @@ void FmFormView::MarkListHasChanged() FmFormObj* pObj = getMarkedGrid(); if ( pImpl->m_pMarkedGrid && pImpl->m_pMarkedGrid != pObj ) { - pImpl->m_pMarkedGrid = NULL; + pImpl->m_pMarkedGrid = nullptr; if ( pImpl->m_xWindow.is() ) { pImpl->m_xWindow->removeFocusListener(pImpl); - pImpl->m_xWindow = NULL; + pImpl->m_xWindow = nullptr; } SetMoveOutside(false); //OLMRefreshAllIAOManagers(); @@ -194,7 +194,7 @@ namespace return pPageWindow; } } - return NULL; + return nullptr; } } @@ -422,7 +422,7 @@ SdrObject* FmFormView::CreateFieldControl(const OUString& rFieldDesc) const OUString sFieldName = rFieldDesc.getToken(3,sal_Unicode(11)); if (sFieldName.isEmpty() || sObjectName.isEmpty() || sDataSource.isEmpty()) - return NULL; + return nullptr; ODataAccessDescriptor aColumnDescriptor; aColumnDescriptor.setDataSource(sDataSource); @@ -558,7 +558,7 @@ bool FmFormView::MouseButtonDown( const MouseEvent& _rMEvt, vcl::Window* _pWin ) FmFormObj* FmFormView::getMarkedGrid() const { - FmFormObj* pFormObject = NULL; + FmFormObj* pFormObject = nullptr; const SdrMarkList& rMarkList = GetMarkedObjectList(); if ( 1 == rMarkList.GetMarkCount() ) { @@ -570,7 +570,7 @@ FmFormObj* FmFormView::getMarkedGrid() const { Reference< XServiceInfo > xServInfo( pFormObject->GetUnoControlModel(), UNO_QUERY ); if ( !xServInfo.is() || !xServInfo->supportsService( FM_SUN_COMPONENT_GRIDCONTROL ) ) - pFormObject = NULL; + pFormObject = nullptr; } } } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index 4d04ee005ade..a81b2044123c 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -183,7 +183,7 @@ FormViewPageWindowAdapter::FormViewPageWindowAdapter( const css::uno::Reference< { Reference< XForm > xForm( xForms->getByIndex(i), UNO_QUERY ); if ( xForm.is() ) - setController( xForm, NULL ); + setController( xForm, nullptr ); } } catch (const Exception&) @@ -400,13 +400,13 @@ void FormViewPageWindowAdapter::updateTabOrder( const Reference< XForm >& _rxFor FmXFormView::FmXFormView(FmFormView* _pView ) - :m_pMarkedGrid(NULL) + :m_pMarkedGrid(nullptr) ,m_pView(_pView) - ,m_nActivationEvent(0) - ,m_nErrorMessageEvent( 0 ) - ,m_nAutoFocusEvent( 0 ) - ,m_nControlWizardEvent( 0 ) - ,m_pWatchStoredList( NULL ) + ,m_nActivationEvent(nullptr) + ,m_nErrorMessageEvent( nullptr ) + ,m_nAutoFocusEvent( nullptr ) + ,m_nControlWizardEvent( nullptr ) + ,m_pWatchStoredList( nullptr ) ,m_bFirstActivation( true ) ,m_isTabOrderUpdateSuspended( false ) { @@ -418,25 +418,25 @@ void FmXFormView::cancelEvents() if ( m_nActivationEvent ) { Application::RemoveUserEvent( m_nActivationEvent ); - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; } if ( m_nErrorMessageEvent ) { Application::RemoveUserEvent( m_nErrorMessageEvent ); - m_nErrorMessageEvent = 0; + m_nErrorMessageEvent = nullptr; } if ( m_nAutoFocusEvent ) { Application::RemoveUserEvent( m_nAutoFocusEvent ); - m_nAutoFocusEvent = 0; + m_nAutoFocusEvent = nullptr; } if ( m_nControlWizardEvent ) { Application::RemoveUserEvent( m_nControlWizardEvent ); - m_nControlWizardEvent = 0; + m_nControlWizardEvent = nullptr; } } @@ -444,7 +444,7 @@ void FmXFormView::cancelEvents() void FmXFormView::notifyViewDying( ) { DBG_ASSERT( m_pView, "FmXFormView::notifyViewDying: my view already died!" ); - m_pView = NULL; + m_pView = nullptr; cancelEvents(); } @@ -466,7 +466,7 @@ FmXFormView::~FmXFormView() cancelEvents(); delete m_pWatchStoredList; - m_pWatchStoredList = NULL; + m_pWatchStoredList = nullptr; } // EventListener @@ -543,7 +543,7 @@ PFormViewPageWindowAdapter FmXFormView::findWindow( const Reference< XControlCon if ( _rxCC == (*i)->getControlContainer() ) return *i; } - return NULL; + return nullptr; } @@ -598,7 +598,7 @@ void FmXFormView::removeWindow( const Reference< XControlContainer >& _rxCC ) void FmXFormView::displayAsyncErrorMessage( const SQLErrorEvent& _rEvent ) { - DBG_ASSERT( 0 == m_nErrorMessageEvent, "FmXFormView::displayAsyncErrorMessage: not too fast, please!" ); + DBG_ASSERT( nullptr == m_nErrorMessageEvent, "FmXFormView::displayAsyncErrorMessage: not too fast, please!" ); // This should not happen - usually, the PostUserEvent is faster than any possible user // interaction which could trigger a new error. If it happens, we need a queue for the events. m_aAsyncError = _rEvent; @@ -608,7 +608,7 @@ void FmXFormView::displayAsyncErrorMessage( const SQLErrorEvent& _rEvent ) IMPL_LINK_NOARG_TYPED(FmXFormView, OnDelayedErrorMessage, void*, void) { - m_nErrorMessageEvent = 0; + m_nErrorMessageEvent = nullptr; displayException( m_aAsyncError ); } @@ -716,7 +716,7 @@ namespace IMPL_LINK_NOARG_TYPED(FmXFormView, OnActivate, void*, void) { - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; if ( !m_pView ) { @@ -735,7 +735,7 @@ IMPL_LINK_NOARG_TYPED(FmXFormView, OnActivate, void*, void) find_active_databaseform fad(pShImpl->getActiveController()); vcl::Window* pWindow = const_cast<vcl::Window*>(static_cast<const vcl::Window*>(m_pView->GetActualOutDev())); - PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0]; + PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0]; for ( PageWindowAdapterList::const_iterator i = m_aPageWindowAdapters.begin(); i != m_aPageWindowAdapters.end(); ++i @@ -782,12 +782,12 @@ void FmXFormView::Activate(bool bSync) if (m_nActivationEvent) { Application::RemoveUserEvent(m_nActivationEvent); - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; } if (bSync) { - LINK(this,FmXFormView,OnActivate).Call(NULL); + LINK(this,FmXFormView,OnActivate).Call(nullptr); } else m_nActivationEvent = Application::PostUserEvent(LINK(this,FmXFormView,OnActivate)); @@ -799,18 +799,18 @@ void FmXFormView::Deactivate(bool bDeactivateController) if (m_nActivationEvent) { Application::RemoveUserEvent(m_nActivationEvent); - m_nActivationEvent = 0; + m_nActivationEvent = nullptr; } - FmXFormShell* pShImpl = m_pView->GetFormShell() ? m_pView->GetFormShell()->GetImpl() : NULL; + FmXFormShell* pShImpl = m_pView->GetFormShell() ? m_pView->GetFormShell()->GetImpl() : nullptr; if (pShImpl && bDeactivateController) - pShImpl->setActiveController( NULL ); + pShImpl->setActiveController( nullptr ); } FmFormShell* FmXFormView::GetFormShell() const { - return m_pView ? m_pView->GetFormShell() : NULL; + return m_pView ? m_pView->GetFormShell() : nullptr; } void FmXFormView::AutoFocus( bool _bSync ) @@ -819,7 +819,7 @@ void FmXFormView::AutoFocus( bool _bSync ) Application::RemoveUserEvent(m_nAutoFocusEvent); if ( _bSync ) - OnAutoFocus( NULL ); + OnAutoFocus( nullptr ); else m_nAutoFocusEvent = Application::PostUserEvent(LINK(this, FmXFormView, OnAutoFocus)); } @@ -955,19 +955,19 @@ Reference< XFormController > FmXFormView::getFormController( const Reference< XF IMPL_LINK_NOARG_TYPED(FmXFormView, OnAutoFocus, void*, void) { - m_nAutoFocusEvent = 0; + m_nAutoFocusEvent = nullptr; // go to the first form of our page, examine it's TabController, go to it's first (in terms of the tab order) // control, give it the focus - SdrPageView *pPageView = m_pView ? m_pView->GetSdrPageView() : NULL; - SdrPage *pSdrPage = pPageView ? pPageView->GetPage() : NULL; + SdrPageView *pPageView = m_pView ? m_pView->GetSdrPageView() : nullptr; + SdrPage *pSdrPage = pPageView ? pPageView->GetPage() : nullptr; // get the forms collection of the page we belong to FmFormPage* pPage = dynamic_cast<FmFormPage*>( pSdrPage ); Reference< XIndexAccess > xForms( pPage ? Reference< XIndexAccess >( pPage->GetForms(), UNO_QUERY ) : Reference< XIndexAccess >() ); - const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? NULL : m_aPageWindowAdapters[0]; - const vcl::Window* pWindow = pAdapter.get() ? pAdapter->getWindow() : NULL; + const PFormViewPageWindowAdapter pAdapter = m_aPageWindowAdapters.empty() ? nullptr : m_aPageWindowAdapters[0]; + const vcl::Window* pWindow = pAdapter.get() ? pAdapter->getWindow() : nullptr; ENSURE_OR_RETURN_VOID( xForms.is() && pWindow, "FmXFormView::OnAutoFocus: could not collect all essentials!" ); @@ -1006,7 +1006,7 @@ IMPL_LINK_NOARG_TYPED(FmXFormView, OnAutoFocus, void*, void) // ensure that the control is visible // 80210 - 12/07/00 - FS - const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast<const vcl::Window*>(m_pView->GetActualOutDev()) : NULL; + const vcl::Window* pCurrentWindow = m_pView ? dynamic_cast<const vcl::Window*>(m_pView->GetActualOutDev()) : nullptr; if ( pCurrentWindow ) { awt::Rectangle aRect = xControlWindow->getPosSize(); @@ -1023,8 +1023,8 @@ IMPL_LINK_NOARG_TYPED(FmXFormView, OnAutoFocus, void*, void) void FmXFormView::onCreatedFormObject( FmFormObj& _rFormObject ) { - FmFormShell* pShell = m_pView ? m_pView->GetFormShell() : NULL; - FmXFormShell* pShellImpl = pShell ? pShell->GetImpl() : NULL; + FmFormShell* pShell = m_pView ? m_pView->GetFormShell() : nullptr; + FmXFormShell* pShellImpl = pShell ? pShell->GetImpl() : nullptr; OSL_ENSURE( pShellImpl, "FmXFormView::onCreatedFormObject: no form shell!" ); if ( !pShellImpl ) return; @@ -1059,17 +1059,17 @@ void FmXFormView::onCreatedFormObject( FmFormObj& _rFormObject ) void FmXFormView::breakCreateFormObject() { - if (m_nControlWizardEvent != 0) + if (m_nControlWizardEvent != nullptr) { Application::RemoveUserEvent(m_nControlWizardEvent); - m_nControlWizardEvent = 0; + m_nControlWizardEvent = nullptr; } m_xLastCreatedControlModel.clear(); } IMPL_LINK_NOARG_TYPED( FmXFormView, OnStartControlWizard, void*, void ) { - m_nControlWizardEvent = 0; + m_nControlWizardEvent = nullptr; OSL_PRECOND( m_xLastCreatedControlModel.is(), "FmXFormView::OnStartControlWizard: illegal call!" ); if ( !m_xLastCreatedControlModel.is() ) return; @@ -1084,7 +1084,7 @@ IMPL_LINK_NOARG_TYPED( FmXFormView, OnStartControlWizard, void*, void ) DBG_UNHANDLED_EXCEPTION(); } - const sal_Char* pWizardAsciiName = NULL; + const sal_Char* pWizardAsciiName = nullptr; switch ( nClassId ) { case FormComponentType::GRIDCONTROL: @@ -1119,7 +1119,7 @@ IMPL_LINK_NOARG_TYPED( FmXFormView, OnStartControlWizard, void*, void ) if ( !xWizard.is() ) { - ShowServiceNotAvailableError( NULL, OUString::createFromAscii(pWizardAsciiName), true ); + ShowServiceNotAvailableError( nullptr, OUString::createFromAscii(pWizardAsciiName), true ); } else { @@ -1142,7 +1142,7 @@ IMPL_LINK_NOARG_TYPED( FmXFormView, OnStartControlWizard, void*, void ) namespace { void lcl_insertIntoFormComponentHierarchy_throw( const FmFormView& _rView, const SdrUnoObj& _rSdrObj, - const Reference< XDataSource >& _rxDataSource = NULL, const OUString& _rDataSourceName = OUString(), + const Reference< XDataSource >& _rxDataSource = nullptr, const OUString& _rDataSourceName = OUString(), const OUString& _rCommand = OUString(), const sal_Int32 _nCommandType = -1 ) { FmFormPage& rPage = static_cast< FmFormPage& >( *_rView.GetSdrPageView()->GetPage() ); @@ -1164,7 +1164,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor { // not if we're in design mode if ( !m_pView->IsDesignMode() ) - return NULL; + return nullptr; OUString sCommand, sFieldName; sal_Int32 nCommandType = CommandType::COMMAND; @@ -1225,14 +1225,14 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor if (aError.Reason.hasValue()) { displayAsyncErrorMessage( aError ); - return NULL; + return nullptr; } // need a data source and a connection here if (!xDataSource.is() || !xConnection.is()) { OSL_FAIL("FmXFormView::implCreateFieldControl : could not retrieve the data source or the connection!"); - return NULL; + return nullptr; } Reference< XComponent > xKeepFieldsAlive; @@ -1248,7 +1248,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor if (xFields.is() && xFields->hasByName(sFieldName)) xFields->getByName(sFieldName) >>= xField; if ( !xField.is() ) - return NULL; + return nullptr; Reference< XNumberFormatsSupplier > xSupplier( getNumberFormats( xConnection ), UNO_SET_THROW ); Reference< XNumberFormats > xNumberFormats( xSupplier->getNumberFormats(), UNO_SET_THROW ); @@ -1257,7 +1257,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor // nur fuer Textgroesse - OutputDevice* pOutDev = NULL; + OutputDevice* pOutDev = nullptr; if (m_pView->GetActualOutDev() && m_pView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW) pOutDev = const_cast<OutputDevice*>(m_pView->GetActualOutDev()); else @@ -1282,11 +1282,11 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor } if ( !pOutDev ) - return NULL; + return nullptr; sal_Int32 nDataType = ::comphelper::getINT32(xField->getPropertyValue(FM_PROP_FIELDTYPE)); if ((DataType::BINARY == nDataType) || (DataType::VARBINARY == nDataType)) - return NULL; + return nullptr; // determine the control type by examining the data type of the bound column @@ -1312,7 +1312,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor break; case DataType::BINARY: case DataType::VARBINARY: - return NULL; + return nullptr; case DataType::BIT: case DataType::BOOLEAN: nOBJID = OBJ_FM_CHECKBOX; @@ -1345,15 +1345,15 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor break; } if (!nOBJID) - return NULL; + return nullptr; - SdrUnoObj* pLabel( NULL ); - SdrUnoObj* pControl( NULL ); + SdrUnoObj* pLabel( nullptr ); + SdrUnoObj* pControl( nullptr ); if ( !createControlLabelPair( *pOutDev, 0, 0, xField, xNumberFormats, nOBJID, sLabelPostfix, pLabel, pControl, xDataSource, sDataSource, sCommand, nCommandType ) ) { - return NULL; + return nullptr; } @@ -1370,7 +1370,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor if ( bDateNTimeField ) { // so far we created a date field only, but we also need a time field - pLabel = pControl = NULL; + pLabel = pControl = nullptr; if ( createControlLabelPair( *pOutDev, 0, 1000, xField, xNumberFormats, OBJ_FM_TIMEFIELD, SVX_RESSTR(RID_STR_POSTFIX_TIME), pLabel, pControl, xDataSource, sDataSource, sCommand, nCommandType ) @@ -1389,7 +1389,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor } - return NULL; + return nullptr; } @@ -1397,7 +1397,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ { // not if we're in design mode if ( !m_pView->IsDesignMode() ) - return NULL; + return nullptr; Reference< XComponent > xKeepFieldsAlive; @@ -1410,7 +1410,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ // nur fuer Textgroesse - OutputDevice* pOutDev = NULL; + OutputDevice* pOutDev = nullptr; if (m_pView->GetActualOutDev() && m_pView->GetActualOutDev()->GetOutDevType() == OUTDEV_WINDOW) pOutDev = const_cast<OutputDevice*>(m_pView->GetActualOutDev()); else @@ -1435,7 +1435,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ } if ( !pOutDev ) - return NULL; + return nullptr; // The service name decides which control should be created @@ -1452,13 +1452,13 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ // xform control or submission button? if ( !xSubmission.is() ) { - SdrUnoObj* pLabel( NULL ); - SdrUnoObj* pControl( NULL ); - if ( !createControlLabelPair( *pOutDev, 0, 0, NULL, xNumberFormats, nOBJID, sLabelPostfix, + SdrUnoObj* pLabel( nullptr ); + SdrUnoObj* pControl( nullptr ); + if ( !createControlLabelPair( *pOutDev, 0, 0, nullptr, xNumberFormats, nOBJID, sLabelPostfix, pLabel, pControl ) ) { - return NULL; + return nullptr; } @@ -1491,7 +1491,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ const MapMode eSourceMode(MAP_100TH_MM); const sal_uInt16 nObjID = OBJ_FM_BUTTON; ::Size controlSize(4000, 500); - FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( FmFormInventor, nObjID, NULL )); + FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( FmFormInventor, nObjID, nullptr )); controlSize.Width() = Fraction(controlSize.Width(), 1) * eTargetMode.GetScaleX(); controlSize.Height() = Fraction(controlSize.Height(), 1) * eTargetMode.GetScaleY(); ::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) ); @@ -1517,7 +1517,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ } - return NULL; + return nullptr; } @@ -1530,7 +1530,7 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO { if ( !createControlLabelPair( _rOutDev, _nXOffsetMM, _nYOffsetMM, _rxField, _rxNumberFormats, _nControlObjectID, _rFieldPostfix, FmFormInventor, OBJ_FM_FIXEDTEXT, - NULL, NULL, NULL, _rpLabel, _rpControl ) + nullptr, nullptr, nullptr, _rpLabel, _rpControl ) ) return false; @@ -1745,7 +1745,7 @@ void FmXFormView::stopMarkListWatching() { m_pWatchStoredList->EndListeningAll(); delete m_pWatchStoredList; - m_pWatchStoredList = NULL; + m_pWatchStoredList = nullptr; } } @@ -1754,8 +1754,8 @@ void FmXFormView::startMarkListWatching() { if ( !m_pWatchStoredList ) { - FmFormModel* pModel = GetFormShell() ? GetFormShell()->GetFormModel() : NULL; - DBG_ASSERT( pModel != NULL, "FmXFormView::startMarkListWatching: shell has no model!" ); + FmFormModel* pModel = GetFormShell() ? GetFormShell()->GetFormModel() : nullptr; + DBG_ASSERT( pModel != nullptr, "FmXFormView::startMarkListWatching: shell has no model!" ); if (pModel) { m_pWatchStoredList = new ObjectRemoveListener( this ); @@ -1835,7 +1835,7 @@ void FmXFormView::restoreMarkList( SdrMarkList& _rRestoredMarkList ) _rRestoredMarkList.Clear(); const SdrMarkList& rCurrentList = m_pView->GetMarkedObjectList(); - FmFormPage* pPage = GetFormShell() ? GetFormShell()->GetCurPage() : NULL; + FmFormPage* pPage = GetFormShell() ? GetFormShell()->GetCurPage() : nullptr; if (pPage) { if (rCurrentList.GetMarkCount()) @@ -1941,7 +1941,7 @@ void FmXFormView::removeGridWindowListening() { m_pView->SetMoveOutside( false, FmFormView::ImplAccess() ); } - m_xWindow = NULL; + m_xWindow = nullptr; } } diff --git a/svx/source/form/formcontrolfactory.cxx b/svx/source/form/formcontrolfactory.cxx index 671697fe7cc9..853aed3cd538 100644 --- a/svx/source/form/formcontrolfactory.cxx +++ b/svx/source/form/formcontrolfactory.cxx @@ -352,7 +352,7 @@ namespace svxform "ParaUserDefinedAttributes", "NumberingIsNumber", "ParaIsConnectBorder", - NULL + nullptr }; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 925da1d21627..e905f757bf57 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -609,7 +609,7 @@ FormController::~FormController() // Freigeben der Aggregation if ( m_xAggregate.is() ) { - m_xAggregate->setDelegator( NULL ); + m_xAggregate->setDelegator( nullptr ); m_xAggregate.clear(); } @@ -1173,8 +1173,8 @@ void FormController::disposing() m_aFilterRows.clear(); ::osl::MutexGuard aGuard( m_aMutex ); - m_xActiveControl = NULL; - implSetCurrentControl( NULL ); + m_xActiveControl = nullptr; + implSetCurrentControl( nullptr ); // clean up our children for (FmFormControllers::const_iterator i = m_aChildren.begin(); @@ -1209,9 +1209,9 @@ void FormController::disposing() if (m_bDBConnection) unload(); - setContainer( NULL ); - setModel( NULL ); - setParent( NULL ); + setContainer( nullptr ); + setModel( nullptr ); + setParent( nullptr ); ::comphelper::disposeComponent( m_xComposer ); @@ -1328,8 +1328,8 @@ bool FormController::replaceControl( const Reference< XControl >& _rxExistentCon if ( bReplacedWasActive ) { - m_xActiveControl = NULL; - implSetCurrentControl( NULL ); + m_xActiveControl = nullptr; + implSetCurrentControl( nullptr ); } else if ( bReplacedWasCurrent ) { @@ -1783,7 +1783,7 @@ void FormController::focusLost(const FocusEvent& e) throw( RuntimeException, std Reference< XControl > xNextControl = isInList(xNext); if (!xNextControl.is()) { - m_xActiveControl = NULL; + m_xActiveControl = nullptr; m_aDeactivationEvent.Call(); } } @@ -1873,8 +1873,8 @@ void FormController::setModel(const Reference< XTabControllerModel > & Model) th // only if both ifaces exit, the controller will work successful if (!m_xModelAsIndex.is() || !m_xModelAsManager.is()) { - m_xModelAsManager = NULL; - m_xModelAsIndex = NULL; + m_xModelAsManager = nullptr; + m_xModelAsIndex = nullptr; } if (m_xModelAsIndex.is()) @@ -2311,7 +2311,7 @@ void FormController::stopControlModifyListening(const Reference< XControl > & xC { OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); - bool bModifyListening = lcl_shouldListenForModifications( xControl, NULL ); + bool bModifyListening = lcl_shouldListenForModifications( xControl, nullptr ); // kuenstliches while while (bModifyListening) @@ -2591,7 +2591,7 @@ void FormController::loaded(const EventObject& rEvent) throw( RuntimeException, } Reference< XColumnsSupplier > xFormColumns( xForm, UNO_QUERY ); - m_pColumnInfoCache.reset( xFormColumns.is() ? new ColumnInfoCache( xFormColumns ) : NULL ); + m_pColumnInfoCache.reset( xFormColumns.is() ? new ColumnInfoCache( xFormColumns ) : nullptr ); updateAllDispatchers(); } @@ -3511,7 +3511,7 @@ sal_Bool SAL_CALL FormController::supportsMode(const OUString& Mode) throw( Runt vcl::Window* FormController::getDialogParentWindow() { OSL_ENSURE( !impl_isDisposed_nofail(), "FormController: already disposed!" ); - vcl::Window* pParentWindow = NULL; + vcl::Window* pParentWindow = nullptr; try { Reference< XControl > xContainerControl( getContainer(), UNO_QUERY_THROW ); @@ -3590,7 +3590,7 @@ Reference< XControl > FormController::locateControl( const Reference< XControlMo { DBG_UNHANDLED_EXCEPTION(); } - return NULL; + return nullptr; } @@ -4200,7 +4200,7 @@ bool FormController::ensureInteractionHandler() return false; m_bAttemptedHandlerCreation = true; - m_xInteractionHandler = InteractionHandler::createWithParent(m_xComponentContext, 0); + m_xInteractionHandler = InteractionHandler::createWithParent(m_xComponentContext, nullptr); return m_xInteractionHandler.is(); } diff --git a/svx/source/form/formcontrolling.cxx b/svx/source/form/formcontrolling.cxx index d04b2c5a0840..0baab098e9ad 100644 --- a/svx/source/form/formcontrolling.cxx +++ b/svx/source/form/formcontrolling.cxx @@ -194,14 +194,14 @@ namespace svx ControllerFeatures::ControllerFeatures( IControllerFeatureInvalidation* _pInvalidationCallback ) :m_pInvalidationCallback( _pInvalidationCallback ) - ,m_pImpl( NULL ) + ,m_pImpl( nullptr ) { } ControllerFeatures::ControllerFeatures( const Reference< XFormController >& _rxController, IControllerFeatureInvalidation* _pInvalidationCallback ) :m_pInvalidationCallback( _pInvalidationCallback ) - ,m_pImpl( NULL ) + ,m_pImpl( nullptr ) { assign( _rxController ); } @@ -227,7 +227,7 @@ namespace svx { m_pImpl->dispose(); m_pImpl->release(); - m_pImpl = NULL; + m_pImpl = nullptr; } } diff --git a/svx/source/form/formdispatchinterceptor.cxx b/svx/source/form/formdispatchinterceptor.cxx index e2abd5ba493d..49afca456ad4 100644 --- a/svx/source/form/formdispatchinterceptor.cxx +++ b/svx/source/form/formdispatchinterceptor.cxx @@ -161,7 +161,7 @@ namespace svxform // Don't reset m_xIntercepted: It may be needed by our owner to check for which object we were // responsible. As we hold the object with a weak reference only, this should be no problem. // 88936 - 23.07.2001 - frank.schoenheit@sun.com - m_pMaster = NULL; + m_pMaster = nullptr; m_pMutex = &m_aFallback; m_bListening = false; } diff --git a/svx/source/form/formfeaturedispatcher.cxx b/svx/source/form/formfeaturedispatcher.cxx index 664f6a1239ad..3f213db05755 100644 --- a/svx/source/form/formfeaturedispatcher.cxx +++ b/svx/source/form/formfeaturedispatcher.cxx @@ -74,7 +74,7 @@ namespace svx m_aLastKnownState = aUnoState.State; m_bLastKnownEnabled = aUnoState.IsEnabled; - notifyStatus( NULL, aGuard ); + notifyStatus( nullptr, aGuard ); } diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index b09288749a61..02a1f9cf70ad 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -113,10 +113,10 @@ namespace svxform NavigatorTree::NavigatorTree( vcl::Window* pParent ) :SvTreeListBox( pParent, WB_HASBUTTONS|WB_HASLINES|WB_BORDER|WB_HSCROLL ) // #100258# OJ WB_HSCROLL added ,m_aControlExchange(this) - ,m_pNavModel( NULL ) - ,m_pRootEntry(NULL) - ,m_pEditEntry(NULL) - ,nEditEvent(0) + ,m_pNavModel( nullptr ) + ,m_pRootEntry(nullptr) + ,m_pEditEntry(nullptr) + ,nEditEvent(nullptr) ,m_sdiState(SDI_DIRTY) ,m_aTimerTriggered(-1,-1) ,m_aDropActionType( DA_SCROLLUP ) @@ -171,7 +171,7 @@ namespace svxform if (m_aSynchronizeTimer.IsActive()) m_aSynchronizeTimer.Stop(); - DBG_ASSERT(GetNavModel() != NULL, "NavigatorTree::~NavigatorTree : unexpected : no ExplorerModel"); + DBG_ASSERT(GetNavModel() != nullptr, "NavigatorTree::~NavigatorTree : unexpected : no ExplorerModel"); EndListening( *m_pNavModel ); Clear(); delete m_pNavModel; @@ -195,7 +195,7 @@ namespace svxform FmFormShell* pOldShell = GetNavModel()->GetFormShell(); FmFormPage* pOldPage = GetNavModel()->GetFormPage(); - FmFormPage* pNewPage = pFormShell ? pFormShell->GetCurPage() : NULL; + FmFormPage* pNewPage = pFormShell ? pFormShell->GetCurPage() : nullptr; if ((pOldShell != pFormShell) || (pOldPage != pNewPage)) { @@ -318,7 +318,7 @@ namespace svxform { ptWhere = rEvt.GetMousePosPixel(); SvTreeListEntry* ptClickedOn = GetEntry(ptWhere); - if (ptClickedOn == NULL) + if (ptClickedOn == nullptr) break; if ( !IsSelected(ptClickedOn) ) { @@ -357,7 +357,7 @@ namespace svxform // create menu FmFormShell* pFormShell = GetNavModel()->GetFormShell(); - FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL; + FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : nullptr; if( pFormShell && pFormModel ) { PopupMenu aContextMenu(SVX_RES(RID_FMEXPLORER_POPUPMENU)); @@ -536,7 +536,7 @@ namespace svxform SvTreeListEntry* NavigatorTree::FindEntry( FmEntryData* pEntryData ) { - if( !pEntryData ) return NULL; + if( !pEntryData ) return nullptr; SvTreeListEntry* pCurEntry = First(); while( pCurEntry ) { @@ -547,7 +547,7 @@ namespace svxform pCurEntry = Next( pCurEntry ); } - return NULL; + return nullptr; } @@ -594,7 +594,7 @@ namespace svxform // default-entry "Forms" Image aRootImage( m_aNavigatorImages.GetImage( RID_SVXIMG_FORMS ) ); m_pRootEntry = InsertEntry( SVX_RESSTR(RID_STR_FORMS), aRootImage, aRootImage, - NULL, false, 0 ); + nullptr, false, 0 ); } else if (!m_bMarkingObjects && dynamic_cast<const FmNavRequestSelectHint*>(&rHint)) { // if m_bMarkingObjects is sal_True, I mark objects myself @@ -965,7 +965,7 @@ namespace svxform const Reference< XInterface >* pControls = aControls.getConstArray(); FmFormShell* pFormShell = GetNavModel()->GetFormShell(); - FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL; + FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : nullptr; // within undo if (pFormModel) @@ -1026,7 +1026,7 @@ namespace svxform // some data for the target bool bDropTargetIsForm = IsFormEntry(_pTargetEntry); - FmFormData* pTargetData = bDropTargetIsForm ? static_cast<FmFormData*>(_pTargetEntry->GetUserData()) : NULL; + FmFormData* pTargetData = bDropTargetIsForm ? static_cast<FmFormData*>(_pTargetEntry->GetUserData()) : nullptr; DBG_ASSERT( DND_ACTION_COPY != _nAction, "NavigatorTree::implExecuteDataTransfer: somebody changed the logics!" ); @@ -1036,7 +1036,7 @@ namespace svxform // shell and model FmFormShell* pFormShell = GetNavModel()->GetFormShell(); - FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : NULL; + FmFormModel* pFormModel = pFormShell ? pFormShell->GetFormModel() : nullptr; if (!pFormModel) return DND_ACTION_NONE; @@ -1061,8 +1061,8 @@ namespace svxform { // some data of the current element SvTreeListEntry* pCurrent = *dropped; - DBG_ASSERT(pCurrent != NULL, "NavigatorTree::implExecuteDataTransfer: invalid entry"); - DBG_ASSERT(GetParent(pCurrent) != NULL, "NavigatorTree::implExecuteDataTransfer: invalid entry"); + DBG_ASSERT(pCurrent != nullptr, "NavigatorTree::implExecuteDataTransfer: invalid entry"); + DBG_ASSERT(GetParent(pCurrent) != nullptr, "NavigatorTree::implExecuteDataTransfer: invalid entry"); // don't drag root FmEntryData* pCurrentUserData = static_cast<FmEntryData*>(pCurrent->GetUserData()); @@ -1071,7 +1071,7 @@ namespace svxform Reference< XIndexContainer > xContainer(xCurrentChild->getParent(), UNO_QUERY); FmFormData* pCurrentParentUserData = static_cast<FmFormData*>(pCurrentUserData->GetParent()); - DBG_ASSERT(pCurrentParentUserData == NULL || dynamic_cast<const FmFormData*>( pCurrentParentUserData) != nullptr, "NavigatorTree::implExecuteDataTransfer: invalid parent"); + DBG_ASSERT(pCurrentParentUserData == nullptr || dynamic_cast<const FmFormData*>( pCurrentParentUserData) != nullptr, "NavigatorTree::implExecuteDataTransfer: invalid parent"); // remove from parent if (pCurrentParentUserData) @@ -1318,7 +1318,7 @@ namespace svxform if (!SvTreeListBox::EditingEntry( pEntry, rSelection )) return false; - return (pEntry && (pEntry->GetUserData() != NULL)); + return (pEntry && (pEntry->GetUserData() != nullptr)); // root, which isn't allowed to be renamed, has UserData=NULL } @@ -1391,9 +1391,9 @@ namespace svxform // get ParentForm if (!GetNavModel()->GetFormShell()) - return NULL; + return nullptr; if (!IsFormEntry(pParentEntry)) - return NULL; + return nullptr; FmFormData* pParentFormData = static_cast<FmFormData*>(pParentEntry->GetUserData()); Reference< XForm > xParentForm( pParentFormData->GetFormIface()); @@ -1403,7 +1403,7 @@ namespace svxform Reference<XComponentContext> xContext = comphelper::getProcessComponentContext(); Reference<XFormComponent> xNewComponent( xContext->getServiceManager()->createInstanceWithContext(rServiceName, xContext), UNO_QUERY); if (!xNewComponent.is()) - return NULL; + return nullptr; FmControlData* pNewFormControlData = new FmControlData( xNewComponent, m_aNavigatorImages, pParentFormData ); @@ -1457,7 +1457,7 @@ namespace svxform aNewName += OUString::number(i).getStr(); } - if( GetNavModel()->FindData(aNewName, pFormParentData,false) == NULL ) + if( GetNavModel()->FindData(aNewName, pFormParentData,false) == nullptr ) break; } @@ -1476,7 +1476,7 @@ namespace svxform if( !bRes ) { m_pEditEntry = pEntry; - nEditEvent = Application::PostUserEvent( LINK(this, NavigatorTree, OnEdit), NULL, true ); + nEditEvent = Application::PostUserEvent( LINK(this, NavigatorTree, OnEdit), nullptr, true ); } else SetCursor(pEntry, true); @@ -1486,9 +1486,9 @@ namespace svxform IMPL_LINK_NOARG_TYPED(NavigatorTree, OnEdit, void*, void) { - nEditEvent = 0; + nEditEvent = nullptr; EditEntry( m_pEditEntry ); - m_pEditEntry = NULL; + m_pEditEntry = nullptr; } @@ -1693,8 +1693,8 @@ namespace svxform // see below for why we need this mapping from models to shapes FmFormView* pFormView = pFormShell->GetFormView(); - SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : NULL; - SdrPage* pPage = pPageView ? pPageView->GetPage() : NULL; + SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : nullptr; + SdrPage* pPage = pPageView ? pPageView->GetPage() : nullptr; DBG_ASSERT( pPage, "NavigatorTree::DeleteSelection: invalid form page!" ); MapModelToShape aModelShapes; @@ -1893,7 +1893,7 @@ namespace svxform while (pSelection) { FmEntryData* pCurrent = static_cast<FmEntryData*>(pSelection->GetUserData()); - if (pCurrent != NULL) + if (pCurrent != nullptr) { FmEntryDataArray::iterator it = arredToSelect.find(pCurrent); if ( it != arredToSelect.end() ) @@ -2024,7 +2024,7 @@ namespace svxform bool NavigatorTree::IsHiddenControl(FmEntryData* pEntryData) { - if (pEntryData == NULL) return false; + if (pEntryData == nullptr) return false; Reference< XPropertySet > xProperties( pEntryData->GetPropertySet() ); if (::comphelper::hasProperty(FM_PROP_CLASSID, xProperties)) diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 279932f00e8b..f949bd35019f 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -75,7 +75,7 @@ namespace svxform Reference< XFormComponent > xFormComponent(evt.Source, UNO_QUERY); Reference< XForm > xForm(evt.Source, UNO_QUERY); - FmEntryData* pEntryData( NULL ); + FmEntryData* pEntryData( nullptr ); if( xForm.is() ) pEntryData = m_pNavModel->FindData( xForm, m_pNavModel->GetRootList() ); else if( xFormComponent.is() ) @@ -187,9 +187,9 @@ namespace svxform } NavigatorTreeModel::NavigatorTreeModel( const ImageList& _rNormalImages ) - :m_pFormShell(NULL) - ,m_pFormPage(NULL) - ,m_pFormModel(NULL) + :m_pFormShell(nullptr) + ,m_pFormPage(nullptr) + ,m_pFormModel(nullptr) ,m_aNormalImages( _rNormalImages ) { m_pPropChangeList = new OFormComponentObserver(this); @@ -249,7 +249,7 @@ namespace svxform Reference< css::form::XForms > NavigatorTreeModel::GetForms() const { if( !m_pFormShell || !m_pFormShell->GetCurPage()) - return NULL; + return nullptr; else return m_pFormShell->GetCurPage()->GetForms(); } @@ -511,7 +511,7 @@ namespace svxform { // insert forms from root - if( pFormData == NULL ) + if( pFormData == nullptr ) { Reference< XIndexContainer > xForms(GetForms(), UNO_QUERY); if (!xForms.is()) @@ -580,7 +580,7 @@ namespace svxform // set ParentData Reference< XInterface > xIFace( xForm->getParent()); Reference< XForm > xParentForm(xIFace, UNO_QUERY); - FmFormData* pParentData = NULL; + FmFormData* pParentData = nullptr; if (xParentForm.is()) pParentData = static_cast<FmFormData*>(FindData( xParentForm, GetRootList() )); @@ -601,7 +601,7 @@ namespace svxform FmFormData* pParentData = static_cast<FmFormData*>(FindData( xForm, GetRootList() )); if( !pParentData ) { - pParentData = new FmFormData( xForm, m_aNormalImages, NULL ); + pParentData = new FmFormData( xForm, m_aNormalImages, nullptr ); Insert( pParentData ); } @@ -651,7 +651,7 @@ namespace svxform return pEntryData; } } - return NULL; + return nullptr; } @@ -683,7 +683,7 @@ namespace svxform } } - return NULL; + return nullptr; } @@ -838,14 +838,14 @@ namespace svxform { xForms->addContainerListener(static_cast<XContainerListener*>(m_pPropChangeList)); - FillBranch(NULL); + FillBranch(nullptr); // select same control in tree as in view // (or all of them), if there is one ... if(!m_pFormShell) return; // no shell FmFormView* pFormView = m_pFormShell->GetFormView(); - DBG_ASSERT(pFormView != NULL, "NavigatorTreeModel::UpdateContent : keine FormView"); + DBG_ASSERT(pFormView != nullptr, "NavigatorTreeModel::UpdateContent : keine FormView"); BroadcastMarkedObjects(pFormView->GetMarkedObjectList()); } } @@ -855,7 +855,7 @@ namespace svxform { // If shell is unchanged, do nothing - FmFormPage* pNewPage = pShell ? pShell->GetCurPage() : NULL; + FmFormPage* pNewPage = pShell ? pShell->GetCurPage() : nullptr; if ((pShell == m_pFormShell) && (m_pFormPage == pNewPage)) return; @@ -865,7 +865,7 @@ namespace svxform { if (m_pFormModel) EndListening( *m_pFormModel ); - m_pFormModel = NULL; + m_pFormModel = nullptr; EndListening( *m_pFormShell ); Clear(); } @@ -878,7 +878,7 @@ namespace svxform m_pFormPage = pNewPage; UpdateContent(m_pFormPage->GetForms()); } else - m_pFormPage = NULL; + m_pFormPage = nullptr; // register as Listener again @@ -958,7 +958,7 @@ namespace svxform return pObj; } } - return NULL; + return nullptr; } diff --git a/svx/source/form/sdbdatacolumn.cxx b/svx/source/form/sdbdatacolumn.cxx index d5272878fae0..d53525059f2e 100644 --- a/svx/source/form/sdbdatacolumn.cxx +++ b/svx/source/form/sdbdatacolumn.cxx @@ -43,9 +43,9 @@ namespace svxform if (!m_xPropertySet.is() || !m_xColumn.is()) { - m_xPropertySet = NULL; - m_xColumn = NULL; - m_xColumnUpdate = NULL; + m_xPropertySet = nullptr; + m_xColumn = nullptr; + m_xColumnUpdate = nullptr; } } diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 700e0a617536..ed8052efd6b4 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -98,9 +98,9 @@ static void lcl_addToList( SvTreeListBox& _rListBox, const uno::Reference< conta if ( xColumn->getPropertySetInfo()->hasPropertyByName(FM_PROP_LABEL) ) xColumn->getPropertyValue(FM_PROP_LABEL) >>= sLabel; if ( !sLabel.isEmpty() ) - _rListBox.InsertEntry( sLabel, NULL, false, TREELIST_APPEND, new ColumnInfo(*pEntries,sLabel) ); + _rListBox.InsertEntry( sLabel, nullptr, false, TREELIST_APPEND, new ColumnInfo(*pEntries,sLabel) ); else - _rListBox.InsertEntry( *pEntries, NULL, false, TREELIST_APPEND, new ColumnInfo(*pEntries,sLabel) ); + _rListBox.InsertEntry( *pEntries, nullptr, false, TREELIST_APPEND, new ColumnInfo(*pEntries,sLabel) ); } } @@ -184,14 +184,14 @@ FmFieldWin::FmFieldWin(SfxBindings* _pBindings, SfxChildWindow* _pMgr, vcl::Wind ,::comphelper::OPropertyChangeListener(m_aMutex) ,pData(new FmFieldWinData) ,m_nObjectType(0) - ,m_pChangeListener(NULL) + ,m_pChangeListener(nullptr) { SetHelpId( HID_FIELD_SEL_WIN ); SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor()) ); pListBox = VclPtr<FmFieldWinListBox>::Create( this ); pListBox->Show(); - UpdateContent(NULL); + UpdateContent(nullptr); SetSizePixel(Size(STD_WIN_SIZE_X,STD_WIN_SIZE_Y)); } @@ -245,14 +245,14 @@ bool FmFieldWin::createSelectionControls( ) SfxUnoAnyItem aDescriptorItem( SID_FM_DATACCESS_DESCRIPTOR, makeAny( aDescr.createPropertyValueSequence() ) ); const SfxPoolItem* pArgs[] = { - &aDescriptorItem, NULL + &aDescriptorItem, nullptr }; // execute the create slot GetBindings().Execute( SID_FM_CREATE_FIELDCONTROL, pArgs ); } - return NULL != pSelected; + return nullptr != pSelected; } @@ -296,7 +296,7 @@ void FmFieldWin::StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoo UpdateContent(pShell); } else - UpdateContent(NULL); + UpdateContent(nullptr); } diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index fbdf616121c2..1da3496a853a 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -202,7 +202,7 @@ SFX_IMPL_TOOLBOX_CONTROL( SvxFmTbxCtlRecTotal, SfxStringItem ); SvxFmTbxCtlRecTotal::SvxFmTbxCtlRecTotal( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox& rTbx ) :SfxToolBoxControl( nSlotId, nId, rTbx ) - ,pFixedText( NULL ) + ,pFixedText( nullptr ) { } |