diff options
Diffstat (limited to 'reportdesign/source/ui/report')
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 14 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FixedTextColor.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/FormattedFieldBeautifier.cxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 50 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportSection.cxx | 26 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 34 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 32 | ||||
-rw-r--r-- | reportdesign/source/ui/report/propbrw.cxx | 16 |
10 files changed, 93 insertions, 93 deletions
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 33323495360e..b15399dcf340 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -61,7 +61,7 @@ class OTaskWindow : public vcl::Window { VclPtr<PropBrw> m_pPropWin; public: - explicit OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(NULL){} + explicit OTaskWindow(vcl::Window* _pParent) : Window(_pParent),m_pPropWin(nullptr){} virtual ~OTaskWindow() { disposeOnce(); } virtual void dispose() override { m_pPropWin.clear(); vcl::Window::dispose(); } @@ -89,10 +89,10 @@ ODesignView::ODesignView( vcl::Window* pParent, ,m_aSplitWin(VclPtr<SplitWindow>::Create(this)) ,m_rReportController( _rController ) ,m_aScrollWindow(VclPtr<rptui::OScrollWindowHelper>::Create(this)) - ,m_pPropWin(NULL) - ,m_pAddField(NULL) - ,m_pCurrentView(NULL) - ,m_pReportExplorer(NULL) + ,m_pPropWin(nullptr) + ,m_pAddField(nullptr) + ,m_pCurrentView(nullptr) + ,m_pReportExplorer(nullptr) ,m_eMode( RPTUI_SELECT ) ,m_eActObj( OBJ_NONE ) ,m_aGridSizeCoarse( 1000, 1000 ) // #i93595# 100TH_MM changed to grid using coarse 1 cm grid @@ -465,7 +465,7 @@ void ODesignView::showProperties(const uno::Reference< uno::XInterface>& _xRepor m_xReportComponent = _xReportComponent; if ( m_pCurrentView ) m_aScrollWindow->setMarked(m_pCurrentView,false); - m_pCurrentView = NULL; + m_pCurrentView = nullptr; m_aMarkIdle.Start(); } } @@ -607,7 +607,7 @@ void ODesignView::setMarked(const uno::Reference< report::XSection>& _xSection,b if ( _bMark ) UpdatePropertyBrowserDelayed(getMarkedSection()->getReportSection().getSectionView()); else - m_pCurrentView = NULL; + m_pCurrentView = nullptr; } void ODesignView::setMarked(const uno::Sequence< uno::Reference< report::XReportComponent> >& _aShapes,bool _bMark) diff --git a/reportdesign/source/ui/report/FixedTextColor.cxx b/reportdesign/source/ui/report/FixedTextColor.cxx index a55c8d193dad..b0ef99ae216a 100644 --- a/reportdesign/source/ui/report/FixedTextColor.cxx +++ b/reportdesign/source/ui/report/FixedTextColor.cxx @@ -172,7 +172,7 @@ namespace rptui if ( pUnoObj ) // this doesn't need to be done for shapes { OSectionWindow* pSectionWindow = pController->getSectionWindow(xSection); - if (pSectionWindow != 0) + if (pSectionWindow != nullptr) { OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx index 10736ae36814..ab8d82491255 100644 --- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx +++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx @@ -173,7 +173,7 @@ namespace rptui if ( pUnoObj ) // this doesn't need to be done for shapes { OSectionWindow* pSectionWindow = m_rReportController.getSectionWindow(xSection); - if (pSectionWindow != 0) + if (pSectionWindow != nullptr) { OReportSection& aOutputDevice = pSectionWindow->getReportSection(); // OutputDevice OSectionView& aSdrView = aOutputDevice.getSectionView(); // SdrView diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index b537e8718594..6126c03cb709 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -289,8 +289,8 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon :OReportController_BASE(xContext) ,OPropertyStateContainer(OGenericUnoController_Base::rBHelper) ,m_aSelectionListeners( getMutex() ) - ,m_pClipbordNotifier(NULL) - ,m_pGroupsFloater(NULL) + ,m_pClipbordNotifier(nullptr) + ,m_pGroupsFloater(nullptr) ,m_sMode("normal") ,m_nSplitPos(-1) ,m_nPageNum(-1) @@ -332,7 +332,7 @@ void OReportController::disposing() m_pClipbordNotifier->ClearCallbackLink(); m_pClipbordNotifier->AddRemoveListener( getView(), false ); m_pClipbordNotifier->release(); - m_pClipbordNotifier = NULL; + m_pClipbordNotifier = nullptr; } if ( m_pGroupsFloater ) { @@ -360,7 +360,7 @@ void OReportController::disposing() { try { - OSectionWindow* pSectionWindow = NULL; + OSectionWindow* pSectionWindow = nullptr; if ( getDesignView() ) pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) @@ -549,7 +549,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const case SID_SELECTALL_IN_SECTION: aReturn.bEnabled = !getDesignView()->isHandleEvent(_nId); if ( aReturn.bEnabled ) - aReturn.bEnabled = getCurrentSectionView() != NULL; + aReturn.bEnabled = getCurrentSectionView() != nullptr; break; case SID_ESCAPE: aReturn.bEnabled = getDesignView()->GetMode() == RPTUI_INSERT; @@ -1703,7 +1703,7 @@ void OReportController::impl_initialize( ) getDesignView()->showRuler(m_bShowRuler); getDesignView()->togglePropertyBrowser(m_bShowProperties); getDesignView()->setCurrentPage(m_sLastActivePage); - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); if ( m_nPageNum != -1 ) { @@ -2497,7 +2497,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _ uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW); const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); - const SfxPoolItem* pItem = NULL; + const SfxPoolItem* pItem = nullptr; if ( SfxItemState::SET == pSet->GetItemState( RPTUI_ID_SIZE,true,&pItem)) { uno::Any aValue; @@ -3077,7 +3077,7 @@ sal_Bool SAL_CALL OReportController::select( const Any& aSelection ) throw (Ille bool bRet = true; if ( getDesignView() ) { - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); getDesignView()->SetMode(RPTUI_SELECT); uno::Sequence< uno::Reference<report::XReportComponent> > aElements; @@ -3166,7 +3166,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co if ( aPos.X < nLeftMargin ) aPos.X = nLeftMargin; - SdrObject* pNewControl = NULL; + SdrObject* pNewControl = nullptr; uno::Reference< report::XReportComponent> xShapeProp; if ( _nObjectId == OBJ_CUSTOMSHAPE ) { @@ -3192,12 +3192,12 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co } else { - SdrUnoObj* pLabel( NULL ); - SdrUnoObj* pControl( NULL ); + SdrUnoObj* pLabel( nullptr ); + SdrUnoObj* pControl( nullptr ); FmFormView::createControlLabelPair( getDesignView() ,nLeftMargin,0 - ,NULL,NULL,_nObjectId,OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT, - NULL,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(), + ,nullptr,nullptr,_nObjectId,OUString(),ReportInventor,OBJ_DLG_FIXEDTEXT, + nullptr,pSectionWindow->getReportSection().getPage(),m_aReportModel.get(), pLabel,pControl); delete pLabel; @@ -3270,7 +3270,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs) { - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); @@ -3298,7 +3298,7 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs) void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs) { - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL)); UndoContext aUndoContext( getUndoManager(), sUndoAction ); @@ -3328,7 +3328,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) { - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); // Anhand des FormatKeys wird festgestellt, welches Feld benoetigt wird OSectionWindow* pSectionWindow[2]; @@ -3386,7 +3386,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) } } // clear all selections - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); uno::Reference< beans::XPropertySet > xField( aDescriptor[ svx::daColumnObject ], uno::UNO_QUERY ); uno::Reference< lang::XComponent > xHoldAlive; @@ -3481,8 +3481,8 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) Reference< XNumberFormats > xNumberFormats(xSupplier->getNumberFormats()); SdrUnoObj* pControl[2]; - pControl[0] = NULL; - pControl[1] = NULL; + pControl[0] = nullptr; + pControl[1] = nullptr; const sal_Int32 nRightMargin = getStyleProperty<sal_Int32>(m_xReportDefinition,PROPERTY_RIGHTMARGIN); const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_xReportDefinition,PROPERTY_PAPERSIZE).Width - nRightMargin; OSectionView* pSectionViews[2]; @@ -3603,7 +3603,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) while ( bOverlapping ) { const SdrObject* pOverlappedObj = isOver(aLabelAndTextfield, *pSectionWindow[0]->getReportSection().getPage(), *pSectionViews[0], true, pControl, 2); - bOverlapping = pOverlappedObj != NULL; + bOverlapping = pOverlappedObj != nullptr; if ( bOverlapping ) { const Rectangle& aLogicRect = pOverlappedObj->GetLogicRect(); @@ -3644,7 +3644,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs) OSectionView* OReportController::getCurrentSectionView() const { - OSectionView* pSectionView = NULL; + OSectionView* pSectionView = nullptr; OSectionWindow* pSectionWindow = getDesignView()->getMarkedSection(); if ( pSectionWindow ) pSectionView = &pSectionWindow->getReportSection().getSectionView(); @@ -4003,7 +4003,7 @@ void OReportController::createDefaultControl(const uno::Sequence< beans::Propert if ( pKeyModifier == pEnd || ((pKeyModifier->Value >>= nKeyModifier) && nKeyModifier == KEY_MOD1) ) { Sequence< PropertyValue > aCreateArgs; - getDesignView()->unmarkAllObjects(NULL); + getDesignView()->unmarkAllObjects(nullptr); createControl(aCreateArgs,xSection,OUString(),getDesignView()->GetInsertObj()); } } @@ -4221,7 +4221,7 @@ OSectionWindow* OReportController::getSectionWindow(const css::uno::Reference< c } // throw NullPointerException? - return NULL; + return nullptr; } @@ -4255,7 +4255,7 @@ void OReportController::openZoomDialog() aZoomItem.SetValueSet(SvxZoomEnableFlags::N100|SvxZoomEnableFlags::WHOLEPAGE|SvxZoomEnableFlags::PAGEWIDTH); pDescriptor->Put(aZoomItem); - ::std::unique_ptr<AbstractSvxZoomDialog> pDlg( pFact->CreateSvxZoomDialog(NULL, *pDescriptor.get()) ); + ::std::unique_ptr<AbstractSvxZoomDialog> pDlg( pFact->CreateSvxZoomDialog(nullptr, *pDescriptor.get()) ); pDlg->SetLimits( 20, 400 ); bool bCancel = ( RET_CANCEL == pDlg->Execute() ); @@ -4376,7 +4376,7 @@ SfxUndoManager& OReportController::getUndoManager() const ENSURE_OR_THROW( !!pReportModel, "no access to our model" ); SfxUndoManager* pUndoManager( pReportModel->GetSdrUndoManager() ); - ENSURE_OR_THROW( pUndoManager != NULL, "no access to our model's UndoManager" ); + ENSURE_OR_THROW( pUndoManager != nullptr, "no access to our model's UndoManager" ); return *pUndoManager; } diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 7c5ef02e97b4..b08e4e62a2af 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -79,11 +79,11 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re : Window(_pParent,WB_DIALOGCONTROL) , ::comphelper::OPropertyChangeListener(m_aMutex) , DropTargetHelper(this) - , m_pPage(NULL) - , m_pView(NULL) + , m_pPage(nullptr) + , m_pView(nullptr) , m_pParent(_pParent) - , m_pMulti(NULL) - , m_pReportListener(NULL) + , m_pMulti(nullptr) + , m_pReportListener(nullptr) , m_xSection(_xSection) , m_nPaintEntranceCount(0) , m_eMode(RPTUI_SELECT) @@ -115,7 +115,7 @@ OReportSection::~OReportSection() void OReportSection::dispose() { - m_pPage = NULL; + m_pPage = nullptr; if ( m_pMulti.is() ) m_pMulti->dispose(); @@ -127,7 +127,7 @@ void OReportSection::dispose() ::std::unique_ptr<OSectionView> aTemp( m_pView); if ( m_pView ) m_pView->EndListening( *m_pModel ); - m_pView = NULL; + m_pView = nullptr; } m_pParent.clear(); vcl::Window::dispose(); @@ -145,7 +145,7 @@ void OReportSection::Paint( vcl::RenderContext& rRenderContext, const Rectangle& const vcl::Region aPaintRectRegion(rRect); // #i74769# - SdrPaintWindow* pTargetPaintWindow = 0; + SdrPaintWindow* pTargetPaintWindow = nullptr; // mark repaint start if (pPgView) @@ -264,7 +264,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC for (;pCopiesIter != pCopiesEnd ; ++pCopiesIter) { SvxShape* pShape = SvxShape::getImplementation( *pCopiesIter ); - SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; + SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr; if ( pObject ) { SdrObject* pNeuObj = pObject->Clone(); @@ -280,7 +280,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC bool bOverlapping = true; while ( bOverlapping ) { - bOverlapping = isOver(aRet,*m_pPage,*m_pView,true,pNeuObj) != NULL; + bOverlapping = isOver(aRet,*m_pPage,*m_pView,true,pNeuObj) != nullptr; if ( bOverlapping ) { aRet.Move(0,aRet.getHeight()+1); @@ -424,8 +424,8 @@ void OReportSection::SelectAll(const sal_uInt16 _nObjectType) { m_pView->UnmarkAll(); SdrObjListIter aIter(*m_pPage,IM_DEEPNOGROUPS); - SdrObject* pObjIter = NULL; - while( (pObjIter = aIter.Next()) != NULL ) + SdrObject* pObjIter = nullptr; + while( (pObjIter = aIter.Next()) != nullptr ) { if ( pObjIter->GetObjIdentifier() == _nObjectType ) m_pView->MarkObj( pObjIter, m_pView->GetSdrPageView() ); @@ -552,7 +552,7 @@ void OReportSection::impl_adjustObjectSizePosition(sal_Int32 i_nPaperWidth,sal_I awt::Point aPos = xReportComponent->getPosition(); awt::Size aSize = xReportComponent->getSize(); SvxShape* pShape = SvxShape::getImplementation( xReportComponent ); - SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; + SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr; if ( pObject ) { bool bChanged = false; @@ -636,7 +636,7 @@ void OReportSection::createDefault(const OUString& _sType,SdrObject* _pObj) { if ( aIter->equalsIgnoreAsciiCase( _sType ) ) { - OReportModel aReportModel(NULL); + OReportModel aReportModel(nullptr); SfxItemPool& rPool = aReportModel.GetItemPool(); rPool.FreezeIdRanges(); if ( GalleryExplorer::GetSdrObj( GALLERY_THEME_POWERPOINT, i, &aReportModel ) ) diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 2957c0d92e01..b91cf7e40d09 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -51,7 +51,7 @@ OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView) ,m_aCornerWin( VclPtr<ScrollBarBox>::Create(this) ) ,m_pParent(_pDesignView) ,m_aReportWindow(VclPtr<rptui::OReportWindow>::Create(this,m_pParent)) - ,m_pReportDefinitionMultiPlexer(NULL) + ,m_pReportDefinitionMultiPlexer(nullptr) { SetMapMode( MapMode( MAP_100TH_MM ) ); @@ -333,8 +333,8 @@ bool OScrollWindowHelper::Notify( NotifyEvent& rNEvt ) (pCommandEvent->GetCommand() == CommandEventId::StartAutoScroll) || (pCommandEvent->GetCommand() == CommandEventId::AutoScroll))) ) { - ScrollBar* pHScrBar = NULL; - ScrollBar* pVScrBar = NULL; + ScrollBar* pHScrBar = nullptr; + ScrollBar* pVScrBar = nullptr; if ( m_aHScroll->IsVisible() ) pHScrBar = m_aHScroll.get(); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 9f1f77041b01..6cc0ea141434 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -41,8 +41,8 @@ namespace rptui { -Image* OStartMarker::s_pDefCollapsed = NULL; -Image* OStartMarker::s_pDefExpanded = NULL; +Image* OStartMarker::s_pDefCollapsed = nullptr; +Image* OStartMarker::s_pDefExpanded = nullptr; oslInterlockedCount OStartMarker::s_nImageRefCount = 0; diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 5e8205d90a43..c85872e0b3d9 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -63,7 +63,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd if ( bMoveAllowed ) { Rectangle aNewRect = _aObjRect; - SdrObject* pOverlappedObj = NULL; + SdrObject* pOverlappedObj = nullptr; do { aNewRect = _aObjRect; @@ -78,7 +78,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd aNewRect.Move(_nXMov,_nYMov); break; } - if (dynamic_cast<OUnoObject*>(_pObj) != NULL || dynamic_cast<OOle2Obj*>(_pObj) != NULL) + if (dynamic_cast<OUnoObject*>(_pObj) != nullptr || dynamic_cast<OOle2Obj*>(_pObj) != nullptr) { pOverlappedObj = isOver(aNewRect,*_pObj->GetPage(),*_pView,true,_pObj); if ( pOverlappedObj && _pObj != pOverlappedObj ) @@ -161,7 +161,7 @@ bool lcl_getNewRectSize(const Rectangle& _aObjRect,long& _nXMov, long& _nYMov,Sd _nYMov = nYTemp; } else - pOverlappedObj = NULL; + pOverlappedObj = nullptr; } } while ( pOverlappedObj && bMoveAllowed ); @@ -424,7 +424,7 @@ OSectionWindow* OViewsWindow::getSectionWindow(const uno::Reference< report::XSe { OSL_ENSURE(_xSection.is(),"Section is NULL!"); - OSectionWindow* pSectionWindow = NULL; + OSectionWindow* pSectionWindow = nullptr; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); for (; aIter != aEnd ; ++aIter) @@ -442,7 +442,7 @@ OSectionWindow* OViewsWindow::getSectionWindow(const uno::Reference< report::XSe OSectionWindow* OViewsWindow::getMarkedSection(NearSectionAccess nsa) const { - OSectionWindow* pRet = NULL; + OSectionWindow* pRet = nullptr; TSectionsMap::const_iterator aIter = m_aSections.begin(); TSectionsMap::const_iterator aEnd = m_aSections.end(); sal_uInt32 nCurrentPosition = 0; @@ -460,7 +460,7 @@ OSectionWindow* OViewsWindow::getMarkedSection(NearSectionAccess nsa) const if (nCurrentPosition > 0) { pRet = (*(--aIter)); - if (pRet == 0) + if (pRet == nullptr) { pRet = (*m_aSections.begin()); } @@ -478,7 +478,7 @@ OSectionWindow* OViewsWindow::getMarkedSection(NearSectionAccess nsa) const if ((nCurrentPosition + 1) < nSize) { pRet = *(++aIter); - if (pRet == 0) + if (pRet == nullptr) { pRet = (*(--aEnd)); } @@ -615,7 +615,7 @@ OViewsWindow::TSectionsMap::iterator OViewsWindow::getIteratorAtPos(sal_uInt16 _ void OViewsWindow::setMarked(OSectionView* _pSectionView, bool _bMark) { - OSL_ENSURE(_pSectionView != NULL,"SectionView is NULL!"); + OSL_ENSURE(_pSectionView != nullptr,"SectionView is NULL!"); if ( _pSectionView ) setMarked(_pSectionView->getReportSection()->getSection(),_bMark); } @@ -656,7 +656,7 @@ void OViewsWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepor if ( pSectionWindow ) { SvxShape* pShape = SvxShape::getImplementation( *pIter ); - SdrObject* pObject = pShape ? pShape->GetSdrObject() : NULL; + SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr; OSL_ENSURE( pObject, "OViewsWindow::setMarked: no SdrObject for the shape!" ); if ( pObject ) pSectionWindow->getReportSection().getSectionView().MarkObj( pObject, pSectionWindow->getReportSection().getSectionView().GetSdrPageView(), !_bMark ); @@ -951,7 +951,7 @@ sal_uInt16 OViewsWindow::getPosition(const OSectionWindow* _pSectionWindow) cons OSectionWindow* OViewsWindow::getSectionWindow(const sal_uInt16 _nPos) const { - OSectionWindow* aReturn = NULL; + OSectionWindow* aReturn = nullptr; if ( _nPos < m_aSections.size() ) aReturn = m_aSections[_nPos]; @@ -1199,7 +1199,7 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection) OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pSection,Point& _rPnt) { - OSectionView* pSection = NULL; + OSectionView* pSection = nullptr; sal_Int32 nCount = 0; TSectionsMap::iterator aIter = m_aSections.begin(); const TSectionsMap::iterator aEnd = m_aSections.end(); @@ -1517,7 +1517,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) const SdrHdlList& rHdlList = rView.GetHdlList(); SdrHdl* pHdl = rHdlList.GetFocusHdl(); - if ( pHdl == 0 ) + if ( pHdl == nullptr ) { // no handle selected if ( rView.IsMoveAllowed() ) @@ -1552,7 +1552,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) for (size_t i = 0; !bCheck && i < rMarkList.GetMarkCount(); ++i ) { SdrMark* pMark = rMarkList.GetMark(i); - bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL|| dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()); + bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != nullptr|| dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()); } @@ -1597,8 +1597,8 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) } pOverlapped = isOver(aMarkRect,*rReportSection.getPage(),rView); } - while(pOverlapped != NULL); - if (pOverlapped != NULL) + while(pOverlapped != nullptr); + if (pOverlapped != nullptr) break; } } @@ -1621,7 +1621,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) const SdrDragStat& rDragStat = rView.GetDragStat(); // start dragging - rView.BegDragObj( aStartPoint, 0, pHdl, 0 ); + rView.BegDragObj( aStartPoint, nullptr, pHdl, 0 ); if ( rView.IsDragObj() ) { @@ -1640,7 +1640,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) for (size_t i = 0; !bCheck && i < rMarkList.GetMarkCount(); ++i ) { SdrMark* pMark = rMarkList.GetMark(i); - bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != NULL || dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()) != NULL; + bCheck = dynamic_cast<OUnoObject*>(pMark->GetMarkedSdrObj()) != nullptr || dynamic_cast<OOle2Obj*>(pMark->GetMarkedSdrObj()) != nullptr; if ( bCheck ) aNewRect.Union(pMark->GetMarkedSdrObj()->GetLastBoundRect()); } diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 91379a6518d1..cd743ae9dfa5 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -116,8 +116,8 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) DlgEdFunc::DlgEdFunc( OReportSection* _pParent ) : m_pParent(_pParent) , m_rView(_pParent->getSectionView()) - , m_xOverlappingObj(NULL) - , m_pOverlappingObj(NULL) + , m_xOverlappingObj(nullptr) + , m_pOverlappingObj(nullptr) , m_nOverlappedControlColor(0) , m_nOldColor(0) , m_bSelectionMode(false) @@ -194,7 +194,7 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) SdrHdl* pHdl = m_rView.PickHandle(m_aMDPos); // if selected object was hit, drag object - if ( pHdl!=NULL || m_rView.IsMarkedHit(m_aMDPos) ) + if ( pHdl!=nullptr || m_rView.IsMarkedHit(m_aMDPos) ) { bHandled = true; m_pParent->CaptureMouse(); @@ -207,11 +207,11 @@ bool DlgEdFunc::MouseButtonDown( const MouseEvent& rMEvt ) SdrPageView* pPV = m_rView.GetSdrPageView(); SdrViewEvent aVEvt; if ( m_rView.PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt) != SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() ) - m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); + m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); if ( aVEvt.pRootObj ) m_rView.MarkObj(aVEvt.pRootObj, pPV); else - m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); + m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); bHandled = true; } @@ -295,7 +295,7 @@ bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent) if ( pHdl ) ((SdrHdlList&)rHdlList).ResetFocusHdl(); else - m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); + m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); deactivateOle(true); bReturn = false; @@ -490,8 +490,8 @@ void DlgEdFunc::unColorizeOverlappedObj() OXUndoEnvironment::OUndoEnvLock aLock(pRptModel->GetUndoEnv()); lcl_setColorOfObject(m_xOverlappingObj, m_nOldColor); - m_xOverlappingObj = NULL; - m_pOverlappingObj = NULL; + m_xOverlappingObj = nullptr; + m_pOverlappingObj = nullptr; } } } @@ -584,15 +584,15 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) { // no drag rect, we have to check every single select rect const SdrDragStat& rDragStat = m_rView.GetDragStat(); - if (rDragStat.GetDragMethod() != NULL) + if (rDragStat.GetDragMethod() != nullptr) { SdrObjListIter aIter(*m_pParent->getPage(),IM_DEEPNOGROUPS); - SdrObject* pObjIter = NULL; + SdrObject* pObjIter = nullptr; // loop through all marked objects and check if there new rect overlapps an old one. - while( (pObjIter = aIter.Next()) != NULL && !bIsSetPoint) + while( (pObjIter = aIter.Next()) != nullptr && !bIsSetPoint) { if ( m_rView.IsObjMarked(pObjIter) - && (dynamic_cast<OUnoObject*>(pObjIter) != NULL || dynamic_cast<OOle2Obj*>(pObjIter) != NULL) ) + && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) ) { Rectangle aNewRect = pObjIter->GetLastBoundRect(); long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX(); @@ -780,7 +780,7 @@ bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) } bIsSetPoint = setMovementPointer(rMEvt); ForceScroll(aPos); - m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPos,&m_rView, m_rView.GetDragMethod() == NULL, false); + m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPos,&m_rView, m_rView.GetDragMethod() == nullptr, false); } if ( !bIsSetPoint ) @@ -816,7 +816,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { // if not multi selection, unmark all if ( !rMEvt.IsShift() ) - m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); + m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); if ( m_rView.MarkObj(m_aMDPos) && rMEvt.IsLeft() ) { @@ -832,7 +832,7 @@ bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) else { if( !rMEvt.IsShift() ) - m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(NULL); + m_pParent->getSectionWindow()->getViewsWindow()->unmarkAllObjects(nullptr); if ( rMEvt.GetClicks() == 1 ) { @@ -886,7 +886,7 @@ bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) { bIsSetPoint = setMovementPointer(rMEvt); ForceScroll(aPnt); - if (m_rView.GetDragMethod()==NULL) + if (m_rView.GetDragMethod()==nullptr) { // create a selection m_pParent->getSectionWindow()->getViewsWindow()->MovAction(aPnt, &m_rView, true, false); diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 0f948b2287b6..a11250bbf968 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -94,7 +94,7 @@ PropBrw::PropBrw(const Reference< XComponentContext >& _xORB, vcl::Window* pPare :DockingWindow(pParent,WinBits(WB_STDMODELESS|WB_SIZEABLE|WB_3DLOOK|WB_ROLLABLE)) ,m_xORB(_xORB) ,m_pDesignView(_pDesignView) - ,m_pView( NULL ) + ,m_pView( nullptr ) ,m_bInitialStateChange(true) { @@ -223,10 +223,10 @@ void PropBrw::implDetachController() implSetNewObject( ); if ( m_xMeAsFrame.is() ) - m_xMeAsFrame->setComponent( NULL, NULL ); + m_xMeAsFrame->setComponent( nullptr, nullptr ); if ( m_xBrowserController.is() ) - m_xBrowserController->attachFrame( NULL ); + m_xBrowserController->attachFrame( nullptr ); m_xMeAsFrame.clear(); m_xBrowserController.clear(); @@ -297,7 +297,7 @@ uno::Sequence< Reference<uno::XInterface> > PropBrw::CreateCompPropSet(const Sdr if (pCurrent->IsGroupObject()) { pGroupIterator.reset(new SdrObjListIter(*pCurrent->GetSubList())); - pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } while (pCurrent) @@ -307,7 +307,7 @@ uno::Sequence< Reference<uno::XInterface> > PropBrw::CreateCompPropSet(const Sdr aSets.push_back(CreateComponentPair(pObj)); // next element - pCurrent = pGroupIterator.get() && pGroupIterator->IsMore() ? pGroupIterator->Next() : NULL; + pCurrent = pGroupIterator.get() && pGroupIterator->IsMore() ? pGroupIterator->Next() : nullptr; } } return uno::Sequence< Reference<uno::XInterface> >(aSets.data(), aSets.size()); @@ -477,14 +477,14 @@ void PropBrw::Update( OSectionView* pNewView ) if ( m_pView ) { EndListening( *(m_pView->GetModel()) ); - m_pView = NULL; + m_pView = nullptr; } // set focus on initialization if ( m_bInitialStateChange ) { // if we're just newly created, we want to have the focus - PostUserEvent( LINK( this, PropBrw, OnAsyncGetFocus ), NULL, true ); + PostUserEvent( LINK( this, PropBrw, OnAsyncGetFocus ), nullptr, true ); m_bInitialStateChange = false; // and additionally, we want to show the page which was active during // our previous incarnation @@ -553,7 +553,7 @@ void PropBrw::Update( const uno::Reference< uno::XInterface>& _xReportComponent) if ( m_pView ) { EndListening( *(m_pView->GetModel()) ); - m_pView = NULL; + m_pView = nullptr; } uno::Reference< uno::XInterface> xTemp(CreateComponentPair(_xReportComponent,_xReportComponent)); |