summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:23:02 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:38 +0100
commit92c697c0e3e4bde88424322875c993c161696b1e (patch)
treeea1be62a0cb8fd7f7e63dd03a52441cedd8e96eb
parent65464ed0985802edb96dbcbd1c3eed996f3778bd (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: If1b80da64ba575f07b31dce9bc0e34b7eb9f11a4
-rw-r--r--sd/inc/CustomAnimationCloner.hxx2
-rw-r--r--sd/inc/Outliner.hxx2
-rw-r--r--sd/inc/customshowlist.hxx8
-rw-r--r--sd/inc/drawdoc.hxx6
-rw-r--r--sd/inc/pglink.hxx2
-rw-r--r--sd/inc/sdabstdlg.hxx2
-rw-r--r--sd/inc/sdattr.hxx8
-rw-r--r--sd/inc/sdpage.hxx2
-rw-r--r--sd/inc/sdundo.hxx2
-rw-r--r--sd/qa/unit/export-tests.cxx116
-rw-r--r--sd/qa/unit/import-tests.cxx116
-rw-r--r--sd/qa/unit/sdmodeltestbase.hxx6
-rw-r--r--sd/qa/unit/uimpress.cxx4
-rw-r--r--sd/source/core/CustomAnimationCloner.cxx2
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx20
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx6
-rw-r--r--sd/source/core/EffectMigration.cxx78
-rw-r--r--sd/source/core/PageListWatcher.cxx6
-rw-r--r--sd/source/core/anminfo.cxx6
-rw-r--r--sd/source/core/annotations/Annotation.cxx16
-rw-r--r--sd/source/core/drawdoc.cxx56
-rw-r--r--sd/source/core/drawdoc2.cxx58
-rw-r--r--sd/source/core/drawdoc3.cxx50
-rw-r--r--sd/source/core/drawdoc4.cxx20
-rw-r--r--sd/source/core/pglink.cxx8
-rw-r--r--sd/source/core/sdpage.cxx78
-rw-r--r--sd/source/core/sdpage2.cxx26
-rw-r--r--sd/source/core/sdpage_animations.cxx2
-rw-r--r--sd/source/core/shapelist.cxx4
-rw-r--r--sd/source/core/stlfamily.cxx10
-rw-r--r--sd/source/core/stlpool.cxx40
-rw-r--r--sd/source/core/stlsheet.cxx26
-rw-r--r--sd/source/core/text/textapi.cxx18
-rw-r--r--sd/source/core/undo/undomanager.cxx4
-rw-r--r--sd/source/core/undo/undoobjects.cxx10
-rw-r--r--sd/source/filter/eppt/eppt.cxx20
-rw-r--r--sd/source/filter/eppt/eppt.hxx18
-rw-r--r--sd/source/filter/eppt/epptooxml.hxx6
-rw-r--r--sd/source/filter/eppt/epptso.cxx28
-rw-r--r--sd/source/filter/eppt/pptexanimations.cxx10
-rw-r--r--sd/source/filter/eppt/pptx-epptbase.cxx8
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx62
-rw-r--r--sd/source/filter/eppt/pptx-grouptable.cxx2
-rw-r--r--sd/source/filter/eppt/pptx-stylesheet.cxx4
-rw-r--r--sd/source/filter/eppt/pptx-text.cxx20
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx44
-rw-r--r--sd/source/filter/html/htmlex.hxx4
-rw-r--r--sd/source/filter/html/pubdlg.cxx6
-rw-r--r--sd/source/filter/ppt/pptatom.cxx12
-rw-r--r--sd/source/filter/ppt/pptatom.hxx4
-rw-r--r--sd/source/filter/ppt/pptin.cxx66
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx20
-rw-r--r--sd/source/filter/ppt/propread.cxx2
-rw-r--r--sd/source/filter/sdfilter.cxx2
-rw-r--r--sd/source/filter/sdpptwrp.cxx2
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx26
-rw-r--r--sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx24
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx34
-rw-r--r--sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx12
-rw-r--r--sd/source/ui/accessibility/AccessiblePageShape.cxx6
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx8
-rw-r--r--sd/source/ui/accessibility/AccessibleSlideSorterView.cxx46
-rw-r--r--sd/source/ui/accessibility/AccessibleViewForwarder.cxx6
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx28
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx24
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx34
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx4
-rw-r--r--sd/source/ui/animations/motionpathtag.cxx24
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx40
-rw-r--r--sd/source/ui/annotations/annotationtag.cxx20
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx14
-rw-r--r--sd/source/ui/app/optsitem.cxx4
-rw-r--r--sd/source/ui/app/sddll.cxx4
-rw-r--r--sd/source/ui/app/sdmod.cxx26
-rw-r--r--sd/source/ui/app/sdmod1.cxx38
-rw-r--r--sd/source/ui/app/sdmod2.cxx76
-rw-r--r--sd/source/ui/app/sdpopup.cxx2
-rw-r--r--sd/source/ui/app/sdxfer.cxx62
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx8
-rw-r--r--sd/source/ui/dlg/LayerTabBar.cxx6
-rw-r--r--sd/source/ui/dlg/NavigatorChildWindow.cxx4
-rw-r--r--sd/source/ui/dlg/PaneChildWindows.cxx8
-rw-r--r--sd/source/ui/dlg/PaneDockingWindow.cxx6
-rw-r--r--sd/source/ui/dlg/PaneShells.cxx4
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx10
-rw-r--r--sd/source/ui/dlg/SpellDialogChildWindow.cxx18
-rw-r--r--sd/source/ui/dlg/TemplateScanner.cxx12
-rw-r--r--sd/source/ui/dlg/animobjs.cxx16
-rw-r--r--sd/source/ui/dlg/brkdlg.cxx8
-rw-r--r--sd/source/ui/dlg/copydlg.cxx6
-rw-r--r--sd/source/ui/dlg/custsdlg.cxx22
-rw-r--r--sd/source/ui/dlg/diactrl.cxx2
-rw-r--r--sd/source/ui/dlg/dlgass.cxx58
-rw-r--r--sd/source/ui/dlg/dlgchar.cxx8
-rw-r--r--sd/source/ui/dlg/dlgfield.cxx2
-rw-r--r--sd/source/ui/dlg/dlgolbul.cxx6
-rw-r--r--sd/source/ui/dlg/dlgpage.cxx4
-rw-r--r--sd/source/ui/dlg/docprev.cxx8
-rw-r--r--sd/source/ui/dlg/filedlg.cxx4
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx16
-rw-r--r--sd/source/ui/dlg/masterlayoutdlg.cxx10
-rw-r--r--sd/source/ui/dlg/navigatr.cxx34
-rw-r--r--sd/source/ui/dlg/paragr.cxx2
-rw-r--r--sd/source/ui/dlg/present.cxx6
-rw-r--r--sd/source/ui/dlg/prltempl.cxx36
-rw-r--r--sd/source/ui/dlg/prntopts.cxx4
-rw-r--r--sd/source/ui/dlg/sdabstdlg.cxx4
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx2
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx196
-rw-r--r--sd/source/ui/dlg/tpaction.cxx8
-rw-r--r--sd/source/ui/dlg/tpoption.cxx4
-rw-r--r--sd/source/ui/docshell/docshel2.cxx18
-rw-r--r--sd/source/ui/docshell/docshel3.cxx6
-rw-r--r--sd/source/ui/docshell/docshel4.cxx26
-rw-r--r--sd/source/ui/docshell/docshell.cxx46
-rw-r--r--sd/source/ui/docshell/sdclient.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx10
-rw-r--r--sd/source/ui/framework/configuration/Configuration.cxx8
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationClassifier.cxx4
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationController.cxx26
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationUpdater.cxx4
-rw-r--r--sd/source/ui/framework/configuration/ResourceFactoryManager.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ResourceId.cxx20
-rw-r--r--sd/source/ui/framework/factories/BasicPaneFactory.cxx18
-rw-r--r--sd/source/ui/framework/factories/BasicToolBarFactory.cxx12
-rw-r--r--sd/source/ui/framework/factories/BasicViewFactory.cxx38
-rw-r--r--sd/source/ui/framework/factories/ChildWindowPane.cxx20
-rw-r--r--sd/source/ui/framework/factories/FullScreenPane.cxx16
-rw-r--r--sd/source/ui/framework/factories/Pane.cxx18
-rw-r--r--sd/source/ui/framework/factories/PresentationFactory.cxx4
-rw-r--r--sd/source/ui/framework/factories/ViewShellWrapper.cxx12
-rw-r--r--sd/source/ui/framework/module/CenterViewFocusModule.cxx20
-rw-r--r--sd/source/ui/framework/module/ResourceManager.cxx4
-rw-r--r--sd/source/ui/framework/module/ShellStackGuard.cxx20
-rw-r--r--sd/source/ui/framework/module/SlideSorterModule.cxx4
-rw-r--r--sd/source/ui/framework/module/ToolBarModule.cxx12
-rw-r--r--sd/source/ui/framework/module/ViewTabBarModule.cxx6
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx26
-rw-r--r--sd/source/ui/func/fuarea.cxx4
-rw-r--r--sd/source/ui/func/fubullet.cxx20
-rw-r--r--sd/source/ui/func/fuchar.cxx2
-rw-r--r--sd/source/ui/func/fucon3d.cxx4
-rw-r--r--sd/source/ui/func/fuconarc.cxx2
-rw-r--r--sd/source/ui/func/fuconbez.cxx6
-rw-r--r--sd/source/ui/func/fuconcs.cxx2
-rw-r--r--sd/source/ui/func/fuconnct.cxx2
-rw-r--r--sd/source/ui/func/fuconrec.cxx2
-rw-r--r--sd/source/ui/func/fuconstr.cxx4
-rw-r--r--sd/source/ui/func/fuconuno.cxx2
-rw-r--r--sd/source/ui/func/fucopy.cxx8
-rw-r--r--sd/source/ui/func/fucushow.cxx2
-rw-r--r--sd/source/ui/func/fudraw.cxx20
-rw-r--r--sd/source/ui/func/fudspord.cxx10
-rw-r--r--sd/source/ui/func/fuediglu.cxx4
-rw-r--r--sd/source/ui/func/fuexpand.cxx4
-rw-r--r--sd/source/ui/func/fuformatpaintbrush.cxx18
-rw-r--r--sd/source/ui/func/fuhhconv.cxx16
-rw-r--r--sd/source/ui/func/fuinsert.cxx6
-rw-r--r--sd/source/ui/func/fuinsfil.cxx26
-rw-r--r--sd/source/ui/func/fuline.cxx4
-rw-r--r--sd/source/ui/func/fulinend.cxx4
-rw-r--r--sd/source/ui/func/fumeasur.cxx2
-rw-r--r--sd/source/ui/func/fumorph.cxx6
-rw-r--r--sd/source/ui/func/fuoaprms.cxx8
-rw-r--r--sd/source/ui/func/fuolbull.cxx20
-rw-r--r--sd/source/ui/func/fupage.cxx16
-rw-r--r--sd/source/ui/func/fuparagr.cxx4
-rw-r--r--sd/source/ui/func/fupoor.cxx26
-rw-r--r--sd/source/ui/func/fuprlout.cxx2
-rw-r--r--sd/source/ui/func/fuprobjs.cxx4
-rw-r--r--sd/source/ui/func/fuscale.cxx2
-rw-r--r--sd/source/ui/func/fusearch.cxx10
-rw-r--r--sd/source/ui/func/fusel.cxx36
-rw-r--r--sd/source/ui/func/fusldlg.cxx4
-rw-r--r--sd/source/ui/func/fusnapln.cxx10
-rw-r--r--sd/source/ui/func/fusumry.cxx6
-rw-r--r--sd/source/ui/func/futempl.cxx12
-rw-r--r--sd/source/ui/func/futext.cxx28
-rw-r--r--sd/source/ui/func/futhes.cxx2
-rw-r--r--sd/source/ui/func/futransf.cxx4
-rw-r--r--sd/source/ui/func/futxtatt.cxx2
-rw-r--r--sd/source/ui/func/fuvect.cxx2
-rw-r--r--sd/source/ui/func/unoaprms.cxx2
-rw-r--r--sd/source/ui/inc/ClientView.hxx2
-rw-r--r--sd/source/ui/inc/DrawDocShell.hxx2
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx2
-rw-r--r--sd/source/ui/inc/EventMultiplexer.hxx2
-rw-r--r--sd/source/ui/inc/FrameView.hxx2
-rw-r--r--sd/source/ui/inc/GraphicViewShell.hxx2
-rw-r--r--sd/source/ui/inc/OutlineView.hxx4
-rw-r--r--sd/source/ui/inc/OutlineViewShell.hxx2
-rw-r--r--sd/source/ui/inc/OutlinerIteratorImpl.hxx2
-rw-r--r--sd/source/ui/inc/PresentationViewShell.hxx2
-rw-r--r--sd/source/ui/inc/PreviewRenderer.hxx2
-rw-r--r--sd/source/ui/inc/ShellFactory.hxx2
-rw-r--r--sd/source/ui/inc/SlideSorterViewShell.hxx4
-rw-r--r--sd/source/ui/inc/View.hxx20
-rw-r--r--sd/source/ui/inc/WindowUpdater.hxx2
-rw-r--r--sd/source/ui/inc/drawview.hxx2
-rw-r--r--sd/source/ui/inc/fudraw.hxx2
-rw-r--r--sd/source/ui/inc/fuediglu.hxx2
-rw-r--r--sd/source/ui/inc/fusel.hxx2
-rw-r--r--sd/source/ui/inc/navigatr.hxx4
-rw-r--r--sd/source/ui/inc/optsitem.hxx22
-rw-r--r--sd/source/ui/inc/sdtreelb.hxx4
-rw-r--r--sd/source/ui/inc/slideshow.hxx4
-rw-r--r--sd/source/ui/inc/tools/IdleDetection.hxx2
-rw-r--r--sd/source/ui/inc/unoaprms.hxx4
-rw-r--r--sd/source/ui/inc/unopage.hxx2
-rw-r--r--sd/source/ui/presenter/CanvasUpdateRequester.cxx8
-rw-r--r--sd/source/ui/presenter/PresenterCanvas.cxx28
-rw-r--r--sd/source/ui/presenter/PresenterHelper.cxx26
-rw-r--r--sd/source/ui/presenter/PresenterPreviewCache.cxx20
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx48
-rw-r--r--sd/source/ui/presenter/SlideRenderer.cxx6
-rw-r--r--sd/source/ui/remotecontrol/AvahiNetworkService.cxx16
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx56
-rw-r--r--sd/source/ui/remotecontrol/Communicator.cxx10
-rw-r--r--sd/source/ui/remotecontrol/DiscoveryService.cxx4
-rw-r--r--sd/source/ui/remotecontrol/ImagePreparer.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Listener.cxx6
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx12
-rw-r--r--sd/source/ui/sidebar/AllMasterPagesSelector.cxx4
-rw-r--r--sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx20
-rw-r--r--sd/source/ui/sidebar/DocumentHelper.cxx84
-rw-r--r--sd/source/ui/sidebar/LayoutMenu.cxx48
-rw-r--r--sd/source/ui/sidebar/MasterPageContainer.cxx2
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerFiller.cxx10
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerProviders.cxx32
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerQueue.cxx10
-rw-r--r--sd/source/ui/sidebar/MasterPageDescriptor.cxx36
-rw-r--r--sd/source/ui/sidebar/MasterPageObserver.cxx12
-rw-r--r--sd/source/ui/sidebar/MasterPagesSelector.cxx38
-rw-r--r--sd/source/ui/sidebar/PanelBase.cxx4
-rw-r--r--sd/source/ui/sidebar/PanelFactory.cxx8
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx6
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx6
-rw-r--r--sd/source/ui/slideshow/PaneHider.cxx4
-rw-r--r--sd/source/ui/slideshow/SlideShowRestarter.cxx12
-rw-r--r--sd/source/ui/slideshow/showwin.cxx4
-rw-r--r--sd/source/ui/slideshow/showwindow.hxx2
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx56
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx48
-rw-r--r--sd/source/ui/slideshow/slideshowviewimpl.cxx10
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx12
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx2
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx2
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx6
-rw-r--r--sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx26
-rw-r--r--sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx14
-rw-r--r--sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx12
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx4
-rw-r--r--sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx4
-rw-r--r--sd/source/ui/slidesorter/controller/SlideSorterController.cxx72
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx62
-rw-r--r--sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx28
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx10
-rw-r--r--sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsFocusManager.cxx8
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx38
-rw-r--r--sd/source/ui/slidesorter/controller/SlsPageSelector.cxx20
-rw-r--r--sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx30
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx88
-rw-r--r--sd/source/ui/slidesorter/controller/SlsTransferableData.cxx6
-rw-r--r--sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx12
-rw-r--r--sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx2
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx36
-rw-r--r--sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx20
-rw-r--r--sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx2
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorter.cxx36
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterService.cxx66
-rw-r--r--sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx100
-rw-r--r--sd/source/ui/slidesorter/view/SlideSorterView.cxx18
-rw-r--r--sd/source/ui/slidesorter/view/SlsFontProvider.cxx10
-rw-r--r--sd/source/ui/slidesorter/view/SlsFramePainter.cxx2
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx6
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx14
-rw-r--r--sd/source/ui/slidesorter/view/SlsToolTip.cxx6
-rw-r--r--sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx6
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx6
-rw-r--r--sd/source/ui/table/tablefunction.cxx4
-rw-r--r--sd/source/ui/table/tableobjectbar.cxx4
-rw-r--r--sd/source/ui/tools/EventMultiplexer.cxx22
-rw-r--r--sd/source/ui/tools/IconCache.cxx8
-rw-r--r--sd/source/ui/tools/IdleDetection.cxx6
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx36
-rw-r--r--sd/source/ui/tools/PropertySet.cxx2
-rw-r--r--sd/source/ui/tools/SdGlobalResourceContainer.cxx8
-rw-r--r--sd/source/ui/tools/SlotStateListener.cxx4
-rw-r--r--sd/source/ui/tools/TimerBasedTaskExecution.cxx4
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx30
-rw-r--r--sd/source/ui/unoidl/SdUnoDrawView.cxx34
-rw-r--r--sd/source/ui/unoidl/SdUnoOutlineView.cxx8
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx10
-rw-r--r--sd/source/ui/unoidl/facreg.cxx6
-rw-r--r--sd/source/ui/unoidl/unocpres.cxx26
-rw-r--r--sd/source/ui/unoidl/unocpres.hxx2
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx54
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx172
-rw-r--r--sd/source/ui/unoidl/unoobj.cxx76
-rw-r--r--sd/source/ui/unoidl/unopage.cxx60
-rw-r--r--sd/source/ui/unoidl/unopback.cxx20
-rw-r--r--sd/source/ui/unoidl/unopback.hxx2
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx34
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx60
-rw-r--r--sd/source/ui/view/FormShellManager.cxx50
-rw-r--r--sd/source/ui/view/GraphicObjectBar.cxx2
-rw-r--r--sd/source/ui/view/MediaObjectBar.cxx4
-rw-r--r--sd/source/ui/view/Outliner.cxx188
-rw-r--r--sd/source/ui/view/OutlinerIterator.cxx70
-rw-r--r--sd/source/ui/view/ToolBarManager.cxx82
-rw-r--r--sd/source/ui/view/ViewClipboard.cxx28
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx108
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx18
-rw-r--r--sd/source/ui/view/ViewShellManager.cxx100
-rw-r--r--sd/source/ui/view/ViewTabBar.cxx40
-rw-r--r--sd/source/ui/view/WindowUpdater.cxx14
-rw-r--r--sd/source/ui/view/drawview.cxx10
-rw-r--r--sd/source/ui/view/drbezob.cxx14
-rw-r--r--sd/source/ui/view/drtxtob.cxx6
-rw-r--r--sd/source/ui/view/drtxtob1.cxx12
-rw-r--r--sd/source/ui/view/drviews1.cxx36
-rw-r--r--sd/source/ui/view/drviews2.cxx68
-rw-r--r--sd/source/ui/view/drviews3.cxx8
-rw-r--r--sd/source/ui/view/drviews4.cxx46
-rw-r--r--sd/source/ui/view/drviews5.cxx12
-rw-r--r--sd/source/ui/view/drviews6.cxx16
-rw-r--r--sd/source/ui/view/drviews7.cxx36
-rw-r--r--sd/source/ui/view/drviews8.cxx4
-rw-r--r--sd/source/ui/view/drviews9.cxx4
-rw-r--r--sd/source/ui/view/drviewsa.cxx20
-rw-r--r--sd/source/ui/view/drviewsb.cxx6
-rw-r--r--sd/source/ui/view/drviewsc.cxx4
-rw-r--r--sd/source/ui/view/drviewsd.cxx4
-rw-r--r--sd/source/ui/view/drviewse.cxx18
-rw-r--r--sd/source/ui/view/drviewsf.cxx14
-rw-r--r--sd/source/ui/view/drviewsg.cxx2
-rw-r--r--sd/source/ui/view/drviewsj.cxx8
-rw-r--r--sd/source/ui/view/frmview.cxx4
-rw-r--r--sd/source/ui/view/grviewsh.cxx2
-rw-r--r--sd/source/ui/view/outlnvs2.cxx30
-rw-r--r--sd/source/ui/view/outlnvsh.cxx46
-rw-r--r--sd/source/ui/view/outlview.cxx94
-rw-r--r--sd/source/ui/view/presvish.cxx6
-rw-r--r--sd/source/ui/view/sdruler.cxx2
-rw-r--r--sd/source/ui/view/sdview.cxx26
-rw-r--r--sd/source/ui/view/sdview2.cxx42
-rw-r--r--sd/source/ui/view/sdview3.cxx42
-rw-r--r--sd/source/ui/view/sdview4.cxx32
-rw-r--r--sd/source/ui/view/sdview5.cxx8
-rw-r--r--sd/source/ui/view/sdwindow.cxx22
-rw-r--r--sd/source/ui/view/tabcontr.cxx4
-rw-r--r--sd/source/ui/view/viewoverlaymanager.cxx24
-rw-r--r--sd/source/ui/view/viewshe2.cxx58
-rw-r--r--sd/source/ui/view/viewshe3.cxx20
-rw-r--r--sd/source/ui/view/viewshel.cxx150
364 files changed, 3509 insertions, 3509 deletions
diff --git a/sd/inc/CustomAnimationCloner.hxx b/sd/inc/CustomAnimationCloner.hxx
index 7127f372eccd..86b4e6b1fcd5 100644
--- a/sd/inc/CustomAnimationCloner.hxx
+++ b/sd/inc/CustomAnimationCloner.hxx
@@ -28,7 +28,7 @@ namespace sd
{
css::uno::Reference< css::animations::XAnimationNode > Clone(
const css::uno::Reference< css::animations::XAnimationNode >& xSourceNode,
- const SdPage* pSource = 0, const SdPage* pTarget = 0 );
+ const SdPage* pSource = nullptr, const SdPage* pTarget = nullptr );
}
#endif // INCLUDED_SD_INC_CUSTOMANIMATIONCLONER_HXX
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index ec54eabee35e..ddb9af04152e 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -372,7 +372,7 @@ private:
The return value specifies whether the search ended (</sal_True>) or
another call to this method is required (</sal_False>).
*/
- bool SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections = 0);
+ bool SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections = nullptr);
/** Detect changes of the document or view and react accordingly. Such
changes may occur because different calls to
diff --git a/sd/inc/customshowlist.hxx b/sd/inc/customshowlist.hxx
index 0fdd8c041cb8..1d30473e5050 100644
--- a/sd/inc/customshowlist.hxx
+++ b/sd/inc/customshowlist.hxx
@@ -53,14 +53,14 @@ public:
SdCustomShow* First()
{
if( mShows.empty() )
- return NULL;
+ return nullptr;
mnCurPos = 0;
return mShows[mnCurPos];
}
SdCustomShow* Next()
{
++mnCurPos;
- return mnCurPos >= mShows.size() ? NULL : mShows[mnCurPos];
+ return mnCurPos >= mShows.size() ? nullptr : mShows[mnCurPos];
}
void Last()
{
@@ -69,13 +69,13 @@ public:
}
SdCustomShow* GetCurObject()
{
- return mShows.empty() ? NULL : mShows[mnCurPos];
+ return mShows.empty() ? nullptr : mShows[mnCurPos];
}
SdCustomShow* Remove(SdCustomShow* p)
{
std::vector<SdCustomShow*>::iterator it = std::find(mShows.begin(), mShows.end(), p);
if( it == mShows.end() )
- return NULL;
+ return nullptr;
mShows.erase(it);
return p;
}
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 0b3c1e7b6de8..2d90bbe41179 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -244,7 +244,7 @@ public:
If a reference document is given, the sizes and border settings of that document are used
for newly created slides.
*/
- void CreateFirstPages( SdDrawDocument* pRefDocument = 0 );
+ void CreateFirstPages( SdDrawDocument* pRefDocument = nullptr );
bool CreateMissingNotesAndHandoutPages();
SAL_DLLPRIVATE void MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos) override;
@@ -255,7 +255,7 @@ public:
SAL_DLLPRIVATE virtual void InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos=0xFFFF) override;
SAL_DLLPRIVATE virtual SdrPage* RemoveMasterPage(sal_uInt16 nPgNum) override;
- SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages( SdPage* pMaster=NULL, bool bOnlyDuplicatePages=false, bool bUndo=true );
+ SAL_DLLPRIVATE void RemoveUnnecessaryMasterPages( SdPage* pMaster=nullptr, bool bOnlyDuplicatePages=false, bool bUndo=true );
void SetMasterPage(sal_uInt16 nSdPageNum, const OUString& rLayoutName,
SdDrawDocument* pSourceDoc, bool bMaster, bool bCheckMasters);
@@ -434,7 +434,7 @@ public:
SAL_DLLPRIVATE bool IsNewOrLoadCompleted() const {return mbNewOrLoadCompleted; }
SAL_DLLPRIVATE ::sd::FrameView* GetFrameView(sal_uLong nPos) {
- return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : NULL; }
+ return nPos < maFrameViewList.size() ? maFrameViewList[nPos] : nullptr; }
/** deprecated*/
SAL_DLLPRIVATE SdAnimationInfo* GetAnimationInfo(SdrObject* pObject) const;
diff --git a/sd/inc/pglink.hxx b/sd/inc/pglink.hxx
index 0d422752fe66..968799bdcbbd 100644
--- a/sd/inc/pglink.hxx
+++ b/sd/inc/pglink.hxx
@@ -35,7 +35,7 @@ public:
virtual void Closed() override;
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- bool Connect() { return 0 != SvBaseLink::GetRealObject(); }
+ bool Connect() { return nullptr != SvBaseLink::GetRealObject(); }
};
#endif // INCLUDED_SD_INC_PGLINK_HXX
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index c732d4a9aba7..99dab1b66594 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -177,7 +177,7 @@ public:
virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) = 0;
virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) = 0;
virtual AbstractMorphDlg* CreateMorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) = 0;
- virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
+ virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = nullptr ) = 0;
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr ) = 0;
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs,
const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) = 0;
diff --git a/sd/inc/sdattr.hxx b/sd/inc/sdattr.hxx
index 268db69c730b..e0611e50a06b 100644
--- a/sd/inc/sdattr.hxx
+++ b/sd/inc/sdattr.hxx
@@ -90,7 +90,7 @@ public:
DiaEffectItem( css::presentation::FadeEffect eFade = css::presentation::FadeEffect_NONE );
DiaEffectItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const override;
sal_uInt16 GetValueCount() const override { return FADE_EFFECT_COUNT; }
};
@@ -102,7 +102,7 @@ public:
DiaSpeedItem( FadeSpeed = FADE_SPEED_MEDIUM );
DiaSpeedItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const override;
sal_uInt16 GetValueCount() const override { return FADE_SPEED_COUNT; }
};
@@ -114,7 +114,7 @@ public:
DiaAutoItem( PresChange = PRESCHANGE_MANUAL );
DiaAutoItem( SvStream& rIn );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rIn, sal_uInt16 nVer ) const override;
sal_uInt16 GetValueCount() const override { return PRESCHANGE_COUNT; }
};
@@ -125,7 +125,7 @@ public:
TYPEINFO_OVERRIDE();
DiaTimeItem( sal_uInt32 nValue = 0L );
- virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
};
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 624c86dba1cf..f9fa1e569132 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -197,7 +197,7 @@ public:
SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit);
virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE,
- const SdrInsertReason* pReason=NULL) override;
+ const SdrInsertReason* pReason=nullptr) override;
virtual SdrObject* NbcRemoveObject(size_t nObjNum) override;
virtual SdrObject* RemoveObject(size_t nObjNum) override;
diff --git a/sd/inc/sdundo.hxx b/sd/inc/sdundo.hxx
index 7a983aa423bb..20da8b374a36 100644
--- a/sd/inc/sdundo.hxx
+++ b/sd/inc/sdundo.hxx
@@ -35,7 +35,7 @@ public:
void SetComment(const OUString& rStr) { maComment = rStr; }
virtual OUString GetComment() const override { return maComment; }
- virtual SdUndoAction* Clone() const { return NULL; }
+ virtual SdUndoAction* Clone() const { return nullptr; }
protected:
SdDrawDocument* mpDoc;
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 7b078aad1899..b0dcb74807a1 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -216,7 +216,7 @@ namespace {
template< typename ItemValue, typename ItemType >
void checkFontAttributes( const SdrTextObj* pObj, ItemValue nVal)
{
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
const EditTextObject& aEdit = pObj->GetOutlinerParaObject()->GetTextObject();
std::vector<EECharAttrib> rLst;
aEdit.GetCharAttribs(0, rLst);
@@ -238,9 +238,9 @@ void SdExportTest::testBnc870233_1()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// The problem was all shapes had the same font (the last parsed font attribues overwrote all previous ones)
@@ -267,9 +267,9 @@ void SdExportTest::testBnc870233_2()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// The problem was in some SmartArts font color was wrong
@@ -302,9 +302,9 @@ void SdExportTest::testN828390_4()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
std::vector<EECharAttrib> rLst;
SdrObject *pObj = pPage->GetObj(0);
@@ -340,9 +340,9 @@ void SdExportTest::testN828390_5()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
SdrObject *pObj = pPage->GetObj(0);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
@@ -362,9 +362,9 @@ void SdExportTest::testTransparentBackground()
xDocShRef = saveAndReload( xDocShRef, ODP );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
const SdrTextObj *pObj1 = dynamic_cast<SdrTextObj *>( pPage->GetObj( 0 ) );
checkFontAttributes<Color, SvxBackgroundColorItem>( pObj1, Color(COL_TRANSPARENT) );
@@ -382,14 +382,14 @@ void SdExportTest::testMediaEmbedding()
#endif
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
#if HAVE_FEATURE_GLTF
// First object is a glTF model
SdrMediaObj *pModelObj = dynamic_cast<SdrMediaObj*>( pPage->GetObj( 2 ));
- CPPUNIT_ASSERT_MESSAGE( "missing model", pModelObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "missing model", pModelObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Models/duck/duck.json" ), pModelObj->getMediaProperties().getURL());
CPPUNIT_ASSERT_EQUAL( OUString( "model/vnd.gltf+json" ), pModelObj->getMediaProperties().getMimeType());
#else
@@ -401,7 +401,7 @@ void SdExportTest::testMediaEmbedding()
// Second object is a sound
SdrMediaObj *pMediaObj = dynamic_cast<SdrMediaObj*>( pPage->GetObj( 3 ));
- CPPUNIT_ASSERT_MESSAGE( "missing media object", pMediaObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "missing media object", pMediaObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "vnd.sun.star.Package:Media/button-1.wav" ), pMediaObj->getMediaProperties().getURL());
CPPUNIT_ASSERT_EQUAL( OUString( "application/vnd.sun.star.media" ), pMediaObj->getMediaProperties().getMimeType());
@@ -429,24 +429,24 @@ void SdExportTest::testFdo71961()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// Export to .pptx changes all text frames to custom shape objects, which obey TextWordWrap property
// (which is false for text frames otherwise and is ignored). Check that frames that should wrap still do.
SdrObjCustomShape *pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 1 ));
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Text to be always wrapped" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL( true, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 2 ));
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Custom shape non-wrapped text" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL( false, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
pTxtObj = dynamic_cast<SdrObjCustomShape *>( pPage->GetObj( 3 ));
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT_EQUAL( OUString( "Custom shape wrapped text" ), pTxtObj->GetOutlinerParaObject()->GetTextObject().GetText(0));
CPPUNIT_ASSERT_EQUAL( true, (static_cast<const SdrOnOffItem&>(pTxtObj->GetMergedItem(SDRATTR_TEXT_WORDWRAP))).GetValue());
@@ -461,9 +461,9 @@ void SdExportTest::testN828390()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
std::vector<EECharAttrib> rLst;
// Get the object
@@ -496,19 +496,19 @@ void SdExportTest::testBnc880763()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// Check z-order of the two shapes, use background color to identify them
// First object in the background has blue background color
const SdrObject *pObj = dynamic_cast<SdrObject *>( pPage->GetObj( 0 ) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( sal_uInt32(0x0000ff),(static_cast< const XColorItem& >(pObj->GetMergedItem(XATTR_FILLCOLOR))).GetColorValue().GetColor());
// Second object at the front has green background color
pObj = dynamic_cast<SdrObject *>( pPage->GetObj( 1 ) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( sal_uInt32(0x00ff00),(static_cast< const XColorItem& >(pObj->GetMergedItem(XATTR_FILLCOLOR))).GetColorValue().GetColor());
xDocShRef->DoClose();
@@ -520,13 +520,13 @@ void SdExportTest::testBnc862510_5()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// Same as testBnc870237, but here we check the horizontal spacing
const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj( 1 ) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue());
CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue());
CPPUNIT_ASSERT_EQUAL( sal_Int32(7510), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue());
@@ -578,12 +578,12 @@ void SdExportTest::testFdo90607()
uno::Reference< drawing::XDrawPage > xPage(
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(1) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
OutlinerParaObject* pOutlinerParagraphObject = pTxtObj->GetOutlinerParaObject();
const sal_Int16 nDepth = pOutlinerParagraphObject->GetDepth(0);
CPPUNIT_ASSERT_MESSAGE("not equal", nDepth != -1);
@@ -596,7 +596,7 @@ void SdExportTest::testFdo83751()
xDocShRef = saveAndReload( xDocShRef, PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY );
uno::Reference<document::XDocumentProperties> xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY );
@@ -743,11 +743,11 @@ void SdExportTest::testLinkedGraphicRT()
// Check whether graphic imported well after export
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pPage != nullptr );
SdrGrafObj* pObject = dynamic_cast<SdrGrafObj*>(pPage->GetObj(2));
- CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != NULL );
+ CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject != nullptr );
CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), pObject->IsLinkedGraphic() );
const GraphicObject& rGraphicObj = pObject->GetGraphicObject(true);
@@ -861,9 +861,9 @@ void SdExportTest::testTableCellFillProperties()
xDocShRef = loadURL(aTempFile.GetURL(), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
@@ -901,12 +901,12 @@ void SdExportTest::testBulletStartNumber()
uno::Reference< drawing::XDrawPage > xPage(
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
CPPUNIT_ASSERT(pNumFmt);
@@ -1022,13 +1022,13 @@ void SdExportTest::testBulletColor()
uno::Reference< drawing::XDrawPage > xPage(
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
@@ -1120,7 +1120,7 @@ void SdExportTest::testTdf91378()
for( sal_uInt32 i=0;i<2;i++)
{
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference<document::XDocumentPropertiesSupplier> xDocumentPropertiesSupplier( xDocShRef->GetModel(), uno::UNO_QUERY );
uno::Reference<document::XDocumentProperties> xProps( xDocumentPropertiesSupplier->getDocumentProperties(), uno::UNO_QUERY );
uno::Reference<beans::XPropertySet> xUDProps( xProps->getUserDefinedProperties(), uno::UNO_QUERY );
@@ -1143,12 +1143,12 @@ void SdExportTest::testBnc822341()
// Export an LO specific ole object (imported from an ODP document)
{
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() );
}
@@ -1157,12 +1157,12 @@ void SdExportTest::testBnc822341()
// Export an MS specific ole object (imported from a PPTX document)
{
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
const SdrObject* pObj = dynamic_cast<SdrObject*>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( static_cast<sal_uInt16>(OBJ_OLE2), pObj->GetObjIdentifier() );
}
@@ -1182,13 +1182,13 @@ void SdExportTest::testBulletMarginAndIndentation()
uno::Reference< drawing::XDrawPage > xPage(
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET));
@@ -1246,10 +1246,10 @@ void SdExportTest::testCellLeftAndRightMargin()
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
@@ -1283,10 +1283,10 @@ void SdExportTest::testTableCellBorder()
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9376286f67bd..e1e7262e9537 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -220,14 +220,14 @@ void SdImportTest::testSmoketest()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/smoketest.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
// cf. SdrModel svx/svdmodel.hxx ...
CPPUNIT_ASSERT_MESSAGE( "wrong page count", pDoc->GetPageCount() == 3);
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
const size_t nObjs = pPage->GetObjCount();
for (size_t i = 0; i < nObjs; i++)
@@ -248,9 +248,9 @@ void SdImportTest::testN759180()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/n759180.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
//sal_uIntPtr nObjs = pPage->GetObjCount();
//for (sal_uIntPtr i = 0; i < nObjs; i++)
@@ -286,9 +286,9 @@ void SdImportTest::testN862510_1()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_1.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
std::vector<EECharAttrib> rLst;
SdrObject *pObj = pPage->GetObj( 0 );
@@ -311,9 +311,9 @@ void SdImportTest::testN862510_2()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_2.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
SdrObjGroup *pGrpObj = dynamic_cast<SdrObjGroup *>( pPage->GetObj( 0 ) );
CPPUNIT_ASSERT( pGrpObj );
@@ -330,9 +330,9 @@ void SdImportTest::testN862510_4()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n862510_4.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage( 1 );
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
std::vector<EECharAttrib> rLst;
SdrObject *pObj = pPage->GetObj( 0 );
@@ -355,9 +355,9 @@ void SdImportTest::testN828390_2()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n828390_2.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrObject *pObj = pPage->GetObj(0);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
@@ -375,9 +375,9 @@ void SdImportTest::testN828390_3()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n828390_3.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrObject *pObj = pPage->GetObj(0);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
@@ -407,9 +407,9 @@ void SdImportTest::testMasterPageStyleParent()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/odp/masterpage_style_parent.odp"), ODP );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdStyleSheetPool *const pPool(pDoc->GetSdStyleSheetPool());
@@ -502,14 +502,14 @@ void SdImportTest::testN778859()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/n778859.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
// Get the object
SdrObject *pObj = pPage->GetObj(1);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
CPPUNIT_ASSERT(!pTxtObj->IsAutoFit());
}
@@ -521,14 +521,14 @@ void SdImportTest::testFdo68594()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/ppt/fdo68594.ppt"), PPT);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = &(pDoc->GetPage (1)->TRG_GetMasterPage());
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrObject *pObj = pPage->GetObj(1);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const SvxColorItem *pC = dynamic_cast<const SvxColorItem *>(&pTxtObj->GetMergedItem(EE_CHAR_COLOR));
- CPPUNIT_ASSERT_MESSAGE( "no color item", pC != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no color item", pC != nullptr);
// Color should be black
CPPUNIT_ASSERT_MESSAGE( "Placeholder color mismatch", pC->GetValue().GetColor() == 0);
@@ -540,9 +540,9 @@ void SdImportTest::testFdo72998()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/cshapes.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
SdrObjCustomShape *pObj = dynamic_cast<SdrObjCustomShape *>(pPage->GetObj(2));
CPPUNIT_ASSERT( pObj );
@@ -570,9 +570,9 @@ void SdImportTest::testFdo77027()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/odp/fdo77027.odp"), ODP);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
{
SdrOle2Obj *const pObj = dynamic_cast<SdrOle2Obj*>(pPage->GetObj(0));
CPPUNIT_ASSERT(pObj);
@@ -639,7 +639,7 @@ void SdImportTest::testFdo71075()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/fdo71075.odp"), ODP);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW );
@@ -681,7 +681,7 @@ void SdImportTest::testStrictOOXML()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/strict_ooxml.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XShape > xShape(xPage->getByIndex(0), uno::UNO_QUERY_THROW );
@@ -695,13 +695,13 @@ void SdImportTest::testBnc870237()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc870237.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage (1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// Simulate a:ext inside dsp:txXfrm with changing the lower distance
const SdrObjGroup* pObj = dynamic_cast<SdrObjGroup*>( pPage->GetObj( 0 ) );
- CPPUNIT_ASSERT_MESSAGE( "no object", pObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no object", pObj != nullptr);
CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST))).GetValue());
CPPUNIT_ASSERT_EQUAL( sal_Int32(9919), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST))).GetValue());
CPPUNIT_ASSERT_EQUAL( sal_Int32(0), (static_cast< const SdrMetricItem& >(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST))).GetValue());
@@ -717,7 +717,7 @@ void SdImportTest::testCreationDate()
uno::Reference<document::XDocumentProperties> xDocumentProperties = xDocumentPropertiesSupplier->getDocumentProperties();
util::DateTime aDate = xDocumentProperties->getCreationDate();
OUStringBuffer aBuffer;
- sax::Converter::convertDateTime(aBuffer, aDate, 0);
+ sax::Converter::convertDateTime(aBuffer, aDate, nullptr);
// Metadata wasn't imported, this was 0000-00-00.
CPPUNIT_ASSERT_EQUAL(OUString("2013-11-09T10:37:56"), aBuffer.makeStringAndClear());
xDocShRef->DoClose();
@@ -730,9 +730,9 @@ void SdImportTest::testBnc887225()
// Make sure styles are set properly for individual cells.
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(2));
CPPUNIT_ASSERT( pTableObj );
@@ -781,9 +781,9 @@ void SdImportTest::testBnc480256()
// this unit test to fail. In that case, feel free to change the numbers.
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj;
uno::Reference< table::XCellRange > xTable;
@@ -835,12 +835,12 @@ void SdImportTest::testBnc584721_1()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = &(pDoc->GetPage (1)->TRG_GetMasterPage());
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrObject *pObj = pPage->GetObj(0);
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master title style"), aEdit.GetText(0));
xDocShRef->DoClose();
@@ -853,9 +853,9 @@ void SdImportTest::testBnc584721_2()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_1_2.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = &(pDoc->GetPage(1)->TRG_GetMasterPage());
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
CPPUNIT_ASSERT_EQUAL(size_t(1), pPage->GetObjCount());
xDocShRef->DoClose();
@@ -869,11 +869,11 @@ void SdImportTest::testBnc584721_3()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_3.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = &(pDoc->GetPage(1)->TRG_GetMasterPage());
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(1) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
// Check the shape type
uno::Reference< drawing::XShape > xShape( pTxtObj->getUnoShape(), uno::UNO_QUERY );
@@ -969,9 +969,9 @@ void SdImportTest::testBnc904423()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/pptx/bnc904423.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// First shape's background color is defined on master slide
{
@@ -1022,9 +1022,9 @@ void SdImportTest::testShapeLineStyle()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("sd/qa/unit/data/pptx/ShapeLineProperties.pptx"), PPTX);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
// First shape's line style is defined on master slide
{
@@ -1159,7 +1159,7 @@ void SdImportTest::testPDFImport()
{
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pdf/txtpic.pdf"), PDF);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
CPPUNIT_ASSERT_MESSAGE( "no exactly two shapes", xPage->getCount() == 2 );
@@ -1179,7 +1179,7 @@ void SdImportTest::testPDFImportSkipImages()
sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pdf/txtpic.pdf"), PDF, pParams);
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
uno::Reference< drawing::XDrawPagesSupplier > xDoc(xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW );
uno::Reference< drawing::XDrawPage > xPage(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
CPPUNIT_ASSERT_MESSAGE( "no exactly one shape", xPage->getCount() == 1 );
@@ -1204,13 +1204,13 @@ void SdImportTest::testBulletSuffix()
uno::Reference< drawing::XDrawPage > xPage(
xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
// check suffix of the char bullet
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pPage->GetObj(0) );
- CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != nullptr);
const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
const SvxNumBulletItem *pNumFmt = dynamic_cast<const SvxNumBulletItem *>(aEdit.GetParaAttribs(1).GetItem(EE_PARA_NUMBULLET));
CPPUNIT_ASSERT(pNumFmt);
@@ -1224,9 +1224,9 @@ void SdImportTest::testBnc910045()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/bnc910045.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
@@ -1244,10 +1244,10 @@ void SdImportTest::testRowHeight()
sd::DrawDocShellRef xDocShRef = loadURL( getURLFromSrc("/sd/qa/unit/data/pptx/n80340.pptx"), PPTX );
SdDrawDocument *pDoc = xDocShRef->GetDoc();
- CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != nullptr );
const SdrPage *pPage = pDoc->GetPage(1);
- CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != nullptr );
sdr::table::SdrTableObj *pTableObj = dynamic_cast<sdr::table::SdrTableObj*>(pPage->GetObj(0));
CPPUNIT_ASSERT( pTableObj );
diff --git a/sd/qa/unit/sdmodeltestbase.hxx b/sd/qa/unit/sdmodeltestbase.hxx
index 416b4261b91b..3bcd261f9c2f 100644
--- a/sd/qa/unit/sdmodeltestbase.hxx
+++ b/sd/qa/unit/sdmodeltestbase.hxx
@@ -66,7 +66,7 @@ FileFormat aFileFormats[] =
{ "html", "graphic_HTML", "graphic_HTML", "", HTML_FORMAT_TYPE },
{ "pdf", "draw_pdf_import", "pdf_Portable_Document_Format", "", PDF_FORMAT_TYPE },
{ "fodg", "OpenDocument Drawing Flat XML", "Flat XML ODF Drawing", "", FODG_FORMAT_TYPE },
- { 0, 0, 0, 0, SfxFilterFlags::NONE }
+ { nullptr, nullptr, nullptr, nullptr, SfxFilterFlags::NONE }
};
#define ODP 0
@@ -104,10 +104,10 @@ public:
protected:
/// Load the document.
- sd::DrawDocShellRef loadURL( const OUString &rURL, sal_Int32 nFormat, SfxAllItemSet *pParams = 0 )
+ sd::DrawDocShellRef loadURL( const OUString &rURL, sal_Int32 nFormat, SfxAllItemSet *pParams = nullptr )
{
FileFormat *pFmt = getFormat(nFormat);
- CPPUNIT_ASSERT_MESSAGE( "missing filter info", pFmt->pName != NULL );
+ CPPUNIT_ASSERT_MESSAGE( "missing filter info", pFmt->pName != nullptr );
SotClipboardFormatId nOptions = SotClipboardFormatId::NONE;
if (pFmt->nFormatType != SfxFilterFlags::NONE)
diff --git a/sd/qa/unit/uimpress.cxx b/sd/qa/unit/uimpress.cxx
index 37ab096b81c2..af06d8cb1367 100644
--- a/sd/qa/unit/uimpress.cxx
+++ b/sd/qa/unit/uimpress.cxx
@@ -49,7 +49,7 @@ private:
};
Test::Test()
- : m_pDoc(0)
+ : m_pDoc(nullptr)
{
m_xContext = cppu::defaultBootstrap_InitialComponentContext();
@@ -68,7 +68,7 @@ Test::Test()
void Test::setUp()
{
- m_pDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, NULL);
+ m_pDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, nullptr);
}
void Test::tearDown()
diff --git a/sd/source/core/CustomAnimationCloner.cxx b/sd/source/core/CustomAnimationCloner.cxx
index 855a9f76cb84..79a1636fae12 100644
--- a/sd/source/core/CustomAnimationCloner.cxx
+++ b/sd/source/core/CustomAnimationCloner.cxx
@@ -61,7 +61,7 @@ namespace sd
{
public:
CustomAnimationClonerImpl();
- Reference< XAnimationNode > Clone( const Reference< XAnimationNode >& xSourceNode, const SdPage* pSource = 0, const SdPage* pTarget = 0 );
+ Reference< XAnimationNode > Clone( const Reference< XAnimationNode >& xSourceNode, const SdPage* pSource = nullptr, const SdPage* pTarget = nullptr );
private:
void transformNode( const Reference< XAnimationNode >& xNode );
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 650ecc51851e..103157efaaf0 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -108,7 +108,7 @@ public:
explicit MainSequenceChangeGuard( EffectSequenceHelper* pSequence )
{
mpMainSequence = dynamic_cast< MainSequence* >( pSequence );
- if( mpMainSequence == 0 )
+ if( mpMainSequence == nullptr )
{
InteractiveSequence* pI = dynamic_cast< InteractiveSequence* >( pSequence );
if( pI )
@@ -146,7 +146,7 @@ CustomAnimationEffect::CustomAnimationEffect( const css::uno::Reference< css::an
mbAutoReverse(false),
mnTargetSubItem(0),
mnCommand(0),
- mpEffectSequence( 0 ),
+ mpEffectSequence( nullptr ),
mbHasAfterEffect(false),
mbAfterEffectOnNextEffect(false)
{
@@ -1604,7 +1604,7 @@ SdrPathObj* CustomAnimationEffect::createSdrPathObjFromPath()
void CustomAnimationEffect::updateSdrPathObjFromPath( SdrPathObj& rPathObj )
{
::basegfx::B2DPolyPolygon xPolyPoly;
- if( ::basegfx::tools::importFromSvgD( xPolyPoly, getPath(), true, 0 ) )
+ if( ::basegfx::tools::importFromSvgD( xPolyPoly, getPath(), true, nullptr ) )
{
SdrObject* pObj = GetSdrObjectFromXShape( getTargetShape() );
if( pObj )
@@ -1685,7 +1685,7 @@ void EffectSequenceHelper::reset()
if( aIter != aEnd )
{
CustomAnimationEffectPtr pEffect = (*aIter++);
- pEffect->setEffectSequence(0);
+ pEffect->setEffectSequence(nullptr);
}
maEffects.clear();
}
@@ -1851,7 +1851,7 @@ void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect )
{
if( pEffect.get() )
{
- pEffect->setEffectSequence( 0 );
+ pEffect->setEffectSequence( nullptr );
maEffects.remove( pEffect );
}
@@ -2186,7 +2186,7 @@ bool EffectSequenceHelper::disposeShape( const Reference< XShape >& xShape )
{
if( (*aIter)->getTargetShape() == xShape )
{
- (*aIter)->setEffectSequence( 0 );
+ (*aIter)->setEffectSequence( nullptr );
bChanges = true;
aIter = maEffects.erase( aIter );
}
@@ -2253,7 +2253,7 @@ void EffectSequenceHelper::disposeTextRange( const css::uno::Any& aTarget )
if( aIterParaTarget.Paragraph == aParaTarget.Paragraph )
{
// delete this effect if it targets the disposed paragraph directly
- (*aIter)->setEffectSequence( 0 );
+ (*aIter)->setEffectSequence( nullptr );
aIter = maEffects.erase( aIter );
bChanges = true;
bErased = true;
@@ -3166,10 +3166,10 @@ CustomAnimationEffectPtr MainSequence::findEffect( const css::uno::Reference< cs
{
CustomAnimationEffectPtr pEffect = EffectSequenceHelper::findEffect( xNode );
- if( pEffect.get() == 0 )
+ if( pEffect.get() == nullptr )
{
InteractiveSequenceList::const_iterator aIter;
- for( aIter = maInteractiveSequenceList.begin(); (aIter != maInteractiveSequenceList.end()) && (pEffect.get() == 0); ++aIter )
+ for( aIter = maInteractiveSequenceList.begin(); (aIter != maInteractiveSequenceList.end()) && (pEffect.get() == nullptr); ++aIter )
{
pEffect = (*aIter)->findEffect( xNode );
}
@@ -3374,7 +3374,7 @@ bool MainSequence::setTrigger( const CustomAnimationEffectPtr& pEffect, const cs
{
EffectSequenceHelper* pOldSequence = pEffect->getEffectSequence();
- EffectSequenceHelper* pNewSequence = 0;
+ EffectSequenceHelper* pNewSequence = nullptr;
if( xTriggerShape.is() )
{
InteractiveSequenceList::iterator aIter( maInteractiveSequenceList.begin() );
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index f4da98ca9c69..024684e24fd2 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -541,7 +541,7 @@ void CustomAnimationPresets::changePresetSubType( CustomAnimationEffectPtr pEffe
}
}
-CustomAnimationPresets* CustomAnimationPresets::mpCustomAnimationPresets = 0;
+CustomAnimationPresets* CustomAnimationPresets::mpCustomAnimationPresets = nullptr;
const CustomAnimationPresets& CustomAnimationPresets::getCustomAnimationPresets()
{
@@ -563,7 +563,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
{
Reference< XAnimationNode > xNode;
- const PresetCategoryList* pCategoryList = 0;
+ const PresetCategoryList* pCategoryList = nullptr;
switch( nPresetClass )
{
case EffectPresetClass::ENTRANCE: pCategoryList = &maEntrancePresets; break;
@@ -571,7 +571,7 @@ Reference< XAnimationNode > CustomAnimationPresets::getRandomPreset( sal_Int16 n
case EffectPresetClass::EMPHASIS: pCategoryList = &maEmphasisPresets; break;
case EffectPresetClass::MOTIONPATH: pCategoryList = &maMotionPathsPresets; break;
default:
- pCategoryList = 0;
+ pCategoryList = nullptr;
}
if( pCategoryList && pCategoryList->size() )
diff --git a/sd/source/core/EffectMigration.cxx b/sd/source/core/EffectMigration.cxx
index 668aef1d5279..7b1ab2efce31 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -152,7 +152,7 @@ deprecated_FadeEffect_conversion_table[] =
{ FadeEffect_DISSOLVE, "fade-smoothly" },
- { FadeEffect_NONE, 0 }
+ { FadeEffect_NONE, nullptr }
};
/* todo
@@ -229,7 +229,7 @@ struct deprecated_AnimationEffect_conversion_table_entry
deprecated_AnimationEffect_conversion_table[] =
{
// OOo 1.x entrance effects
- { AnimationEffect_APPEAR, "ooo-entrance-appear",0 },
+ { AnimationEffect_APPEAR, "ooo-entrance-appear",nullptr },
{ AnimationEffect_FADE_TO_CENTER, "ooo-entrance-box","in" },
{ AnimationEffect_FADE_FROM_CENTER, "ooo-entrance-box","out" },
@@ -242,7 +242,7 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_FADE_FROM_LOWERLEFT, "ooo-entrance-diagonal-squares","right-to-top" },
{ AnimationEffect_FADE_FROM_LOWERRIGHT, "ooo-entrance-diagonal-squares","left-to-top" },
- { AnimationEffect_DISSOLVE, "ooo-entrance-dissolve-in",0 },
+ { AnimationEffect_DISSOLVE, "ooo-entrance-dissolve-in",nullptr },
{ AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-fly-in","from-left" },
{ AnimationEffect_MOVE_FROM_TOP, "ooo-entrance-fly-in","from-top" },
@@ -266,7 +266,7 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_VERTICAL_LINES, "ooo-entrance-random-bars","horizontal" },
{ AnimationEffect_HORIZONTAL_LINES, "ooo-entrance-random-bars","vertical" },
- { AnimationEffect_RANDOM, "ooo-entrance-random",0 },
+ { AnimationEffect_RANDOM, "ooo-entrance-random",nullptr },
{ AnimationEffect_CLOSE_VERTICAL, "ooo-entrance-split","horizontal-in" },
{ AnimationEffect_CLOSE_HORIZONTAL, "ooo-entrance-split","vertical-in" },
@@ -293,7 +293,7 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_STRETCH_FROM_BOTTOM, "ooo-entrance-stretchy","from-bottom" },
{ AnimationEffect_STRETCH_FROM_LOWERLEFT, "ooo-entrance-stretchy","from-bottom-left" },
- { AnimationEffect_HORIZONTAL_STRETCH, "ooo-entrance-expand", 0 },
+ { AnimationEffect_HORIZONTAL_STRETCH, "ooo-entrance-expand", nullptr },
{ AnimationEffect_CLOCKWISE, "ooo-entrance-wheel","1" },
{ AnimationEffect_COUNTERCLOCKWISE, "ooo-entrance-clock-wipe","counter-clockwise" },
@@ -309,7 +309,7 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_WAVYLINE_FROM_BOTTOM, "ooo-entrance-snake-wipe","from-bottom-right-horizontal" },
// ooo 1.x exit effects
- { AnimationEffect_HIDE, "ooo-exit-disappear",0 },
+ { AnimationEffect_HIDE, "ooo-exit-disappear",nullptr },
{ AnimationEffect_MOVE_TO_LEFT, "ooo-exit-fly-out", "from-right" },
{ AnimationEffect_MOVE_TO_TOP, "ooo-exit-fly-out", "from-bottom" },
{ AnimationEffect_MOVE_TO_RIGHT, "ooo-exit-fly-out", "from-left" },
@@ -349,30 +349,30 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_FADE_FROM_CENTER, "ooo-entrance-diamond", "out" },
{ AnimationEffect_FADE_TO_CENTER, "ooo-entrance-plus", "in" },
{ AnimationEffect_FADE_FROM_CENTER, "ooo-entrance-plus", "out" },
- { AnimationEffect_CLOCKWISE, "ooo-entrance-wedge", 0 },
+ { AnimationEffect_CLOCKWISE, "ooo-entrance-wedge", nullptr },
{ AnimationEffect_CLOCKWISE, "ooo-entrance-wheel", "2" },
{ AnimationEffect_CLOCKWISE, "ooo-entrance-wheel", "3" },
{ AnimationEffect_CLOCKWISE, "ooo-entrance-wheel", "4" },
{ AnimationEffect_CLOCKWISE, "ooo-entrance-wheel", "8" },
- { AnimationEffect_MOVE_FROM_RIGHT, "ooo-entrance-boomerang", 0 },
- { AnimationEffect_MOVE_FROM_UPPERRIGHT, "ooo-entrance-bounce", 0 },
- { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-curve-up", 0 },
- { AnimationEffect_MOVE_FROM_TOP, "ooo-entrance-float", 0 },
- { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-glide", 0 },
- { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-magnify", 0 },
- { AnimationEffect_HORIZONTAL_ROTATE, "ooo-entrance-pinwheel", 0 },
- { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-breaks", 0 },
- { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-sling", 0 },
- { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-spiral-in", 0 },
- { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-thread", 0 },
- { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-ascend", 0 },
- { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-center-revolve", 0 },
- { AnimationEffect_APPEAR, "ooo-entrance-compress", 0 },
- { AnimationEffect_MOVE_SHORT_FROM_TOP, "ooo-entrance-descend", 0 },
- { AnimationEffect_MOVE_SHORT_FROM_LEFT, "ooo-entrance-ease-in", 0 },
- { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-rise-up", 0 },
- { AnimationEffect_HORIZONTAL_ROTATE, "ooo-entrance-spin-in", 0 },
+ { AnimationEffect_MOVE_FROM_RIGHT, "ooo-entrance-boomerang", nullptr },
+ { AnimationEffect_MOVE_FROM_UPPERRIGHT, "ooo-entrance-bounce", nullptr },
+ { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-curve-up", nullptr },
+ { AnimationEffect_MOVE_FROM_TOP, "ooo-entrance-float", nullptr },
+ { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-glide", nullptr },
+ { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-magnify", nullptr },
+ { AnimationEffect_HORIZONTAL_ROTATE, "ooo-entrance-pinwheel", nullptr },
+ { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-breaks", nullptr },
+ { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-sling", nullptr },
+ { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-spiral-in", nullptr },
+ { AnimationEffect_MOVE_FROM_LEFT, "ooo-entrance-thread", nullptr },
+ { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-ascend", nullptr },
+ { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-center-revolve", nullptr },
+ { AnimationEffect_APPEAR, "ooo-entrance-compress", nullptr },
+ { AnimationEffect_MOVE_SHORT_FROM_TOP, "ooo-entrance-descend", nullptr },
+ { AnimationEffect_MOVE_SHORT_FROM_LEFT, "ooo-entrance-ease-in", nullptr },
+ { AnimationEffect_MOVE_FROM_BOTTOM, "ooo-entrance-rise-up", nullptr },
+ { AnimationEffect_HORIZONTAL_ROTATE, "ooo-entrance-spin-in", nullptr },
{ AnimationEffect_STRETCH_FROM_LEFT, "ooo-entrance-stretchy", "across" },
{ AnimationEffect_STRETCH_FROM_TOP, "ooo-entrance-stretchy", "downward" },
@@ -383,14 +383,14 @@ deprecated_AnimationEffect_conversion_table[] =
{ AnimationEffect_FADE_TO_CENTER, "ooo-entrance-zoom","out-slightly" },
{ AnimationEffect_FADE_TO_CENTER, "ooo-entrance-zoom","out-from-screen-center" },
- { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in", 0 },
- { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in-and-zoom", 0 },
- { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in-and-swivel", 0 },
+ { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in", nullptr },
+ { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in-and-zoom", nullptr },
+ { AnimationEffect_DISSOLVE, "ooo-entrance-fade-in-and-swivel", nullptr },
// still open (no matching effect: AnimationEffect_ZOOM_IN_FROM_*,
// AnimationEffect_ZOOM_OUT_FROM_*, AnimationEffect_PATH
- { AnimationEffect_NONE, 0, 0 }
+ { AnimationEffect_NONE, nullptr, nullptr }
};
EffectSequence::iterator ImplFindEffect( MainSequencePtr& pMainSequence, const Reference< XShape >& rShape, sal_Int16 nSubItem )
@@ -491,7 +491,7 @@ void EffectMigration::SetAnimationEffect( SvxShape* pShape, AnimationEffect eEff
CustomAnimationEffectPtr pEffect( new CustomAnimationEffect( xNode ) );
pEffect->setTarget( makeAny( xShape ) );
SdPage* pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
- const bool bManual = (pPage == 0) || (pPage->GetPresChange() == PRESCHANGE_MANUAL);
+ const bool bManual = (pPage == nullptr) || (pPage->GetPresChange() == PRESCHANGE_MANUAL);
if( !bManual )
pEffect->setNodeType( EffectNodeType::AFTER_PREVIOUS );
@@ -569,7 +569,7 @@ AnimationEffect EffectMigration::GetAnimationEffect( SvxShape* pShape )
AnimationEffect eEffect = AnimationEffect_NONE;
if( !ConvertPreset( aPresetId, &aPresetSubType, eEffect ) )
- ConvertPreset( aPresetId, 0, eEffect );
+ ConvertPreset( aPresetId, nullptr, eEffect );
return eEffect;
}
@@ -598,7 +598,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
// ignore old text effects on shape without text
- if( (pTextObj == 0) || (!pTextObj->HasText()) )
+ if( (pTextObj == nullptr) || (!pTextObj->HasText()) )
return;
const CustomAnimationPresets& rPresets = CustomAnimationPresets::getCustomAnimationPresets();
@@ -626,7 +626,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
}
// if there is not yet a group, create it
- if( pGroup.get() == 0 )
+ if( pGroup.get() == nullptr )
{
CustomAnimationEffectPtr pShapeEffect;
@@ -665,7 +665,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
if( pShapeEffect.get() )
{
SdPage* pPage = dynamic_cast< SdPage* >( pObj->GetPage() );
- const bool bManual = (pPage == 0) || (pPage->GetPresChange() == PRESCHANGE_MANUAL);
+ const bool bManual = (pPage == nullptr) || (pPage->GetPresChange() == PRESCHANGE_MANUAL);
// now create effects for each paragraph
pGroup =
@@ -674,7 +674,7 @@ void EffectMigration::SetTextAnimationEffect( SvxShape* pShape, AnimationEffect
}
}
- if( pGroup.get() != 0 )
+ if( pGroup.get() != nullptr )
{
const bool bLaserEffect = (eEffect >= AnimationEffect_LASER_FROM_LEFT) && (eEffect <= AnimationEffect_LASER_FROM_LOWERRIGHT);
@@ -738,7 +738,7 @@ AnimationEffect EffectMigration::GetTextAnimationEffect( SvxShape* pShape )
AnimationEffect eEffect = AnimationEffect_NONE;
if( !ConvertPreset( aPresetId, &aPresetSubType, eEffect ) )
- ConvertPreset( aPresetId, 0, eEffect );
+ ConvertPreset( aPresetId, nullptr, eEffect );
return eEffect;
}
@@ -753,8 +753,8 @@ bool EffectMigration::ConvertPreset( const OUString& rPresetId, const OUString*
while( p->mpPresetId )
{
if( rPresetId.equalsAscii( p->mpPresetId ) &&
- (( p->mpPresetSubType == 0 ) ||
- ( pPresetSubType == 0) ||
+ (( p->mpPresetSubType == nullptr ) ||
+ ( pPresetSubType == nullptr) ||
( pPresetSubType->equalsAscii( p->mpPresetSubType )) ) )
{
rEffect = p->meEffect;
@@ -1401,7 +1401,7 @@ void EffectMigration::CreateAnimatedGroup(SdrObjGroup& rGroupObj, SdPage& rPage)
Reference< XTimeContainer > xParentContainer(xOuterSeqTimeContainer, UNO_QUERY_THROW);
// prepare loop over objects
- SdrObject* pNext = 0;
+ SdrObject* pNext = nullptr;
const double fDurationShow(0.2);
const double fDurationHide(0.001);
diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx
index f86b586248d9..a0c0771e8cda 100644
--- a/sd/source/core/PageListWatcher.cxx
+++ b/sd/source/core/PageListWatcher.cxx
@@ -28,7 +28,7 @@ void ImpPageListWatcher::ImpRecreateSortedPageListOnDemand()
// clear vectors
maPageVectorStandard.clear();
maPageVectorNotes.clear();
- mpHandoutPage = 0L;
+ mpHandoutPage = nullptr;
// build up vectors again
const sal_uInt32 nPageCount(ImpGetPageCount());
@@ -65,7 +65,7 @@ void ImpPageListWatcher::ImpRecreateSortedPageListOnDemand()
ImpPageListWatcher::ImpPageListWatcher(const SdrModel& rModel)
: mrModel(rModel)
- , mpHandoutPage(0L)
+ , mpHandoutPage(nullptr)
, mbPageListValid(false)
{
}
@@ -76,7 +76,7 @@ ImpPageListWatcher::~ImpPageListWatcher()
SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum)
{
- SdPage* pRetval(0L);
+ SdPage* pRetval(nullptr);
if(!mbPageListValid)
{
diff --git a/sd/source/core/anminfo.cxx b/sd/source/core/anminfo.cxx
index 8ac8418ea18d..c0794a104f7e 100644
--- a/sd/source/core/anminfo.cxx
+++ b/sd/source/core/anminfo.cxx
@@ -45,7 +45,7 @@ SdAnimationInfo::SdAnimationInfo(SdrObject& rObject)
mbDimHide (false),
mbSoundOn (false),
mbPlayFull (false),
- mpPathObj (NULL),
+ mpPathObj (nullptr),
meClickAction (presentation::ClickAction_NONE),
meSecondEffect (presentation::AnimationEffect_NONE),
meSecondSpeed (presentation::AnimationSpeed_SLOW),
@@ -74,7 +74,7 @@ SdAnimationInfo::SdAnimationInfo(const SdAnimationInfo& rAnmInfo, SdrObject& rOb
maSoundFile (rAnmInfo.maSoundFile),
mbSoundOn (rAnmInfo.mbSoundOn),
mbPlayFull (rAnmInfo.mbPlayFull),
- mpPathObj (NULL),
+ mpPathObj (nullptr),
meClickAction (rAnmInfo.meClickAction),
meSecondEffect (rAnmInfo.meSecondEffect),
meSecondSpeed (rAnmInfo.meSecondSpeed),
@@ -97,7 +97,7 @@ SdAnimationInfo::~SdAnimationInfo()
SdrObjUserData* SdAnimationInfo::Clone(SdrObject* pObject) const
{
DBG_ASSERT( pObject, "SdAnimationInfo::Clone(), pObject must not be null!" );
- if( pObject == 0 )
+ if( pObject == nullptr )
pObject = &mrObject;
return new SdAnimationInfo(*this, *pObject );
diff --git a/sd/source/core/annotations/Annotation.cxx b/sd/source/core/annotations/Annotation.cxx
index d789e6cdbc5a..ebc3a2d30025 100644
--- a/sd/source/core/annotations/Annotation.cxx
+++ b/sd/source/core/annotations/Annotation.cxx
@@ -58,7 +58,7 @@ public:
explicit Annotation( const Reference< XComponentContext >& context, SdPage* pPage );
SdPage* GetPage() const { return mpPage; }
- SdrModel* GetModel() { return (mpPage != 0) ? mpPage->GetModel() : 0; }
+ SdrModel* GetModel() { return (mpPage != nullptr) ? mpPage->GetModel() : nullptr; }
// XInterface:
virtual Any SAL_CALL queryInterface(Type const & type) throw (RuntimeException, std::exception) override;
@@ -179,7 +179,7 @@ Annotation::Annotation( const Reference< XComponentContext >& context, SdPage* p
// disposed, do it here.
void SAL_CALL Annotation::disposing()
{
- mpPage = 0;
+ mpPage = nullptr;
if( m_TextRange.is() )
{
m_TextRange->dispose();
@@ -249,7 +249,7 @@ RealPoint2D SAL_CALL Annotation::getPosition() throw (RuntimeException, std::exc
void SAL_CALL Annotation::setPosition(const RealPoint2D & the_value) throw (RuntimeException, std::exception)
{
- prepareSet("Position", Any(), Any(), 0);
+ prepareSet("Position", Any(), Any(), nullptr);
{
osl::MutexGuard g(m_aMutex);
createChangeUndo();
@@ -266,7 +266,7 @@ RealSize2D SAL_CALL Annotation::getSize() throw (RuntimeException, std::exceptio
void SAL_CALL Annotation::setSize(const RealSize2D & the_value) throw (RuntimeException, std::exception)
{
- prepareSet("Size", Any(), Any(), 0);
+ prepareSet("Size", Any(), Any(), nullptr);
{
osl::MutexGuard g(m_aMutex);
createChangeUndo();
@@ -282,7 +282,7 @@ OUString SAL_CALL Annotation::getAuthor() throw (RuntimeException, std::exceptio
void SAL_CALL Annotation::setAuthor(const OUString & the_value) throw (RuntimeException, std::exception)
{
- prepareSet("Author", Any(), Any(), 0);
+ prepareSet("Author", Any(), Any(), nullptr);
{
osl::MutexGuard g(m_aMutex);
createChangeUndo();
@@ -298,7 +298,7 @@ util::DateTime SAL_CALL Annotation::getDateTime() throw (RuntimeException, std::
void SAL_CALL Annotation::setDateTime(const util::DateTime & the_value) throw (RuntimeException, std::exception)
{
- prepareSet("DateTime", Any(), Any(), 0);
+ prepareSet("DateTime", Any(), Any(), nullptr);
{
osl::MutexGuard g(m_aMutex);
createChangeUndo();
@@ -323,7 +323,7 @@ void Annotation::createChangeUndo()
Reference< XText > SAL_CALL Annotation::getTextRange() throw (RuntimeException, std::exception)
{
osl::MutexGuard g(m_aMutex);
- if( !m_TextRange.is() && (mpPage != 0) )
+ if( !m_TextRange.is() && (mpPage != nullptr) )
{
m_TextRange = TextApiObject::create( static_cast< SdDrawDocument* >( mpPage->GetModel() ) );
}
@@ -339,7 +339,7 @@ SdrUndoAction* CreateUndoInsertOrRemoveAnnotation( const Reference< XAnnotation
}
else
{
- return 0;
+ return nullptr;
}
}
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 988b1f7210ea..914ae1cdc62b 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -113,7 +113,7 @@ using ::com::sun::star::beans::PropertyValue;
TYPEINIT1( SdDrawDocument, FmFormModel );
-SdDrawDocument* SdDrawDocument::pDocLockedInsertingLinks = NULL;
+SdDrawDocument* SdDrawDocument::pDocLockedInsertingLinks = nullptr;
PresentationSettings::PresentationSettings()
: mbAll( true ),
@@ -151,17 +151,17 @@ PresentationSettings::PresentationSettings( const PresentationSettings& r )
}
SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
-: FmFormModel( !utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetPalettePath() : OUString(), NULL, pDrDocSh )
+: FmFormModel( !utl::ConfigManager::IsAvoidConfig() ? SvtPathOptions().GetPalettePath() : OUString(), nullptr, pDrDocSh )
, bReadOnly(false)
-, mpOutliner(NULL)
-, mpInternalOutliner(NULL)
-, mpWorkStartupTimer(NULL)
-, mpOnlineSpellingIdle(NULL)
-, mpOnlineSpellingList(NULL)
-, mpOnlineSearchItem(NULL)
-, mpCustomShowList(NULL)
+, mpOutliner(nullptr)
+, mpInternalOutliner(nullptr)
+, mpWorkStartupTimer(nullptr)
+, mpOnlineSpellingIdle(nullptr)
+, mpOnlineSpellingList(nullptr)
+, mpOnlineSearchItem(nullptr)
+, mpCustomShowList(nullptr)
, mpDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh))
-, mpCreatingTransferable( NULL )
+, mpCreatingTransferable( nullptr )
, mbHasOnlineSpellErrors(false)
, mbInitialOnlineSpellingEnabled(true)
, mbNewOrLoadCompleted(false)
@@ -174,8 +174,8 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
, mePageNumType(SVX_ARABIC)
, mbAllocDocSh(false)
, meDocType(eType)
-, mpCharClass(NULL)
-, mpLocale(NULL)
+, mpCharClass(nullptr)
+, mpLocale(nullptr)
, mbUseEmbedFonts(false)
{
mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this));
@@ -382,12 +382,12 @@ SdDrawDocument::~SdDrawDocument()
mpWorkStartupTimer->Stop();
delete mpWorkStartupTimer;
- mpWorkStartupTimer = NULL;
+ mpWorkStartupTimer = nullptr;
}
StopOnlineSpelling();
delete mpOnlineSearchItem;
- mpOnlineSearchItem = NULL;
+ mpOnlineSearchItem = nullptr;
CloseBookmarkDoc();
SetAllocDocSh(false);
@@ -403,7 +403,7 @@ SdDrawDocument::~SdDrawDocument()
}
delete pLinkManager;
- pLinkManager = NULL;
+ pLinkManager = nullptr;
}
std::vector<sd::FrameView*>::iterator pIter;
@@ -420,20 +420,20 @@ SdDrawDocument::~SdDrawDocument()
}
delete mpCustomShowList;
- mpCustomShowList = NULL;
+ mpCustomShowList = nullptr;
}
delete mpOutliner;
- mpOutliner = NULL;
+ mpOutliner = nullptr;
delete mpInternalOutliner;
- mpInternalOutliner = NULL;
+ mpInternalOutliner = nullptr;
delete mpLocale;
- mpLocale = NULL;
+ mpLocale = nullptr;
delete mpCharClass;
- mpCharClass = NULL;
+ mpCharClass = nullptr;
}
SdrModel* SdDrawDocument::AllocModel() const
@@ -446,14 +446,14 @@ SdrModel* SdDrawDocument::AllocModel() const
// parts of it) into the clipboard/DragServer.
SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
{
- SdDrawDocument* pNewModel = NULL;
+ SdDrawDocument* pNewModel = nullptr;
if( mpCreatingTransferable )
{
// Document is created for drag & drop/clipboard. To be able to
// do this, the document has to know a DocShell (SvPersist).
- SfxObjectShell* pObj = NULL;
- ::sd::DrawDocShell* pNewDocSh = NULL;
+ SfxObjectShell* pObj = nullptr;
+ ::sd::DrawDocShell* pNewDocSh = nullptr;
if( meDocType == DOCUMENT_TYPE_IMPRESS )
mpCreatingTransferable->SetDocShell( new ::sd::DrawDocShell(
@@ -498,7 +498,7 @@ SdDrawDocument* SdDrawDocument::AllocSdDrawDocument() const
}
else
{
- pNewModel = new SdDrawDocument(meDocType, NULL);
+ pNewModel = new SdDrawDocument(meDocType, nullptr);
}
return pNewModel;
@@ -566,7 +566,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
CheckMasterPages();
if ( GetMasterSdPageCount(PK_STANDARD) > 1 )
- RemoveUnnecessaryMasterPages( NULL, true, false );
+ RemoveUnnecessaryMasterPages( nullptr, true, false );
for ( sal_uInt16 i = 0; i < GetPageCount(); i++ )
{
@@ -700,7 +700,7 @@ void SdDrawDocument::UpdateAllLinks()
pLinkManager->UpdateAllLinks(); // query box: update all links?
if( pDocLockedInsertingLinks == this )
- pDocLockedInsertingLinks = NULL; // unlock inserting links
+ pDocLockedInsertingLinks = nullptr; // unlock inserting links
}
}
@@ -721,7 +721,7 @@ void SdDrawDocument::NewOrLoadCompleted( SdPage* pPage, SdStyleSheetPool* pSPool
SfxStyleSheet* pTitleSheet = static_cast<SfxStyleSheet*>(pSPool->GetTitleSheet(aName));
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
rPresentationShapes.seekShape(0);
// Now look for title and outline text objects, then make those objects
@@ -1067,7 +1067,7 @@ void SdDrawDocument::dumpAsXml(xmlTextWriterPtr pWriter) const
if (!pWriter)
{
pWriter = xmlNewTextWriterFilename("model.xml", 0);
- xmlTextWriterStartDocument(pWriter, NULL, NULL, NULL);
+ xmlTextWriterStartDocument(pWriter, nullptr, nullptr, nullptr);
bOwns = true;
}
FmFormModel::dumpAsXml(pWriter);
diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx
index f23b9f9cf73e..27dbcda95495 100644
--- a/sd/source/core/drawdoc2.cxx
+++ b/sd/source/core/drawdoc2.cxx
@@ -78,9 +78,9 @@ using namespace com::sun::star;
// Looks up an object by name
SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const
{
- SdrObject* pObj = NULL;
- SdrObject* pObjFound = NULL;
- const SdPage* pPage = NULL;
+ SdrObject* pObj = nullptr;
+ SdrObject* pObjFound = nullptr;
+ const SdPage* pPage = nullptr;
// First search in all pages
sal_uInt16 nPage = 0;
@@ -138,7 +138,7 @@ SdrObject* SdDrawDocument::GetObj(const OUString& rObjName) const
// Find SdPage by name
sal_uInt16 SdDrawDocument::GetPageByName(const OUString& rPgName, bool& rbIsMasterPage) const
{
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sal_uInt16 nPage = 0;
const sal_uInt16 nMaxPages = GetPageCount();
sal_uInt16 nPageNum = SDRPAGE_NOTFOUND;
@@ -152,7 +152,7 @@ sal_uInt16 SdDrawDocument::GetPageByName(const OUString& rPgName, bool& rbIsMast
pPage = const_cast<SdPage*>(static_cast<const SdPage*>(
GetPage(nPage)));
- if (pPage != NULL
+ if (pPage != nullptr
&& pPage->GetPageKind() != PK_HANDOUT
&& pPage->GetName() == rPgName)
{
@@ -213,7 +213,7 @@ sal_uInt16 SdDrawDocument::GetActiveSdPageCount() const
void SdDrawDocument::UpdatePageObjectsInNotes(sal_uInt16 nStartPos)
{
sal_uInt16 nPageCount = GetPageCount();
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
for (sal_uInt16 nPage = nStartPos; nPage < nPageCount; nPage++)
{
@@ -299,7 +299,7 @@ void SdDrawDocument::UpdatePageRelativeURLs(SdPage* pPage, sal_uInt16 nPos, sal_
const SfxPoolItem *pItem = pPool.GetItem2(EE_FEATURE_FIELD, nOff);
const SvxFieldItem* pFldItem;
- if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != 0)
+ if ((pFldItem = dynamic_cast< const SvxFieldItem * > (pItem)) != nullptr)
{
SvxURLField* pURLField = const_cast< SvxURLField* >( dynamic_cast<const SvxURLField*>( pFldItem->GetField() ) );
@@ -392,7 +392,7 @@ SdrPage* SdDrawDocument::RemovePage(sal_uInt16 nPgNum)
bool bLast = ((nPgNum+1)/2 == (GetPageCount()+1)/2);
static_cast<SdPage*>(pPage)->DisconnectLink();
- ReplacePageInCustomShows( dynamic_cast< SdPage* >( pPage ), 0 );
+ ReplacePageInCustomShows( dynamic_cast< SdPage* >( pPage ), nullptr );
UpdatePageObjectsInNotes(nPgNum);
if (!bLast)
@@ -439,7 +439,7 @@ void SdDrawDocument::SetSelected(SdPage* pPage, bool bSelect)
pPage->SetSelected(bSelect);
const sal_uInt16 nDestPageNum(pPage->GetPageNum() + 1);
- SdPage* pNotesPage = 0L;
+ SdPage* pNotesPage = nullptr;
if(nDestPageNum < GetPageCount())
{
@@ -475,7 +475,7 @@ void SdDrawDocument::CreateFirstPages( SdDrawDocument* pRefDocument /* = 0 */ )
// Insert handout page
SdPage* pHandoutPage = AllocSdPage(false);
- SdPage* pRefPage = NULL;
+ SdPage* pRefPage = nullptr;
if( pRefDocument )
pRefPage = pRefDocument->GetSdPage( 0, PK_HANDOUT );
@@ -687,7 +687,7 @@ bool SdDrawDocument::CreateMissingNotesAndHandoutPages()
// + Returns sal_True when the page has been moved
bool SdDrawDocument::MovePages(sal_uInt16 nTargetPage)
{
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sal_uInt16 nPage;
sal_uInt16 nNoOfPages = GetSdPageCount(PK_STANDARD);
bool bSomethingHappened = false;
@@ -899,11 +899,11 @@ void SdDrawDocument::StopWorkStartupDelay()
{
// Timer not yet expired -> initiate WorkStartup
mpWorkStartupTimer->Stop();
- WorkStartupHdl(NULL);
+ WorkStartupHdl(nullptr);
}
delete mpWorkStartupTimer;
- mpWorkStartupTimer = NULL;
+ mpWorkStartupTimer = nullptr;
}
}
@@ -916,14 +916,14 @@ SdAnimationInfo* SdDrawDocument::GetAnimationInfo(SdrObject* pObject) const
if( pObject )
return GetShapeUserData( *pObject );
else
- return 0;
+ return nullptr;
}
SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCreate /* = false */ )
{
sal_uInt16 nUD = 0;
sal_uInt16 nUDCount = rObject.GetUserDataCount();
- SdAnimationInfo* pRet = 0;
+ SdAnimationInfo* pRet = nullptr;
// Can we find animation information within the user data?
for (nUD = 0; nUD < nUDCount; nUD++)
@@ -936,7 +936,7 @@ SdAnimationInfo* SdDrawDocument::GetShapeUserData(SdrObject& rObject, bool bCrea
}
}
- if( (pRet == 0) && bCreate )
+ if( (pRet == nullptr) && bCreate )
{
pRet = new SdAnimationInfo( rObject );
rObject.AppendUserData( pRet);
@@ -949,7 +949,7 @@ SdIMapInfo* SdDrawDocument::GetIMapInfo( SdrObject* pObject ) const
{
DBG_ASSERT(pObject, "Without an object there is no IMapInfo");
- SdIMapInfo* pIMapInfo = NULL;
+ SdIMapInfo* pIMapInfo = nullptr;
sal_uInt16 nCount = pObject->GetUserDataCount();
// Can we find IMap information within the user data?
@@ -969,7 +969,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
const vcl::Window& /* rCmpWnd */ )
{
SdIMapInfo* pIMapInfo = GetIMapInfo( pObj );
- IMapObject* pIMapObj = NULL;
+ IMapObject* pIMapObj = nullptr;
if ( pIMapInfo )
{
@@ -1023,7 +1023,7 @@ IMapObject* SdDrawDocument::GetHitIMapObject( SdrObject* pObj,
// We don't care about deactivated objects
if ( pIMapObj && !pIMapObj->IsActive() )
- pIMapObj = NULL;
+ pIMapObj = nullptr;
}
}
@@ -1037,7 +1037,7 @@ ImageMap* SdDrawDocument::GetImageMapForObject(SdrObject* pObj)
{
return const_cast<ImageMap*>( &(pIMapInfo->GetImageMap()) );
}
- return NULL;
+ return nullptr;
}
/** this method enforces that the masterpages are in the correct order,
@@ -1054,7 +1054,7 @@ void SdDrawDocument::CheckMasterPages()
return;
}
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sal_uInt16 nPage;
@@ -1070,7 +1070,7 @@ void SdDrawDocument::CheckMasterPages()
if( nPage < nMaxPages )
{
- SdPage* pNotesPage = NULL;
+ SdPage* pNotesPage = nullptr;
// there is a fatal error in the master page order,
// we need to repair the document
@@ -1108,9 +1108,9 @@ void SdDrawDocument::CheckMasterPages()
if( nPage < nMaxPages )
pNotesPage = static_cast<SdPage*>(GetMasterPage( nPage ));
else
- pNotesPage = NULL;
+ pNotesPage = nullptr;
- if( (NULL == pNotesPage) || (pNotesPage->GetPageKind() != PK_NOTES) || ( pPage->GetLayoutName() != pNotesPage->GetLayoutName() ) )
+ if( (nullptr == pNotesPage) || (pNotesPage->GetPageKind() != PK_NOTES) || ( pPage->GetLayoutName() != pNotesPage->GetLayoutName() ) )
{
bChanged = true;
@@ -1134,7 +1134,7 @@ void SdDrawDocument::CheckMasterPages()
// so create one
// first find a reference notes page for size
- SdPage* pRefNotesPage = NULL;
+ SdPage* pRefNotesPage = nullptr;
nFound = 0;
while( nFound < nMaxPages )
{
@@ -1144,7 +1144,7 @@ void SdDrawDocument::CheckMasterPages()
nFound++;
}
if( nFound == nMaxPages )
- pRefNotesPage = NULL;
+ pRefNotesPage = nullptr;
SdPage* pNewNotesPage = AllocSdPage(true);
pNewNotesPage->SetPageKind(PK_NOTES);
@@ -1409,7 +1409,7 @@ void SdDrawDocument::SetupNewPage (
bool bIsPageBack,
bool bIsPageObj)
{
- if (pPreviousPage != NULL)
+ if (pPreviousPage != nullptr)
{
pPage->SetSize( pPreviousPage->GetSize() );
pPage->SetBorder( pPreviousPage->GetLftBorder(),
@@ -1421,7 +1421,7 @@ void SdDrawDocument::SetupNewPage (
InsertPage(pPage, nInsertionPoint);
- if (pPreviousPage != NULL)
+ if (pPreviousPage != nullptr)
{
SdrLayerAdmin& rLayerAdmin = GetLayerAdmin();
sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
@@ -1435,7 +1435,7 @@ void SdDrawDocument::SetupNewPage (
sd::UndoManager* SdDrawDocument::GetUndoManager() const
{
- return mpDocSh ? dynamic_cast< sd::UndoManager* >(mpDocSh->GetUndoManager()) : 0;
+ return mpDocSh ? dynamic_cast< sd::UndoManager* >(mpDocSh->GetUndoManager()) : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index e8fb7f07b9c7..5fb0e789d816 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -154,7 +154,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
for (nPos = 0; nPos < nEndPos; ++nPos)
{
// the master page associated to the nPos'th page to insert
- SdPage* pBMMPage = NULL;
+ SdPage* pBMMPage = nullptr;
if( rBookmarkList.empty() )
{
@@ -175,7 +175,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
}
else
{
- pBMPage = NULL;
+ pBMPage = nullptr;
}
// enforce that bookmarked page is a standard page and not already a master page
@@ -199,7 +199,7 @@ static void lcl_IterateBookmarkPages( SdDrawDocument &rDoc, SdDrawDocument* pBoo
SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
{
bool bOK = true;
- SdDrawDocument* pBookmarkDoc = NULL;
+ SdDrawDocument* pBookmarkDoc = nullptr;
OUString aBookmarkName = rMedium.GetName();
const SfxFilter* pFilter = rMedium.GetFilter();
if ( !pFilter )
@@ -247,7 +247,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
aErrorBox->Execute();
CloseBookmarkDoc();
- pBookmarkDoc = NULL;
+ pBookmarkDoc = nullptr;
}
else if (mxBookmarkDocShRef.Is())
{
@@ -260,7 +260,7 @@ SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(SfxMedium& rMedium)
// Opens a bookmark document
SdDrawDocument* SdDrawDocument::OpenBookmarkDoc(const OUString& rBookmarkFile)
{
- SdDrawDocument* pBookmarkDoc = NULL;
+ SdDrawDocument* pBookmarkDoc = nullptr;
if (!rBookmarkFile.isEmpty() && maBookmarkFile != rBookmarkFile)
{
@@ -297,7 +297,7 @@ bool SdDrawDocument::InsertBookmark(
}
else
{
- SdDrawDocument* pBookmarkDoc = NULL;
+ SdDrawDocument* pBookmarkDoc = nullptr;
if (pBookmarkDocSh)
{
@@ -367,7 +367,7 @@ SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, const OUString& aStyle
if((*aIt)->GetName().startsWith(aStyleName))
return (*aIt).get();
}
- return NULL;
+ return nullptr;
}
}
@@ -388,7 +388,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
bool bScaleObjects = false;
sal_uInt16 nReplacedStandardPages = 0;
- SdDrawDocument* pBookmarkDoc = NULL;
+ SdDrawDocument* pBookmarkDoc = nullptr;
OUString aBookmarkName;
if (pBookmarkDocSh)
@@ -474,7 +474,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
// Get the necessary presentation stylesheets and transfer them before
// the pages, else, the text objects won't reference their styles anymore.
- ::svl::IUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = nullptr;
if( mpDocSh )
{
pUndoMgr = mpDocSh->GetUndoManager();
@@ -622,7 +622,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
sal_uInt16 nActualInsertPos = nInsertPos;
// Collect the bookmarked pages
- ::std::vector<SdPage*> aBookmarkedPages (rBookmarkList.size(), NULL);
+ ::std::vector<SdPage*> aBookmarkedPages (rBookmarkList.size(), nullptr);
for ( size_t nPos = 0, n = rBookmarkList.size(); nPos < n; ++nPos)
{
OUString aPgName(rBookmarkList[nPos]);
@@ -638,7 +638,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
for ( size_t nPos = 0, n = rBookmarkList.size(); nPos < n; ++nPos)
{
pBMPage = aBookmarkedPages[nPos];
- sal_uInt16 nBMPage = pBMPage!=NULL ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
+ sal_uInt16 nBMPage = pBMPage!=nullptr ? pBMPage->GetPageNum() : SDRPAGE_NOTFOUND;
if (pBMPage && pBMPage->GetPageKind()==PK_STANDARD && !pBMPage->IsMasterPage())
{
@@ -705,7 +705,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
{
// Remove page and notes page.
const sal_uInt16 nDestPageNum(nActualInsertPos + 2);
- SdPage* pStandardPage = 0L;
+ SdPage* pStandardPage = nullptr;
if(nDestPageNum < GetPageCount())
{
@@ -730,7 +730,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
delete pStandardPage;
}
- SdPage* pNotesPage = 0L;
+ SdPage* pNotesPage = nullptr;
if(nDestPageNum < GetPageCount())
{
@@ -918,7 +918,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
}
// Make absolutely sure no double masterpages are there
- RemoveUnnecessaryMasterPages(NULL, true);
+ RemoveUnnecessaryMasterPages(nullptr, true);
// Rename object styles if necessary
if(!aRenameStr.isEmpty())
@@ -934,7 +934,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
{
OUString aStyleName = pPg->GetObj(i)->GetStyleSheet()->GetName();
SfxStyleSheet *pSheet = lcl_findStyle(aNewGraphicStyles, aStyleName + aRenameStr);
- if(pSheet != NULL)
+ if(pSheet != nullptr)
pPg->GetObj(i)->SetStyleSheet(pSheet, true);
}
}
@@ -976,9 +976,9 @@ bool SdDrawDocument::InsertBookmarkAsObject(
{
bool bOK = true;
bool bOLEObjFound = false;
- ::sd::View* pBMView = NULL;
+ ::sd::View* pBMView = nullptr;
- SdDrawDocument* pBookmarkDoc = NULL;
+ SdDrawDocument* pBookmarkDoc = nullptr;
if (pBookmarkDocSh)
{
@@ -1180,8 +1180,8 @@ SdCustomShowList* SdDrawDocument::GetCustomShowList(bool bCreate)
// Remove unused master pages and layouts
void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnlyDuplicatePages, bool bUndo)
{
- ::sd::View* pView = NULL;
- ::svl::IUndoManager* pUndoMgr = NULL;
+ ::sd::View* pView = nullptr;
+ ::svl::IUndoManager* pUndoMgr = nullptr;
if( bUndo && !IsUndoEnabled() )
bUndo = false;
@@ -1199,7 +1199,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
for (sal_Int32 nMPage = nSdMasterPageCount - 1; nMPage >= 0; nMPage--)
{
SdPage* pMaster = pMasterPage;
- SdPage* pNotesMaster = NULL;
+ SdPage* pNotesMaster = nullptr;
if (!pMaster)
{
@@ -1395,7 +1395,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
bool bMaster,
bool bCheckMasters)
{
- ::svl::IUndoManager* pUndoMgr = NULL;
+ ::svl::IUndoManager* pUndoMgr = nullptr;
if( mpDocSh )
{
@@ -1414,8 +1414,8 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
SdPage* pNotes = static_cast<SdPage*>( GetPage(pSelectedPage->GetPageNum()+1) );
SdPage& rOldMaster = static_cast<SdPage&>(pSelectedPage->TRG_GetMasterPage());
SdPage& rOldNotesMaster = static_cast<SdPage&>(pNotes->TRG_GetMasterPage());
- SdPage* pMaster = NULL;
- SdPage* pNotesMaster = NULL;
+ SdPage* pMaster = nullptr;
+ SdPage* pNotesMaster = nullptr;
OUString aOldPageLayoutName(pSelectedPage->GetLayoutName());
OUString aOldLayoutName(aOldPageLayoutName);
sal_Int32 nIndex = aOldLayoutName.indexOf( SD_LT_SEPARATOR );
@@ -1458,7 +1458,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
DBG_ASSERT(pNotesMaster, "MasterPage (Notes page) not found");
// this should not happen, but looking at crashreports, it does
- if( (pMaster == NULL) || (pNotesMaster == NULL) )
+ if( (pMaster == nullptr) || (pNotesMaster == nullptr) )
{
// so take the first MasterPage
pMaster = static_cast<SdPage*>( pSourceDoc->GetMasterSdPage(0, PK_STANDARD) );
@@ -1467,7 +1467,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
}
// we should never reach this, but one never knows...
- if( (pMaster == NULL) || (pNotesMaster == NULL) )
+ if( (pMaster == nullptr) || (pNotesMaster == nullptr) )
{
if (bUndo)
pUndoMgr->LeaveListAction();
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 830d451aac5f..a18ad194168c 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -127,7 +127,7 @@ using namespace ::sd;
void SdDrawDocument::CreateLayoutTemplates()
{
SdStyleSheetPool* pSSPool = static_cast<SdStyleSheetPool*>(GetStyleSheetPool());
- SfxStyleSheetBase* pSheet = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
OUString aHelpFile;
OUString aStdName(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME));
@@ -253,7 +253,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// New BulletItem
SdStyleSheetPool::PutNumBulletItem( pSheet, aBulletFont );
- SfxItemSet* pISet = NULL;
+ SfxItemSet* pISet = nullptr;
// Object with arrowhead
aName = SD_RESSTR(STR_POOLSHEET_OBJWITHARROW);
@@ -535,7 +535,7 @@ static void implCreateTableTemplate( const Reference< XNameContainer >& xTableFa
void SdDrawDocument::CreateDefaultCellStyles()
{
SdStyleSheetPool* pSSPool = static_cast< SdStyleSheetPool* >(GetStyleSheetPool());
- SfxStyleSheetBase* pSheet = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
OUString aHelpFile;
Reference< XNameContainer > xTableFamily( pSSPool->getByName( "table" ), UNO_QUERY );
@@ -731,10 +731,10 @@ void SdDrawDocument::StopOnlineSpelling()
}
delete mpOnlineSpellingIdle;
- mpOnlineSpellingIdle = NULL;
+ mpOnlineSpellingIdle = nullptr;
delete mpOnlineSpellingList;
- mpOnlineSpellingList = NULL;
+ mpOnlineSpellingList = nullptr;
}
// Start OnlineSpelling in the background
@@ -825,7 +825,7 @@ void SdDrawDocument::FillOnlineSpellingList(SdPage* pPage)
// OnlineSpelling in the background
IMPL_LINK_NOARG_TYPED(SdDrawDocument, OnlineSpellingHdl, Idle *, void)
{
- if (mpOnlineSpellingList!=NULL
+ if (mpOnlineSpellingList!=nullptr
&& ( !mbOnlineSpell || mpOnlineSpellingList->hasMore()))
{
// Spell next object
@@ -870,7 +870,7 @@ IMPL_LINK_NOARG_TYPED(SdDrawDocument, OnlineSpellingHdl, Idle *, void)
StopOnlineSpelling();
delete mpOnlineSearchItem;
- mpOnlineSearchItem = NULL;
+ mpOnlineSearchItem = nullptr;
}
}
@@ -967,7 +967,7 @@ IMPL_LINK_TYPED(SdDrawDocument, OnlineSpellEventHdl, EditStatus&, rEditStat, voi
void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject* pObj, SdrOutliner* pOutl)
{
delete mpOnlineSearchItem;
- mpOnlineSearchItem = NULL;
+ mpOnlineSearchItem = nullptr;
SpellCallbackCommand nCommand = pInfo->nCommand;
@@ -1236,7 +1236,7 @@ void SdDrawDocument::SetTextDefaults() const
css::text::WritingMode SdDrawDocument::GetDefaultWritingMode() const
{
- const SfxPoolItem* pItem = ( pItemPool ? pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : NULL );
+ const SfxPoolItem* pItem = ( pItemPool ? pItemPool->GetPoolDefaultItem( EE_PARA_WRITINGDIR ) : nullptr );
css::text::WritingMode eRet = css::text::WritingMode_LR_TB;
if( pItem )
@@ -1322,7 +1322,7 @@ SdStyleSheetPool* SdDrawDocument::GetSdStyleSheetPool() const
}
ModifyGuard::ModifyGuard( SdDrawDocument* pDoc )
-: mpDocShell( 0 ), mpDoc( pDoc )
+: mpDocShell( nullptr ), mpDoc( pDoc )
{
init();
}
diff --git a/sd/source/core/pglink.cxx b/sd/source/core/pglink.cxx
index a817967a729c..c68b625472fc 100644
--- a/sd/source/core/pglink.cxx
+++ b/sd/source/core/pglink.cxx
@@ -58,7 +58,7 @@ SdPageLink::~SdPageLink()
const OUString&, const css::uno::Any& )
{
SdDrawDocument* pDoc = static_cast<SdDrawDocument*>( pPage->GetModel() );
- sfx2::LinkManager* pLinkManager = pDoc!=NULL ? pDoc->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pDoc!=nullptr ? pDoc->GetLinkManager() : nullptr;
if (pLinkManager)
{
@@ -69,7 +69,7 @@ SdPageLink::~SdPageLink()
OUString aFileName;
OUString aBookmarkName;
OUString aFilterName;
- sfx2::LinkManager::GetDisplayNames( this,0, &aFileName, &aBookmarkName,
+ sfx2::LinkManager::GetDisplayNames( this,nullptr, &aFileName, &aBookmarkName,
&aFilterName);
pPage->SetFileName(aFileName);
pPage->SetBookmarkName(aBookmarkName);
@@ -103,8 +103,8 @@ SdPageLink::~SdPageLink()
bCopy = true;
}
- pDoc->InsertBookmarkAsPage(aBookmarkList, NULL, bLink, bReplace,
- nInsertPos, bNoDialogs, NULL, bCopy, true, true);
+ pDoc->InsertBookmarkAsPage(aBookmarkList, nullptr, bLink, bReplace,
+ nInsertPos, bNoDialogs, nullptr, bCopy, true, true);
if( !pDoc->pDocLockedInsertingLinks )
pDoc->CloseBookmarkDoc();
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index ca359a263f06..cd3fe89a64d9 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -105,8 +105,8 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage)
, mbBackgroundFullSize( false )
, meCharSet(osl_getThreadTextEncoding())
, mnPaperBin(PAPERBIN_PRINTER_SETTINGS)
-, mpPageLink(NULL)
-, mpItems(NULL)
+, mpPageLink(nullptr)
+, mpItems(nullptr)
, mnTransitionType(0)
, mnTransitionSubtype(0)
, mbTransitionDirection(true)
@@ -164,7 +164,7 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc
// first sort all matching shapes with z-order
std::vector< SdrObject* > aMatches;
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
maPresentationShapeList.seekShape(0);
while( (pObj = maPresentationShapeList.getNextShape()) )
@@ -214,7 +214,7 @@ SdrObject* SdPage::GetPresObj(PresObjKind eObjKind, int nIndex, bool bFuzzySearc
if( (nIndex >= 0) && ( aMatches.size() > static_cast<unsigned int>(nIndex)) )
return aMatches[nIndex];
- return 0;
+ return nullptr;
}
/** create background properties */
@@ -244,10 +244,10 @@ void SdPage::EnsureMasterPageDefaultBackground()
*/
SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool /* bInsert */ )
{
- ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : nullptr;
const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
- SdrObject* pSdrObj = NULL;
+ SdrObject* pSdrObj = nullptr;
bool bForceText = false; // forces the shape text to be set even if its empty
bool bEmptyPresObj = true;
@@ -358,7 +358,7 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
// Save the first standard page at SdrPageObj
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
- pSdrObj = new SdrPageObj(0);
+ pSdrObj = new SdrPageObj(nullptr);
}
break;
@@ -460,13 +460,13 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const Rec
sal_uInt16 nOutlMode = pOutliner->GetMode();
pOutliner->Init( OUTLINERMODE_TEXTOBJECT );
- pOutliner->SetStyleSheet( 0, NULL );
+ pOutliner->SetStyleSheet( 0, nullptr );
pOutliner->SetVertical( bVertical );
SetObjText( static_cast<SdrTextObj*>(pSdrObj), static_cast<SdrOutliner*>(pOutliner), eObjKind, aString );
pOutliner->Init( nOutlMode );
- pOutliner->SetStyleSheet( 0, NULL );
+ pOutliner->SetStyleSheet( 0, nullptr );
}
if( (eObjKind == PRESOBJ_HEADER) || (eObjKind == PRESOBJ_FOOTER) || (eObjKind == PRESOBJ_SLIDENUMBER) || (eObjKind == PRESOBJ_DATETIME) )
@@ -663,7 +663,7 @@ SdStyleSheet* SdPage::getPresentationStyle( sal_uInt32 nHelpId ) const
default:
OSL_FAIL( "SdPage::getPresentationStyle(), illegal argument!" );
- return 0;
+ return nullptr;
}
aStyleName += SD_RESSTR( nNameId );
if( nNameId == STR_LAYOUT_OUTLINE )
@@ -712,7 +712,7 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
pUndoManager->AddUndoAction( new UndoObjectUserCall(*pObj) );
// Objekt was resized by user and does not listen to its slide anymore
- pObj->SetUserCall(0);
+ pObj->SetUserCall(nullptr);
}
}
else
@@ -753,7 +753,7 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectang
void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
{
- ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : nullptr;
const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
SdPage* pMasterPage = this;
@@ -783,8 +783,8 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
// handout template
// delete all available handout presentation objects
- SdrObject *pObj=NULL;
- while( (pObj = pMasterPage->GetPresObj(PRESOBJ_HANDOUT)) != 0 )
+ SdrObject *pObj=nullptr;
+ while( (pObj = pMasterPage->GetPresObj(PRESOBJ_HANDOUT)) != nullptr )
{
pMasterPage->RemoveObject(pObj->GetOrdNum());
@@ -809,7 +809,7 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
SdrPageObj* pPageObj = static_cast<SdrPageObj*>(pMasterPage->CreatePresObj(PRESOBJ_HANDOUT, false, (*iter++), true) );
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
- pPageObj->SetReferencedPage(0L);
+ pPageObj->SetReferencedPage(nullptr);
if( bSkip && iter != aAreas.end() )
++iter;
@@ -819,11 +819,11 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
if( mePageKind != PK_HANDOUT )
{
SdrObject* pMasterTitle = pMasterPage->GetPresObj( PRESOBJ_TITLE );
- if( pMasterTitle == NULL )
+ if( pMasterTitle == nullptr )
pMasterPage->CreateDefaultPresObj(PRESOBJ_TITLE, true);
SdrObject* pMasterOutline = pMasterPage->GetPresObj( mePageKind==PK_NOTES ? PRESOBJ_NOTES : PRESOBJ_OUTLINE );
- if( pMasterOutline == NULL )
+ if( pMasterOutline == nullptr )
pMasterPage->CreateDefaultPresObj( mePageKind == PK_STANDARD ? PRESOBJ_OUTLINE : PRESOBJ_NOTES, true );
}
@@ -834,20 +834,20 @@ void SdPage::CreateTitleAndLayout(bool bInit, bool bCreate )
if( mePageKind != PK_STANDARD )
{
SdrObject* pHeader = pMasterPage->GetPresObj( PRESOBJ_HEADER );
- if( pHeader == NULL )
+ if( pHeader == nullptr )
pMasterPage->CreateDefaultPresObj( PRESOBJ_HEADER, true );
}
SdrObject* pDate = pMasterPage->GetPresObj( PRESOBJ_DATETIME );
- if( pDate == NULL )
+ if( pDate == nullptr )
pMasterPage->CreateDefaultPresObj( PRESOBJ_DATETIME, true );
SdrObject* pFooter = pMasterPage->GetPresObj( PRESOBJ_FOOTER );
- if( pFooter == NULL )
+ if( pFooter == nullptr )
pMasterPage->CreateDefaultPresObj( PRESOBJ_FOOTER, true );
SdrObject* pNumber = pMasterPage->GetPresObj( PRESOBJ_SLIDENUMBER );
- if( pNumber == NULL )
+ if( pNumber == nullptr )
pMasterPage->CreateDefaultPresObj( PRESOBJ_SLIDENUMBER, true );
}
}
@@ -976,7 +976,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
if(eObjKind == PRESOBJ_HEADER )
{
OSL_FAIL( "SdPage::CreateDefaultPresObj() - can't create a header placeholder for a slide master" );
- return NULL;
+ return nullptr;
}
else
{
@@ -1014,7 +1014,7 @@ SdrObject* SdPage::CreateDefaultPresObj(PresObjKind eObjKind, bool bInsert)
else
{
OSL_FAIL("SdPage::CreateDefaultPresObj() - unknown PRESOBJ kind" );
- return NULL;
+ return nullptr;
}
}
@@ -1082,7 +1082,7 @@ Rectangle SdPage::GetTitleRect() const
Size aPartArea = aTitleSize;
Size aSize;
sal_uInt16 nDestPageNum(GetPageNum());
- SdrPage* pRefPage = 0L;
+ SdrPage* pRefPage = nullptr;
if(nDestPageNum)
{
@@ -1426,8 +1426,8 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
for (i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++)
{
PresObjKind eKind = rDescriptor.meKind[i];
- SdrObject* pObj = 0;
- while( (pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind], true )) != 0 )
+ SdrObject* pObj = nullptr;
+ while( (pObj = rPage.GetPresObj( eKind, PresObjIndex[eKind], true )) != nullptr )
{
PresObjIndex[eKind]++; // on next search for eKind, find next shape with same eKind
@@ -1452,7 +1452,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
PresObjKind eKind = rDescriptor.meKind[i];
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
bool bFound = false;
const size_t nShapeCount = rPage.GetObjCount();
@@ -1577,7 +1577,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate )
const bool bSwitchLayout = eLayout != GetAutoLayout();
- ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : 0;
+ ::svl::IUndoManager* pUndoManager = pModel ? static_cast<SdDrawDocument*>(pModel)->GetUndoManager() : nullptr;
const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted();
meAutoLayout = eLayout;
@@ -1598,7 +1598,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate )
std::set< SdrObject* > aUsedPresentationObjects;
- std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, 0);
+ std::vector< SdrObject* > aLayoutShapes(PRESOBJ_MAX, nullptr);
findAutoLayoutShapesImpl( *this, aDescriptor, aLayoutShapes, bInit, bSwitchLayout );
int i;
@@ -1615,7 +1615,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, bool bInit, bool bCreate )
// now delete all empty presentation objects that are no longer used by the new layout
if( bInit )
{
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
maPresentationShapeList.seekShape(0);
while( (pObj = maPresentationShapeList.getNextShape()) )
@@ -1813,7 +1813,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR
sd::ScopeLockGuard aGuard( maLockAutoLayoutArrangement );
mbScaleObjects = bScaleAllObj;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
Point aRefPnt(0, 0);
Size aNewPageSize(rNewPageSize);
sal_Int32 nLeft = rNewBorderRect.Left();
@@ -2331,7 +2331,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
PresObjKind SdPage::GetPresObjKind(SdrObject* pObj) const
{
PresObjKind eKind = PRESOBJ_NONE;
- if( (pObj != 0) && (maPresentationShapeList.hasShape(*pObj)) )
+ if( (pObj != nullptr) && (maPresentationShapeList.hasShape(*pObj)) )
{
SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj);
if( pInfo )
@@ -2456,7 +2456,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
aString += rString;
// check if we need to add a text field
- SvxFieldData* pData = NULL;
+ SvxFieldData* pData = nullptr;
switch( eObjKind )
{
@@ -2497,7 +2497,7 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO
if (!pOutliner)
{
delete pOutl;
- pOutl = NULL;
+ pOutl = nullptr;
}
else
{
@@ -2698,7 +2698,7 @@ SdPage* SdPage::getImplementation( const css::uno::Reference< css::drawing::XDra
OSL_FAIL("sd::SdPage::getImplementation(), exception caught!" );
}
- return 0;
+ return nullptr;
}
void SdPage::SetName (const OUString& rName)
@@ -2749,7 +2749,7 @@ void SdPage::setHeaderFooterSettings( const sd::HeaderFooterSettings& rNewSettin
if(pMasterPage)
{
- SdrObject* pCandidate = 0;
+ SdrObject* pCandidate = nullptr;
pCandidate = pMasterPage->GetPresObj( PRESOBJ_HEADER );
@@ -2795,7 +2795,7 @@ bool SdPage::checkVisibility(
return false;
SdrObject* pObj = rOriginal.GetViewContact().TryToGetSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
return false;
const SdrPage* pVisualizedPage = GetSdrPageFromXDrawPage(rOriginal.GetObjectContact().getViewInformation2D().getVisualizedPage());
@@ -2890,7 +2890,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
if( pOldPara )
bVertical = pOldPara->IsVertical(); // is old para object vertical?
- SetObjText( pTextObj, 0, ePresObjKind, aString );
+ SetObjText( pTextObj, nullptr, ePresObjKind, aString );
if( pOldPara )
{
@@ -2908,7 +2908,7 @@ bool SdPage::RestoreDefaultText( SdrObject* pObj )
}
}
- pTextObj->SetTextEditOutliner( NULL ); // to make stylesheet settings work
+ pTextObj->SetTextEditOutliner( nullptr ); // to make stylesheet settings work
pTextObj->NbcSetStyleSheet( GetStyleSheetForPresObj(ePresObjKind), true );
pTextObj->SetEmptyPresObj(true);
bRet = true;
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 1bc4c6888841..34a5510bd102 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -94,7 +94,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
if (bSetMasterPage && !IsMasterPage())
{
SdPage* pMaster;
- SdPage* pFoundMaster = 0;
+ SdPage* pFoundMaster = nullptr;
sal_uInt16 nMaster = 0;
sal_uInt16 nMasterCount = pModel->GetMasterPageCount();
@@ -126,7 +126,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
DBG_ASSERT(pFoundMaster, "Masterpage for presentation layout not found!");
// this should never happen, but we play failsafe here
- if( pFoundMaster == 0 )
+ if( pFoundMaster == nullptr )
pFoundMaster = static_cast< SdDrawDocument *>(pModel)->GetSdPage( 0, mePageKind );
if( pFoundMaster )
@@ -157,7 +157,7 @@ void SdPage::SetPresentationLayout(const OUString& rLayoutName,
{
OUString aFullName;
OUString aOldFullName;
- SfxStyleSheetBase* pSheet = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
SfxStyleSheetBasePool* pStShPool = pModel->GetStyleSheetPool();
for (sal_Int16 i = -1; i < 9; i++)
@@ -316,7 +316,7 @@ bool SdPage::IsReadOnly() const
void SdPage::ConnectLink()
{
- sfx2::LinkManager* pLinkManager = pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel!=nullptr ? pModel->GetLinkManager() : nullptr;
if (pLinkManager && !mpPageLink && !maFileName.isEmpty() && !maBookmarkName.isEmpty() &&
mePageKind==PK_STANDARD && !IsMasterPage() &&
@@ -348,7 +348,7 @@ void SdPage::ConnectLink()
void SdPage::DisconnectLink()
{
- sfx2::LinkManager* pLinkManager = pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel!=nullptr ? pModel->GetLinkManager() : nullptr;
if (pLinkManager && mpPageLink)
{
@@ -357,7 +357,7 @@ void SdPage::DisconnectLink()
* (remove deletes *pGraphicLink implicit)
**********************************************************************/
pLinkManager->Remove(mpPageLink);
- mpPageLink=NULL;
+ mpPageLink=nullptr;
}
}
@@ -370,7 +370,7 @@ void SdPage::DisconnectLink()
SdPage::SdPage(const SdPage& rSrcPage)
: FmFormPage(rSrcPage)
, SdrObjUserCall()
-, mpItems(NULL)
+, mpItems(nullptr)
{
mePageKind = rSrcPage.mePageKind;
meAutoLayout = rSrcPage.meAutoLayout;
@@ -399,7 +399,7 @@ SdPage::SdPage(const SdPage& rSrcPage)
mnPaperBin = rSrcPage.mnPaperBin;
meOrientation = rSrcPage.meOrientation;
- mpPageLink = NULL; // is set when inserting via ConnectLink()
+ mpPageLink = nullptr; // is set when inserting via ConnectLink()
mbIsPrecious = false;
}
@@ -429,12 +429,12 @@ void SdPage::lateInit(const SdPage& rSrcPage)
SdrPage* SdPage::Clone() const
{
- return Clone(NULL);
+ return Clone(nullptr);
}
SdrPage* SdPage::Clone(SdrModel* pNewModel) const
{
- DBG_ASSERT( pNewModel == 0, "sd::SdPage::Clone(), new page ignored, please check code! CL" );
+ DBG_ASSERT( pNewModel == nullptr, "sd::SdPage::Clone(), new page ignored, please check code! CL" );
(void)pNewModel;
SdPage* pNewPage = new SdPage(*this);
@@ -477,7 +477,7 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
SfxItemSet* SdPage::getOrCreateItems()
{
- if( mpItems == NULL )
+ if( mpItems == nullptr )
mpItems = new SfxItemSet( pModel->GetItemPool(), SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES );
return mpItems;
@@ -501,7 +501,7 @@ void SdPage::getAlienAttributes( css::uno::Any& rAttributes )
{
const SfxPoolItem* pItem;
- if( (mpItems == NULL) || ( SfxItemState::SET != mpItems->GetItemState( SDRATTR_XMLATTRIBUTES, false, &pItem ) ) )
+ if( (mpItems == nullptr) || ( SfxItemState::SET != mpItems->GetItemState( SDRATTR_XMLATTRIBUTES, false, &pItem ) ) )
{
SvXMLAttrContainerItem aAlienAttributes;
aAlienAttributes.QueryValue( rAttributes );
@@ -639,7 +639,7 @@ void SdPage::dumpAsXml(xmlTextWriterPtr pWriter) const
{
xmlTextWriterStartElement(pWriter, BAD_CAST("sdPage"));
- const char* pPageKind = 0;
+ const char* pPageKind = nullptr;
switch (mePageKind)
{
case PK_STANDARD:
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index 9bfd8e4a7867..df3b68b3bc1c 100644
--- a/sd/source/core/sdpage_animations.cxx
+++ b/sd/source/core/sdpage_animations.cxx
@@ -42,7 +42,7 @@ using ::com::sun::star::drawing::XShape;
/** returns a helper class to manipulate effects inside the main sequence */
sd::MainSequencePtr SdPage::getMainSequence()
{
- if( 0 == mpMainSequence.get() )
+ if( nullptr == mpMainSequence.get() )
mpMainSequence.reset( new sd::MainSequence( getAnimationNode() ) );
return mpMainSequence;
diff --git a/sd/source/core/shapelist.cxx b/sd/source/core/shapelist.cxx
index 47ba5e281705..bbdcc96aa7bb 100644
--- a/sd/source/core/shapelist.cxx
+++ b/sd/source/core/shapelist.cxx
@@ -70,7 +70,7 @@ SdrObject* ShapeList::removeShape( SdrObject& rObject )
{
OSL_FAIL("sd::ShapeList::removeShape(), given shape not part of list!");
}
- return 0;
+ return nullptr;
}
/** removes all shapes from this list
@@ -125,7 +125,7 @@ SdrObject* ShapeList::getNextShape()
}
else
{
- return 0;
+ return nullptr;
}
}
diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx
index 3cd85d5d0bf5..daca4ac25935 100644
--- a/sd/source/core/stlfamily.cxx
+++ b/sd/source/core/stlfamily.cxx
@@ -94,7 +94,7 @@ PresStyleMap& SdStyleFamilyImpl::getStyleSheets()
SdStyleFamily::SdStyleFamily( const rtl::Reference< SfxStyleSheetPool >& xPool, SfxStyleFamily nFamily )
: mnFamily( nFamily )
, mxPool( xPool )
-, mpImpl( 0 )
+, mpImpl( nullptr )
{
}
@@ -124,7 +124,7 @@ SdStyleSheet* SdStyleFamily::GetValidNewSheet( const Any& rElement ) throw(Illeg
Reference< XStyle > xStyle( rElement, UNO_QUERY );
SdStyleSheet* pStyle = static_cast< SdStyleSheet* >( xStyle.get() );
- if( pStyle == 0 || (pStyle->GetFamily() != mnFamily) || (&pStyle->GetPool() != mxPool.get()) || (mxPool->Find( pStyle->GetName(), mnFamily) != 0) )
+ if( pStyle == nullptr || (pStyle->GetFamily() != mnFamily) || (&pStyle->GetPool() != mxPool.get()) || (mxPool->Find( pStyle->GetName(), mnFamily) != nullptr) )
throw IllegalArgumentException();
return pStyle;
@@ -132,7 +132,7 @@ SdStyleSheet* SdStyleFamily::GetValidNewSheet( const Any& rElement ) throw(Illeg
SdStyleSheet* SdStyleFamily::GetSheetByName( const OUString& rName ) throw(NoSuchElementException, WrappedTargetException )
{
- SdStyleSheet* pRet = 0;
+ SdStyleSheet* pRet = nullptr;
if( !rName.isEmpty() )
{
if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
@@ -188,7 +188,7 @@ OUString SAL_CALL SdStyleFamily::getName() throw (RuntimeException, std::excepti
if( mnFamily == SD_STYLE_FAMILY_MASTERPAGE )
{
SdPage* pPage = static_cast< SdPage* >( mpImpl->mxMasterPage.get() );
- if( pPage == 0 )
+ if( pPage == nullptr )
throw DisposedException();
OUString aLayoutName( pPage->GetLayoutName() );
@@ -464,7 +464,7 @@ void SAL_CALL SdStyleFamily::dispose( ) throw (RuntimeException, std::exception
if( mpImpl )
{
delete mpImpl;
- mpImpl = 0;
+ mpImpl = nullptr;
}
}
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 1cc18a2c29ae..bc1f18b7ae35 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -91,20 +91,20 @@ OUString lcl_findRenamedStyleName(std::vector< std::pair< OUString, OUString > >
SfxStyleSheet *lcl_findStyle(SdStyleSheetVector& rStyles, const OUString& aStyleName)
{
if( aStyleName.isEmpty() )
- return NULL;
+ return nullptr;
for(SdStyleSheetVector::const_iterator aIt(rStyles.begin()), aLast(rStyles.end()); aIt != aLast; ++aIt)
{
if((*aIt)->GetName() == aStyleName)
return (*aIt).get();
}
- return NULL;
+ return nullptr;
}
}
SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pDocument)
: SdStyleSheetPoolBase( _rPool )
-, mpActualStyleSheet(NULL)
+, mpActualStyleSheet(nullptr)
, mpDoc(pDocument)
{
if( mpDoc )
@@ -130,7 +130,7 @@ SdStyleSheetPool::SdStyleSheetPool(SfxItemPool const& _rPool, SdDrawDocument* pD
SdStyleSheetPool::~SdStyleSheetPool()
{
- DBG_ASSERT( mpDoc == NULL, "sd::SdStyleSheetPool::~SdStyleSheetPool(), dispose me first!" );
+ DBG_ASSERT( mpDoc == nullptr, "sd::SdStyleSheetPool::~SdStyleSheetPool(), dispose me first!" );
}
SfxStyleSheetBase* SdStyleSheetPool::Create(const OUString& rName, SfxStyleFamily eFamily, sal_uInt16 _nMask )
@@ -183,7 +183,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
(void)bCheck;
bool bCreated = false;
- SfxStyleSheetBase* pSheet = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
OUString aPrefix(rLayoutName + SD_LT_SEPARATOR);
@@ -311,7 +311,7 @@ void SdStyleSheetPool::CreateLayoutStyleSheets(const OUString& rLayoutName, bool
// if we created outline styles, we need to chain them
if( bCreated )
{
- SfxStyleSheetBase* pParent = NULL;
+ SfxStyleSheetBase* pParent = nullptr;
for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
{
OUString aLevelName( aPrefix + aName + " " + OUString::number( nLevel ) );
@@ -653,7 +653,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
// now check whether we already have a sheet with the same name
std::vector<unsigned> aSheetsWithName = GetIndexedStyleSheets().FindPositionsByName(aName);
bool bAddToList = false;
- SfxStyleSheetBase * pExistingSheet = 0;
+ SfxStyleSheetBase * pExistingSheet = nullptr;
if (!aSheetsWithName.empty())
{
// if we have a rename suffix, try to find a new name
@@ -742,7 +742,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
void SdStyleSheetPool::CopyLayoutSheets(const OUString& rLayoutName, SdStyleSheetPool& rSourcePool, SdStyleSheetVector& rCreatedSheets)
{
- SfxStyleSheetBase* pSheet = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
std::vector<OUString> aNameList;
CreateLayoutSheetNames(rLayoutName,aNameList);
@@ -847,13 +847,13 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
{
OUString aName;
OUString aHelpFile;
- SfxStyleSheetBase* pSheet = NULL;
- SfxStyleSheetBase* pParent = NULL;
+ SfxStyleSheetBase* pSheet = nullptr;
+ SfxStyleSheetBase* pParent = nullptr;
sal_uInt16 nUsedMask = SFXSTYLEBIT_USED;
aName = SD_RESSTR(STR_PSEUDOSHEET_TITLE);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
@@ -862,7 +862,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_TITLE );
aName = SD_RESSTR(STR_PSEUDOSHEET_SUBTITLE);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
@@ -871,7 +871,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_SUBTITLE );
aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUNDOBJECTS);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
@@ -880,7 +880,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUNDOBJECTS );
aName = SD_RESSTR(STR_PSEUDOSHEET_BACKGROUND);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
@@ -889,7 +889,7 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_BACKGROUND );
aName = SD_RESSTR(STR_PSEUDOSHEET_NOTES);
- if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
pSheet->SetParent( OUString() );
@@ -897,14 +897,14 @@ void SdStyleSheetPool::CreatePseudosIfNecessary()
}
pSheet->SetHelpId( aHelpFile, HID_PSEUDOSHEET_NOTES );
- pParent = NULL;
+ pParent = nullptr;
SetSearchMask(SD_STYLE_FAMILY_PSEUDO);
aName = SD_RESSTR(STR_PSEUDOSHEET_OUTLINE);
for (sal_Int32 nLevel = 1; nLevel < 10; nLevel++)
{
OUString aLevelName( aName + " " + OUString::number( nLevel ) );
- if( (pSheet = Find(aLevelName, SD_STYLE_FAMILY_PSEUDO)) == 0 )
+ if( (pSheet = Find(aLevelName, SD_STYLE_FAMILY_PSEUDO)) == nullptr )
{
pSheet = &Make(aLevelName, SD_STYLE_FAMILY_PSEUDO, nUsedMask);
@@ -1260,7 +1260,7 @@ void SdStyleSheetPool::RemoveStyleFamily( const SdPage* pPage )
void SdStyleSheetPool::throwIfDisposed() throw(css::uno::RuntimeException)
{
- if( mpDoc == NULL )
+ if( mpDoc == nullptr )
throw DisposedException();
}
@@ -1409,7 +1409,7 @@ void SAL_CALL SdStyleSheetPool::dispose() throw (RuntimeException, std::exceptio
Reference< XComponent > xComp( mxTableFamily, UNO_QUERY );
if( xComp.is() )
xComp->dispose();
- mxTableFamily = 0;
+ mxTableFamily = nullptr;
SdStyleFamilyMap aTempMap;
aTempMap.swap( maStyleFamilyMap );
@@ -1422,7 +1422,7 @@ void SAL_CALL SdStyleSheetPool::dispose() throw (RuntimeException, std::exceptio
{
}
- mpDoc = 0;
+ mpDoc = nullptr;
Clear();
}
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 64bba513cb52..97965f7c75bd 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -149,7 +149,7 @@ SdStyleSheet::SdStyleSheet( const SdStyleSheet & r )
SdStyleSheet::~SdStyleSheet()
{
delete pSet;
- pSet = NULL; // that following destructors also get a change
+ pSet = nullptr; // that following destructors also get a change
}
void SdStyleSheet::SetApiName( const OUString& rApiName )
@@ -204,7 +204,7 @@ bool SdStyleSheet::SetParent(const OUString& rParentName)
else
{
bResult = true;
- GetItemSet().SetParent(NULL);
+ GetItemSet().SetParent(nullptr);
Broadcast( SfxSimpleHint( SFX_HINT_DATACHANGED ) );
}
}
@@ -369,10 +369,10 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
{
OUString aRealStyle;
OUString aSep( SD_LT_SEPARATOR );
- SdStyleSheet* pRealStyle = NULL;
+ SdStyleSheet* pRealStyle = nullptr;
SdDrawDocument* pDoc = static_cast<SdStyleSheetPool*>(pPool)->GetDoc();
- ::sd::DrawViewShell* pDrawViewShell = 0;
+ ::sd::DrawViewShell* pDrawViewShell = nullptr;
::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase* >( SfxViewShell::Current() );
if( pBase )
@@ -474,7 +474,7 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const
*/
SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const
{
- SdStyleSheet* pPseudoStyle = NULL;
+ SdStyleSheet* pPseudoStyle = nullptr;
OUString aSep( SD_LT_SEPARATOR );
OUString aStyleName(aName);
// without layout name and separator
@@ -659,7 +659,7 @@ void SdStyleSheet::SetHelpId( const OUString& r, sal_uLong nId )
{ RTL_CONSTASCII_STRINGPARAM( "headline1" ), HID_POOLSHEET_HEADLINE1 },
{ RTL_CONSTASCII_STRINGPARAM( "headline2" ), HID_POOLSHEET_HEADLINE2 },
{ RTL_CONSTASCII_STRINGPARAM( "measure" ), HID_POOLSHEET_MEASURE },
- { 0, 0, 0 }
+ { nullptr, 0, 0 }
};
ApiNameMap* p = pApiNameMap;
@@ -703,7 +703,7 @@ SdStyleSheet* SdStyleSheet::CreateEmptyUserStyle( SfxStyleSheetBasePool& rPool,
{
aName = aPrefix + OUString::number( nIndex++ );
}
- while( rPool.Find( aName, eFamily ) != 0 );
+ while( rPool.Find( aName, eFamily ) != nullptr );
return new SdStyleSheet(aName, rPool, eFamily, SFXSTYLEBIT_USERDEF);
}
@@ -977,7 +977,7 @@ void SAL_CALL SdStyleSheet::setPropertyValue( const OUString& aPropertyName, con
throwIfDisposed();
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
{
throw UnknownPropertyException();
}
@@ -1064,7 +1064,7 @@ Any SAL_CALL SdStyleSheet::getPropertyValue( const OUString& PropertyName ) thro
throwIfDisposed();
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
{
throw UnknownPropertyException();
}
@@ -1167,7 +1167,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
throw UnknownPropertyException();
if( pEntry->nWID == WID_STYLE_FAMILY )
@@ -1226,7 +1226,7 @@ PropertyState SAL_CALL SdStyleSheet::getPropertyState( const OUString& PropertyN
case XATTR_LINEDASH:
{
const NameOrIndex* pItem = static_cast<const NameOrIndex*>(rStyleSet.GetItem((sal_uInt16)pEntry->nWID));
- if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
+ if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
eState = PropertyState_DEFAULT_VALUE;
}
}
@@ -1261,7 +1261,7 @@ void SAL_CALL SdStyleSheet::setPropertyToDefault( const OUString& PropertyName )
throwIfDisposed();
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( PropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
throw UnknownPropertyException();
SfxItemSet &rStyleSet = GetItemSet();
@@ -1285,7 +1285,7 @@ Any SAL_CALL SdStyleSheet::getPropertyDefault( const OUString& aPropertyName ) t
throwIfDisposed();
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
throw UnknownPropertyException();
Any aRet;
if( pEntry->nWID == WID_STYLE_FAMILY )
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index b9bb8d7908ca..39f3ca5aa99e 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -54,7 +54,7 @@ protected:
UndoTextAPIChanged::UndoTextAPIChanged(SdrModel& rModel, TextApiObject* pTextObj )
: SdrUndoAction( rModel )
, mpOldText( pTextObj->CreateText() )
-, mpNewText( 0 )
+, mpNewText( nullptr )
, mxTextObj( pTextObj )
{
}
@@ -152,7 +152,7 @@ void SAL_CALL TextApiObject::dispose() throw(RuntimeException)
{
mpSource->Dispose();
delete mpSource;
- mpSource = 0;
+ mpSource = nullptr;
}
}
@@ -209,8 +209,8 @@ TextAPIEditSource::TextAPIEditSource(SdDrawDocument* pDoc)
: pImpl(new TextAPIEditSource_Impl)
{
pImpl->mpDoc = pDoc;
- pImpl->mpOutliner = 0;
- pImpl->mpTextForwarder = 0;
+ pImpl->mpOutliner = nullptr;
+ pImpl->mpTextForwarder = nullptr;
pImpl->mnRef = 1;
}
@@ -222,18 +222,18 @@ TextAPIEditSource::~TextAPIEditSource()
void TextAPIEditSource::Dispose()
{
- pImpl->mpDoc=0;
+ pImpl->mpDoc=nullptr;
delete pImpl->mpTextForwarder;
- pImpl->mpTextForwarder = 0;
+ pImpl->mpTextForwarder = nullptr;
delete pImpl->mpOutliner;
- pImpl->mpOutliner = 0;
+ pImpl->mpOutliner = nullptr;
}
SvxTextForwarder* TextAPIEditSource::GetTextForwarder()
{
if( !pImpl->mpDoc )
- return 0; // mpDoc == 0 can be used to flag this as disposed
+ return nullptr; // mpDoc == 0 can be used to flag this as disposed
if( !pImpl->mpOutliner )
{
@@ -268,7 +268,7 @@ OutlinerParaObject* TextAPIEditSource::CreateText()
if ( pImpl->mpDoc && pImpl->mpOutliner )
return pImpl->mpOutliner->CreateParaObject();
else
- return 0;
+ return nullptr;
}
OUString TextAPIEditSource::GetText()
diff --git a/sd/source/core/undo/undomanager.cxx b/sd/source/core/undo/undomanager.cxx
index d7006175ea8a..20e13edde08a 100644
--- a/sd/source/core/undo/undomanager.cxx
+++ b/sd/source/core/undo/undomanager.cxx
@@ -23,7 +23,7 @@ using namespace sd;
UndoManager::UndoManager( sal_uInt16 nMaxUndoActionCount /* = 20 */ )
: SdrUndoManager( nMaxUndoActionCount )
- , mpLinkedUndoManager(NULL)
+ , mpLinkedUndoManager(nullptr)
{
}
@@ -56,7 +56,7 @@ void UndoManager::SetLinkedUndoManager (::svl::IUndoManager* pLinkedUndoManager)
void UndoManager::ClearLinkedRedoActions()
{
- if (mpLinkedUndoManager != NULL)
+ if (mpLinkedUndoManager != nullptr)
mpLinkedUndoManager->ClearRedo();
}
diff --git a/sd/source/core/undo/undoobjects.cxx b/sd/source/core/undo/undoobjects.cxx
index 12e7828828d5..c8017f335228 100644
--- a/sd/source/core/undo/undoobjects.cxx
+++ b/sd/source/core/undo/undoobjects.cxx
@@ -26,9 +26,9 @@
using namespace sd;
UndoRemovePresObjectImpl::UndoRemovePresObjectImpl( SdrObject& rObject )
-: mpUndoUsercall(0)
-, mpUndoAnimation(0)
-, mpUndoPresObj(0)
+: mpUndoUsercall(nullptr)
+, mpUndoAnimation(nullptr)
+, mpUndoPresObj(nullptr)
{
SdPage* pPage = dynamic_cast< SdPage* >( rObject.GetPage() );
if( pPage )
@@ -158,7 +158,7 @@ void UndoReplaceObject::Redo()
UndoObjectSetText::UndoObjectSetText( SdrObject& rObject, sal_Int32 nText )
: SdrUndoObjSetText( rObject, nText )
-, mpUndoAnimation(0)
+, mpUndoAnimation(nullptr)
, mbNewEmptyPresObj(false)
, mxSdrObject( &rObject )
{
@@ -207,7 +207,7 @@ void UndoObjectSetText::Redo()
UndoObjectUserCall::UndoObjectUserCall(SdrObject& rObject)
: SdrUndoObj(rObject)
, mpOldUserCall(static_cast<SdPage*>(rObject.GetUserCall()))
-, mpNewUserCall(0)
+, mpNewUserCall(nullptr)
, mxSdrObject( &rObject )
{
}
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 58feda6fa5d1..6f50c98848ed 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -80,10 +80,10 @@ PPTWriter::PPTWriter( tools::SvRef<SotStorage>& rSvStorage,
mbFontIndependentLineSpacing( false ),
mnTextSize( 0 ),
mrStg ( rSvStorage ),
- mpCurUserStrm ( NULL ),
- mpStrm ( NULL ),
- mpPicStrm ( NULL ),
- mpPptEscherEx ( NULL ),
+ mpCurUserStrm ( nullptr ),
+ mpStrm ( nullptr ),
+ mpPicStrm ( nullptr ),
+ mpPptEscherEx ( nullptr ),
mnVBAOleOfs ( 0 ),
mpVBA ( pVBA ),
mnExEmbed ( 0 ),
@@ -287,7 +287,7 @@ void PPTWriter::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNum, sal_
EscherSolverContainer aSolverContainer;
mpPptEscherEx->OpenContainer( EPP_PPDrawing );
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
- mpPptEscherEx->EnterGroup(0,0);
+ mpPptEscherEx->EnterGroup(nullptr,nullptr);
ImplWritePage( rLayout, aSolverContainer, NORMAL, false, nPageNum ); // the shapes of the pages are created in the PPT document
mpPptEscherEx->LeaveGroup();
@@ -426,7 +426,7 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS
mpPptEscherEx->OpenContainer( EPP_PPDrawing );
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
- mpPptEscherEx->EnterGroup(0,0);
+ mpPptEscherEx->EnterGroup(nullptr,nullptr);
ImplWritePage( GetLayout( 0 ), aSolverContainer, MASTER, true ); // the shapes of the pages are created in the PPT document
mpPptEscherEx->LeaveGroup();
@@ -539,7 +539,7 @@ bool PPTWriter::ImplCreateDocumentSummaryInformation()
else
{
sfx2::SaveOlePropertySet( xDocProps, mrStg,
- NULL, &aGuidSeq, &aHyperSeq );
+ nullptr, &aGuidSeq, &aHyperSeq );
}
}
@@ -1013,7 +1013,7 @@ bool PPTWriter::ImplCreateMainNotes()
.WriteUInt32( 0 ); // follow nothing
mpPptEscherEx->OpenContainer( EPP_PPDrawing );
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
- mpPptEscherEx->EnterGroup(0,0);
+ mpPptEscherEx->EnterGroup(nullptr,nullptr);
ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, true );
@@ -1142,7 +1142,7 @@ void PPTWriter::ImplWriteNotes( sal_uInt32 nPageNum )
mpPptEscherEx->OpenContainer( EPP_PPDrawing );
mpPptEscherEx->OpenContainer( ESCHER_DgContainer );
- mpPptEscherEx->EnterGroup(0,0);
+ mpPptEscherEx->EnterGroup(nullptr,nullptr);
ImplWritePage( GetLayout( 20 ), aSolverContainer, NOTICE, false ); // the shapes of the pages are created in the PPT document
@@ -1258,7 +1258,7 @@ void PPTWriter::ImplWriteOLE( )
for ( std::vector<PPTExOleObjEntry*>::const_iterator it = maExOleObj.begin(); it != maExOleObj.end(); ++it )
{
PPTExOleObjEntry* pPtr = *it;
- SvMemoryStream* pStrm = NULL;
+ SvMemoryStream* pStrm = nullptr;
pPtr->nOfsB = mpStrm->Tell();
switch ( pPtr->eType )
{
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index 0343a36468e5..c500464bff65 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -141,7 +141,7 @@ struct TextRuleEntry
explicit TextRuleEntry( int nPg ) :
nPageNumber( nPg ),
- pOut ( NULL ){};
+ pOut ( nullptr ){};
~TextRuleEntry() { delete pOut; };
};
@@ -206,14 +206,14 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
void ImplWriteExtParaHeader( SvMemoryStream& rSt, sal_uInt32 nRef, sal_uInt32 nInstance, sal_uInt32 nSlideId );
- sal_uInt32 ImplProgBinaryTag( SvStream* pOutStrm = NULL );
- sal_uInt32 ImplProgBinaryTagContainer( SvStream* pOutStrm = NULL, SvMemoryStream* pBinTag = NULL );
- sal_uInt32 ImplProgTagContainer( SvStream* pOutStrm = NULL, SvMemoryStream* pBinTag = NULL );
- static sal_uInt32 ImplOutlineViewInfoContainer( SvStream* pOutStrm = NULL );
- static sal_uInt32 ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream* pOutStrm = NULL );
- sal_uInt32 ImplVBAInfoContainer( SvStream* pOutStrm = NULL );
- sal_uInt32 ImplDocumentListContainer( SvStream* pOutStrm = NULL );
- sal_uInt32 ImplMasterSlideListContainer( SvStream* pOutStrm = NULL );
+ sal_uInt32 ImplProgBinaryTag( SvStream* pOutStrm = nullptr );
+ sal_uInt32 ImplProgBinaryTagContainer( SvStream* pOutStrm = nullptr, SvMemoryStream* pBinTag = nullptr );
+ sal_uInt32 ImplProgTagContainer( SvStream* pOutStrm = nullptr, SvMemoryStream* pBinTag = nullptr );
+ static sal_uInt32 ImplOutlineViewInfoContainer( SvStream* pOutStrm = nullptr );
+ static sal_uInt32 ImplSlideViewInfoContainer( sal_uInt32 nInstance, SvStream* pOutStrm = nullptr );
+ sal_uInt32 ImplVBAInfoContainer( SvStream* pOutStrm = nullptr );
+ sal_uInt32 ImplDocumentListContainer( SvStream* pOutStrm = nullptr );
+ sal_uInt32 ImplMasterSlideListContainer( SvStream* pOutStrm = nullptr );
public:
static void WriteCString( SvStream&, const OUString&, sal_uInt32 nInstance = 0 );
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index 1c68d99f1845..4fac893d9568 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -74,10 +74,10 @@ public:
virtual bool exportDocument() throw (css::uno::RuntimeException, std::exception) override;
// only needed for import, leave them empty, refactor later XmlFilterBase to export and import base?
- virtual oox::vml::Drawing* getVmlDrawing() override { return NULL; }
- virtual const oox::drawingml::Theme* getCurrentTheme() const override { return NULL; }
+ virtual oox::vml::Drawing* getVmlDrawing() override { return nullptr; }
+ virtual const oox::drawingml::Theme* getCurrentTheme() const override { return nullptr; }
virtual const oox::drawingml::table::TableStyleListPtr getTableStyles() override { return oox::drawingml::table::TableStyleListPtr(); }
- virtual oox::drawingml::chart::ChartConverter* getChartConverter() override { return NULL; }
+ virtual oox::drawingml::chart::ChartConverter* getChartConverter() override { return nullptr; }
static const char* GetSideDirection( sal_uInt8 nDirection );
static const char* GetCornerDirection( sal_uInt8 nDirection );
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index e4b3ccd2f6e5..41426b5240f8 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2102,7 +2102,7 @@ bool PPTWriter::ImplCreatePresentationPlaceholder( const bool bMasterPage, const
SvMemoryStream aExtBu( 0x200, 0x200 );
SvMemoryStream aClientTextBox( 0x200, 0x200 );
- ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, NULL, aExtBu, &aPropOpt );
+ ImplWriteTextStyleAtom( aClientTextBox, nStyleInstance, 0, nullptr, aExtBu, &aPropOpt );
aPropOpt.CreateTextProperties( mXPropSet, mnTxId += 0x60 );
aPropOpt.CreateShapeProperties( mXShape );
@@ -2174,8 +2174,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
bool bSecOutl = false;
sal_uInt32 nPObjects = 0;
- SvMemoryStream* pClientTextBox = NULL;
- SvMemoryStream* pClientData = NULL;
+ SvMemoryStream* pClientTextBox = nullptr;
+ SvMemoryStream* pClientData = nullptr;
while( GetNextGroupEntry() )
{
@@ -2229,7 +2229,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
aXIndexAccess( mXShape, css::uno::UNO_QUERY );
if ( EnterGroup( aXIndexAccess ) )
{
- SvMemoryStream* pTmp = NULL;
+ SvMemoryStream* pTmp = nullptr;
if ( bEffect && !mbUseNewAnimations )
{
@@ -3183,7 +3183,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
}
else if ( (mType == "drawing.Table") || (mType == "presentation.Table") )
{
- SvMemoryStream* pTmp = NULL;
+ SvMemoryStream* pTmp = nullptr;
if ( bEffect && !mbUseNewAnimations )
{
pTmp = new SvMemoryStream( 0x200, 0x200 );
@@ -3312,13 +3312,13 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
TextRuleEntry aTextRule( nPageNumber );
SvMemoryStream aExtBu( 0x200, 0x200 );
ImplGetText();
- ImplWriteTextStyleAtom( *pClientTextBox, nTextType, nPObjects, &aTextRule, aExtBu, NULL );
+ ImplWriteTextStyleAtom( *pClientTextBox, nTextType, nPObjects, &aTextRule, aExtBu, nullptr );
ImplWriteExtParaHeader( aExtBu, nPObjects++, nTextType, nPageNumber + 0x100 );
SvMemoryStream* pOut = aTextRule.pOut;
if ( pOut )
{
pClientTextBox->Write( pOut->GetData(), pOut->Tell() );
- delete pOut, aTextRule.pOut = NULL;
+ delete pOut, aTextRule.pOut = nullptr;
}
if ( aExtBu.Tell() )
{
@@ -3345,7 +3345,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
pClientTextBox = new SvMemoryStream( 0x200, 0x200 );
SvMemoryStream aExtBu( 0x200, 0x200 );
- ImplWriteTextStyleAtom( *pClientTextBox, nInstance2, 0, NULL, aExtBu, &aPropOpt );
+ ImplWriteTextStyleAtom( *pClientTextBox, nInstance2, 0, nullptr, aExtBu, &aPropOpt );
if ( aExtBu.Tell() )
{
if ( !pClientData )
@@ -3381,7 +3381,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
.WriteUInt32( pClientData->Tell() );
mpStrm->Write( pClientData->GetData(), pClientData->Tell() );
- delete pClientData, pClientData = NULL;
+ delete pClientData, pClientData = nullptr;
}
if ( pClientTextBox )
{
@@ -3389,7 +3389,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
.WriteUInt32( pClientTextBox->Tell() );
mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() );
- delete pClientTextBox, pClientTextBox = NULL;
+ delete pClientTextBox, pClientTextBox = nullptr;
}
mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer
}
@@ -3441,7 +3441,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
pClientTextBox = new SvMemoryStream( 0x200, 0x200 );
SvMemoryStream aExtBu( 0x200, 0x200 );
- ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOpt );
+ ImplWriteTextStyleAtom( *pClientTextBox, EPP_TEXTTYPE_Other, 0, nullptr, aExtBu, &aPropOpt );
aPropOpt.CreateShapeProperties( mXShape );
aPropOpt.Commit( *mpStrm );
@@ -3454,7 +3454,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
.WriteUInt32( pClientTextBox->Tell() );
mpStrm->Write( pClientTextBox->GetData(), pClientTextBox->Tell() );
- delete pClientTextBox, pClientTextBox = NULL;
+ delete pClientTextBox, pClientTextBox = nullptr;
mpPptEscherEx->CloseContainer(); // ESCHER_SpContainer
@@ -3690,7 +3690,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
SvMemoryStream aClientTextBox( 0x200, 0x200 );
SvMemoryStream aExtBu( 0x200, 0x200 );
- ImplWriteTextStyleAtom( aClientTextBox, EPP_TEXTTYPE_Other, 0, NULL, aExtBu, &aPropOptSp );
+ ImplWriteTextStyleAtom( aClientTextBox, EPP_TEXTTYPE_Other, 0, nullptr, aExtBu, &aPropOptSp );
// need write client data for extend bullet
if ( aExtBu.Tell() )
@@ -3701,7 +3701,7 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
.WriteUInt32( pClientData->Tell() );
mpStrm->Write( pClientData->GetData(), pClientData->Tell() );
- delete pClientData, pClientData = NULL;
+ delete pClientData, pClientData = nullptr;
}
aPropOptSp.Commit( *mpStrm );
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index f4b16e8d13da..2dcea0df8a8d 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -116,8 +116,8 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo
}
else if ( eTranslateMode & TRANSLATE_MEASURE )
{
- const sal_Char* pDest[] = { "#ppt_x", "#ppt_y", "#ppt_w", "#ppt_h", NULL };
- const sal_Char* pSource[] = { "x", "y", "width", "height", NULL };
+ const sal_Char* pDest[] = { "#ppt_x", "#ppt_y", "#ppt_w", "#ppt_h", nullptr };
+ const sal_Char* pSource[] = { "x", "y", "width", "height", nullptr };
sal_Int32 nIndex = 0;
const sal_Char** ps = pSource;
@@ -228,7 +228,7 @@ sal_uInt32 AnimationExporter::TranslatePresetSubType( const sal_uInt32 nPresetCl
const sal_Char* AnimationExporter::FindTransitionName( const sal_Int16 nType, const sal_Int16 nSubType, const bool bDirection )
{
- const sal_Char* pRet = NULL;
+ const sal_Char* pRet = nullptr;
int nFit = 0;
const oox::ppt::transition* p = oox::ppt::transition::getList();
@@ -342,7 +342,7 @@ void AnimationExporter::doexport( const Reference< XDrawPage >& xPage, SvStream&
if( xRootNode.is() )
{
processAfterEffectNodes( xRootNode );
- exportNode( rStrm, xRootNode, NULL, DFF_msofbtAnimGroup, 1, 0, false, AnimationFill::AUTO );
+ exportNode( rStrm, xRootNode, nullptr, DFF_msofbtAnimGroup, 1, 0, false, AnimationFill::AUTO );
}
}
}
@@ -1583,7 +1583,7 @@ sal_uInt32 AnimationExporter::GetValueTypeForAttributeName( const OUString& rAtt
{ "width", 1 },
{ "x", 1 },
{ "y", 1 },
- { NULL, 0 }
+ { nullptr, 0 }
};
const Entry* pPtr = &lcl_attributeMap[ 0 ];
while( pPtr->pName )
diff --git a/sd/source/filter/eppt/pptx-epptbase.cxx b/sd/source/filter/eppt/pptx-epptbase.cxx
index 75931b2e068b..450b835a6bae 100644
--- a/sd/source/filter/eppt/pptx-epptbase.cxx
+++ b/sd/source/filter/eppt/pptx-epptbase.cxx
@@ -128,8 +128,8 @@ static PHLayout pPHLayout[] =
};
PPTWriterBase::PPTWriterBase()
- : mXModel(0)
- , mXStatusIndicator(0)
+ : mXModel(nullptr)
+ , mXStatusIndicator(nullptr)
, mbStatusIndicator(false)
, mbPresObj(false)
, mbEmptyPresObj(false)
@@ -141,7 +141,7 @@ PPTWriterBase::PPTWriterBase()
, maMapModeSrc(MAP_100TH_MM)
, maMapModeDest(MAP_INCH, Point(), maFraction, maFraction)
, meLatestPageType(NORMAL)
- , mpStyleSheet(0)
+ , mpStyleSheet(nullptr)
{
DBG(printf ("PPTWriterBase::PPTWriterBase()\n"));
}
@@ -161,7 +161,7 @@ PPTWriterBase::PPTWriterBase( const Reference< XModel > & rXModel,
, maMapModeSrc(MAP_100TH_MM)
, maMapModeDest(MAP_INCH, Point(), maFraction, maFraction)
, meLatestPageType (NORMAL)
- , mpStyleSheet(0)
+ , mpStyleSheet(nullptr)
{
}
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 4d10949a3d8a..2924c1ac5037 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -448,7 +448,7 @@ void PowerPointExport::ImplWriteBackground( FSHelperPtr pFS, Reference< XPropert
const char* PowerPointExport::GetSideDirection( sal_uInt8 nDirection )
{
- const char* pDirection = NULL;
+ const char* pDirection = nullptr;
switch(nDirection)
{
@@ -471,7 +471,7 @@ const char* PowerPointExport::GetSideDirection( sal_uInt8 nDirection )
const char* PowerPointExport::GetCornerDirection( sal_uInt8 nDirection )
{
- const char* pDirection = NULL;
+ const char* pDirection = nullptr;
switch( nDirection ) {
case 4:
@@ -522,11 +522,11 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
bool bOOXmlSpecificTransition = false;
sal_Int32 nTransition = 0;
- const char* pDirection = NULL;
- const char* pDirection14 = NULL;
- const char* pOrientation = NULL;
- const char* pThruBlk = NULL;
- const char* pSpokes = NULL;
+ const char* pDirection = nullptr;
+ const char* pDirection14 = nullptr;
+ const char* pOrientation = nullptr;
+ const char* pThruBlk = nullptr;
+ const char* pSpokes = nullptr;
char pSpokesTmp[2] = "0";
// p14
@@ -598,7 +598,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
return;
AnimationSpeed animationSpeed = AnimationSpeed_MEDIUM;
- const char* speed = NULL;
+ const char* speed = nullptr;
sal_Int32 advanceTiming = -1;
sal_Int32 changeType = 0;
@@ -635,7 +635,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- XML_advTm, advanceTiming != -1 ? I32S( advanceTiming*1000 ) : NULL,
+ XML_advTm, advanceTiming != -1 ? I32S( advanceTiming*1000 ) : nullptr,
FSEND );
if (nTransition14)
@@ -660,7 +660,7 @@ void PowerPointExport::WriteTransition( FSHelperPtr pFS )
pFS->startElementNS(XML_p, XML_transition,
XML_spd, speed,
- XML_advTm, advanceTiming != -1 ? I32S( advanceTiming*1000 ) : NULL,
+ XML_advTm, advanceTiming != -1 ? I32S( advanceTiming*1000 ) : nullptr,
FSEND );
if (!bOOXmlSpecificTransition)
@@ -807,7 +807,7 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn
DBG(printf("animate value %d: %f\n", i, aKeyTimes[ i ]));
if( aValues[ i ].hasValue() ) {
pFS->startElementNS( XML_p, XML_tav,
- XML_fmla, sFormula.isEmpty() ? NULL : USS( sFormula ),
+ XML_fmla, sFormula.isEmpty() ? nullptr : USS( sFormula ),
XML_tm, I32S( ( sal_Int32 )( aKeyTimes[ i ]*100000.0 ) ),
FSEND );
pFS->startElementNS( XML_p, XML_val, FSEND );
@@ -849,7 +849,7 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr
DBG(printf("write attribute name: %s\n", USS( rAttributeName )));
- const char* sAttributeName = NULL;
+ const char* sAttributeName = nullptr;
if ( rAttributeName == "Visibility" ) {
sAttributeName = "style.visibility";
} else if ( rAttributeName == "X" ) {
@@ -895,8 +895,8 @@ void PowerPointExport::WriteAnimationNodeAnimate( FSHelperPtr pFS, const Referen
if( !rXAnimate.is() )
return;
- const char* pCalcMode = NULL;
- const char* pValueType = NULL;
+ const char* pCalcMode = nullptr;
+ const char* pValueType = nullptr;
bool bSimple = ( nXmlNodeType != XML_anim );
if( !bSimple ) {
@@ -936,7 +936,7 @@ void PowerPointExport::WriteAnimationNodeAnimateInside( FSHelperPtr pFS, const R
if( !rXAnimate.is() )
return;
- const char* pAdditive = NULL;
+ const char* pAdditive = nullptr;
if( !bSimple ) {
switch( rXAnimate->getAdditive() ) {
@@ -997,8 +997,8 @@ void PowerPointExport::WriteAnimationCondition( FSHelperPtr pFS, Any& rAny, bool
double fDelay = 0;
Timing eTiming;
Event aEvent;
- const char* pDelay = NULL;
- const char* pEvent = NULL;
+ const char* pDelay = nullptr;
+ const char* pEvent = nullptr;
if( rAny >>= fDelay )
bHasFDelay = true;
@@ -1068,11 +1068,11 @@ void PowerPointExport::WriteAnimationCondition( FSHelperPtr pFS, Any& rAny, bool
void PowerPointExport::WriteAnimationNodeCommonPropsStart( FSHelperPtr pFS, const Reference< XAnimationNode >& rXNode, bool bSingle, bool bMainSeqChild )
{
- const char* pDuration = NULL;
- const char* pRestart = NULL;
- const char* pNodeType = NULL;
- const char* pPresetClass = NULL;
- const char* pFill = NULL;
+ const char* pDuration = nullptr;
+ const char* pRestart = nullptr;
+ const char* pNodeType = nullptr;
+ const char* pPresetClass = nullptr;
+ const char* pFill = nullptr;
double fDuration = 0;
Any aAny;
@@ -1201,8 +1201,8 @@ void PowerPointExport::WriteAnimationNodeCommonPropsStart( FSHelperPtr pFS, cons
XML_nodeType, pNodeType,
XML_fill, pFill,
XML_presetClass, pPresetClass,
- XML_presetID, bPresetId ? I64S( nPresetId ) : NULL,
- XML_presetSubtype, bPresetSubType ? I64S( nPresetSubType ) : NULL,
+ XML_presetID, bPresetId ? I64S( nPresetId ) : nullptr,
+ XML_presetSubtype, bPresetSubType ? I64S( nPresetSubType ) : nullptr,
FSEND );
aAny = rXNode->getBegin();
@@ -1265,11 +1265,11 @@ void PowerPointExport::WriteAnimationNodeSeq( FSHelperPtr pFS, const Reference<
WriteAnimationNodeCommonPropsStart( pFS, rXNode, true, bMainSeqChild );
pFS->startElementNS( XML_p, XML_prevCondLst, FSEND );
- WriteAnimationCondition( pFS, NULL, "onPrev", 0, true );
+ WriteAnimationCondition( pFS, nullptr, "onPrev", 0, true );
pFS->endElementNS( XML_p, XML_prevCondLst );
pFS->startElementNS( XML_p, XML_nextCondLst, FSEND );
- WriteAnimationCondition( pFS, NULL, "onNext", 0, true );
+ WriteAnimationCondition( pFS, nullptr, "onNext", 0, true );
pFS->endElementNS( XML_p, XML_nextCondLst );
pFS->endElementNS( XML_p, XML_seq );
@@ -1299,7 +1299,7 @@ void PowerPointExport::WriteAnimationNode( FSHelperPtr pFS, const Reference< XAn
DBG(printf ("export node type: %d\n", rXNode->getType()));
sal_Int32 xmlNodeType = -1;
typedef void (PowerPointExport::*AnimationNodeWriteMethod)( FSHelperPtr, const Reference< XAnimationNode >&, sal_Int32, bool );
- AnimationNodeWriteMethod pMethod = NULL;
+ AnimationNodeWriteMethod pMethod = nullptr;
switch( rXNode->getType() ) {
case AnimationNodeType::PAR:
@@ -1520,7 +1520,7 @@ void PowerPointExport::ImplWriteSlide( sal_uInt32 nPageNum, sal_uInt32 nMasterNu
mpSlidesFSArray.resize( mnPages );
mpSlidesFSArray[ nPageNum ] = pFS;
- const char* pShow = NULL;
+ const char* pShow = nullptr;
if( GETA( Visible ) ) {
bool bShow(false);
@@ -1887,7 +1887,7 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape( Reference< XShape > x
mpFS->endElementNS( XML_p, XML_cNvSpPr );
mpFS->startElementNS( XML_p, XML_nvPr, FSEND );
- const char* pType = NULL;
+ const char* pType = nullptr;
switch( ePlaceholder ) {
case SlideImage:
pType = "sldImg";
@@ -2301,9 +2301,9 @@ static const struct cppu::ImplementationEntry g_entries[] =
oox::core::PowerPointExport_getImplementationName,
oox::core::PowerPointExport_getSupportedServiceNames,
cppu::createSingleComponentFactory,
- 0 , 0
+ nullptr , 0
},
- { 0, 0, 0, 0, 0, 0 }
+ { nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
};
#ifdef __cplusplus
diff --git a/sd/source/filter/eppt/pptx-grouptable.cxx b/sd/source/filter/eppt/pptx-grouptable.cxx
index 70f661a4d455..27879d6ea753 100644
--- a/sd/source/filter/eppt/pptx-grouptable.cxx
+++ b/sd/source/filter/eppt/pptx-grouptable.cxx
@@ -27,7 +27,7 @@ GroupTable::GroupTable()
, mnCurrentGroupEntry(0)
, mnMaxGroupEntry(0)
, mnGroupsClosed(0)
- , mpGroupEntry(NULL)
+ , mpGroupEntry(nullptr)
{
ImplResizeGroupTable( 32 );
}
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx b/sd/source/filter/eppt/pptx-stylesheet.cxx
index 04323e6b670c..89c72956ebd3 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -388,8 +388,8 @@ PPTExStyleSheet::PPTExStyleSheet( sal_uInt16 nDefaultTab, PPTExBulletProvider* p
{
for ( int nInstance = EPP_TEXTTYPE_Title; nInstance <= EPP_TEXTTYPE_QuarterBody; nInstance++ )
{
- mpParaSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? NULL : new PPTExParaSheet( nInstance, nDefaultTab, pBuProv );
- mpCharSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? NULL : new PPTExCharSheet( nInstance );
+ mpParaSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? nullptr : new PPTExParaSheet( nInstance, nDefaultTab, pBuProv );
+ mpCharSheet[ nInstance ] = ( nInstance == EPP_TEXTTYPE_notUsed ) ? nullptr : new PPTExCharSheet( nInstance );
}
}
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index c9f3d8974eb5..6bc7dfd1b878 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -60,8 +60,8 @@ PortionObj::PortionObj( const css::uno::Reference< css::beans::XPropertySet > &
mnAsianOrComplexFont( 0xffff ),
mnTextSize ( 0 ),
mbLastPortion ( true ),
- mpText ( NULL ),
- mpFieldEntry ( NULL )
+ mpText ( nullptr ),
+ mpFieldEntry ( nullptr )
{
mXPropSet = rXPropSet;
@@ -83,8 +83,8 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang
, mnAsianOrComplexFont(0xffff)
, mnCharEscapement(0)
, mbLastPortion(bLast)
- , mpText(NULL)
- , mpFieldEntry(NULL)
+ , mpText(nullptr)
+ , mpFieldEntry(nullptr)
{
OUString aString( rXTextRange->getString() );
OUString aURL;
@@ -96,7 +96,7 @@ PortionObj::PortionObj(css::uno::Reference< css::text::XTextRange > & rXTextRang
if ( mnTextSize )
{
bool bRTL_endingParen = false;
- mpFieldEntry = NULL;
+ mpFieldEntry = nullptr;
sal_uInt32 nFieldType = 0;
mXPropSet.set( rXTextRange, css::uno::UNO_QUERY );
@@ -456,12 +456,12 @@ void PortionObj::ImplConstruct( const PortionObj& rPortionObj )
memcpy( mpText, rPortionObj.mpText, mnTextSize << 1 );
}
else
- mpText = NULL;
+ mpText = nullptr;
if ( rPortionObj.mpFieldEntry )
mpFieldEntry = new FieldEntry( *( rPortionObj.mpFieldEntry ) );
else
- mpFieldEntry = NULL;
+ mpFieldEntry = nullptr;
}
sal_uInt32 PortionObj::ImplCalculateTextPositions( sal_uInt32 nCurrentTextPosition )
@@ -1384,11 +1384,11 @@ void FontCollectionEntry::ImplInit( const OUString& rName )
FontCollection::~FontCollection()
{
pVDev.disposeAndClear();
- xPPTBreakIter = NULL;
+ xPPTBreakIter = nullptr;
}
FontCollection::FontCollection() :
- pVDev ( NULL )
+ pVDev ( nullptr )
{
xPPTBreakIter = css::i18n::BreakIterator::create( ::comphelper::getProcessComponentContext() );
}
@@ -1439,7 +1439,7 @@ sal_uInt32 FontCollection::GetId( FontCollectionEntry& rEntry )
const FontCollectionEntry* FontCollection::GetById( sal_uInt32 nId )
{
- return nId < maFonts.size() ? &maFonts[nId] : NULL;
+ return nId < maFonts.size() ? &maFonts[nId] : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 2b4b9704ca69..07899819f54c 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -240,7 +240,7 @@ bool SdGRFFilter::Export()
uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
uno::Reference< drawing::XGraphicExportFilter > xExporter = drawing::GraphicExportFilter::create( xContext );
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sd::DrawViewShell* pDrawViewShell = dynamic_cast<::sd::DrawViewShell* >(mrDocShell.GetViewShell() );
PageKind ePageKind = PK_STANDARD;
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index cfe2ea237568..aee3bdf1a7e3 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -349,7 +349,7 @@ HtmlExport::HtmlExport(
: maPath( aPath ),
mpDoc(pExpDoc),
mpDocSh( pDocShell ),
- meEC(NULL),
+ meEC(nullptr),
meMode( PUBLISH_SINGLE_DOCUMENT ),
mbContentsPage(false),
mnButtonThema(-1),
@@ -803,7 +803,7 @@ void HtmlExport::ExportHtml()
void HtmlExport::SetDocColors( SdPage* pPage )
{
- if( pPage == NULL )
+ if( pPage == nullptr )
pPage = mpDoc->GetSdPage(0, PK_STANDARD);
svtools::ColorConfig aConfig;
@@ -812,19 +812,19 @@ void HtmlExport::SetDocColors( SdPage* pPage )
maLinkColor = Color(aConfig.GetColorValue(svtools::LINKS).nColor);
maTextColor = Color(COL_BLACK);
- SfxStyleSheet* pSheet = NULL;
+ SfxStyleSheet* pSheet = nullptr;
if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS )
{
// default text color from the outline template of the first page
pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_OUTLINE);
- if(pSheet == NULL)
+ if(pSheet == nullptr)
pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TEXT);
- if(pSheet == NULL)
+ if(pSheet == nullptr)
pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
}
- if(pSheet == NULL)
+ if(pSheet == nullptr)
pSheet = mpDoc->GetDefaultStyleSheet();
if(pSheet)
@@ -852,7 +852,7 @@ void HtmlExport::InitProgress( sal_uInt16 nProgrCount )
void HtmlExport::ResetProgress()
{
delete mpProgress;
- mpProgress = NULL;
+ mpProgress = nullptr;
}
void HtmlExport::ExportKiosk()
@@ -1034,7 +1034,7 @@ bool HtmlExport::CreateImagesForPresPages( bool bThumbnail)
SdrTextObj* HtmlExport::GetLayoutTextObject(SdrPage* pPage)
{
const size_t nObjectCount = pPage->GetObjCount();
- SdrTextObj* pResult = NULL;
+ SdrTextObj* pResult = nullptr;
for (size_t nObject = 0; nObject < nObjectCount; ++nObject)
{
@@ -1282,7 +1282,7 @@ void HtmlExport::WriteTable(OUStringBuffer& aStr, SdrTableObj* pTableObject, Sdr
sal_Int32 nCellIndex = nRow * nColCount + nCol;
SdrText* pText = pTableObject->getText(nCellIndex);
- if (pText == NULL)
+ if (pText == nullptr)
continue;
WriteOutlinerParagraph(aStr, pOutliner, pText->GetOutlinerParaObject(), rBackgroundColor, false);
aStr.append(" </td>\r\n");
@@ -1307,7 +1307,7 @@ void HtmlExport::WriteObjectGroup(OUStringBuffer& aStr, SdrObjGroup* pObjectGrou
else
{
OutlinerParaObject* pOutlinerParagraphObject = pCurrentObject->GetOutlinerParaObject();
- if (pOutlinerParagraphObject != NULL)
+ if (pOutlinerParagraphObject != nullptr)
{
WriteOutlinerParagraph(aStr, pOutliner, pOutlinerParagraphObject, rBackgroundColor, bHeadLine);
}
@@ -1319,7 +1319,7 @@ void HtmlExport::WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutl
OutlinerParaObject* pOutlinerParagraphObject,
const Color& rBackgroundColor, bool bHeadLine)
{
- if (pOutlinerParagraphObject == NULL)
+ if (pOutlinerParagraphObject == nullptr)
return;
pOutliner->SetText(*pOutlinerParagraphObject);
@@ -1332,7 +1332,7 @@ void HtmlExport::WriteOutlinerParagraph(OUStringBuffer& aStr, SdrOutliner* pOutl
for (sal_Int32 nIndex = 0; nIndex < nCount; nIndex++)
{
Paragraph* pParagraph = pOutliner->GetParagraph(nIndex);
- if(pParagraph == NULL)
+ if(pParagraph == nullptr)
continue;
const sal_Int16 nDepth = (sal_uInt16) pOutliner->GetDepth(nIndex);
@@ -1410,7 +1410,7 @@ OUString HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_Int32 nP
{
OUStringBuffer aStr;
- if(NULL == pOutliner)
+ if(nullptr == pOutliner)
return OUString();
// TODO: MALTE!!!
@@ -1419,7 +1419,7 @@ OUString HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_Int32 nP
rEditEngine.SetUpdateMode(true);
Paragraph* pPara = pOutliner->GetParagraph(nPara);
- if(NULL == pPara)
+ if(nullptr == pPara)
return OUString();
HtmlState aState( (mbUserAttr || mbDocColors) ? maTextColor : Color(COL_BLACK) );
@@ -1455,7 +1455,7 @@ OUString HtmlExport::TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState
{
OUStringBuffer aStr;
- if(NULL == pSet)
+ if(nullptr == pSet)
return OUString();
OUString aLink, aTarget;
@@ -1723,7 +1723,7 @@ bool HtmlExport::CreateHtmlForPresPages()
// corresponding names of the html file
bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aURL, bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if (nPgNum == SDRPAGE_NOTFOUND)
{
@@ -1809,7 +1809,7 @@ bool HtmlExport::CreateHtmlForPresPages()
{
bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( pInfo->GetBookmark(), bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if( nPgNum == SDRPAGE_NOTFOUND )
{
@@ -3146,8 +3146,8 @@ OUString HtmlExport::GetButtonName( int nButton )
EasyFile::EasyFile()
{
- pMedium = NULL;
- pOStm = NULL;
+ pMedium = nullptr;
+ pOStm = nullptr;
bOpen = false;
}
@@ -3188,7 +3188,7 @@ sal_uLong EasyFile::createStream( const OUString& rUrl, SvStream* &rpStr )
bOpen = false;
delete pMedium;
delete pOStm;
- pOStm = NULL;
+ pOStm = nullptr;
}
rpStr = pOStm;
@@ -3225,7 +3225,7 @@ sal_uLong EasyFile::close()
sal_uLong nErr = 0;
delete pOStm;
- pOStm = NULL;
+ pOStm = nullptr;
bOpen = false;
@@ -3238,7 +3238,7 @@ sal_uLong EasyFile::close()
nErr = pMedium->GetError();
delete pMedium;
- pMedium = NULL;
+ pMedium = nullptr;
}
return nErr;
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index 1f53980dc175..0c51afb1a7c2 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -66,7 +66,7 @@ private:
OUString maURL2;
public:
- explicit HtmlErrorContext(vcl::Window *pWin=0);
+ explicit HtmlErrorContext(vcl::Window *pWin=nullptr);
virtual ~HtmlErrorContext() {};
virtual bool GetString( sal_uLong nErrId, OUString& rCtxStr ) override;
@@ -146,7 +146,7 @@ class HtmlExport
static SdrTextObj* GetLayoutTextObject(SdrPage* pPage);
- void SetDocColors( SdPage* pPage = NULL );
+ void SetDocColors( SdPage* pPage = nullptr );
bool CreateImagesForPresPages( bool bThumbnails = false );
bool CreateHtmlTextForPresPages();
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 4b353cbaf121..d273e2275fa1 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -366,7 +366,7 @@ SdPublishingDlg::SdPublishingDlg(vcl::Window* pWindow, DocumentType eDocType)
, aAssistentFunc(NOOFPAGES)
, m_bButtonsDirty(true)
, m_bDesignListDirty(false)
-, m_pDesign(NULL)
+, m_pDesign(nullptr)
{
get(pLastPageButton, "lastPageButton");
get(pNextPageButton, "nextPageButton");
@@ -947,7 +947,7 @@ IMPL_LINK_TYPED( SdPublishingDlg, DesignHdl, Button *, pButton, void )
pPage1_OldDesign->Check(false);
pPage1_Designs->Disable();
pPage1_DelDesign->Disable();
- m_pDesign = NULL;
+ m_pDesign = nullptr;
SdPublishingDesign aDefault;
SetDesign(&aDefault);
@@ -1172,7 +1172,7 @@ IMPL_LINK_NOARG_TYPED(SdPublishingDlg, FinishHdl, Button*, void)
{
m_aDesignList.push_back(pDesign);
m_bDesignListDirty = true;
- pDesign = NULL;
+ pDesign = nullptr;
}
}
}
diff --git a/sd/source/filter/ppt/pptatom.cxx b/sd/source/filter/ppt/pptatom.cxx
index 69d964a7dba7..5536d2a55d4a 100644
--- a/sd/source/filter/ppt/pptatom.cxx
+++ b/sd/source/filter/ppt/pptatom.cxx
@@ -25,8 +25,8 @@ using namespace ppt;
Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
: mrStream( rStream )
, maRecordHeader( rRecordHeader )
-, mpFirstChild( 0 )
-, mpNextAtom( 0 )
+, mpFirstChild( nullptr )
+, mpNextAtom( nullptr )
{
if( isContainer() )
{
@@ -34,7 +34,7 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
{
DffRecordHeader aChildHeader;
- Atom* pLastAtom = NULL;
+ Atom* pLastAtom = nullptr;
// retrieve file size (to allow sanity checks)
const sal_Size nStreamPos = mrStream.Tell();
@@ -54,7 +54,7 @@ Atom::Atom( const DffRecordHeader& rRecordHeader, SvStream& rStream )
if( pLastAtom )
pLastAtom->mpNextAtom = pAtom;
- if( mpFirstChild == NULL )
+ if( mpFirstChild == nullptr )
mpFirstChild = pAtom;
pLastAtom = pAtom;
@@ -89,14 +89,14 @@ Atom* Atom::import( const DffRecordHeader& rRootRecordHeader, SvStream& rStCtrl
else
{
delete pRootAtom;
- return NULL;
+ return nullptr;
}
}
/** returns the next child atom after pLast with nRecType or NULL */
const Atom* Atom::findNextChildAtom( sal_uInt16 nRecType, const Atom* pLast ) const
{
- Atom* pChild = pLast != NULL ? pLast->mpNextAtom : mpFirstChild;
+ Atom* pChild = pLast != nullptr ? pLast->mpNextAtom : mpFirstChild;
while( pChild && pChild->maRecordHeader.nRecType != nRecType )
{
pChild = pChild->mpNextAtom;
diff --git a/sd/source/filter/ppt/pptatom.hxx b/sd/source/filter/ppt/pptatom.hxx
index efbd72092604..c23e662442b1 100644
--- a/sd/source/filter/ppt/pptatom.hxx
+++ b/sd/source/filter/ppt/pptatom.hxx
@@ -77,12 +77,12 @@ private:
inline bool Atom::hasChildAtom( sal_uInt16 nRecType ) const
{
- return findFirstChildAtom( nRecType ) != NULL;
+ return findFirstChildAtom( nRecType ) != nullptr;
}
inline const Atom* Atom::findFirstChildAtom( sal_uInt16 nRecType ) const
{
- return findNextChildAtom( nRecType, NULL );
+ return findNextChildAtom( nRecType, nullptr );
}
inline const Atom* Atom::findFirstChildAtom() const
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index fe9d6d34d720..4d716e740dc1 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -390,7 +390,7 @@ bool ImplSdPPTImport::Import()
nPropCount /= 6; // 6 properties per hyperlink
- SdHyperlinkEntry* pHyperlink = 0;
+ SdHyperlinkEntry* pHyperlink = nullptr;
for ( i = 0; i < nPropCount; i++ )
{
pHyperlink = new SdHyperlinkEntry;
@@ -606,7 +606,7 @@ bool ImplSdPPTImport::Import()
PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
aParagraph.AppendPortion( aPortion );
- aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+ aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, nullptr );
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
}
}
@@ -619,7 +619,7 @@ bool ImplSdPPTImport::Import()
PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_TEXT_IN_SHAPE, 0 );
aParagraph.AppendPortion( aPortion );
- aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+ aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, nullptr );
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
}
@@ -664,14 +664,14 @@ bool ImplSdPPTImport::Import()
PPTParagraphObj aParagraph( *pPPTStyleSheet, nTitleInstance, 0 );
PPTPortionObj aPortion( *pPPTStyleSheet, nTitleInstance, 0 );
aParagraph.AppendPortion( aPortion );
- aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+ aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, nullptr );
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
}
// outlinerstylesheet
sal_uInt16 nLevel;
PPTParagraphObj* pParagraphs[ 9 ];
- PPTParagraphObj* pPreviousPara = NULL;
+ PPTParagraphObj* pPreviousPara = nullptr;
for ( nLevel = 0; nLevel < 9; nLevel++ )
{
@@ -691,7 +691,7 @@ bool ImplSdPPTImport::Import()
pPreviousPara = pParagraphs[ nLevel ];
}
else
- pParagraphs[ nLevel ] = NULL;
+ pParagraphs[ nLevel ] = nullptr;
}
for ( nLevel = 0; nLevel < 9; delete pParagraphs[ nLevel++ ] ) ;
@@ -703,7 +703,7 @@ bool ImplSdPPTImport::Import()
PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_SUBTITLE, 0 );
aParagraph.AppendPortion( aPortion );
- aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+ aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, nullptr );
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
}
}
@@ -716,7 +716,7 @@ bool ImplSdPPTImport::Import()
PPTParagraphObj aParagraph( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
PPTPortionObj aPortion( *pPPTStyleSheet, TSS_TYPE_NOTES, 0 );
aParagraph.AppendPortion( aPortion );
- aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, NULL );
+ aParagraph.ApplyTo( rItemSet, oStartNumbering, (SdrPowerPointImport&)*this, 0xffffffff, nullptr );
aPortion.ApplyTo( rItemSet, (SdrPowerPointImport&)*this, 0xffffffff );
}
}
@@ -726,14 +726,14 @@ bool ImplSdPPTImport::Import()
}
SdPage* pMPage;
sal_uInt16 i;
- for ( i = 0; i < mpDoc->GetMasterPageCount() && ( (pMPage = static_cast<SdPage*>(mpDoc->GetMasterPage( i ))) != 0 ); i++ )
+ for ( i = 0; i < mpDoc->GetMasterPageCount() && ( (pMPage = static_cast<SdPage*>(mpDoc->GetMasterPage( i ))) != nullptr ); i++ )
{
SetPageNum( i, PPT_MASTERPAGE );
// importing master page objects
PptSlidePersistList* pList = GetPageList( eAktPageKind );
PptSlidePersistEntry* pPersist = ( pList && ( nAktPageNum < pList->size() ) )
- ? &(*pList)[ nAktPageNum ] : NULL;
+ ? &(*pList)[ nAktPageNum ] : nullptr;
if ( pPersist )
{
if ( pPersist->bStarDrawFiller && pPersist->bNotesMaster && ( nAktPageNum > 2 ) && ( ( nAktPageNum & 1 ) == 0 ) )
@@ -919,7 +919,7 @@ bool ImplSdPPTImport::Import()
mePresChange = PRESCHANGE_SEMIAUTO;
SetPageNum( nPage );
SdPage* pPage = static_cast<SdPage*>(MakeBlancPage( false ));
- PptSlidePersistEntry* pMasterPersist = NULL;
+ PptSlidePersistEntry* pMasterPersist = nullptr;
if ( HasMasterPage( nPage ) ) // try to get the LayoutName from the masterpage
{
sal_uInt16 nMasterNum = GetMasterPageIndex( nAktPageNum, eAktPageKind );
@@ -1005,7 +1005,7 @@ bool ImplSdPPTImport::Import()
if ( nNotesPageIndex == PPTSLIDEPERSIST_ENTRY_NOTFOUND )
nNotesPageIndex = 0;
SetPageNum( nNotesPageIndex, PPT_NOTEPAGE );
- PptSlidePersistEntry* pMasterPersist2 = NULL;
+ PptSlidePersistEntry* pMasterPersist2 = nullptr;
if ( HasMasterPage( nNotesPageIndex, PPT_NOTEPAGE ) ) // try to get the LayoutName from the masterpage
{
pNotesPage->TRG_SetMasterPage(*pSdrModel->GetMasterPage(nNotesMasterNum));
@@ -1045,7 +1045,7 @@ bool ImplSdPPTImport::Import()
// #i37397#, trying to set the title master for the first page
sal_uInt16 nMaster, nMasterCount = pSdrModel->GetMasterPageCount();
- SdPage* pFoundMaster = NULL;
+ SdPage* pFoundMaster = nullptr;
for ( nMaster = 1; nMaster < nMasterCount; nMaster++ )
{
SdPage* pMaster = static_cast<SdPage*>( pSdrModel->GetMasterPage( nMaster ) );
@@ -1370,7 +1370,7 @@ bool ImplSdPPTImport::Import()
SdCustomShowList* pList = mpDoc->GetCustomShowList();
if ( pList )
{
- SdCustomShow* pPtr = NULL;
+ SdCustomShow* pPtr = nullptr;
OUString aCustomShowStr = aCustomShow.makeStringAndClear();
for( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
{
@@ -1513,7 +1513,7 @@ void ImplSdPPTImport::ImportPageEffect( SdPage* pPage, const bool bNewAnimations
{
PptSlidePersistList* pPersistList = GetPageList( eAktPageKind );
PptSlidePersistEntry* pActualSlidePersist = ( pPersistList && ( nAktPageNum < pPersistList->size() ) )
- ? &(*pPersistList)[ nAktPageNum ] : NULL;
+ ? &(*pPersistList)[ nAktPageNum ] : nullptr;
if ( pActualSlidePersist && ( eAktPageKind == PPT_SLIDEPAGE ) )
{
@@ -1897,7 +1897,7 @@ OUString ImplSdPPTImport::ReadSound(sal_uInt32 nSoundRef) const
sal_uInt32 nStrLen = aSoundRecHd.GetRecEndFilePos();
OUString aRefStr;
sal_uInt32 nPosMerk2 = rStCtrl.Tell();
- if ( SeekToRec( rStCtrl, PPT_PST_CString, nStrLen, NULL, 2 ) )
+ if ( SeekToRec( rStCtrl, PPT_PST_CString, nStrLen, nullptr, 2 ) )
{
if ( ReadString( aRefStr ) )
bRefStrValid = true;
@@ -2102,7 +2102,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
break;
case 0x04 :
{
- SdHyperlinkEntry* pPtr = NULL;
+ SdHyperlinkEntry* pPtr = nullptr;
for ( size_t i = 0, n = aHyperList.size(); i < n; ++i ) {
if ( aHyperList[ i ]->nIndex == pIAtom->nExHyperlinkId ) {
pPtr = aHyperList[ i ];
@@ -2170,7 +2170,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
SdrTextObj* pText = pObj;
SdrObject* pRet = pText;
- ppStyleSheetAry = NULL;
+ ppStyleSheetAry = nullptr;
PresObjKind ePresKind = PRESOBJ_NONE;
PptOEPlaceholderAtom* pPlaceHolder = pTextObj->GetOEPlaceHolderAtom();
@@ -2306,7 +2306,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
}
pText->SetUserCall( pPage );
pPage->InsertPresObj( pText, ePresKind );
- SdrOutliner* pOutl = NULL;
+ SdrOutliner* pOutl = nullptr;
if ( pTextObj->GetInstance() == TSS_TYPE_NOTES )
pOutl = GetDrawOutliner( pText );
if ( !aPresentationText.isEmpty() )
@@ -2342,7 +2342,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
}
else
{
- pRet = NULL;
+ pRet = nullptr;
}
}
else
@@ -2429,7 +2429,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if ( pTextObj->Count() == 1 )
{
PPTParagraphObj* pPara = pTextObj->First();
- PPTPortionObj* pPor = NULL;
+ PPTPortionObj* pPor = nullptr;
if ( pPara && pPara->GetTextSize() == 0 && (pPor = pPara->First()))
{
pPor->ApplyTo(aSet, (SdrPowerPointImport&)*this, pTextObj->GetDestinationInstance());
@@ -2461,7 +2461,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
case 0 : // position in title area
{
if ( aLogicRect != aTitleRect )
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
break;
@@ -2470,7 +2470,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if ( pSlideLayout->eLayout == PptSlideLayout::TITLEANDBODYSLIDE )
{ // position in outline area
if ( aLogicRect != aOutlineRect )
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
else if ( pSlideLayout->eLayout == PptSlideLayout::TWOCOLUMNSANDTITLE )
{ // position in outline area left
@@ -2480,7 +2480,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
(double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
(double)aLogicSize.Width() / aOutlineSize.Width() > 0.5)
{
- pPresObj->SetUserCall(NULL);
+ pPresObj->SetUserCall(nullptr);
}
}
else if ( pSlideLayout->eLayout == PptSlideLayout::TWOROWSANDTITLE )
@@ -2489,13 +2489,13 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
std::abs(aLogicRect.Top() - aOutlineRect.Top()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Right() - aOutlineRect.Right()) > MAX_USER_MOVE)
{
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
}
else if (std::abs(aLogicRect.Left() - aOutlineRect.Left()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Top() - aOutlineRect.Top()) > MAX_USER_MOVE)
{ // position in outline area top left
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
}
break;
@@ -2510,7 +2510,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
(double)aLogicSize.Width() / aOutlineSize.Width() < 0.48 ||
(double)aLogicSize.Width() / aOutlineSize.Width() > 0.5)
{
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
}
else if ( pSlideLayout->eLayout == PptSlideLayout::TWOROWSANDTITLE )
@@ -2519,13 +2519,13 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Right() - aOutlineRect.Right()) > MAX_USER_MOVE)
{
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
}
else if (std::abs(aLogicRect.Right() - aOutlineRect.Right()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Top() - aOutlineRect.Top()) > MAX_USER_MOVE)
{ // position in outline area top right
- pPresObj->SetUserCall(NULL);
+ pPresObj->SetUserCall(nullptr);
}
}
break;
@@ -2535,7 +2535,7 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if (std::abs(aLogicRect.Left() - aOutlineRect.Left()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) > MAX_USER_MOVE)
{
- pPresObj->SetUserCall( NULL );
+ pPresObj->SetUserCall( nullptr );
}
}
break;
@@ -2545,17 +2545,17 @@ SdrObject* ImplSdPPTImport::ApplyTextObj( PPTTextObj* pTextObj, SdrTextObj* pObj
if (std::abs(aLogicRect.Right() - aOutlineRect.Right()) > MAX_USER_MOVE ||
std::abs(aLogicRect.Bottom() - aOutlineRect.Bottom()) > MAX_USER_MOVE)
{
- pObj->SetUserCall( NULL );
+ pObj->SetUserCall( nullptr );
}
}
break;
}
}
- pRet = NULL; // return zero cause this obj was already inserted by CreatePresObj
+ pRet = nullptr; // return zero cause this obj was already inserted by CreatePresObj
}
}
else if ( !pTextObj->Count() )
- pRet = NULL;
+ pRet = nullptr;
}
}
}
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 403f04f03070..1363a2494489 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -102,8 +102,8 @@ static bool convertMeasure( OUString& rString )
{
bool bRet = false;
- const sal_Char* pSource[] = { "ppt_x", "ppt_y", "ppt_w", "ppt_h", NULL };
- const sal_Char* pDest[] = { "x", "y", "width", "height", NULL };
+ const sal_Char* pSource[] = { "ppt_x", "ppt_y", "ppt_w", "ppt_h", nullptr };
+ const sal_Char* pDest[] = { "x", "y", "width", "height", nullptr };
sal_Int32 nIndex = 0;
const sal_Char** ps = pSource;
@@ -197,7 +197,7 @@ void AnimationImporter::processAfterEffectNodes()
Reference< XAnimationNode > AnimationImporter::createNode( const Atom* pAtom, const AnimationNode& rNode )
{
- const char* pServiceName = NULL;
+ const char* pServiceName = nullptr;
switch( rNode.mnGroupType )
{
@@ -453,7 +453,7 @@ int AnimationImporter::importAnimationContainer( const Atom* pAtom, const Refere
#endif
int nANCNodes = importAnimationNodeContainer( pAtom, xNode );
if( !convertAnimationNode( xNode, xParent ) )
- xNode = 0;
+ xNode = nullptr;
else
nNodes += nANCNodes;
dump( "/>\n");
@@ -2386,10 +2386,10 @@ void AnimationImporter::importAnimateKeyPoints( const Atom* pAtom, const Referen
if( pAtom && xAnim.is() )
{
// first count keytimes
- const Atom* pIter = NULL;
+ const Atom* pIter = nullptr;
int nKeyTimes = 0;
- while( (pIter = pAtom->findNextChildAtom( DFF_msofbtAnimKeyTime, pIter )) != 0 )
+ while( (pIter = pAtom->findNextChildAtom( DFF_msofbtAnimKeyTime, pIter )) != nullptr )
nKeyTimes++;
Sequence< double > aKeyTimes( nKeyTimes );
@@ -2591,7 +2591,7 @@ void AnimationImporter::importAnimationEvents( const Atom* pAtom, const Referenc
const Atom* pEventAtom = pAtom->findFirstChildAtom( DFF_msofbtAnimEvent );
while( pEventAtom )
{
- Any* pEvents = NULL;
+ Any* pEvents = nullptr;
switch( pEventAtom->getInstance() )
{
@@ -2763,7 +2763,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
case 1: // shape
{
SdrObject* pSdrObject = mpPPTImport->getShapeForId( nRefId );
- if( pSdrObject == NULL )
+ if( pSdrObject == nullptr )
break;
rTarget <<= pSdrObject->getUnoShape();
@@ -2780,7 +2780,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
SdrTextObj* pTextObj = static_cast< SdrTextObj* >( pSdrObject );
const OutlinerParaObject* pOPO = pTextObj->GetOutlinerParaObject();
- if( pOPO == NULL )
+ if( pOPO == nullptr )
break;
const EditTextObject& rEditTextObject = pOPO->GetTextObject();
@@ -2825,7 +2825,7 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
case 4: // video object
{
SdrObject* pSdrObject = mpPPTImport->getShapeForId( nRefId );
- if( pSdrObject == NULL )
+ if( pSdrObject == nullptr )
break;
rTarget <<= pSdrObject->getUnoShape();
diff --git a/sd/source/filter/ppt/propread.cxx b/sd/source/filter/ppt/propread.cxx
index 03e05d0623bf..b90d30502ce3 100644
--- a/sd/source/filter/ppt/propread.cxx
+++ b/sd/source/filter/ppt/propread.cxx
@@ -574,7 +574,7 @@ const Section* PropRead::GetSection( const sal_uInt8* pFMTID )
if ( memcmp( it->GetFMTID(), pFMTID, 16 ) == 0 )
return &(*it);
}
- return NULL;
+ return nullptr;
}
void PropRead::Read()
diff --git a/sd/source/filter/sdfilter.cxx b/sd/source/filter/sdfilter.cxx
index 39899ec38017..ac29715ba607 100644
--- a/sd/source/filter/sdfilter.cxx
+++ b/sd/source/filter/sdfilter.cxx
@@ -71,7 +71,7 @@ extern "C" { static void SAL_CALL thisModule() {} }
std::unique_ptr< osl::Module > mod(new osl::Module);
return mod->loadRelative(&thisModule, ImplGetFullLibraryName(rLibraryName),
SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY)
- ? mod.release() : 0;
+ ? mod.release() : nullptr;
}
#endif
diff --git a/sd/source/filter/sdpptwrp.cxx b/sd/source/filter/sdpptwrp.cxx
index c295eca857d0..02b9e39b1e14 100644
--- a/sd/source/filter/sdpptwrp.cxx
+++ b/sd/source/filter/sdpptwrp.cxx
@@ -65,7 +65,7 @@ extern "C" sal_Bool SaveVBA( SfxObjectShell&, SvMemoryStream*& );
SdPPTFilter::SdPPTFilter( SfxMedium& rMedium, ::sd::DrawDocShell& rDocShell, bool bShowProgress ) :
SdFilter( rMedium, rDocShell, bShowProgress ),
- pBas ( NULL )
+ pBas ( nullptr )
{
}
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index de06bbea82d5..ed0d70d73cab 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -193,7 +193,7 @@ sal_Int32 ReadThroughComponent(
DBG_ASSERT(xInputStream.is(), "input stream missing");
DBG_ASSERT(xModelComponent.is(), "document missing");
DBG_ASSERT(rxContext.is(), "factory missing");
- DBG_ASSERT(NULL != pFilterName,"I need a service name for the component!");
+ DBG_ASSERT(nullptr != pFilterName,"I need a service name for the component!");
SAL_INFO( "sd.filter", "ReadThroughComponent" );
@@ -332,7 +332,7 @@ sal_Int32 ReadThroughComponent(
bool bMustBeSuccessfull )
{
DBG_ASSERT(xStorage.is(), "Need storage!");
- DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+ DBG_ASSERT(nullptr != pStreamName, "Please, please, give me a name!");
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
@@ -351,7 +351,7 @@ sal_Int32 ReadThroughComponent(
// if no stream can be opened, return immediately with OK signal
// do we even have an alternative name?
- if ( NULL == pCompatibilityStreamName )
+ if ( nullptr == pCompatibilityStreamName )
return 0;
// if so, does the stream exist?
@@ -531,9 +531,9 @@ bool SdXMLFilter::Import( ErrCode& nError )
Reference< io::XActiveDataSource > xSource;
Reference< XInterface > xPipe;
Reference< document::XGraphicObjectResolver > xGraphicResolver;
- SvXMLGraphicHelper *pGraphicHelper = 0;
+ SvXMLGraphicHelper *pGraphicHelper = nullptr;
Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
Reference< lang::XComponent > xModelComp( mxModel, uno::UNO_QUERY );
@@ -650,13 +650,13 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( meFilterMode != SDXMLMODE_Organizer )
{
nWarn2 = ReadThroughComponent(
- xStorage, xModelComp, "settings.xml", NULL, rxContext,
+ xStorage, xModelComp, "settings.xml", nullptr, rxContext,
pServices->mpSettings,
aFilterArgs, aName, false );
}
nRet = ReadThroughComponent(
- xStorage, xModelComp, "styles.xml", NULL, rxContext,
+ xStorage, xModelComp, "styles.xml", nullptr, rxContext,
pServices->mpStyles,
aFilterArgs, aName, true );
@@ -677,10 +677,10 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
- xGraphicResolver = 0;
+ xGraphicResolver = nullptr;
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
- xObjectResolver = 0;
+ xObjectResolver = nullptr;
if( mxStatusIndicator.is() )
mxStatusIndicator->end();
@@ -817,8 +817,8 @@ bool SdXMLFilter::Import( ErrCode& nError )
bool SdXMLFilter::Export()
{
- SvXMLEmbeddedObjectHelper* pObjectHelper = NULL;
- SvXMLGraphicHelper* pGraphicHelper = NULL;
+ SvXMLEmbeddedObjectHelper* pObjectHelper = nullptr;
+ SvXMLGraphicHelper* pGraphicHelper = nullptr;
bool bDocRet = false;
if( !mxModel.is() )
@@ -959,8 +959,8 @@ bool SdXMLFilter::Export()
aServices[i++].mpStream = sXML_metaStreamName;
};
- aServices[i].mpService = NULL;
- aServices[i].mpStream = NULL;
+ aServices[i].mpService = nullptr;
+ aServices[i].mpStream = nullptr;
XML_SERVICEMAP* pServices = aServices;
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index 986bc4c19401..e055a70df1dd 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -68,7 +68,7 @@ AccessibleDocumentViewBase::AccessibleDocumentViewBase (
AccessibleRole::DOCUMENT),
mpWindow (pSdWindow),
mxController (rxController),
- mxModel (NULL),
+ mxModel (nullptr),
maViewForwarder (
static_cast<SdrPaintView*>(pViewShell->GetView()),
*static_cast<OutputDevice*>(pSdWindow))
@@ -135,7 +135,7 @@ void AccessibleDocumentViewBase::Init()
// Register at VCL Window to be informed of activated and deactivated
// OLE objects.
vcl::Window* pWindow = maShapeTreeInfo.GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
maWindowLink = LINK(
this, AccessibleDocumentViewBase, WindowChildEventListener);
@@ -172,7 +172,7 @@ IMPL_LINK_TYPED(AccessibleDocumentViewBase, WindowChildEventListener,
vcl::Window* pWindow = maShapeTreeInfo.GetWindow();
vcl::Window* pDyingWindow = static_cast<vcl::Window*>(
rEvent.GetWindow());
- if (pWindow==pDyingWindow && pWindow!=NULL && maWindowLink.IsSet())
+ if (pWindow==pDyingWindow && pWindow!=nullptr && maWindowLink.IsSet())
{
pWindow->RemoveChildEventListener (maWindowLink);
maWindowLink = Link<VclWindowEvent&,void>();
@@ -185,7 +185,7 @@ IMPL_LINK_TYPED(AccessibleDocumentViewBase, WindowChildEventListener,
// A new window has been created. Is it an OLE object?
vcl::Window* pChildWindow = static_cast<vcl::Window*>(
rEvent.GetData());
- if (pChildWindow!=NULL
+ if (pChildWindow!=nullptr
&& (pChildWindow->GetAccessibleRole()
== AccessibleRole::EMBEDDED_OBJECT))
{
@@ -200,11 +200,11 @@ IMPL_LINK_TYPED(AccessibleDocumentViewBase, WindowChildEventListener,
// object?
vcl::Window* pChildWindow = static_cast<vcl::Window*>(
rEvent.GetData());
- if (pChildWindow!=NULL
+ if (pChildWindow!=nullptr
&& (pChildWindow->GetAccessibleRole()
== AccessibleRole::EMBEDDED_OBJECT))
{
- SetAccessibleOLEObject (NULL);
+ SetAccessibleOLEObject (nullptr);
}
}
break;
@@ -491,7 +491,7 @@ void AccessibleDocumentViewBase::impl_dispose()
{
mxWindow->removeWindowListener (this);
mxWindow->removeFocusListener (this);
- mxWindow = NULL;
+ mxWindow = nullptr;
}
// Unregister form the model.
@@ -511,14 +511,14 @@ void AccessibleDocumentViewBase::impl_dispose()
}
// Propagate change of controller down the shape tree.
- maShapeTreeInfo.SetModelBroadcaster (NULL);
+ maShapeTreeInfo.SetModelBroadcaster (nullptr);
// Reset the model reference.
- mxModel = NULL;
+ mxModel = nullptr;
// Reset the model reference.
- mxController = NULL;
+ mxController = nullptr;
- maShapeTreeInfo.SetDocumentWindow (NULL);
+ maShapeTreeInfo.SetDocumentWindow (nullptr);
}
//===== XEventListener ======================================================
@@ -738,7 +738,7 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes()
uno::Any anyAtrribute;
OUString sValue;
- if (0 != dynamic_cast<const ::sd::DrawViewShell* > (mpViewShell))
+ if (nullptr != dynamic_cast<const ::sd::DrawViewShell* > (mpViewShell))
{
::sd::DrawViewShell* pDrViewSh = static_cast< ::sd::DrawViewShell*>(mpViewShell);
OUString sDisplay;
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index cecf847271aa..9706c33bc2f1 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -86,7 +86,7 @@ AccessibleDrawDocumentView::AccessibleDrawDocumentView (
const uno::Reference<XAccessible>& rxParent)
: AccessibleDocumentViewBase (pSdWindow, pViewShell, rxController, rxParent),
mpSdViewSh( pViewShell ),
- mpChildrenManager (NULL)
+ mpChildrenManager (nullptr)
{
OSL_TRACE ("AccessibleDrawDocumentView");
UpdateAccessibleName();
@@ -127,7 +127,7 @@ void AccessibleDrawDocumentView::ViewForwarderChanged (ChangeType aChangeType,
const IAccessibleViewForwarder* pViewForwarder)
{
AccessibleDocumentViewBase::ViewForwarderChanged (aChangeType, pViewForwarder);
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
mpChildrenManager->ViewForwarderChanged (aChangeType, pViewForwarder);
}
@@ -195,7 +195,7 @@ sal_Int32 SAL_CALL
long mpChildCount = AccessibleDocumentViewBase::getAccessibleChildCount();
// Forward request to children manager.
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
mpChildCount += mpChildrenManager->GetChildCount ();
return mpChildCount;
@@ -225,7 +225,7 @@ uno::Reference<XAccessible> SAL_CALL
aGuard.clear();
// Forward request to children manager.
- if (pChildrenManager != NULL)
+ if (pChildrenManager != nullptr)
{
return pChildrenManager->GetChild (nIndex);
}
@@ -284,7 +284,7 @@ void SAL_CALL
{
::osl::Guard< ::osl::Mutex> aGuard (::osl::Mutex::getGlobalMutex());
// maShapeTreeInfo has been modified in base class.
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
mpChildrenManager->SetInfo (maShapeTreeInfo);
}
}
@@ -311,7 +311,7 @@ void SAL_CALL
// The current page changed. Update the children manager accordingly.
uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
- if (xView.is() && mpChildrenManager!=NULL)
+ if (xView.is() && mpChildrenManager!=nullptr)
{
// Inform the children manager to forget all children and give
// him the new ones.
@@ -334,7 +334,7 @@ void SAL_CALL
else if ( rEventObject.PropertyName == "VisibleArea" )
{
OSL_TRACE (" visible area changed");
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
mpChildrenManager->ViewForwarderChanged (
IAccessibleViewForwarderListener::VISIBLE_AREA,
&maViewForwarder);
@@ -349,7 +349,7 @@ void SAL_CALL
// The current page changed. Update the children manager accordingly.
uno::Reference<drawing::XDrawView> xView (mxController, uno::UNO_QUERY);
- if (xView.is() && mpChildrenManager!=NULL)
+ if (xView.is() && mpChildrenManager!=nullptr)
{
// Inform the children manager to forget all children and give
// him the new ones.
@@ -472,15 +472,15 @@ uno::Sequence< sal_Int32 > SAL_CALL
return aRet;
}
//find all the child in the page, insert them into a vector and sort
- if ( mpChildrenManager == NULL )
+ if ( mpChildrenManager == nullptr )
{
return aRet;
}
std::vector< uno::Reference<drawing::XShape> > vXShapes;
sal_Int32 nCount = mpChildrenManager->GetChildCount();
//get pointer of SdView & SdrPageView for further use.
- SdrPageView* pPV = NULL;
- ::sd::View* pSdView = NULL;
+ SdrPageView* pPV = nullptr;
+ ::sd::View* pSdView = nullptr;
if ( mpSdViewSh )
{
pSdView = mpSdViewSh->GetView();
@@ -786,7 +786,7 @@ void
void AccessibleDrawDocumentView::Activated()
{
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
{
bool bChange = false;
// When none of the children has the focus then claim it for the
@@ -807,17 +807,17 @@ void AccessibleDrawDocumentView::Activated()
void AccessibleDrawDocumentView::Deactivated()
{
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
mpChildrenManager->RemoveFocus();
ResetState (AccessibleStateType::FOCUSED);
}
void AccessibleDrawDocumentView::impl_dispose()
{
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
{
delete mpChildrenManager;
- mpChildrenManager = NULL;
+ mpChildrenManager = nullptr;
}
AccessibleDocumentViewBase::impl_dispose();
@@ -830,10 +830,10 @@ void SAL_CALL AccessibleDrawDocumentView::disposing()
{
// Release resources.
- if (mpChildrenManager != NULL)
+ if (mpChildrenManager != nullptr)
{
delete mpChildrenManager;
- mpChildrenManager = NULL;
+ mpChildrenManager = nullptr;
}
// Forward call to base classes.
diff --git a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
index 0076ce93553f..f9e9d2ca56b3 100644
--- a/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
+++ b/sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx
@@ -68,7 +68,7 @@ namespace accessibility
return &mTextForwarder;
}
else
- return NULL;
+ return nullptr;
}
SvxViewForwarder* AccessibleOutlineEditSource::GetViewForwarder()
@@ -77,7 +77,7 @@ namespace accessibility
if( IsValid() )
return this;
else
- return NULL;
+ return nullptr;
}
SvxEditViewForwarder* AccessibleOutlineEditSource::GetEditViewForwarder( bool )
@@ -89,7 +89,7 @@ namespace accessibility
return &mViewForwarder;
}
else
- return NULL;
+ return nullptr;
}
void AccessibleOutlineEditSource::UpdateData()
@@ -179,7 +179,7 @@ namespace accessibility
if( pHint && (pHint->GetId() == SFX_HINT_DYING) )
{
bDispose = true;
- mpOutliner = NULL;
+ mpOutliner = nullptr;
}
}
else
@@ -197,8 +197,8 @@ namespace accessibility
{
if( mpOutliner )
mpOutliner->SetNotifyHdl( Link<EENotify&,void>() );
- mpOutliner = NULL;
- mpOutlinerView = NULL;
+ mpOutliner = nullptr;
+ mpOutlinerView = nullptr;
Broadcast( TextHint( SFX_HINT_DYING ) );
}
}
diff --git a/sd/source/ui/accessibility/AccessiblePageShape.cxx b/sd/source/ui/accessibility/AccessiblePageShape.cxx
index e5b74bfbcc55..5e490e068d69 100644
--- a/sd/source/ui/accessibility/AccessiblePageShape.cxx
+++ b/sd/source/ui/accessibility/AccessiblePageShape.cxx
@@ -43,7 +43,7 @@ AccessiblePageShape::AccessiblePageShape (
const uno::Reference<XAccessible>& rxParent,
const AccessibleShapeTreeInfo& rShapeTreeInfo,
long nIndex)
- : AccessibleShape (AccessibleShapeInfo (NULL, rxParent, nIndex), rShapeTreeInfo),
+ : AccessibleShape (AccessibleShapeInfo (nullptr, rxParent, nIndex), rShapeTreeInfo),
mxPage (rxPage)
{
// The main part of the initialization is done in the init method which
@@ -89,7 +89,7 @@ awt::Rectangle SAL_CALL AccessiblePageShape::getBounds()
awt::Rectangle aBoundingBox;
- if (maShapeTreeInfo.GetViewForwarder() != NULL)
+ if (maShapeTreeInfo.GetViewForwarder() != nullptr)
{
uno::Reference<beans::XPropertySet> xSet (mxPage, uno::UNO_QUERY);
if (xSet.is())
@@ -259,7 +259,7 @@ void AccessiblePageShape::dispose()
xComponent->removeEventListener (this);
// Cleanup.
- mxShape = NULL;
+ mxShape = nullptr;
// Call base classes.
AccessibleContextBase::dispose ();
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
index dfe24a420012..282a6436ad06 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx
@@ -178,7 +178,7 @@ OUString SAL_CALL AccessibleSlideSorterObject::getAccessibleName()
const SolarMutexGuard aSolarGuard;
SdPage* pPage = GetPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
return pPage->GetName();
else
return OUString();
@@ -303,7 +303,7 @@ Reference<XAccessible> SAL_CALL
AccessibleSlideSorterObject::getAccessibleAtPoint(const awt::Point& )
throw (uno::RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
awt::Rectangle SAL_CALL AccessibleSlideSorterObject::getBounds()
@@ -449,10 +449,10 @@ SdPage* AccessibleSlideSorterObject::GetPage() const
{
::sd::slidesorter::model::SharedPageDescriptor pDescriptor(
mrSlideSorter.GetModel().GetPageDescriptor(mnPageNumber));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
return pDescriptor->GetPage();
else
- return NULL;
+ return nullptr;
}
} // end of namespace ::accessibility
diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
index 4db26b60b6b7..814230c5aad0 100644
--- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
+++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx
@@ -160,7 +160,7 @@ void SAL_CALL AccessibleSlideSorterView::disposing()
AccessibleSlideSorterObject* AccessibleSlideSorterView::GetAccessibleChildImplementation (
sal_Int32 nIndex)
{
- AccessibleSlideSorterObject* pResult = NULL;
+ AccessibleSlideSorterObject* pResult = nullptr;
::osl::MutexGuard aGuard (maMutex);
if (nIndex>=0 && nIndex<mpImpl->GetVisibleChildCount())
@@ -224,7 +224,7 @@ Reference<XAccessible > SAL_CALL AccessibleSlideSorterView::getAccessibleParent(
if (mpContentWindow != nullptr)
{
vcl::Window* pParent = mpContentWindow->GetAccessibleParentWindow();
- if (pParent != NULL)
+ if (pParent != nullptr)
xParent = pParent->GetAccessible();
}
@@ -402,7 +402,7 @@ Reference<XAccessible> SAL_CALL
const Point aTestPoint (aPoint.X, aPoint.Y);
::sd::slidesorter::model::SharedPageDescriptor pHitDescriptor (
mrSlideSorter.GetController().GetPageAt(aTestPoint));
- if (pHitDescriptor.get() != NULL)
+ if (pHitDescriptor.get() != nullptr)
xAccessible = mpImpl->GetAccessibleChild(
(pHitDescriptor->GetPage()->GetPageNum()-1)/2);
@@ -525,7 +525,7 @@ void SAL_CALL AccessibleSlideSorterView::selectAccessibleChild (sal_Int32 nChild
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
- if (pChild != NULL)
+ if (pChild != nullptr)
mrSlideSorter.GetController().GetPageSelector().SelectPage(pChild->GetPageNumber());
else
throw lang::IndexOutOfBoundsException();
@@ -540,7 +540,7 @@ sal_Bool SAL_CALL AccessibleSlideSorterView::isAccessibleChildSelected (sal_Int3
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
- if (pChild != NULL)
+ if (pChild != nullptr)
bIsSelected = mrSlideSorter.GetController().GetPageSelector().IsPageSelected(
pChild->GetPageNumber());
else
@@ -612,7 +612,7 @@ void SAL_CALL AccessibleSlideSorterView::deselectAccessibleChild (sal_Int32 nChi
const SolarMutexGuard aSolarGuard;
AccessibleSlideSorterObject* pChild = mpImpl->GetAccessibleChild(nChildIndex);
- if (pChild != NULL)
+ if (pChild != nullptr)
mrSlideSorter.GetController().GetPageSelector().DeselectPage(pChild->GetPageNumber());
else
throw lang::IndexOutOfBoundsException();
@@ -677,8 +677,8 @@ AccessibleSlideSorterView::Implementation::Implementation (
mpWindow(pWindow),
mnFocusedIndex(-1),
mbModelChangeLocked(false),
- mnUpdateChildrenUserEventId(0),
- mnSelectionChangeUserEventId(0)
+ mnUpdateChildrenUserEventId(nullptr),
+ mnSelectionChangeUserEventId(nullptr)
{
ConnectListeners();
UpdateChildren();
@@ -686,9 +686,9 @@ AccessibleSlideSorterView::Implementation::Implementation (
AccessibleSlideSorterView::Implementation::~Implementation()
{
- if (mnUpdateChildrenUserEventId != 0)
+ if (mnUpdateChildrenUserEventId != nullptr)
Application::RemoveUserEvent(mnUpdateChildrenUserEventId);
- if (mnSelectionChangeUserEventId != 0)
+ if (mnSelectionChangeUserEventId != nullptr)
Application::RemoveUserEvent(mnSelectionChangeUserEventId);
ReleaseListeners();
Clear();
@@ -696,7 +696,7 @@ AccessibleSlideSorterView::Implementation::~Implementation()
void AccessibleSlideSorterView::Implementation::RequestUpdateChildren()
{
- if (mnUpdateChildrenUserEventId == 0)
+ if (mnUpdateChildrenUserEventId == nullptr)
mnUpdateChildrenUserEventId = Application::PostUserEvent(
LINK(this, AccessibleSlideSorterView::Implementation,
UpdateChildrenCallback));
@@ -739,7 +739,7 @@ void AccessibleSlideSorterView::Implementation::Clear()
PageObjectList::iterator iPageObject;
PageObjectList::iterator iEnd = maPageObjects.end();
for (iPageObject=maPageObjects.begin(); iPageObject!=iEnd; ++iPageObject)
- if (*iPageObject != NULL)
+ if (*iPageObject != nullptr)
{
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::CHILD,
@@ -749,7 +749,7 @@ void AccessibleSlideSorterView::Implementation::Clear()
Reference<XComponent> xComponent (Reference<XWeak>(iPageObject->get()), UNO_QUERY);
if (xComponent.is())
xComponent->dispose();
- *iPageObject = NULL;
+ *iPageObject = nullptr;
}
maPageObjects.clear();
}
@@ -773,15 +773,15 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetVisib
AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAccessibleChild (
sal_Int32 nIndex)
{
- AccessibleSlideSorterObject* pChild = NULL;
+ AccessibleSlideSorterObject* pChild = nullptr;
if (nIndex>=0 && (sal_uInt32)nIndex<maPageObjects.size())
{
- if (maPageObjects[nIndex] == NULL)
+ if (maPageObjects[nIndex] == nullptr)
{
::sd::slidesorter::model::SharedPageDescriptor pDescriptor(
mrSlideSorter.GetModel().GetPageDescriptor(nIndex));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
maPageObjects[nIndex] = new AccessibleSlideSorterObject(
&mrAccessibleSlideSorter,
@@ -809,7 +809,7 @@ AccessibleSlideSorterObject* AccessibleSlideSorterView::Implementation::GetAcces
void AccessibleSlideSorterView::Implementation::ConnectListeners()
{
StartListening (*mrSlideSorter.GetModel().GetDocument());
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
StartListening (*mrSlideSorter.GetViewShell());
mbListeningToDocument = true;
@@ -840,7 +840,7 @@ void AccessibleSlideSorterView::Implementation::ReleaseListeners()
if (mbListeningToDocument)
{
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
StartListening(*mrSlideSorter.GetViewShell());
EndListening (*mrSlideSorter.GetModel().GetDocument());
mbListeningToDocument = false;
@@ -921,14 +921,14 @@ IMPL_LINK_TYPED(AccessibleSlideSorterView::Implementation, WindowEventListener,
IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, SelectionChangeListener, LinkParamNone*, void)
{
- if (mnSelectionChangeUserEventId == 0)
+ if (mnSelectionChangeUserEventId == nullptr)
mnSelectionChangeUserEventId = Application::PostUserEvent(
LINK(this, AccessibleSlideSorterView::Implementation, BroadcastSelectionChange));
}
IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, BroadcastSelectionChange, void*, void)
{
- mnSelectionChangeUserEventId = 0;
+ mnSelectionChangeUserEventId = nullptr;
mrAccessibleSlideSorter.FireAccessibleEvent(
AccessibleEventId::SELECTION_CHANGED,
Any(),
@@ -951,7 +951,7 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, FocusChangeList
if (mnFocusedIndex >= 0)
{
AccessibleSlideSorterObject* pObject = GetAccessibleChild(mnFocusedIndex);
- if (pObject != NULL)
+ if (pObject != nullptr)
{
pObject->FireAccessibleEvent(
AccessibleEventId::STATE_CHANGED,
@@ -963,7 +963,7 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, FocusChangeList
if (nNewFocusedIndex >= 0)
{
AccessibleSlideSorterObject* pObject = GetAccessibleChild(nNewFocusedIndex);
- if (pObject != NULL)
+ if (pObject != nullptr)
{
pObject->FireAccessibleEvent(
AccessibleEventId::STATE_CHANGED,
@@ -979,7 +979,7 @@ IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, FocusChangeList
IMPL_LINK_NOARG_TYPED(AccessibleSlideSorterView::Implementation, UpdateChildrenCallback, void*, void)
{
- mnUpdateChildrenUserEventId = 0;
+ mnUpdateChildrenUserEventId = nullptr;
UpdateChildren();
}
diff --git a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
index 0a6ed2a76e0d..fa7338bf0ff9 100644
--- a/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
+++ b/sd/source/ui/accessibility/AccessibleViewForwarder.cxx
@@ -74,12 +74,12 @@ Rectangle AccessibleViewForwarder::GetVisibleArea() const
*/
Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const
{
- OSL_ASSERT (mpView != NULL);
+ OSL_ASSERT (mpView != nullptr);
if((sal_uInt32)mnWindowId < mpView->PaintWindowCount())
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId);
OutputDevice& rOutDev = pPaintWindow->GetOutputDevice();
- Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(0L));
+ Rectangle aBBox(static_cast<vcl::Window&>(rOutDev).GetWindowExtentsRelative(nullptr));
return rOutDev.LogicToPixel (rPoint) + aBBox.TopLeft();
}
else
@@ -88,7 +88,7 @@ Point AccessibleViewForwarder::LogicToPixel (const Point& rPoint) const
Size AccessibleViewForwarder::LogicToPixel (const Size& rSize) const
{
- OSL_ASSERT (mpView != NULL);
+ OSL_ASSERT (mpView != nullptr);
if((sal_uInt32)mnWindowId < mpView->PaintWindowCount())
{
SdrPaintWindow* pPaintWindow = mpView->GetPaintWindow((sal_uInt32)mnWindowId);
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 9f2c26ee569d..dfd303e83cb7 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -626,8 +626,8 @@ namespace
{
vcl::Window * lcl_GetTopmostParent( vcl::Window * pWindow )
{
- vcl::Window * pResult = 0;
- vcl::Window * pCurrent = pWindow ? pWindow->GetParent() : 0;
+ vcl::Window * pResult = nullptr;
+ vcl::Window * pCurrent = pWindow ? pWindow->GetParent() : nullptr;
while( pCurrent )
{
pResult = pCurrent;
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 9103e73bce61..86c6723da8a8 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -206,9 +206,9 @@ ColorPropertyBox::ColorPropertyBox( sal_Int32 nControlType, vcl::Window* pParent
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
XColorListRef pColorList;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
- if ( pDocSh && ( ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0) )
+ if ( pDocSh && ( ( pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != nullptr) )
pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
if ( !pColorList.is() )
@@ -286,15 +286,15 @@ FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent,
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem;
- const FontList* pFontList = 0;
+ const FontList* pFontList = nullptr;
bool bMustDelete = false;
- if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) != 0) )
+ if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_ATTR_CHAR_FONTLIST ) ) != nullptr) )
pFontList = static_cast<const SvxFontListItem*>(pItem)->GetFontList();
if(!pFontList)
{
- pFontList = new FontList( Application::GetDefaultDevice(), NULL, false );
+ pFontList = new FontList( Application::GetDefaultDevice(), nullptr, false );
bMustDelete = true;
}
@@ -358,7 +358,7 @@ private:
DropdownMenuBox::DropdownMenuBox( vcl::Window* pParent, Edit* pSubControl, PopupMenu* pMenu )
: Edit( pParent, WB_BORDER|WB_TABSTOP| WB_DIALOGCONTROL ),
- mpSubControl(pSubControl),mpDropdownButton(0),mpMenu(pMenu)
+ mpSubControl(pSubControl),mpDropdownButton(nullptr),mpMenu(pMenu)
{
mpDropdownButton = VclPtr<MenuButton>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
mpDropdownButton->SetSymbol(SymbolType::SPIN_DOWN);
@@ -1080,9 +1080,9 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( vcl::Window* pParent
SfxObjectShell* pDocSh = SfxObjectShell::Current();
DBG_ASSERT( pDocSh, "DocShell not found!" );
XColorListRef pColorList;
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
- if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != 0 ) )
+ if ( pDocSh && ( (pItem = pDocSh->GetItem( SID_COLOR_TABLE ) ) != nullptr ) )
pColorList = static_cast<const SvxColorListItem*>(pItem)->GetColorList();
if ( !pColorList.is() )
@@ -2203,7 +2203,7 @@ IMPL_LINK_NOARG_TYPED(CustomAnimationTextAnimTabPage, implSelectHdl, ListBox&, v
CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySet* pSet, const OString& sPage)
: TabDialog( pParent, "CustomAnimationProperties", "modules/simpress/ui/customanimationproperties.ui")
, mpSet( pSet )
-, mpResultSet( 0 )
+, mpResultSet( nullptr )
{
get(mpTabControl, "tabs");
@@ -2227,7 +2227,7 @@ CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySe
}
else
{
- mpTextAnimTabPage = 0;
+ mpTextAnimTabPage = nullptr;
mpTabControl->RemovePage( mnTextAnimId );
}
@@ -2316,7 +2316,7 @@ STLPropertySet* CustomAnimationDialog::createDefaultSet()
}
PropertyControl::PropertyControl( vcl::Window* pParent )
-: ListBox( pParent, WB_TABSTOP | WB_BORDER | WB_DROPDOWN ), mpSubControl(0)
+: ListBox( pParent, WB_TABSTOP | WB_BORDER | WB_DROPDOWN ), mpSubControl(nullptr)
{
}
@@ -2340,7 +2340,7 @@ void PropertyControl::setSubControl( PropertySubControl* pSubControl )
mpSubControl = pSubControl;
- Control* pControl = pSubControl ? pSubControl->getControl() : 0;
+ Control* pControl = pSubControl ? pSubControl->getControl() : nullptr;
if( pControl )
{
@@ -2357,7 +2357,7 @@ void PropertyControl::setSubControl( PropertySubControl* pSubControl )
void PropertyControl::Resize()
{
- Control* pControl = mpSubControl ? mpSubControl->getControl() : 0;
+ Control* pControl = mpSubControl ? mpSubControl->getControl() : nullptr;
if( pControl )
pControl->SetPosSizePixel( GetPosPixel(), GetSizePixel() );
ListBox::Resize();
@@ -2369,7 +2369,7 @@ PropertySubControl::~PropertySubControl()
PropertySubControl* PropertySubControl::create( sal_Int32 nType, vcl::Window* pParent, const Any& rValue, const OUString& rPresetId, const Link<LinkParamNone*,void>& rModifyHdl )
{
- PropertySubControl* pSubControl = NULL;
+ PropertySubControl* pSubControl = nullptr;
switch( nType )
{
case nPropertyTypeDirection:
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 4df0848f3f8a..16c05d4f5699 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -307,7 +307,7 @@ void CustomAnimationListEntryItem::Paint(const Point& rPos, SvTreeListBox& rDev,
SvLBoxItem* CustomAnimationListEntryItem::Create() const
{
- return NULL;
+ return nullptr;
}
void CustomAnimationListEntryItem::Clone( SvLBoxItem* )
@@ -415,7 +415,7 @@ void CustomAnimationTriggerEntryItem::Paint(const Point& rPos, SvTreeListBox& rD
SvLBoxItem* CustomAnimationTriggerEntryItem::Create() const
{
- return NULL;
+ return nullptr;
}
void CustomAnimationTriggerEntryItem::Clone( SvLBoxItem* )
@@ -425,9 +425,9 @@ void CustomAnimationTriggerEntryItem::Clone( SvLBoxItem* )
CustomAnimationList::CustomAnimationList( vcl::Window* pParent )
: SvTreeListBox( pParent, WB_TABSTOP | WB_BORDER | WB_HASLINES | WB_HASBUTTONS | WB_HASBUTTONSATROOT )
, mbIgnorePaint(false)
- , mpController(0)
+ , mpController(nullptr)
, mnLastGroupId(0)
- , mpLastParentEntry(0)
+ , mpLastParentEntry(nullptr)
{
EnableContextMenuHandling();
@@ -512,8 +512,8 @@ void CustomAnimationList::clear()
{
Clear();
- mpLastParentEntry = 0;
- mxLastTargetShape = 0;
+ mpLastParentEntry = nullptr;
+ mxLastTargetShape = nullptr;
}
void CustomAnimationList::update( MainSequencePtr pMainSequence )
@@ -545,7 +545,7 @@ void CustomAnimationList::update()
mbIgnorePaint = true;
SetUpdateMode( false );
- CustomAnimationListEntry* pEntry = 0;
+ CustomAnimationListEntry* pEntry = nullptr;
std::list< CustomAnimationEffectPtr > aExpanded;
std::list< CustomAnimationEffectPtr > aSelected;
@@ -608,7 +608,7 @@ void CustomAnimationList::update()
long nFirstSelNew = -1;
long nLastSelNew = -1;
std::for_each( mpMainSequence->getBegin(), mpMainSequence->getEnd(), stl_append_effect_func( *this ) );
- mpLastParentEntry = 0;
+ mpLastParentEntry = nullptr;
const InteractiveSequenceList& rISL = mpMainSequence->getInteractiveSequenceList();
@@ -635,7 +635,7 @@ void CustomAnimationList::update()
pViewData->SetSelectable(false);
std::for_each( pIS->getBegin(), pIS->getEnd(), stl_append_effect_func( *this ) );
- mpLastParentEntry = 0;
+ mpLastParentEntry = nullptr;
}
}
@@ -719,7 +719,7 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect )
{
aDescription = getDescription( aTarget, pEffect->getTargetSubItem() != ShapeAnimationSubType::ONLY_BACKGROUND );
- SvTreeListEntry* pParentEntry = 0;
+ SvTreeListEntry* pParentEntry = nullptr;
Reference< XShape > xTargetShape( pEffect->getTargetShape() );
sal_Int32 nGroupId = pEffect->getGroupId();
@@ -834,7 +834,7 @@ bool CustomAnimationList::isExpanded( const CustomAnimationEffectPtr& pEffect )
if( pEntry )
pEntry = static_cast<CustomAnimationListEntry*>(GetParent( pEntry ));
- return (pEntry == 0) || IsExpanded( pEntry );
+ return (pEntry == nullptr) || IsExpanded( pEntry );
}
EffectSequence CustomAnimationList::getSelection() const
@@ -943,7 +943,7 @@ void CustomAnimationList::Paint(vcl::RenderContext& rRenderContext, const Rectan
SvTreeListBox::Paint(rRenderContext, rRect);
// draw help text if list box is still empty
- if( First() == 0 )
+ if( First() == nullptr )
{
Color aOldColor(rRenderContext.GetTextColor());
rRenderContext.SetTextColor(rRenderContext.GetSettings().GetStyleSettings().GetDisableColor());
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index bac92fa6c6f4..ba817a62f2fb 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -150,7 +150,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase,
const Size& rMinSize )
: PanelLayout( pParent, "CustomAnimationsPanel", "modules/simpress/ui/customanimationspanel.ui", rxFrame ),
mrBase( rBase ),
- mpCustomAnimationPresets(NULL),
+ mpCustomAnimationPresets(nullptr),
mnPropertyType( nPropertyTypeNone ),
maMinSize( rMinSize ),
mxModel( rBase.GetDocShell()->GetDoc()->getUnoModel(), UNO_QUERY ),
@@ -321,7 +321,7 @@ IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
// At this moment the controller may not yet been set at model
// or ViewShellBase. Take it from the view shell passed with
// the event.
- if (mrBase.GetMainViewShell() != 0)
+ if (mrBase.GetMainViewShell() != nullptr)
{
if( mrBase.GetMainViewShell()->GetShellType() == ViewShell::ST_IMPRESS )
{
@@ -333,8 +333,8 @@ IMPL_LINK_TYPED(CustomAnimationPane,EventMultiplexerListener,
}
// fall through intended
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
- mxView = 0;
- mxCurrentPage = 0;
+ mxView = nullptr;
+ mxCurrentPage = nullptr;
updateControls();
break;
@@ -526,7 +526,7 @@ void CustomAnimationPane::updateControls()
CustomAnimationPresetPtr pDescriptor = getPresets().getEffectDescriptor( pEffect->getPresetId() );
if( pDescriptor.get() )
{
- PropertySubControl* pSubControl = NULL;
+ PropertySubControl* pSubControl = nullptr;
Any aValue;
@@ -555,16 +555,16 @@ void CustomAnimationPane::updateControls()
}
else
{
- mpLBProperty->setSubControl( 0 );
+ mpLBProperty->setSubControl( nullptr );
}
- bool bEnable = (pSubControl != 0) && (pSubControl->getControl()->IsEnabled());
+ bool bEnable = (pSubControl != nullptr) && (pSubControl->getControl()->IsEnabled());
mpLBProperty->Enable( bEnable );
mpFTProperty->Enable( bEnable );
}
else
{
- mpLBProperty->setSubControl( 0 );
+ mpLBProperty->setSubControl( nullptr );
mpFTProperty->Enable( false );
mpLBProperty->Enable( false );
mpPBPropertyMore->Enable( false );
@@ -610,7 +610,7 @@ void CustomAnimationPane::updateControls()
}
else
{
- mpLBProperty->setSubControl( 0 );
+ mpLBProperty->setSubControl( nullptr );
mpFTProperty->Enable( false );
mpLBProperty->Enable( false );
mpPBPropertyMore->Enable( false );
@@ -654,7 +654,7 @@ void CustomAnimationPane::updateControls()
{
MainSequenceRebuildGuard aGuard( mpMainSequence );
- EffectSequenceHelper* pSequence = 0;
+ EffectSequenceHelper* pSequence = nullptr;
EffectSequence::iterator aRebuildIter( maListSelection.begin() );
const EffectSequence::iterator aRebuildEnd( maListSelection.end() );
while( aRebuildIter != aRebuildEnd )
@@ -663,7 +663,7 @@ void CustomAnimationPane::updateControls()
if( pEffect.get() )
{
- if( pSequence == 0 )
+ if( pSequence == nullptr )
{
pSequence = pEffect->getEffectSequence();
}
@@ -737,7 +737,7 @@ void CustomAnimationPane::updateMotionPathTags()
MotionPathTagVector aTags;
aTags.swap( maMotionPathTags );
- ::sd::View* pView = 0;
+ ::sd::View* pView = nullptr;
if( mxView.is() )
{
@@ -2067,7 +2067,7 @@ void CustomAnimationPane::moveSelection( bool bUp )
return;
EffectSequenceHelper* pSequence = maListSelection.front()->getEffectSequence();
- if( pSequence == 0 )
+ if( pSequence == nullptr )
return;
addUndo();
@@ -2217,7 +2217,7 @@ void CustomAnimationPane::onSelect()
const CustomAnimationPresets& CustomAnimationPane::getPresets()
{
- if (mpCustomAnimationPresets == NULL)
+ if (mpCustomAnimationPresets == nullptr)
mpCustomAnimationPresets = &CustomAnimationPresets::getCustomAnimationPresets();
return *mpCustomAnimationPresets;
}
@@ -2229,7 +2229,7 @@ void CustomAnimationPane::markShapesFromSelectedEffects()
ScopeLockGuard aGuard( maSelectionLock );
DrawViewShell* pViewShell = dynamic_cast< DrawViewShell* >(
FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get());
- DrawView* pView = pViewShell ? pViewShell->GetDrawView() : NULL;
+ DrawView* pView = pViewShell ? pViewShell->GetDrawView() : nullptr;
if( pView )
{
@@ -2256,7 +2256,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
{
SdrPathObj* pPathObj = xTag->getPathObj();
CustomAnimationEffectPtr pEffect = xTag->getEffect();
- if( (pPathObj != 0) && pEffect.get() != 0 )
+ if( (pPathObj != nullptr) && pEffect.get() != nullptr )
{
::svl::IUndoManager* pManager = mrBase.GetDocShell()->GetUndoManager();
if( pManager )
@@ -2273,7 +2273,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
vcl::Window * createCustomAnimationPanel( vcl::Window* pParent, ViewShellBase& rBase, const css::uno::Reference<css::frame::XFrame>& rxFrame )
{
- vcl::Window* pWindow = 0;
+ vcl::Window* pWindow = nullptr;
DrawDocShell* pDocSh = rBase.GetDocShell();
if( pDocSh )
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index fa7f3aebac63..ac54d9ca128d 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -960,7 +960,7 @@ IMPL_LINK_TYPED(SlideTransitionPane,EventMultiplexerListener,
// At this moment the controller may not yet been set at
// model or ViewShellBase. Take it from the view shell
// passed with the event.
- if (mrBase.GetMainViewShell() != 0)
+ if (mrBase.GetMainViewShell() != nullptr)
{
mxView.set(mrBase.GetController(), css::uno::UNO_QUERY);
onSelectionChanged();
@@ -1129,7 +1129,7 @@ IMPL_LINK_NOARG_TYPED(SlideTransitionPane, LateInitCallback, Timer *, void)
vcl::Window * createSlideTransitionPanel( vcl::Window* pParent, ViewShellBase& rBase, const css::uno::Reference<css::frame::XFrame>& rxFrame )
{
- vcl::Window* pWindow = 0;
+ vcl::Window* pWindow = nullptr;
DrawDocShell* pDocSh = rBase.GetDocShell();
if( pDocSh )
diff --git a/sd/source/ui/animations/motionpathtag.cxx b/sd/source/ui/animations/motionpathtag.cxx
index 3e03f32a67a5..c30d53fa67d0 100644
--- a/sd/source/ui/animations/motionpathtag.cxx
+++ b/sd/source/ui/animations/motionpathtag.cxx
@@ -368,7 +368,7 @@ MotionPathTag::MotionPathTag( CustomAnimationPane& rPane, ::sd::View& rView, con
MotionPathTag::~MotionPathTag()
{
- DBG_ASSERT( mpPathObj == 0, "sd::MotionPathTag::~MotionPathTag(), dispose me first!" );
+ DBG_ASSERT( mpPathObj == nullptr, "sd::MotionPathTag::~MotionPathTag(), dispose me first!" );
Dispose();
}
@@ -402,7 +402,7 @@ void MotionPathTag::updatePathAttributes()
void MotionPathTag::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
{
- if( mpPathObj && !mbInUpdatePath && dynamic_cast< const SdrHint* >( &rHint ) && (mpEffect.get() != 0) )
+ if( mpPathObj && !mbInUpdatePath && dynamic_cast< const SdrHint* >( &rHint ) && (mpEffect.get() != nullptr) )
{
if( mxPolyPoly != mpPathObj->GetPathPoly() )
{
@@ -505,7 +505,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
if (mrView.IsPointMarked(*pHdl) )
{
mrView.UnmarkPoint(*pHdl);
- pHdl = NULL;
+ pHdl = nullptr;
}
else
{
@@ -543,7 +543,7 @@ bool MotionPathTag::MouseButtonDown( const MouseEvent& rMEvt, SmartHdl& rHdl )
pDragMethod = new PathDragResize( mrView, xTag, aDragPoly );
}
- mrView.BegDragObj(aMDPos, NULL, pHdl, nDrgLog, pDragMethod );
+ mrView.BegDragObj(aMDPos, nullptr, pHdl, nDrgLog, pDragMethod );
}
return true;
}
@@ -652,10 +652,10 @@ bool MotionPathTag::OnMarkHandle( const KeyEvent& rKEvt )
mrView.MarkPoint(*pHdl);
}
- if(0L == rHdlList.GetFocusHdl())
+ if(nullptr == rHdlList.GetFocusHdl())
{
// restore point with focus
- SdrHdl* pNewOne = 0L;
+ SdrHdl* pNewOne = nullptr;
for(size_t a = 0; !pNewOne && a < rHdlList.GetHdlCount(); ++a)
{
@@ -715,7 +715,7 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
// start dragging
rtl::Reference< MotionPathTag > xTag( this );
- SdrDragMethod* pDragMethod = 0;
+ SdrDragMethod* pDragMethod = nullptr;
if( (pHdl->GetKind() == HDL_MOVE) || (pHdl->GetKind() == HDL_SMARTTAG) )
{
pDragMethod = new PathDragMove( mrView, xTag );
@@ -728,7 +728,7 @@ bool MotionPathTag::OnMove( const KeyEvent& rKEvt )
{
pDragMethod = new PathDragResize( mrView, xTag );
}
- mrView.BegDragObj(aStartPoint, 0, pHdl, 0, pDragMethod);
+ mrView.BegDragObj(aStartPoint, nullptr, pHdl, 0, pDragMethod);
if(mrView.IsDragObj())
{
@@ -822,7 +822,7 @@ bool MotionPathTag::MarkPoints(const Rectangle* pRect, bool bUnmark )
if( pHdl && (pHdl->getTag().get() == this) && mrView.IsPointMarkable(*pHdl) && pHdl->IsSelected() == bUnmark)
{
Point aPos(pHdl->GetPos());
- if( pRect==NULL || pRect->IsInside(aPos))
+ if( pRect==nullptr || pRect->IsInside(aPos))
{
if( mrView.MarkPointHelper(pHdl,mpMark,bUnmark) )
bChgd=true;
@@ -934,7 +934,7 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
for (sal_uInt32 nPlusNum=0; nPlusNum<nPlusAnz; nPlusNum++)
{
SdrHdl* pPlusHdl = mpPathObj->GetPlusHdl(*pSmartHdl,nPlusNum);
- if (pPlusHdl!=NULL)
+ if (pPlusHdl!=nullptr)
{
pPlusHdl->SetObj(mpPathObj);
pPlusHdl->SetPageView(mrView.GetSdrPageView());
@@ -998,7 +998,7 @@ void MotionPathTag::disposing()
if( mpPathObj )
{
SdrPathObj* pPathObj = mpPathObj;
- mpPathObj = 0;
+ mpPathObj = nullptr;
mrView.updateHandles();
delete pPathObj;
}
@@ -1006,7 +1006,7 @@ void MotionPathTag::disposing()
if( mpMark )
{
delete mpMark;
- mpMark = 0;
+ mpMark = nullptr;
}
SmartTag::disposing();
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 0c08e33328d6..2d09b7a587be 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -103,8 +103,8 @@ namespace sd {
SfxItemPool* GetAnnotationPool()
{
- static SfxItemPool* mpAnnotationPool = 0;
- if( mpAnnotationPool == 0 )
+ static SfxItemPool* mpAnnotationPool = nullptr;
+ if( mpAnnotationPool == nullptr )
{
mpAnnotationPool = EditEngine::CreatePool( false );
mpAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
@@ -121,7 +121,7 @@ static SfxBindings* getBindings( ViewShellBase& rBase )
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
- return 0;
+ return nullptr;
}
static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
@@ -129,7 +129,7 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
- return 0;
+ return nullptr;
}
css::util::DateTime getCurrentDateTime()
@@ -172,7 +172,7 @@ AnnotationManagerImpl::AnnotationManagerImpl( ViewShellBase& rViewShellBase )
, mrBase( rViewShellBase )
, mpDoc( rViewShellBase.GetDocument() )
, mbShowAnnotations( true )
-, mnUpdateTagsEvent( 0 )
+, mnUpdateTagsEvent( nullptr )
{
SdOptions* pOptions = SD_MOD()->GetSdOptions(mpDoc->GetDocumentType());
if( pOptions )
@@ -222,7 +222,7 @@ void SAL_CALL AnnotationManagerImpl::disposing ()
if( mnUpdateTagsEvent )
{
Application::RemoveUserEvent( mnUpdateTagsEvent );
- mnUpdateTagsEvent = 0;
+ mnUpdateTagsEvent = nullptr;
}
mxView.clear();
@@ -302,7 +302,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
case SID_DELETEALLBYAUTHOR_POSTIT:
if( pArgs )
{
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == pArgs->GetItemState( SID_DELETEALLBYAUTHOR_POSTIT, true, &pPoolItem ) )
{
OUString sAuthor( static_cast<const SfxStringItem*>( pPoolItem )->GetValue() );
@@ -318,7 +318,7 @@ void AnnotationManagerImpl::ExecuteDeleteAnnotation(SfxRequest& rReq)
{
if( pArgs )
{
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == pArgs->GetItemState( SID_DELETE_POSTIT, true, &pPoolItem ) )
static_cast<const SfxUnoAnyItem*>(pPoolItem)->GetValue() >>= xAnnotation;
}
@@ -418,7 +418,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
{
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == pArgs->GetItemState( rReq.GetSlot(), true, &pPoolItem ) )
static_cast<const SfxUnoAnyItem*>( pPoolItem )->GetValue() >>= xAnnotation;
}
@@ -499,7 +499,7 @@ void AnnotationManagerImpl::DeleteAnnotationsByAuthor( const OUString& sAuthor )
if( mpDoc->IsUndoEnabled() )
mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_DELETE ) );
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
do
{
pPage = GetNextPage( pPage, true );
@@ -529,7 +529,7 @@ void AnnotationManagerImpl::DeleteAllAnnotations()
if( mpDoc->IsUndoEnabled() )
mpDoc->BegUndo( SD_RESSTR( STR_ANNOTATION_UNDO_DELETE ) );
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
do
{
pPage = GetNextPage( pPage, true );
@@ -557,7 +557,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
SdPage* pCurrentPage = GetCurrentPage();
const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
- const bool bWrongPageKind = (pCurrentPage == 0) || (pCurrentPage->GetPageKind() != PK_STANDARD);
+ const bool bWrongPageKind = (pCurrentPage == nullptr) || (pCurrentPage->GetPageKind() != PK_STANDARD);
const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() );
@@ -572,7 +572,7 @@ void AnnotationManagerImpl::GetAnnotationState(SfxItemSet& rSet)
if( !xAnnotation.is() || bReadOnly )
rSet.DisableItem( SID_DELETE_POSTIT );
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
bool bHasAnnotations = false;
do
@@ -669,7 +669,7 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool bForeward)
{
// switch to next/previous slide with annotations
std::shared_ptr<DrawViewShell> pDrawViewShell(std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
- if (pDrawViewShell.get() != NULL)
+ if (pDrawViewShell.get() != nullptr)
{
pDrawViewShell->ChangeEditMode(pPage->IsMasterPage() ? EM_MASTERPAGE : EM_PAGE, false);
pDrawViewShell->SwitchPage((pPage->GetPageNum() - 1) >> 1);
@@ -781,7 +781,7 @@ void AnnotationManagerImpl::UpdateTags( bool bSynchron )
if( mnUpdateTagsEvent )
Application::RemoveUserEvent( mnUpdateTagsEvent );
- UpdateTagsHdl(0);
+ UpdateTagsHdl(nullptr);
}
else
{
@@ -792,7 +792,7 @@ void AnnotationManagerImpl::UpdateTags( bool bSynchron )
IMPL_LINK_NOARG_TYPED(AnnotationManagerImpl, UpdateTagsHdl, void*, void)
{
- mnUpdateTagsEvent = 0;
+ mnUpdateTagsEvent = nullptr;
DisposeTags();
if( mbShowAnnotations )
@@ -907,7 +907,7 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation
const bool bReadOnly = mrBase.GetDocShell()->IsReadOnly();
- AnnotationWindow* pAnnotationWindow = bButtonMenu ? 0 : dynamic_cast< AnnotationWindow* >( pParent );
+ AnnotationWindow* pAnnotationWindow = bButtonMenu ? nullptr : dynamic_cast< AnnotationWindow* >( pParent );
if( bReadOnly && !pAnnotationWindow )
return;
@@ -1077,7 +1077,7 @@ Color AnnotationManagerImpl::GetColorDark(sal_uInt16 aAuthorIndex)
SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
{
- if( pPage == 0 )
+ if( pPage == nullptr )
return bForeward ? GetFirstPage() : GetLastPage();
sal_uInt16 nPageNum = (pPage->GetPageNum() - 1) >> 1;
@@ -1097,7 +1097,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
else
{
if( nPageNum == 0 )
- return 0; // we are already on the first draw page, finished
+ return nullptr; // we are already on the first draw page, finished
nPageNum--;
}
@@ -1109,7 +1109,7 @@ SdPage* AnnotationManagerImpl::GetNextPage( SdPage* pPage, bool bForeward )
{
if( nPageNum >= mpDoc->GetMasterSdPageCount(PK_STANDARD)-1 )
{
- return 0; // we reached the end, there is nothing more to see here
+ return nullptr; // we reached the end, there is nothing more to see here
}
nPageNum++;
}
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx
index 7fdfec5dd74c..0c3638f0db2f 100644
--- a/sd/source/ui/annotations/annotationtag.cxx
+++ b/sd/source/ui/annotations/annotationtag.cxx
@@ -214,7 +214,7 @@ void AnnotationHdl::CreateB2dIAObject()
rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
if(rPaintWindow.OutputToWindow() && xManager.is() )
{
- sdr::overlay::OverlayObject* pOverlayObject = 0;
+ sdr::overlay::OverlayObject* pOverlayObject = nullptr;
// animate focused handles
if(bFocused)
@@ -255,8 +255,8 @@ AnnotationTag::AnnotationTag( AnnotationManagerImpl& rManager, ::sd::View& rView
, maColor( rColor )
, mnIndex( nIndex )
, mrFont( rFont )
-, mnClosePopupEvent( 0 )
-, mpListenWindow( 0 )
+, mnClosePopupEvent( nullptr )
+, mpListenWindow( nullptr )
{
}
@@ -479,7 +479,7 @@ void AnnotationTag::disposing()
if( mnClosePopupEvent )
{
Application::RemoveUserEvent( mnClosePopupEvent );
- mnClosePopupEvent = 0;
+ mnClosePopupEvent = nullptr;
}
mxAnnotation.clear();
@@ -632,8 +632,8 @@ IMPL_LINK_TYPED(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void
{
// if we stop pressing the button without a mouse move we open the popup
mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
- mpListenWindow = 0;
- if( mpAnnotationWindow.get() == 0 )
+ mpListenWindow = nullptr;
+ if( mpAnnotationWindow.get() == nullptr )
OpenPopup(false);
}
break;
@@ -641,7 +641,7 @@ IMPL_LINK_TYPED(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void
{
// if we move the mouse after a button down we wan't to start draging
mpListenWindow->RemoveEventListener( LINK(this, AnnotationTag, WindowEventHandler));
- mpListenWindow = 0;
+ mpListenWindow = nullptr;
SdrHdl* pHdl = mrView.PickHandle(maMouseDownPos);
if( pHdl )
@@ -652,12 +652,12 @@ IMPL_LINK_TYPED(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void
rtl::Reference< AnnotationTag > xTag( this );
SdrDragMethod* pDragMethod = new AnnotationDragMove( mrView, xTag );
- mrView.BegDragObj(maMouseDownPos, NULL, pHdl, nDrgLog, pDragMethod );
+ mrView.BegDragObj(maMouseDownPos, nullptr, pHdl, nDrgLog, pDragMethod );
}
}
break;
case VCLEVENT_OBJECT_DYING:
- mpListenWindow = 0;
+ mpListenWindow = nullptr;
break;
}
}
@@ -666,7 +666,7 @@ IMPL_LINK_TYPED(AnnotationTag, WindowEventHandler, VclWindowEvent&, rEvent, void
IMPL_LINK_NOARG_TYPED(AnnotationTag, ClosePopupHdl, void*, void)
{
- mnClosePopupEvent = 0;
+ mnClosePopupEvent = nullptr;
ClosePopup();
}
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index e8ea2e9c8da9..eecc0e33aae3 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -111,7 +111,7 @@ Color ColorFromAlphaColor(sal_uInt8 aTransparency, Color &aFront, Color &aBack )
AnnotationTextWindow::AnnotationTextWindow( AnnotationWindow* pParent, WinBits nBits )
: Control(pParent, nBits)
-, mpOutlinerView(0)
+, mpOutlinerView(nullptr)
, mpAnnotationWindow( pParent )
{
}
@@ -276,14 +276,14 @@ AnnotationWindow::AnnotationWindow( AnnotationManagerImpl& rManager, DrawDocShel
, mrManager( rManager )
, mpDocShell( pDocShell )
, mpDoc( pDocShell->GetDoc() )
-, mpOutlinerView(0)
-, mpOutliner(0)
-, mpVScrollbar(0)
+, mpOutlinerView(nullptr)
+, mpOutliner(nullptr)
+, mpVScrollbar(nullptr)
, mbReadonly(pDocShell->IsReadOnly())
, mbProtected(false)
, mbMouseOverButton(false)
-, mpTextWindow(0)
-, mpMeta(0)
+, mpTextWindow(nullptr)
+, mpMeta(nullptr)
{
}
@@ -520,7 +520,7 @@ TextApiObject* getTextApiObject( const Reference< XAnnotation >& xAnnotation )
Reference< XText > xText( xAnnotation->getTextRange() );
return TextApiObject::getImplementation( xText );
}
- return 0;
+ return nullptr;
}
void AnnotationWindow::setAnnotation( const Reference< XAnnotation >& xAnnotation, bool bGrabFocus )
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx
index f86572d31944..628453b1e74c 100644
--- a/sd/source/ui/app/optsitem.cxx
+++ b/sd/source/ui/app/optsitem.cxx
@@ -81,7 +81,7 @@ void SdOptionsItem::SetModified()
// - SdOptionsGeneric -
SdOptionsGeneric::SdOptionsGeneric(sal_uInt16 nConfigId, const OUString& rSubTree)
: maSubTree(rSubTree)
- , mpCfgItem( NULL)
+ , mpCfgItem( nullptr)
, mnConfigId(nConfigId)
, mbInit(rSubTree.isEmpty())
, mbEnableModify(false)
@@ -116,7 +116,7 @@ void SdOptionsGeneric::Init() const
SdOptionsGeneric::~SdOptionsGeneric()
{
delete mpCfgItem;
- mpCfgItem = NULL;
+ mpCfgItem = nullptr;
}
void SdOptionsGeneric::Commit( SdOptionsItem& rCfgItem ) const
diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx
index 2bf67cb9ad8f..fc18067f15be 100644
--- a/sd/source/ui/app/sddll.cxx
+++ b/sd/source/ui/app/sddll.cxx
@@ -253,8 +253,8 @@ void SdDLL::Init()
if ( SD_MOD() )
return;
- SfxObjectFactory* pDrawFact = NULL;
- SfxObjectFactory* pImpressFact = NULL;
+ SfxObjectFactory* pDrawFact = nullptr;
+ SfxObjectFactory* pImpressFact = nullptr;
if (utl::ConfigManager::IsAvoidConfig() || SvtModuleOptions().IsImpress())
pImpressFact = &::sd::DrawDocShell::Factory();
diff --git a/sd/source/ui/app/sdmod.cxx b/sd/source/ui/app/sdmod.cxx
index 36d3aaa59855..82c23e11115a 100644
--- a/sd/source/ui/app/sdmod.cxx
+++ b/sd/source/ui/app/sdmod.cxx
@@ -70,13 +70,13 @@ void SdModule::InitInterface_Impl()
SdModule::SdModule(SfxObjectFactory* pFact1, SfxObjectFactory* pFact2 )
: SfxModule( ResMgr::CreateResMgr("sd"), false,
pFact1, pFact2, NULL ),
- pTransferClip(NULL),
- pTransferDrag(NULL),
- pTransferSelection(NULL),
- pImpressOptions(NULL),
- pDrawOptions(NULL),
- pSearchItem(NULL),
- pNumberFormatter( NULL ),
+ pTransferClip(nullptr),
+ pTransferDrag(nullptr),
+ pTransferSelection(nullptr),
+ pImpressOptions(nullptr),
+ pDrawOptions(nullptr),
+ pSearchItem(nullptr),
+ pNumberFormatter( nullptr ),
bWaterCan(false),
mpResourceContainer(new ::sd::SdGlobalResourceContainer()),
mbEventListenerAdded(false)
@@ -114,8 +114,8 @@ SdModule::~SdModule()
// Mark the module in the global AppData structure as deleted.
SdModule** ppShellPointer = reinterpret_cast<SdModule**>(GetAppData(SHL_DRAW));
- if (ppShellPointer != NULL)
- (*ppShellPointer) = NULL;
+ if (ppShellPointer != nullptr)
+ (*ppShellPointer) = nullptr;
delete mpErrorHdl;
mpVirtualRefDevice.disposeAndClear();
@@ -127,15 +127,15 @@ void SdModule::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DEINITIALIZING )
{
- delete pImpressOptions, pImpressOptions = NULL;
- delete pDrawOptions, pDrawOptions = NULL;
+ delete pImpressOptions, pImpressOptions = nullptr;
+ delete pDrawOptions, pDrawOptions = nullptr;
}
}
/// Return options
SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
{
- SdOptions* pOptions = NULL;
+ SdOptions* pOptions = nullptr;
if (eDocType == DOCUMENT_TYPE_DRAW)
{
@@ -156,7 +156,7 @@ SdOptions* SdModule::GetSdOptions(DocumentType eDocType)
sal_uInt16 nMetric = pOptions->GetMetric();
::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
- SdDrawDocument* pDoc = NULL;
+ SdDrawDocument* pDoc = nullptr;
if (pDocSh)
pDoc = pDocSh->GetDoc();
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 56cbcaa2dd5a..e07f38b67e9c 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -219,7 +219,7 @@ void SdModule::Execute(SfxRequest& rReq)
// Prevent documents from opening while the slide
// show is running, except when this request comes
// from a shape interaction.
- if (rReq.GetArgs() == NULL)
+ if (rReq.GetArgs() == nullptr)
{
bIntercept = true;
}
@@ -237,7 +237,7 @@ void SdModule::Execute(SfxRequest& rReq)
const SfxLinkItem* pLinkItem = rReq.GetArg<SfxLinkItem>(SID_DONELINK);
if( pLinkItem )
- pLinkItem->GetValue().Call( 0 );
+ pLinkItem->GetValue().Call( nullptr );
}
}
break;
@@ -291,7 +291,7 @@ bool SdModule::OutlineToImpress(SfxRequest& rRequest)
// (Otherwise the request will be ignored anyway.)
::sd::ViewShellBase* pBase
= dynamic_cast< ::sd::ViewShellBase*>(pViewFrame->GetViewShell());
- if (pBase != NULL)
+ if (pBase != nullptr)
{
std::shared_ptr<FrameworkHelper> pHelper (
FrameworkHelper::Instance(*pBase));
@@ -456,7 +456,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume
pViewFrame->GetDispatcher()->Execute(SID_SUMMARY_PAGE,
SfxCallMode::SYNCHRON | SfxCallMode::RECORD);
- OSL_ASSERT (pDocument!=NULL);
+ OSL_ASSERT (pDocument!=nullptr);
sal_Int32 nPageCount = pDocument->GetSdPageCount (PK_STANDARD);
@@ -466,12 +466,12 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume
{
// Get a page from which to retrieve the transition parameters.
SdPage* pTemplatePage = pDocument->GetSdPage (0, PK_STANDARD);
- OSL_ASSERT (pTemplatePage!=NULL);
+ OSL_ASSERT (pTemplatePage!=nullptr);
// The summary page, if it exists, is the last page.
SdPage* pSummaryPage = pDocument->GetSdPage (
(sal_uInt16)nPageCount-1, PK_STANDARD);
- OSL_ASSERT (pSummaryPage!=NULL);
+ OSL_ASSERT (pSummaryPage!=nullptr);
// Take the change mode of the template page as indication of the
// document's kiosk mode.
@@ -490,7 +490,7 @@ void SdModule::AddSummaryPage (SfxViewFrame* pViewFrame, SdDrawDocument* pDocume
SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Reference< XFrame >& i_rFrame )
{
- SfxFrame* pFrame = 0;
+ SfxFrame* pFrame = nullptr;
SfxObjectShellLock xDocShell;
@@ -509,7 +509,7 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref
{
SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pDocShell, i_rFrame );
OSL_ENSURE( pViewFrame, "SdModule::CreateFromTemplate: no view frame - was the document really loaded?" );
- pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
+ pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
}
return pFrame;
@@ -518,7 +518,7 @@ SfxFrame* SdModule::CreateFromTemplate( const OUString& rTemplatePath, const Ref
SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
{
- SfxFrame* pFrame = 0;
+ SfxFrame* pFrame = nullptr;
if ( SvtModuleOptions().IsImpress() )
{
Reference< XFrame > xTargetFrame;
@@ -552,7 +552,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
else
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr< AbstractAssistentDlg > pPilotDlg( pFact ? pFact->CreateAssistentDlg( NULL, !bNewDocDirect ) : 0 );
+ std::unique_ptr< AbstractAssistentDlg > pPilotDlg( pFact ? pFact->CreateAssistentDlg( nullptr, !bNewDocDirect ) : nullptr );
// Open the Pilot
if( pPilotDlg.get() && pPilotDlg->Execute()==RET_OK )
@@ -636,7 +636,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
{
SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pShell, xTargetFrame );
DBG_ASSERT( pViewFrame, "no ViewFrame!!" );
- pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
+ pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
if(bNewDocDirect && !bStartWithTemplate)
{
@@ -645,13 +645,13 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
ApplyItemSet( SID_SD_EDITOPTIONS, *pRet.get() );
}
- ::sd::DrawDocShell* pDocShell(NULL);
- ::sd::ViewShellBase* pBase(NULL);
- SdDrawDocument* pDoc(NULL);
+ ::sd::DrawDocShell* pDocShell(nullptr);
+ ::sd::ViewShellBase* pBase(nullptr);
+ SdDrawDocument* pDoc(nullptr);
if (pShell && pViewFrame)
{
pDocShell = dynamic_cast< ::sd::DrawDocShell *>( pShell );
- pDoc = pDocShell ? pDocShell->GetDoc() : NULL;
+ pDoc = pDocShell ? pDocShell->GetDoc() : nullptr;
pBase = ::sd::ViewShellBase::GetViewShellBase(pViewFrame);
}
@@ -713,7 +713,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference< XFrame >& i_rFrame )
{
- SfxFrame* pFrame = 0;
+ SfxFrame* pFrame = nullptr;
SfxObjectShellLock xDocShell;
::sd::DrawDocShell* pNewDocSh;
@@ -728,7 +728,7 @@ SfxFrame* SdModule::CreateEmptyDocument( DocumentType eDocType, const Reference<
SfxViewFrame* pViewFrame = SfxViewFrame::LoadDocumentIntoFrame( *pNewDocSh, i_rFrame );
OSL_ENSURE( pViewFrame, "SdModule::CreateEmptyDocument: no view frame - was the document really loaded?" );
- pFrame = pViewFrame ? &pViewFrame->GetFrame() : NULL;
+ pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
return pFrame;
}
@@ -906,7 +906,7 @@ OutlineToImpressFinalizer::OutlineToImpressFinalizer (
// OutlineToImpressFinalizer object. Therefore a local copy of the
// stream is created.
const SvStream* pStream (rBytes.GetStream());
- if (pStream != NULL)
+ if (pStream != nullptr)
{
// Create a memory stream and prepare to fill it with the content of
// the original stream.
@@ -964,7 +964,7 @@ void OutlineToImpressFinalizer::operator() (bool)
::sd::OutlineViewShell* pOutlineShell
= dynamic_cast<sd::OutlineViewShell*>(FrameworkHelper::Instance(mrBase)->GetViewShell(FrameworkHelper::msCenterPaneURL).get());
- if (pOutlineShell != NULL && mpStream.get() != NULL)
+ if (pOutlineShell != nullptr && mpStream.get() != nullptr)
{
sd::OutlineView* pView = static_cast<sd::OutlineView*>(pOutlineShell->GetView());
// mba: the stream can't contain any relative URLs, because we don't
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 873a99bfb10b..f8f2d57440f3 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -71,7 +71,7 @@
static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, bool& bMasterView )
{
if( !pInfo )
- return 0;
+ return nullptr;
bMasterView = false;
SdPage* pPage = dynamic_cast< SdPage* >( pInfo->GetSdrPage() );
@@ -86,11 +86,11 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
}
// first try to check if we are inside the outline view
- sd::OutlineView* pSdView = NULL;
+ sd::OutlineView* pSdView = nullptr;
if( dynamic_cast<const sd::OutlineViewShell* >(pViewSh) != nullptr )
pSdView = static_cast<sd::OutlineView*> (static_cast<sd::OutlineViewShell*>(pViewSh)->GetView());
- if (pSdView != NULL && (pOutliner == &pSdView->GetOutliner()))
+ if (pSdView != nullptr && (pOutliner == &pSdView->GetOutliner()))
{
// outline mode
int nPgNum = 0;
@@ -122,7 +122,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
// currently formatted from the document
if(!pPage)
{
- const SdrTextObj* pTextObj = (pViewSh && pViewSh->GetDoc()) ? pViewSh->GetDoc()->GetFormattingTextObj() : NULL;
+ const SdrTextObj* pTextObj = (pViewSh && pViewSh->GetDoc()) ? pViewSh->GetDoc()->GetFormattingTextObj() : nullptr;
if( pTextObj )
{
@@ -148,8 +148,8 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
return;
const SvxFieldData* pField = pInfo->GetField().GetField();
- ::sd::DrawDocShell* pDocShell = NULL;
- SdDrawDocument* pDoc = 0;
+ ::sd::DrawDocShell* pDocShell = nullptr;
+ SdDrawDocument* pDoc = nullptr;
SdrOutliner* pSdrOutliner = dynamic_cast< SdrOutliner* >( pInfo->GetOutliner() );
if( pSdrOutliner )
@@ -166,23 +166,23 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
if( !pDocShell )
pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
- const SvxDateField* pDateField = 0;
- const SvxExtTimeField* pExtTimeField = 0;
- const SvxExtFileField* pExtFileField = 0;
- const SvxAuthorField* pAuthorField = 0;
- const SvxURLField* pURLField = 0;
+ const SvxDateField* pDateField = nullptr;
+ const SvxExtTimeField* pExtTimeField = nullptr;
+ const SvxExtFileField* pExtFileField = nullptr;
+ const SvxAuthorField* pAuthorField = nullptr;
+ const SvxURLField* pURLField = nullptr;
- if( (pDateField = dynamic_cast< const SvxDateField* >(pField)) != 0 )
+ if( (pDateField = dynamic_cast< const SvxDateField* >(pField)) != nullptr )
{
LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
pInfo->SetRepresentation( pDateField->GetFormatted( *GetNumberFormatter(), eLang ) );
}
- else if( (pExtTimeField = dynamic_cast< const SvxExtTimeField *>(pField)) != 0 )
+ else if( (pExtTimeField = dynamic_cast< const SvxExtTimeField *>(pField)) != nullptr )
{
LanguageType eLang = pInfo->GetOutliner()->GetLanguage( pInfo->GetPara(), pInfo->GetPos() );
pInfo->SetRepresentation( pExtTimeField->GetFormatted( *GetNumberFormatter(), eLang ) );
}
- else if( (pExtFileField = dynamic_cast< const SvxExtFileField * >(pField)) != 0 )
+ else if( (pExtFileField = dynamic_cast< const SvxExtFileField * >(pField)) != nullptr )
{
if( pDocShell && (pExtFileField->GetType() != SVXFILETYPE_FIX) )
{
@@ -197,7 +197,7 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
pInfo->SetRepresentation( pExtFileField->GetFormatted() );
}
- else if( (pAuthorField = dynamic_cast< const SvxAuthorField* >( pField )) != 0 )
+ else if( (pAuthorField = dynamic_cast< const SvxAuthorField* >( pField )) != nullptr )
{
if( pAuthorField->GetType() != SVXAUTHORTYPE_FIX )
{
@@ -215,8 +215,8 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
{
OUString aRepresentation(" ");
- ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
- if(pViewSh == NULL)
+ ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : nullptr;
+ if(pViewSh == nullptr)
{
::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase *>( SfxViewShell::Current() );
if(pBase)
@@ -252,8 +252,8 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
{
OUString aRepresentation(" ");
- ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
- if(pViewSh == NULL)
+ ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : nullptr;
+ if(pViewSh == nullptr)
{
::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase *>( SfxViewShell::Current() );
if(pBase)
@@ -282,8 +282,8 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
{
OUString aRepresentation(" ");
- ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
- if(pViewSh == NULL)
+ ::sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : nullptr;
+ if(pViewSh == nullptr)
{
::sd::ViewShellBase* pBase = dynamic_cast< ::sd::ViewShellBase *>( SfxViewShell::Current() );
if(pBase)
@@ -316,7 +316,7 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
pInfo->SetRepresentation( aRepresentation );
}
- else if( (pURLField = dynamic_cast< const SvxURLField* >(pField)) != 0 )
+ else if( (pURLField = dynamic_cast< const SvxURLField* >(pField)) != nullptr )
{
switch ( pURLField->GetFormat() )
{
@@ -345,17 +345,17 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
{
OUString aRepresentation;
- bool bHeaderField = dynamic_cast< const SvxHeaderField* >( pField ) != 0;
- bool bFooterField = !bHeaderField && (dynamic_cast< const SvxFooterField* >( pField ) != 0 );
- bool bDateTimeField = !bHeaderField && !bFooterField && (dynamic_cast< const SvxDateTimeField* >( pField ) != 0);
+ bool bHeaderField = dynamic_cast< const SvxHeaderField* >( pField ) != nullptr;
+ bool bFooterField = !bHeaderField && (dynamic_cast< const SvxFooterField* >( pField ) != nullptr );
+ bool bDateTimeField = !bHeaderField && !bFooterField && (dynamic_cast< const SvxDateTimeField* >( pField ) != nullptr);
if( bHeaderField || bFooterField || bDateTimeField )
{
- sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : NULL;
+ sd::ViewShell* pViewSh = pDocShell ? pDocShell->GetViewShell() : nullptr;
bool bMasterView = false;
SdPage* pPage = GetCurrentPage( pViewSh, pInfo, bMasterView );
- if( (pPage == NULL) || bMasterView )
+ if( (pPage == nullptr) || bMasterView )
{
if( bHeaderField )
aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_HEADER).toString();
@@ -408,9 +408,9 @@ IMPL_LINK_TYPED(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
*/
SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
{
- ::sd::FrameView* pFrameView = NULL;
+ ::sd::FrameView* pFrameView = nullptr;
::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
- SdDrawDocument* pDoc = NULL;
+ SdDrawDocument* pDoc = nullptr;
// Here we set the DocType of the option dialog (not document!)
DocumentType eDocType = DOCUMENT_TYPE_IMPRESS;
@@ -427,7 +427,7 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
pFrameView = pDocSh->GetFrameView();
::sd::ViewShell* pViewShell = pDocSh->GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->WriteFrameViewData();
}
@@ -531,26 +531,26 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot )
}
void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
bool bNewDefTab = false;
bool bNewPrintOptions = false;
bool bMiscOptions = false;
::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
- SdDrawDocument* pDoc = NULL;
+ SdDrawDocument* pDoc = nullptr;
// Here we set the DocType of the option dialog (not document!)
DocumentType eDocType = DOCUMENT_TYPE_IMPRESS;
if( nSlot == SID_SD_GRAPHIC_OPTIONS )
eDocType = DOCUMENT_TYPE_DRAW;
- ::sd::ViewShell* pViewShell = NULL;
+ ::sd::ViewShell* pViewShell = nullptr;
if (pDocSh)
{
pDoc = pDocSh->GetDoc();
pViewShell = pDocSh->GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->WriteFrameViewData();
}
SdOptions* pOptions = GetSdOptions(eDocType);
@@ -563,7 +563,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
}
// Layout
- const SdOptionsLayoutItem* pLayoutItem = NULL;
+ const SdOptionsLayoutItem* pLayoutItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_LAYOUT,
false, reinterpret_cast<const SfxPoolItem**>(&pLayoutItem) ))
{
@@ -607,7 +607,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
}
// Misc
- const SdOptionsMiscItem* pMiscItem = NULL;
+ const SdOptionsMiscItem* pMiscItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_MISC,
false, reinterpret_cast<const SfxPoolItem**>(&pMiscItem) ))
{
@@ -616,7 +616,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
}
// Snap
- const SdOptionsSnapItem* pSnapItem = NULL;
+ const SdOptionsSnapItem* pSnapItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_SNAP,
false, reinterpret_cast<const SfxPoolItem**>(&pSnapItem) ))
{
@@ -630,7 +630,7 @@ void SdModule::ApplyItemSet( sal_uInt16 nSlot, const SfxItemSet& rSet )
0 );
// Print
- const SdOptionsPrintItem* pPrintItem = NULL;
+ const SdOptionsPrintItem* pPrintItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( ATTR_OPTIONS_PRINT,
false, reinterpret_cast<const SfxPoolItem**>(&pPrintItem) ))
{
diff --git a/sd/source/ui/app/sdpopup.cxx b/sd/source/ui/app/sdpopup.cxx
index 071340202dd1..9cd822ff21b5 100644
--- a/sd/source/ui/app/sdpopup.cxx
+++ b/sd/source/ui/app/sdpopup.cxx
@@ -163,7 +163,7 @@ void SdFieldPopup::Fill( LanguageType eLanguage )
*/
SvxFieldData* SdFieldPopup::GetField()
{
- SvxFieldData* pNewField = NULL;
+ SvxFieldData* pNewField = nullptr;
sal_uInt16 nCount = GetItemCount();
if( dynamic_cast< const SvxDateField *>( pField ) != nullptr )
diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx
index 7ff21c9f0f70..3103f72cba86 100644
--- a/sd/source/ui/app/sdxfer.cxx
+++ b/sd/source/ui/app/sdxfer.cxx
@@ -77,18 +77,18 @@ using namespace ::com::sun::star::datatransfer::clipboard;
#define SDTRANSFER_OBJECTTYPE_DRAWOLE static_cast<SotClipboardFormatId>(0x00000002)
SdTransferable::SdTransferable( SdDrawDocument* pSrcDoc, ::sd::View* pWorkView, bool bInitOnGetData )
-: mpPageDocShell( NULL )
-, mpOLEDataHelper( NULL )
-, mpObjDesc( NULL )
+: mpPageDocShell( nullptr )
+, mpOLEDataHelper( nullptr )
+, mpObjDesc( nullptr )
, mpSdView( pWorkView )
, mpSdViewIntern( pWorkView )
-, mpSdDrawDocument( NULL )
-, mpSdDrawDocumentIntern( NULL )
+, mpSdDrawDocument( nullptr )
+, mpSdDrawDocumentIntern( nullptr )
, mpSourceDoc( pSrcDoc )
-, mpVDev( NULL )
-, mpBookmark( NULL )
-, mpGraphic( NULL )
-, mpImageMap( NULL )
+, mpVDev( nullptr )
+, mpBookmark( nullptr )
+, mpGraphic( nullptr )
+, mpImageMap( nullptr )
, mbInternalMove( false )
, mbOwnDocument( false )
, mbOwnView( false )
@@ -152,12 +152,12 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
{
if( pObj )
{
- delete mpOLEDataHelper, mpOLEDataHelper = NULL;
- delete mpGraphic, mpGraphic = NULL;
- delete mpBookmark, mpBookmark = NULL;
- delete mpImageMap, mpImageMap = NULL;
+ delete mpOLEDataHelper, mpOLEDataHelper = nullptr;
+ delete mpGraphic, mpGraphic = nullptr;
+ delete mpBookmark, mpBookmark = nullptr;
+ delete mpImageMap, mpImageMap = nullptr;
- if( 0!= dynamic_cast< const SdrOle2Obj* >( pObj ) )
+ if( nullptr!= dynamic_cast< const SdrOle2Obj* >( pObj ) )
{
try
{
@@ -215,11 +215,11 @@ void SdTransferable::CreateObjectReplacement( SdrObject* pObj )
{
const OutlinerParaObject* pPara;
- if( (pPara = static_cast< SdrTextObj* >( pObj )->GetOutlinerParaObject()) != 0 )
+ if( (pPara = static_cast< SdrTextObj* >( pObj )->GetOutlinerParaObject()) != nullptr )
{
const SvxFieldItem* pField;
- if( (pField = pPara->GetTextObject().GetField()) != 0 )
+ if( (pField = pPara->GetTextObject().GetField()) != nullptr )
{
const SvxFieldData* pData = pField->GetField();
@@ -281,7 +281,7 @@ void SdTransferable::CreateData()
mpSourceDoc->CreatingDataObj(this);
mpSdDrawDocumentIntern = static_cast<SdDrawDocument*>( mpSdView->GetMarkedObjModel() );
if( mpSourceDoc )
- mpSourceDoc->CreatingDataObj(0);
+ mpSourceDoc->CreatingDataObj(nullptr);
if( !maDocShellRef.Is() && mpSdDrawDocumentIntern->GetDocSh() )
maDocShellRef = mpSdDrawDocumentIntern->GetDocSh();
@@ -378,7 +378,7 @@ static bool lcl_HasOnlyOneTable( SdrModel* pModel )
SdrPage* pPage = pModel->GetPage(0);
if (pPage && pPage->GetObjCount() == 1 )
{
- if( dynamic_cast< sdr::table::SdrTableObj* >( pPage->GetObj(0) ) != 0 )
+ if( dynamic_cast< sdr::table::SdrTableObj* >( pPage->GetObj(0) ) != nullptr )
return true;
}
}
@@ -452,7 +452,7 @@ void SdTransferable::AddSupportedFormats()
bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDoc )
{
- if (SD_MOD()==NULL)
+ if (SD_MOD()==nullptr)
return false;
SotClipboardFormatId nFormat = SotExchange::GetFormat( rFlavor );
@@ -500,7 +500,7 @@ bool SdTransferable::GetData( const DataFlavor& rFlavor, const OUString& rDestDo
SdDrawDocument& rInternDoc = mpSdViewIntern->GetDoc();
rInternDoc.CreatingDataObj(this);
SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( mpSdViewIntern->GetMarkedObjModel() );
- rInternDoc.CreatingDataObj(0);
+ rInternDoc.CreatingDataObj(nullptr);
bOK = SetObject( pDoc, SDTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
@@ -595,7 +595,7 @@ bool SdTransferable::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void*
{
try
{
- static const bool bDontBurnInStyleSheet = ( getenv( "AVOID_BURN_IN_FOR_GALLERY_THEME" ) != NULL );
+ static const bool bDontBurnInStyleSheet = ( getenv( "AVOID_BURN_IN_FOR_GALLERY_THEME" ) != nullptr );
SdDrawDocument* pDoc = static_cast<SdDrawDocument*>(pObject);
if ( !bDontBurnInStyleSheet )
pDoc->BurnInStyleSheetAttributes();
@@ -676,13 +676,13 @@ void SdTransferable::DragFinished( sal_Int8 nDropAction )
void SdTransferable::ObjectReleased()
{
if( this == SD_MOD()->pTransferClip )
- SD_MOD()->pTransferClip = NULL;
+ SD_MOD()->pTransferClip = nullptr;
if( this == SD_MOD()->pTransferDrag )
- SD_MOD()->pTransferDrag = NULL;
+ SD_MOD()->pTransferDrag = nullptr;
if( this == SD_MOD()->pTransferSelection )
- SD_MOD()->pTransferSelection = NULL;
+ SD_MOD()->pTransferSelection = nullptr;
}
void SdTransferable::SetObjectDescriptor( const TransferableObjectDescriptor& rObjDesc )
@@ -701,14 +701,14 @@ void SdTransferable::SetPageBookmarks( const std::vector<OUString> &rPageBookmar
mpSdDrawDocument->ClearModel(false);
- mpPageDocShell = NULL;
+ mpPageDocShell = nullptr;
maPageBookmarks.clear();
if( bPersistent )
{
mpSdDrawDocument->CreateFirstPages(mpSourceDoc);
- mpSdDrawDocument->InsertBookmarkAsPage( rPageBookmarks, NULL, false, true, 1, true,
+ mpSdDrawDocument->InsertBookmarkAsPage( rPageBookmarks, nullptr, false, true, 1, true,
mpSourceDoc->GetDocSh(), true, true, false );
}
else
@@ -789,7 +789,7 @@ SdTransferable* SdTransferable::getImplementation( const Reference< XInterface >
catch( const css::uno::Exception& )
{
}
- return NULL;
+ return nullptr;
}
void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
@@ -800,7 +800,7 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( HINT_MODELCLEARED == pSdrHint->GetKind() )
{
EndListening(*mpSourceDoc);
- mpSourceDoc = 0;
+ mpSourceDoc = nullptr;
}
}
else
@@ -809,11 +809,11 @@ void SdTransferable::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if(pSimpleHint && (pSimpleHint->GetId() == SFX_HINT_DYING) )
{
if( &rBC == mpSourceDoc )
- mpSourceDoc = 0;
+ mpSourceDoc = nullptr;
if( &rBC == mpSdViewIntern )
- mpSdViewIntern = 0;
+ mpSdViewIntern = nullptr;
if( &rBC == mpSdView )
- mpSdView = 0;
+ mpSdView = nullptr;
}
}
}
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 27b81ed0849e..afabd0f17808 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -157,8 +157,8 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
, mrController( rController )
, mxFrame(xFrame)
, mbInsertPage( bInsertPage )
-, mpLayoutSet1( 0 )
-, mpLayoutSet2( 0 )
+, mpLayoutSet1( nullptr )
+, mpLayoutSet2( nullptr )
{
DrawViewMode eMode = DrawViewMode_DRAW;
@@ -187,7 +187,7 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, const
mpLayoutSet1 = createEmptyValueSetControl();
mpLayoutSet1->SetSelectHdl( LINK( this, LayoutToolbarMenu, SelectValueSetHdl ) );
- const snewfoil_value_info* pInfo = 0;
+ const snewfoil_value_info* pInfo = nullptr;
sal_Int16 nColCount = 4;
switch( eMode )
{
@@ -348,7 +348,7 @@ void SAL_CALL SlideLayoutController::initialize( const css::uno::Sequence< css::
{
svt::PopupWindowController::initialize( aArguments );
- ToolBox* pToolBox = 0;
+ ToolBox* pToolBox = nullptr;
sal_uInt16 nId = 0;
if ( getToolboxId( nId, &pToolBox ) )
{
diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index e1127c3a0fb7..ed3f694c8b65 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -125,7 +125,7 @@ sal_Int8 LayerTabBar::AcceptDrop( const AcceptDropEvent& rEvt )
sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
GetPageText( GetPageId( aPos ) ), false );
- nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, nPageId, nLayerId );
+ nRet = pDrViewSh->AcceptDrop( rEvt, *this, nullptr, nPageId, nLayerId );
SwitchPage( aPos );
}
@@ -141,7 +141,7 @@ sal_Int8 LayerTabBar::ExecuteDrop( const ExecuteDropEvent& rEvt )
sal_uInt16 nPageId = SDRPAGE_NOTFOUND;
sal_uInt16 nLayerId = pDrViewSh->GetView()->GetDoc().GetLayerAdmin().GetLayerID(
GetPageText( GetPageId( PixelToLogic( rEvt.maPosPixel ) ) ), false );
- sal_Int8 nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, nPageId, nLayerId );
+ sal_Int8 nRet = pDrViewSh->ExecuteDrop( rEvt, *this, nullptr, nPageId, nLayerId );
EndSwitchPage();
@@ -279,7 +279,7 @@ void LayerTabBar::EndRenaming()
void LayerTabBar::ActivatePage()
{
- if ( /*IsInSwitching*/ true && pDrViewSh!=NULL)
+ if ( /*IsInSwitching*/ true && pDrViewSh!=nullptr)
{
SfxDispatcher* pDispatcher = pDrViewSh->GetViewFrame()->GetDispatcher();
diff --git a/sd/source/ui/dlg/NavigatorChildWindow.cxx b/sd/source/ui/dlg/NavigatorChildWindow.cxx
index e1b8306e7170..12662aff5d3b 100644
--- a/sd/source/ui/dlg/NavigatorChildWindow.cxx
+++ b/sd/source/ui/dlg/NavigatorChildWindow.cxx
@@ -33,8 +33,8 @@ SFX_IMPL_CHILDWINDOWCONTEXT(NavigatorChildWindow, SID_NAVIGATOR)
void RequestNavigatorUpdate (SfxBindings* pBindings)
{
- if (pBindings != NULL
- && pBindings->GetDispatcher() != NULL)
+ if (pBindings != nullptr
+ && pBindings->GetDispatcher() != nullptr)
{
SfxBoolItem aItem (SID_NAVIGATOR_INIT, true);
pBindings->GetDispatcher()->Execute(
diff --git a/sd/source/ui/dlg/PaneChildWindows.cxx b/sd/source/ui/dlg/PaneChildWindows.cxx
index a8f6306a8865..e26beeca4721 100644
--- a/sd/source/ui/dlg/PaneChildWindows.cxx
+++ b/sd/source/ui/dlg/PaneChildWindows.cxx
@@ -66,7 +66,7 @@ PaneChildWindow::PaneChildWindow (
SetHideNotDelete(true);
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pBindings->GetDispatcher()->GetFrame());
- if (pBase != NULL)
+ if (pBase != nullptr)
{
framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
}
@@ -74,12 +74,12 @@ PaneChildWindow::PaneChildWindow (
PaneChildWindow::~PaneChildWindow()
{
- ViewShellBase* pBase = NULL;
+ ViewShellBase* pBase = nullptr;
PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(GetWindow());
- if (pDockingWindow != NULL)
+ if (pDockingWindow != nullptr)
pBase = ViewShellBase::GetViewShellBase(
pDockingWindow->GetBindings().GetDispatcher()->GetFrame());
- if (pBase != NULL)
+ if (pBase != nullptr)
framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
}
diff --git a/sd/source/ui/dlg/PaneDockingWindow.cxx b/sd/source/ui/dlg/PaneDockingWindow.cxx
index 4f15c625bf44..6c3def48a27c 100644
--- a/sd/source/ui/dlg/PaneDockingWindow.cxx
+++ b/sd/source/ui/dlg/PaneDockingWindow.cxx
@@ -68,7 +68,7 @@ void PaneDockingWindow::StateChanged( StateChangedType nType )
// in-place slide show.
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(
GetBindings().GetDispatcher()->GetFrame());
- if (pBase != NULL)
+ if (pBase != nullptr)
{
framework::FrameworkHelper::Instance(*pBase)->UpdateConfiguration();
}
@@ -98,7 +98,7 @@ void PaneDockingWindow::MouseButtonDown (const MouseEvent& rEvent)
void PaneDockingWindow::SetValidSizeRange (const Range& rValidSizeRange)
{
SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
- if (pSplitWindow != NULL)
+ if (pSplitWindow != nullptr)
{
const sal_uInt16 nId (pSplitWindow->GetItemId(static_cast< vcl::Window*>(this)));
const sal_uInt16 nSetId (pSplitWindow->GetSet(nId));
@@ -119,7 +119,7 @@ void PaneDockingWindow::SetValidSizeRange (const Range& rValidSizeRange)
PaneDockingWindow::Orientation PaneDockingWindow::GetOrientation() const
{
SplitWindow* pSplitWindow = dynamic_cast<SplitWindow*>(GetParent());
- if (pSplitWindow == NULL)
+ if (pSplitWindow == nullptr)
return UnknownOrientation;
else if (pSplitWindow->IsHorizontal())
return HorizontalOrientation;
diff --git a/sd/source/ui/dlg/PaneShells.cxx b/sd/source/ui/dlg/PaneShells.cxx
index 0c4c4d3c3955..05abede1c517 100644
--- a/sd/source/ui/dlg/PaneShells.cxx
+++ b/sd/source/ui/dlg/PaneShells.cxx
@@ -33,7 +33,7 @@ namespace sd {
static SfxSlot aLeftImpressPaneShellSlots_Impl[] =
{
- { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
};
SFX_IMPL_INTERFACE(LeftImpressPaneShell, SfxShell)
@@ -59,7 +59,7 @@ LeftImpressPaneShell::~LeftImpressPaneShell()
static SfxSlot aLeftDrawPaneShellSlots_Impl[] =
{
- { 0, 0, 0, SfxSlotMode::NONE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { 0, 0, 0, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0, nullptr }
};
SFX_IMPL_INTERFACE(LeftDrawPaneShell, SfxShell)
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index a99caae77db2..962b05a72f15 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -179,7 +179,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void)
for( sal_Int32 i = 0; i < pImagesLst->GetEntryCount(); i+=2 )
{
- OUString const * pData = NULL;
+ OUString const * pData = nullptr;
// create the slide
Reference< drawing::XDrawPage > xSlide = appendNewSlide(AUTOLAYOUT_NONE, xDrawPages);
@@ -285,7 +285,7 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, CreateHdl, Button*, void)
for( sal_Int32 i = 0; i < pImagesLst->GetEntryCount(); i+=4 )
{
- OUString* pData = NULL;
+ OUString* pData = nullptr;
// create the slide
Reference< drawing::XDrawPage > xSlide = appendNewSlide(AUTOLAYOUT_NONE, xDrawPages);
Reference< beans::XPropertySet > xSlideProps( xSlide, uno::UNO_QUERY );
@@ -602,14 +602,14 @@ IMPL_LINK_NOARG_TYPED(SdPhotoAlbumDialog, SelectHdl, ListBox&, void)
SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( sImgUrl, StreamMode::READ );
if( pStream )
- mpGraphicFilter->ImportGraphic( aGraphic, sImgUrl, *pStream, nFilter, NULL, nFilterImportFlags );
+ mpGraphicFilter->ImportGraphic( aGraphic, sImgUrl, *pStream, nFilter, nullptr, nFilterImportFlags );
else
- mpGraphicFilter->ImportGraphic( aGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ mpGraphicFilter->ImportGraphic( aGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
delete pStream;
}
else
{
- mpGraphicFilter->ImportGraphic( aGraphic, aURLObj, nFilter, NULL, nFilterImportFlags );
+ mpGraphicFilter->ImportGraphic( aGraphic, aURLObj, nFilter, nullptr, nFilterImportFlags );
}
Bitmap aBmp = aGraphic.GetBitmap();
diff --git a/sd/source/ui/dlg/SpellDialogChildWindow.cxx b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
index b59696c8290a..1791ec6c8c35 100644
--- a/sd/source/ui/dlg/SpellDialogChildWindow.cxx
+++ b/sd/source/ui/dlg/SpellDialogChildWindow.cxx
@@ -40,7 +40,7 @@ SpellDialogChildWindow::SpellDialogChildWindow (
SfxBindings* pBindings,
SfxChildWinInfo* pInfo)
: svx::SpellDialogChildWindow (_pParent, nId, pBindings, pInfo),
- mpSdOutliner (NULL),
+ mpSdOutliner (nullptr),
mbOwnOutliner (false)
{
ProvideOutliner();
@@ -65,7 +65,7 @@ svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck
{
svx::SpellPortions aResult;
- if (mpSdOutliner != NULL)
+ if (mpSdOutliner != nullptr)
{
ProvideOutliner();
aResult = mpSdOutliner->GetNextSpellSentence();
@@ -76,10 +76,10 @@ svx::SpellPortions SpellDialogChildWindow::GetNextWrongSentence( bool /*bRecheck
void SpellDialogChildWindow::ApplyChangedSentence (
const svx::SpellPortions& rChanged, bool bRecheck )
{
- if (mpSdOutliner != NULL)
+ if (mpSdOutliner != nullptr)
{
OutlinerView* pOutlinerView = mpSdOutliner->GetView(0);
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
mpSdOutliner->ApplyChangedSentence (
pOutlinerView->GetEditView(),
rChanged, bRecheck);
@@ -107,7 +107,7 @@ void SpellDialogChildWindow::EndSpellingAndClearOutliner()
mpSdOutliner->EndSpelling();
if (mbOwnOutliner)
delete mpSdOutliner;
- mpSdOutliner = NULL;
+ mpSdOutliner = nullptr;
mbOwnOutliner = false;
}
@@ -126,12 +126,12 @@ void SpellDialogChildWindow::ProvideOutliner()
{
ViewShellBase* pViewShellBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() );
- if (pViewShellBase != NULL)
+ if (pViewShellBase != nullptr)
{
ViewShell* pViewShell = pViewShellBase->GetMainViewShell().get();
// If there already exists an outliner that has been created
// for another view shell then destroy it first.
- if (mpSdOutliner != NULL)
+ if (mpSdOutliner != nullptr)
if(( dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr && ! mbOwnOutliner)
|| (dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && mbOwnOutliner))
{
@@ -139,7 +139,7 @@ void SpellDialogChildWindow::ProvideOutliner()
}
// Now create/get an outliner if none is present.
- if (mpSdOutliner == NULL)
+ if (mpSdOutliner == nullptr)
{
if( dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr)
{
@@ -161,7 +161,7 @@ void SpellDialogChildWindow::ProvideOutliner()
}
// Initialize spelling.
- if (mpSdOutliner != NULL)
+ if (mpSdOutliner != nullptr)
{
mpSdOutliner->PrepareSpelling();
mpSdOutliner->StartSpelling();
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index 284815774b9e..7f96cb386b0c 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -141,7 +141,7 @@ void TemplateDir::EnableSorting(bool bSortingEnabled)
mbSortingEnabled = bSortingEnabled;
if (mbSortingEnabled)
{
- if (mpEntryCompare.get() == NULL)
+ if (mpEntryCompare.get() == nullptr)
mpEntryCompare.reset(new TemplateEntryCompare);
::std::sort(maEntries.begin(), maEntries.end(), *mpEntryCompare);
@@ -168,10 +168,10 @@ class TemplateScanner::FolderDescriptorList
TemplateScanner::TemplateScanner()
: meState(INITIALIZE_SCANNING),
maFolderContent(),
- mpTemplateDirectory(NULL),
+ mpTemplateDirectory(nullptr),
maFolderList(),
mbEntrySortingEnabled(false),
- mpLastAddedEntry(NULL),
+ mpLastAddedEntry(nullptr),
mpFolderDescriptors(new FolderDescriptorList()),
mxTemplateRoot(),
mxFolderEnvironment(),
@@ -190,7 +190,7 @@ TemplateScanner::~TemplateScanner()
// transferred to another object.
std::vector<TemplateDir*>::iterator I;
for (I=maFolderList.begin(); I!=maFolderList.end(); ++I)
- if (*I != NULL)
+ if (*I != nullptr)
delete *I;
}
@@ -273,7 +273,7 @@ TemplateScanner::State TemplateScanner::ScanEntry()
if (mpTemplateDirectory->maEntries.empty())
{
delete mpTemplateDirectory;
- mpTemplateDirectory = NULL;
+ mpTemplateDirectory = nullptr;
}
else
{
@@ -431,7 +431,7 @@ void TemplateScanner::RunNextStep()
mxEntryEnvironment.clear();
mxFolderResultSet.clear();
mxEntryResultSet.clear();
- mpLastAddedEntry = NULL;
+ mpLastAddedEntry = nullptr;
break;
default:
break;
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 2c2f4ee13183..5c129ca3fa58 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -167,7 +167,7 @@ AnimationWindow::AnimationWindow(SfxBindings* pInBindings, SfxChildWindow *pCW,
reverseUniqueHelpIdHack(*this);
// create new document with page
- pMyDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, NULL);
+ pMyDoc = new SdDrawDocument(DOCUMENT_TYPE_IMPRESS, nullptr);
SdPage* pPage = pMyDoc->AllocSdPage(false);
pMyDoc->InsertPage(pPage);
@@ -290,14 +290,14 @@ IMPL_LINK_TYPED( AnimationWindow, ClickPlayHdl, Button *, p, void )
}
// StatusBarManager from 1 second
- SfxProgress* pProgress = NULL;
+ SfxProgress* pProgress = nullptr;
if( nFullTime >= 1000 )
{
bDisableCtrls = true;
m_pBtnStop->Enable();
m_pBtnStop->Update();
OUString aStr("Animator:"); // here we should think about something smart
- pProgress = new SfxProgress( NULL, aStr, nFullTime );
+ pProgress = new SfxProgress( nullptr, aStr, nFullTime );
}
sal_uLong nTmpTime = 0;
@@ -556,7 +556,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
}
else
{
- m_pCtlDisplay->SetBitmapEx(0);
+ m_pCtlDisplay->SetBitmapEx(nullptr);
}
m_pCtlDisplay->Invalidate();
m_pCtlDisplay->Update();
@@ -618,7 +618,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
m_pLbAdjustment->Enable();
}
- ClickRbtHdl( NULL );
+ ClickRbtHdl( nullptr );
}
void AnimationWindow::ResetAttrs()
@@ -1020,7 +1020,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
{
// calculate offset for the specified direction
Size aOffset;
- SdrObject * pClone = NULL;
+ SdrObject * pClone = nullptr;
SdPage* pPage = pMyDoc->GetSdPage(0, PK_STANDARD);
for (size_t i = 0; i < nCount; ++i)
@@ -1078,7 +1078,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
// #i42894# Caution(!) variable pPage looks right, but it is a page from the local
// document the dialog is using (!), so get the target page from the target view
- SdPage* pTargetSdPage = dynamic_cast< SdPage* >(rView.GetSdrPageView() ? rView.GetSdrPageView()->GetPage() : 0);
+ SdPage* pTargetSdPage = dynamic_cast< SdPage* >(rView.GetSdrPageView() ? rView.GetSdrPageView()->GetPage() : nullptr);
if(pTargetSdPage)
{
@@ -1115,7 +1115,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
}
}
- ClickFirstHdl( NULL );
+ ClickFirstHdl( nullptr );
}
void AnimationWindow::DataChanged( const DataChangedEvent& rDCEvt )
diff --git a/sd/source/ui/dlg/brkdlg.cxx b/sd/source/ui/dlg/brkdlg.cxx
index b6a117f7b9b4..15e65ae8723b 100644
--- a/sd/source/ui/dlg/brkdlg.cxx
+++ b/sd/source/ui/dlg/brkdlg.cxx
@@ -45,7 +45,7 @@ BreakDlg::BreakDlg(
sal_uLong nSumActionCount,
sal_uLong nObjCount )
: SfxModalDialog(pWindow, "BreakDialog", "modules/sdraw/ui/breakdialog.ui")
- , mpProgress( NULL )
+ , mpProgress( nullptr )
{
get(m_pFiObjInfo, "metafiles");
get(m_pFiActInfo, "metaobjects");
@@ -72,9 +72,9 @@ BreakDlg::~BreakDlg()
void BreakDlg::dispose()
{
delete mpProgress;
- mpProgress = NULL;
+ mpProgress = nullptr;
delete pProgrInfo;
- pProgrInfo = NULL;
+ pProgrInfo = nullptr;
m_pFiObjInfo.clear();
m_pFiActInfo.clear();
m_pFiInsInfo.clear();
@@ -97,7 +97,7 @@ IMPL_LINK_NOARG_TYPED(BreakDlg, CancelButtonHdl, Button*, void)
*/
IMPL_LINK_TYPED( BreakDlg, UpDate, void*, nInit, bool )
{
- if(pProgrInfo == NULL)
+ if(pProgrInfo == nullptr)
return true;
// update status bar or show a error message?
diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx
index a4bf97f08732..48cefcdff007 100644
--- a/sd/source/ui/dlg/copydlg.cxx
+++ b/sd/source/ui/dlg/copydlg.cxx
@@ -108,7 +108,7 @@ void CopyDlg::dispose()
*/
void CopyDlg::Reset()
{
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
OUString aStr( GetExtraData() );
if (comphelper::string::getTokenCount(aStr, TOKEN) < 8)
@@ -247,7 +247,7 @@ IMPL_LINK_NOARG_TYPED(CopyDlg, SetViewData, Button*, void)
maUIScale, SFX_MAPUNIT_100TH_MM);
// sets color attribute
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) )
{
Color aColor = static_cast<const XColorItem*>( pPoolItem )->GetColorValue();
@@ -272,7 +272,7 @@ IMPL_LINK_NOARG_TYPED(CopyDlg, SetDefault, Button*, void)
SetMetricValue( *m_pMtrFldHeight, Fraction(nValue) / maUIScale, SFX_MAPUNIT_100TH_MM);
// set color attribute
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_START_COLOR, true, &pPoolItem ) )
{
Color aColor = static_cast<const XColorItem*>( pPoolItem )->GetColorValue();
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 153a1cc3510d..f3671b5628e5 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -35,8 +35,8 @@ SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow,
SdDrawDocument& rDrawDoc ) :
ModalDialog ( pWindow, "CustomSlideShows", "modules/simpress/ui/customslideshows.ui" ),
rDoc ( rDrawDoc ),
- pCustomShowList ( NULL ),
- pCustomShow ( NULL ),
+ pCustomShowList ( nullptr ),
+ pCustomShow ( nullptr ),
bModified ( false )
{
get( m_pBtnNew, "new" );
@@ -69,7 +69,7 @@ SdCustomShowDlg::SdCustomShowDlg( vcl::Window* pWindow,
long nPosToSelect = pCustomShowList->GetCurPos();
// fill ListBox with CustomShows
for( pCustomShow = pCustomShowList->First();
- pCustomShow != NULL;
+ pCustomShow != nullptr;
pCustomShow = pCustomShowList->Next() )
{
m_pLbCustomShows->InsertEntry( pCustomShow->GetName() );
@@ -131,7 +131,7 @@ void SdCustomShowDlg::SelectHdl(void *p)
// new CustomShow
if( p == m_pBtnNew )
{
- pCustomShow = NULL;
+ pCustomShow = nullptr;
ScopedVclPtrInstance< SdDefineCustomShowDlg > aDlg( this, rDoc, pCustomShow );
if( aDlg->Execute() == RET_OK )
{
@@ -221,7 +221,7 @@ void SdCustomShowDlg::SelectHdl(void *p)
{
bDifferent = true;
for( pCustomShow = pCustomShowList->First();
- pCustomShow != NULL && bDifferent;
+ pCustomShow != nullptr && bDifferent;
pCustomShow = pCustomShowList->Next() )
{
if( aStr == pCustomShow->GetName() )
@@ -374,7 +374,7 @@ void SdDefineCustomShowDlg::CheckState()
{
bool bPages = m_pLbPages->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
//sal_Bool bCSPages = aLbCustomPages.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND;
- bool bCSPages = m_pLbCustomPages->FirstSelected() != NULL;
+ bool bCSPages = m_pLbCustomPages->FirstSelected() != nullptr;
bool bCount = m_pLbCustomPages->GetEntryCount() > 0;
m_pBtnOK->Enable( bCount );
@@ -415,7 +415,7 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void* p)
{
OUString aStr = m_pLbPages->GetSelectEntry( i );
pEntry = m_pLbCustomPages->InsertEntry( aStr,
- 0, false, nPosCP );
+ nullptr, false, nPosCP );
m_pLbCustomPages->Select( pEntry );
SdPage* pPage = rDoc.GetSdPage( (sal_uInt16) m_pLbPages->
@@ -454,7 +454,7 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void* p)
void SdDefineCustomShowDlg::CheckCustomShow()
{
bool bDifferent = false;
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
// compare count
if( rpCustomShow->PagesVector().size() != m_pLbCustomPages->GetEntryCount() )
@@ -468,7 +468,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
{
SdCustomShow::PageVec::iterator it1 = rpCustomShow->PagesVector().begin();
pEntry = m_pLbCustomPages->First();
- for( ; it1 != rpCustomShow->PagesVector().end() && pEntry != NULL && !bDifferent;
+ for( ; it1 != rpCustomShow->PagesVector().end() && pEntry != nullptr && !bDifferent;
++it1, pEntry = m_pLbCustomPages->Next( pEntry ) )
{
if( *it1 != pEntry->GetUserData() )
@@ -483,7 +483,7 @@ void SdDefineCustomShowDlg::CheckCustomShow()
if( bDifferent )
{
for( pEntry = m_pLbCustomPages->First();
- pEntry != NULL;
+ pEntry != nullptr;
pEntry = m_pLbCustomPages->Next( pEntry ) )
{
SdPage* pPage = static_cast<SdPage*>(pEntry->GetUserData());
@@ -514,7 +514,7 @@ IMPL_LINK_NOARG_TYPED(SdDefineCustomShowDlg, OKHdl, Button*, void)
long nPosToSelect = pCustomShowList->GetCurPos();
for( pCustomShow = pCustomShowList->First();
- pCustomShow != NULL;
+ pCustomShow != nullptr;
pCustomShow = pCustomShowList->Next() )
{
if( aName == pCustomShow->GetName() && aName != aOldName )
diff --git a/sd/source/ui/dlg/diactrl.cxx b/sd/source/ui/dlg/diactrl.cxx
index e2307ac7c2c8..ee84f3578357 100644
--- a/sd/source/ui/dlg/diactrl.cxx
+++ b/sd/source/ui/dlg/diactrl.cxx
@@ -121,7 +121,7 @@ void SdTbxCtlDiaPages::StateChanged( sal_uInt16,
{
pFld->Enable();
- const SfxUInt16Item* pItem = 0;
+ const SfxUInt16Item* pItem = nullptr;
if ( eState == SfxItemState::DEFAULT )
{
pItem = dynamic_cast< const SfxUInt16Item* >( pState );
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 46202abab5b0..334d8412045d 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -324,10 +324,10 @@ public:
};
AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,void>& rFinishLink, bool bAutoPilot ) :
- mpTemplateRegion(NULL),
- mpLayoutRegion(NULL),
+ mpTemplateRegion(nullptr),
+ mpLayoutRegion(nullptr),
mbUserDataDirty(false),
- xDocShell (NULL),
+ xDocShell (nullptr),
mpWindowUpdater (new WindowUpdater()),
mbPreview(true),
mnShowPage(0),
@@ -622,8 +622,8 @@ AssistentDlgImpl::AssistentDlgImpl( vcl::Window* pWindow, const Link<ListBox&,vo
ProvideTemplates();
//find aStandardTemplate in maPresentList
- TemplateDir* pStandardTemplateDir = 0;
- TemplateEntry* pStandardTemplateEntry = 0;
+ TemplateDir* pStandardTemplateDir = nullptr;
+ TemplateEntry* pStandardTemplateEntry = nullptr;
std::vector<TemplateDir*>::iterator I;
for (I=maPresentList.begin(); I!=maPresentList.end(); ++I)
@@ -680,19 +680,19 @@ void AssistentDlgImpl::CloseDocShell()
if( xCloseable.is() )
{
xCloseable->close( sal_True );
- xDocShell = NULL;
+ xDocShell = nullptr;
}
else
{
xDocShell->DoClose();
- xDocShell = NULL;
+ xDocShell = nullptr;
}
}
}
void AssistentDlgImpl::EndDialog( long )
{
- mpWindow = NULL;
+ mpWindow = nullptr;
}
void AssistentDlgImpl::ScanDocmenu()
@@ -810,7 +810,7 @@ void AssistentDlgImpl::TemplateScanDone (
for (i=0,I=maPresentList.begin(); I!=maPresentList.end(); ++I,++i)
{
TemplateDir* pDir = *I;
- if (pDir == NULL)
+ if (pDir == nullptr)
continue;
// HACK! presnt directory is always initially selected.
@@ -818,7 +818,7 @@ void AssistentDlgImpl::TemplateScanDone (
if (!pDir->maEntries.empty() )
{
TemplateEntry* pEntry = pDir->maEntries.front();
- if (pEntry != NULL)
+ if (pEntry != nullptr)
if (pEntry->msPath.indexOf("presnt") != -1)
nFirstEntry = i;
}
@@ -835,7 +835,7 @@ void AssistentDlgImpl::TemplateScanDone (
for (i=0,I=maPresentList.begin(); I!=maPresentList.end(); ++I,++i)
{
TemplateDir* pDir = *I;
- if (pDir == NULL)
+ if (pDir == nullptr)
continue;
// HACK! layout directory is always initially selected.
@@ -843,7 +843,7 @@ void AssistentDlgImpl::TemplateScanDone (
if (!pDir->maEntries.empty() )
{
TemplateEntry* pEntry = pDir->maEntries.front();
- if (pEntry != NULL)
+ if (pEntry != nullptr)
if (pEntry->msPath.indexOf("layout") != -1)
nFirstEntry = i;
}
@@ -907,7 +907,7 @@ OUString AssistentDlgImpl::GetDocFileName()
if( GetStartType() == ST_TEMPLATE )
{
const sal_Int32 nEntry = mpPage1TemplateLB->GetSelectEntryPos();
- TemplateEntry* pEntry = NULL;
+ TemplateEntry* pEntry = nullptr;
if (mpTemplateRegion && nEntry != LISTBOX_ENTRY_NOTFOUND)
pEntry = mpTemplateRegion->maEntries[nEntry];
@@ -936,7 +936,7 @@ OUString AssistentDlgImpl::GetDocFileName()
OUString AssistentDlgImpl::GetLayoutFileName()
{
const sal_Int32 nEntry = mpPage2LayoutLB->GetSelectEntryPos();
- TemplateEntry* pEntry = NULL;
+ TemplateEntry* pEntry = nullptr;
if(nEntry != LISTBOX_ENTRY_NOTFOUND && nEntry > 0)
pEntry = mpLayoutRegion->maEntries[nEntry-1];
@@ -953,7 +953,7 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument()
SfxObjectShell* pShell = xDocShell;
::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( pShell );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
+ SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
if(pDoc)
{
@@ -1001,7 +1001,7 @@ SfxObjectShellLock AssistentDlgImpl::GetDocument()
}
SfxObjectShellLock xRet = xDocShell;
- xDocShell = NULL;
+ xDocShell = nullptr;
return xRet;
}
@@ -1324,8 +1324,8 @@ void AssistentDlgImpl::UpdateUserData()
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = dynamic_cast< DrawDocShell *>( pShell );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
- SdPage* pPage = pDoc?pDoc->GetSdPage(0, PK_STANDARD):NULL;
+ SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
+ SdPage* pPage = pDoc?pDoc->GetSdPage(0, PK_STANDARD):nullptr;
if (pPage && (!aTopic.isEmpty() || !aName.isEmpty() || !aInfo.isEmpty()))
{
@@ -1339,7 +1339,7 @@ void AssistentDlgImpl::UpdateUserData()
pObj = dynamic_cast<SdrTextObj*>( pPage->GetPresObj( PRESOBJ_TITLE ) );
if( pObj )
{
- pPage->SetObjText( pObj, NULL, PRESOBJ_TITLE, aTopic );
+ pPage->SetObjText( pObj, nullptr, PRESOBJ_TITLE, aTopic );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ), true );
pObj->SetEmptyPresObj(false);
}
@@ -1356,7 +1356,7 @@ void AssistentDlgImpl::UpdateUserData()
pObj = dynamic_cast<SdrTextObj*>( pPage->GetPresObj( PRESOBJ_OUTLINE ) );
if( pObj )
{
- pPage->SetObjText( pObj, NULL, PRESOBJ_OUTLINE, aStrTmp );
+ pPage->SetObjText( pObj, nullptr, PRESOBJ_OUTLINE, aStrTmp );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE ), true );
pObj->SetEmptyPresObj(false);
}
@@ -1365,7 +1365,7 @@ void AssistentDlgImpl::UpdateUserData()
pObj = dynamic_cast<SdrTextObj*>( pPage->GetPresObj( PRESOBJ_TEXT ) );
if( pObj )
{
- pPage->SetObjText( pObj, NULL, PRESOBJ_TEXT, aStrTmp );
+ pPage->SetObjText( pObj, nullptr, PRESOBJ_TEXT, aStrTmp );
pObj->NbcSetStyleSheet( pPage->GetStyleSheetForPresObj( PRESOBJ_TEXT ), true );
pObj->SetEmptyPresObj(false);
}
@@ -1387,7 +1387,7 @@ void AssistentDlgImpl::UpdatePageList()
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = dynamic_cast< DrawDocShell *>( pShell );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
+ SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
mpPage5PageListCT->Clear();
@@ -1407,7 +1407,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
if(!mbPreview && bDocPreview)
{
mpPreview->Invalidate();
- mpPreview->SetObjectShell(0);
+ mpPreview->SetObjectShell(nullptr);
mbPreviewUpdating = false;
return;
}
@@ -1446,7 +1446,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
{
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = dynamic_cast< DrawDocShell *>( pShell );
- ::svl::IUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():NULL;
+ ::svl::IUndoManager* pUndoMgr = pDocShell?pDocShell->GetUndoManager():nullptr;
if(pUndoMgr)
pUndoMgr->Undo();
mbUserDataDirty = true;
@@ -1524,11 +1524,11 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
// determine the implementation
SfxObjectShell* pShell = xDocShell;
DrawDocShell* pDocShell = dynamic_cast< DrawDocShell *>( pShell );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
+ SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
pShell = xLayoutDocShell;
pDocShell = dynamic_cast< DrawDocShell *>( pShell );
- SdDrawDocument* pLayoutDoc = pDocShell?pDocShell->GetDoc():NULL;
+ SdDrawDocument* pLayoutDoc = pDocShell?pDocShell->GetDoc():nullptr;
if( pDoc && pLayoutDoc )
{
@@ -1547,7 +1547,7 @@ void AssistentDlgImpl::UpdatePreview( bool bDocPreview )
UpdateUserData();
if ( !xDocShell.Is() || !mbPreview )
- mpPreview->SetObjectShell( 0 );
+ mpPreview->SetObjectShell( nullptr );
else
{
mpPreview->SetObjectShell( xDocShell, mnShowPage );
@@ -1573,7 +1573,7 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const OUString& rP
if( aEncryptionData.getLength() )
{
- PasswordEntry* pEntry = NULL;
+ PasswordEntry* pEntry = nullptr;
for ( size_t i = 0, n = maPasswordList.size(); i < n; ++i )
{
if ( maPasswordList[ i ].maPath == rPath )
@@ -1583,7 +1583,7 @@ void AssistentDlgImpl::SavePassword( SfxObjectShellLock xDoc, const OUString& rP
}
}
- if(pEntry == NULL)
+ if(pEntry == nullptr)
{
pEntry = new PasswordEntry();
pEntry->maPath = rPath;
diff --git a/sd/source/ui/dlg/dlgchar.cxx b/sd/source/ui/dlg/dlgchar.cxx
index 60db74563c1d..bcf443767eea 100644
--- a/sd/source/ui/dlg/dlgchar.cxx
+++ b/sd/source/ui/dlg/dlgchar.cxx
@@ -43,10 +43,10 @@ SdCharDlg::SdCharDlg( vcl::Window* pParent, const SfxItemSet* pAttr,
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- mnCharName = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
- mnCharEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
- mnCharPosition = AddTabPage( "RID_SVXPAGE_CHAR_POSITION", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), 0 );
- mnCharBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), 0 );
+ mnCharName = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
+ mnCharEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
+ mnCharPosition = AddTabPage( "RID_SVXPAGE_CHAR_POSITION", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_POSITION ), nullptr );
+ mnCharBackground = AddTabPage( "RID_SVXPAGE_BACKGROUND", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_BACKGROUND ), nullptr );
}
void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
diff --git a/sd/source/ui/dlg/dlgfield.cxx b/sd/source/ui/dlg/dlgfield.cxx
index 550ac1569909..2e33540da81a 100644
--- a/sd/source/ui/dlg/dlgfield.cxx
+++ b/sd/source/ui/dlg/dlgfield.cxx
@@ -74,7 +74,7 @@ void SdModifyFieldDlg::dispose()
*/
SvxFieldData* SdModifyFieldDlg::GetField()
{
- SvxFieldData* pNewField = NULL;
+ SvxFieldData* pNewField = nullptr;
if( m_pRbtFix->IsValueChangedFromSaved() ||
m_pRbtVar->IsValueChangedFromSaved() ||
diff --git a/sd/source/ui/dlg/dlgolbul.cxx b/sd/source/ui/dlg/dlgolbul.cxx
index 9a208364eff8..89ee17d726e3 100644
--- a/sd/source/ui/dlg/dlgolbul.cxx
+++ b/sd/source/ui/dlg/dlgolbul.cxx
@@ -91,7 +91,7 @@ OutlineBulletDlg::OutlineBulletDlg(
if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET))
{
- const SvxNumBulletItem *pItem = NULL;
+ const SvxNumBulletItem *pItem = nullptr;
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = pView->GetDocSh()->GetStyleSheetPool();
@@ -101,7 +101,7 @@ OutlineBulletDlg::OutlineBulletDlg(
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
- if( pItem == NULL )
+ if( pItem == nullptr )
pItem = static_cast<const SvxNumBulletItem*>( aInputSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
DBG_ASSERT( pItem, "No EE_PARA_NUMBULLET in Pool! [CL]" );
@@ -176,7 +176,7 @@ const SfxItemSet* OutlineBulletDlg::GetOutputItemSet() const
SfxItemSet aSet( *SfxTabDialog::GetOutputItemSet() );
pOutputSet->Put( aSet );
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
if( SfxItemState::SET == pOutputSet->GetItemState(pOutputSet->GetPool()->GetWhich(SID_ATTR_NUMBERING_RULE), false, &pItem ))
{
SdBulletMapper::MapFontsInNumRule( *static_cast<const SvxNumBulletItem*>(pItem)->GetNumRule(), *pOutputSet );
diff --git a/sd/source/ui/dlg/dlgpage.cxx b/sd/source/ui/dlg/dlgpage.cxx
index b1bcc5d7f0df..d2cbe3987142 100644
--- a/sd/source/ui/dlg/dlgpage.cxx
+++ b/sd/source/ui/dlg/dlgpage.cxx
@@ -57,8 +57,8 @@ SdPageDlg::SdPageDlg( SfxObjectShell* pDocSh, vcl::Window* pParent, const SfxIte
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
- mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), 0 );
+ mnPage = AddTabPage( "RID_SVXPAGE_PAGE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), nullptr );
+ mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr );
if(!bAreaPage) // I have to add the page before I remove it !
RemoveTabPage( "RID_SVXPAGE_AREA" );
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 11935c8c6e7e..7df30fa2d850 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -74,7 +74,7 @@ VCL_BUILDER_DECL_FACTORY(SdDocPreviewWin)
}
SdDocPreviewWin::SdDocPreviewWin( vcl::Window* pParent, const WinBits nStyle )
-: Control(pParent, nStyle), pMetaFile( 0 ), bInEffect(false), mpObj(NULL), mnShowPage(0)
+: Control(pParent, nStyle), pMetaFile( nullptr ), bInEffect(false), mpObj(nullptr), mnShowPage(0)
{
SetBorderStyle( WindowBorderStyle::MONO );
svtools::ColorConfig aColorConfig;
@@ -214,7 +214,7 @@ bool SdDocPreviewWin::Notify( NotifyEvent& rNEvt )
void SdDocPreviewWin::updateViewSettings()
{
::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( mpObj );
- SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():NULL;
+ SdDrawDocument* pDoc = pDocShell?pDocShell->GetDoc():nullptr;
SvtAccessibilityOptions aAccOptions;
bool bUseWhiteColor = !aAccOptions.GetIsForPagePreviews() && GetSettings().GetStyleSettings().GetHighContrastMode();
@@ -228,7 +228,7 @@ void SdDocPreviewWin::updateViewSettings()
maDocumentColor = Color( aColorConfig.GetColorValue( svtools::DOCCOLOR ).nColor );
}
- GDIMetaFile* pMtf = NULL;
+ GDIMetaFile* pMtf = nullptr;
if(pDoc)
{
@@ -253,7 +253,7 @@ void SdDocPreviewWin::updateViewSettings()
pMtf->Record( pVDev );
- ::sd::DrawView* pView = new ::sd::DrawView(pDocShell, this, NULL);
+ ::sd::DrawView* pView = new ::sd::DrawView(pDocShell, this, nullptr);
const Size aSize( pPage->GetSize() );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 3fcb789cadb3..ae6aa5818687 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -98,7 +98,7 @@ void SAL_CALL SdFileDialog_Imp::ControlStateChanged( const css::ui::dialogs::Fil
IMPL_LINK_NOARG_TYPED(SdFileDialog_Imp, PlayMusicHdl, void*, void)
{
maUpdateIdle.Stop();
- mnPlaySoundEvent = 0;
+ mnPlaySoundEvent = nullptr;
if (mxPlayer.is())
{
@@ -216,7 +216,7 @@ void SdFileDialog_Imp::CheckSelectionState()
SdFileDialog_Imp::SdFileDialog_Imp( const short nDialogType,
bool bUsableSelection ) :
FileDialogHelper( nDialogType, 0 ),
- mnPlaySoundEvent( 0 ),
+ mnPlaySoundEvent( nullptr ),
mbUsableSelection( bUsableSelection ),
mbLabelPlaying(false)
{
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 2beecae4806b..1ff03d015f09 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -192,7 +192,7 @@ HeaderFooterDialog::HeaderFooterDialog( ViewShell* pViewShell, vcl::Window* pPar
// handout
pSlide = pDoc->GetSdPage( 0, PK_STANDARD );
pNotes = pDoc->GetSdPage( 0, PK_NOTES );
- mpCurrentPage = NULL;
+ mpCurrentPage = nullptr;
}
pDoc->StopWorkStartupDelay();
@@ -260,7 +260,7 @@ IMPL_LINK_TYPED( HeaderFooterDialog, ActivatePageHdl, TabControl *, pTabCtrl, vo
TabPage* pTabPage = pTabCtrl->GetTabPage( nId );
pTabPage->Show();
maPBApply->Show( nId == mnSlidesId );
- maPBApply->Enable( mpCurrentPage != NULL );
+ maPBApply->Enable( mpCurrentPage != nullptr );
}
IMPL_LINK_NOARG_TYPED(HeaderFooterDialog, ClickApplyToAllHdl, Button*, void)
@@ -634,15 +634,15 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
pOutl->SetText( *pOPO );
EFieldInfo aFieldInfo;
- aFieldInfo.pFieldItem = NULL;
+ aFieldInfo.pFieldItem = nullptr;
sal_Int32 nParaCount = pEdit->GetParagraphCount();
sal_Int32 nPara;
- for( nPara = 0; (nPara < nParaCount) && (aFieldInfo.pFieldItem == NULL); nPara++ )
+ for( nPara = 0; (nPara < nParaCount) && (aFieldInfo.pFieldItem == nullptr); nPara++ )
{
sal_uInt16 nFieldCount = pEdit->GetFieldCount( nPara );
sal_uInt16 nField;
- for( nField = 0; (nField < nFieldCount) && (aFieldInfo.pFieldItem == NULL); nField++ )
+ for( nField = 0; (nField < nFieldCount) && (aFieldInfo.pFieldItem == nullptr); nField++ )
{
aFieldInfo = pEdit->GetFieldInfo( nPara, nField );
if( aFieldInfo.pFieldItem )
@@ -653,11 +653,11 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
break;
}
}
- aFieldInfo.pFieldItem = NULL;
+ aFieldInfo.pFieldItem = nullptr;
}
}
- if( aFieldInfo.pFieldItem != NULL )
+ if( aFieldInfo.pFieldItem != nullptr )
{
if( bSet )
{
@@ -692,7 +692,7 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
PresLayoutPreview::PresLayoutPreview( vcl::Window* pParent )
: Control(pParent)
- , mpMaster(NULL)
+ , mpMaster(nullptr)
{
}
diff --git a/sd/source/ui/dlg/masterlayoutdlg.cxx b/sd/source/ui/dlg/masterlayoutdlg.cxx
index e1cce5c63ec6..07d04fd1caa0 100644
--- a/sd/source/ui/dlg/masterlayoutdlg.cxx
+++ b/sd/source/ui/dlg/masterlayoutdlg.cxx
@@ -44,7 +44,7 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD
mpCurrentPage = static_cast<SdPage*>(&(mpCurrentPage->TRG_GetMasterPage()));
}
- if( mpCurrentPage == 0 )
+ if( mpCurrentPage == nullptr )
{
mpCurrentPage = pDoc->GetMasterSdPage( 0, PK_STANDARD );
OSL_FAIL( "MasterLayoutDialog::MasterLayoutDialog() - no current page?" );
@@ -64,10 +64,10 @@ MasterLayoutDialog::MasterLayoutDialog( vcl::Window* pParent, SdDrawDocument* pD
break;
}
- mbOldHeader = mpCurrentPage->GetPresObj( PRESOBJ_HEADER ) != NULL;
- mbOldDate = mpCurrentPage->GetPresObj( PRESOBJ_DATETIME ) != NULL;
- mbOldFooter = mpCurrentPage->GetPresObj( PRESOBJ_FOOTER ) != NULL;
- mbOldPageNumber = mpCurrentPage->GetPresObj( PRESOBJ_SLIDENUMBER ) != NULL;
+ mbOldHeader = mpCurrentPage->GetPresObj( PRESOBJ_HEADER ) != nullptr;
+ mbOldDate = mpCurrentPage->GetPresObj( PRESOBJ_DATETIME ) != nullptr;
+ mbOldFooter = mpCurrentPage->GetPresObj( PRESOBJ_FOOTER ) != nullptr;
+ mbOldPageNumber = mpCurrentPage->GetPresObj( PRESOBJ_SLIDENUMBER ) != nullptr;
mpCBHeader->Check( mbOldHeader );
mpCBDate->Check( mbOldDate );
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 5af021c7227d..0b763ab8dcc5 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -77,8 +77,8 @@ SdNavigatorWin::SdNavigatorWin(
// On changes of the DragType: adjust SelectionMode of TLB!
, meDragType ( NAVIGATOR_DRAGTYPE_EMBEDDED )
, mpBindings ( pInBindings )
- , mpNavigatorCtrlItem( 0 )
- , mpPageNameCtrlItem( 0 )
+ , mpNavigatorCtrlItem( nullptr )
+ , mpPageNameCtrlItem( nullptr )
, maImageList ( SdResId( IL_NAVIGATR ) )
{
maTlbObjects->SetViewFrame( mpBindings->GetDispatcher()->GetFrame() );
@@ -141,7 +141,7 @@ SdNavigatorWin::SdNavigatorWin(
maMinSize.Width() = nMinWidth;
maMinSize.Height() -= 40;
SfxDockingWindow* pDockingParent = dynamic_cast<SfxDockingWindow*>(GetParent());
- if (pDockingParent != NULL)
+ if (pDockingParent != nullptr)
pDockingParent->SetMinOutputSizePixel( maMinSize );
}
@@ -200,16 +200,16 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc )
// Restore the 'ShowAllShapes' flag from the last time (in this session)
// that the navigator was shown.
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
::sd::FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
maTlbObjects->SetShowAllShapes(pFrameView->IsNavigatorShowingAllShapes(), false);
}
// Disable the shape filter drop down menu when there is a running slide
// show.
- if (pViewShell!=NULL && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ))
+ if (pViewShell!=nullptr && sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ))
maToolbox->EnableItem(TBI_SHAPE_FILTER, false);
else
maToolbox->EnableItem(TBI_SHAPE_FILTER);
@@ -260,7 +260,7 @@ NavigatorDragType SdNavigatorWin::GetNavigatorDragType()
sd::DrawDocShell* SdNavigatorWin::GetDrawDocShell( const SdDrawDocument* pDoc )
{
if( !pDoc )
- return NULL; // const as const can...
+ return nullptr; // const as const can...
sd::DrawDocShell* pDocShell = pDoc->GetDocSh();
return pDocShell;
}
@@ -330,7 +330,7 @@ IMPL_LINK_TYPED( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox, void )
HID_SD_NAVIGATOR_MENU1,
HID_SD_NAVIGATOR_MENU2,
HID_SD_NAVIGATOR_MENU3,
- 0
+ nullptr
};
for( sal_uInt16 nID = NAVIGATOR_DRAGTYPE_URL;
@@ -430,7 +430,7 @@ IMPL_LINK_NOARG_TYPED(SdNavigatorWin, SelectDocumentHdl, ListBox&, void)
OUString aStrLb = maLbDocs->GetSelectEntry();
long nPos = maLbDocs->GetSelectEntryPos();
bool bFound = false;
- ::sd::DrawDocShell* pDocShell = NULL;
+ ::sd::DrawDocShell* pDocShell = nullptr;
NavDocInfo* pInfo = GetDocInfo();
// is it a dragged object?
@@ -504,7 +504,7 @@ IMPL_LINK_TYPED( SdNavigatorWin, MenuSelectHdl, Menu *, pMenu, bool )
IMPL_LINK_TYPED( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu, bool )
{
- if (pMenu != NULL)
+ if (pMenu != nullptr)
{
bool bShowAllShapes (maTlbObjects->GetShowAllShapes());
sal_uInt16 nMenuId (pMenu->GetCurItemId());
@@ -528,16 +528,16 @@ IMPL_LINK_TYPED( SdNavigatorWin, ShapeFilterCallback, Menu *, pMenu, bool )
// Remember the selection in the FrameView.
NavDocInfo* pInfo = GetDocInfo();
- if (pInfo != NULL)
+ if (pInfo != nullptr)
{
::sd::DrawDocShell* pDocShell = pInfo->mpDocShell;
- if (pDocShell != NULL)
+ if (pDocShell != nullptr)
{
::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
::sd::FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
{
pFrameView->SetIsNavigatorShowingAllShapes(bShowAllShapes);
}
@@ -608,7 +608,7 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
else
{
// show dragged-in document
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
ErrCode nErr = 0;
if (aFileName != maDropFileName)
@@ -753,12 +753,12 @@ NavDocInfo* SdNavigatorWin::GetDocInfo()
{
if( nPos == 0 )
{
- return NULL;
+ return nullptr;
}
nPos--;
}
- return nPos < maDocList.size() ? &(maDocList[ nPos ]) : NULL;
+ return nPos < maDocList.size() ? &(maDocList[ nPos ]) : nullptr;
}
/**
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 07318adf464c..6e83e59639e0 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -178,7 +178,7 @@ SdParagraphDlg::SdParagraphDlg( vcl::Window* pParent, const SfxItemSet* pAttr )
AddTabPage( "labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH);
- static const bool bShowParaNumbering = ( getenv( "SD_SHOW_NUMBERING_PAGE" ) != NULL );
+ static const bool bShowParaNumbering = ( getenv( "SD_SHOW_NUMBERING_PAGE" ) != nullptr );
if( bShowParaNumbering )
AddTabPage( "labelNUMBERING", SdParagraphNumTabPage::Create, SdParagraphNumTabPage::GetRanges );
else
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 5efb4d9d49a2..3fe220686a59 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -96,7 +96,7 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
SdCustomShow* pCustomShow;
// fill Listbox with CustomShows
for( pCustomShow = pCustomShowList->First();
- pCustomShow != NULL;
+ pCustomShow != nullptr;
pCustomShow = pCustomShowList->Next() )
{
aLbCustomshow->InsertEntry( pCustomShow->GetName() );
@@ -144,9 +144,9 @@ SdStartPresentationDlg::SdStartPresentationDlg( vcl::Window* pWindow,
InitMonitorSettings();
- ChangeRangeHdl( NULL );
+ ChangeRangeHdl( nullptr );
- ClickWindowPresentationHdl( NULL );
+ ClickWindowPresentationHdl( nullptr );
ChangePauseHdl( *aTmfPause );
}
diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index c503c930de60..3b0b102612f4 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -60,7 +60,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
mpDocShell ( pDocSh ),
ePO ( _ePO ),
aInputSet ( *rStyleBase.GetItemSet().GetPool(), SID_PARAM_NUM_PRESET, SID_PARAM_CUR_NUM_LEVEL ),
- pOutSet ( NULL ),
+ pOutSet ( nullptr ),
pOrgSet ( &rStyleBase.GetItemSet() )
{
if( IS_OUTLINE(ePO))
@@ -93,7 +93,7 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
pOutSet->ClearItem();
- const SfxPoolItem *pItem = NULL;
+ const SfxPoolItem *pItem = nullptr;
// If there is no bullet item in this stylesheet, we get it
// from 'Outline 1' style sheet.
@@ -132,21 +132,21 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( SfxObjectShell* pDocSh,
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- mnLine = AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
- mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), 0 );
- mnShadow = AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), 0 );
- mnTransparency = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), 0 );
- mnFont = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), 0 );
- mnEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), 0 );
- mnParagr = AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), 0 );
- mnTextAtt = AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), 0 );
- mnBullet = AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), 0 );
- mnNum = AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), 0 );
- mnBitmap = AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), 0 );
- mnOptions = AddTabPage( "RID_SVXPAGE_NUM_OPTIONS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUM_OPTIONS ), 0 );
- mnTab = AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), 0 );
- mnAsian = AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), 0 );
- mnAlign = AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), 0 );
+ mnLine = AddTabPage( "RID_SVXPAGE_LINE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), nullptr );
+ mnArea = AddTabPage( "RID_SVXPAGE_AREA", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_AREA ), nullptr );
+ mnShadow = AddTabPage( "RID_SVXPAGE_SHADOW", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_SHADOW ), nullptr );
+ mnTransparency = AddTabPage( "RID_SVXPAGE_TRANSPARENCE", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TRANSPARENCE ), nullptr );
+ mnFont = AddTabPage( "RID_SVXPAGE_CHAR_NAME", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_NAME ), nullptr );
+ mnEffects = AddTabPage( "RID_SVXPAGE_CHAR_EFFECTS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_CHAR_EFFECTS ), nullptr );
+ mnParagr = AddTabPage( "RID_SVXPAGE_STD_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_STD_PARAGRAPH ), nullptr );
+ mnTextAtt = AddTabPage( "RID_SVXPAGE_TEXTATTR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TEXTATTR ), nullptr );
+ mnBullet = AddTabPage( "RID_SVXPAGE_PICK_BULLET", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BULLET ), nullptr );
+ mnNum = AddTabPage( "RID_SVXPAGE_PICK_SINGLE_NUM", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_SINGLE_NUM ), nullptr );
+ mnBitmap = AddTabPage( "RID_SVXPAGE_PICK_BMP", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PICK_BMP ), nullptr );
+ mnOptions = AddTabPage( "RID_SVXPAGE_NUM_OPTIONS", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUM_OPTIONS ), nullptr );
+ mnTab = AddTabPage( "RID_SVXPAGE_TABULATOR", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_TABULATOR ), nullptr );
+ mnAsian = AddTabPage( "RID_SVXPAGE_PARA_ASIAN", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PARA_ASIAN ), nullptr );
+ mnAlign = AddTabPage( "RID_SVXPAGE_ALIGN_PARAGRAPH", pFact->GetTabPageCreatorFunc( RID_SVXPAGE_ALIGN_PARAGRAPH ), nullptr );
SvtCJKOptions aCJKOptions;
if( !aCJKOptions.IsAsianTypographyEnabled() )
@@ -291,7 +291,7 @@ const SfxItemSet* SdPresLayoutTemplateDlg::GetOutputItemSet() const
{
pOutSet->Put( *SfxTabDialog::GetOutputItemSet() );
- const SvxNumBulletItem *pSvxNumBulletItem = NULL;
+ const SvxNumBulletItem *pSvxNumBulletItem = nullptr;
if( SfxItemState::SET == pOutSet->GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pSvxNumBulletItem) ))
SdBulletMapper::MapFontsInNumRule( *pSvxNumBulletItem->GetNumRule(), *pOutSet );
return pOutSet;
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index d6d58ab826e8..f0f9ab2d2eea 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -154,7 +154,7 @@ bool SdPrintOptions::FillItemSet( SfxItemSet* rAttrs )
void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
{
- const SdOptionsPrintItem* pPrintOpts = NULL;
+ const SdOptionsPrintItem* pPrintOpts = nullptr;
if( SfxItemState::SET == rAttrs->GetItemState( ATTR_OPTIONS_PRINT, false,
reinterpret_cast<const SfxPoolItem**>(&pPrintOpts) ) )
{
@@ -204,7 +204,7 @@ void SdPrintOptions::Reset( const SfxItemSet* rAttrs )
m_pRbtGrayscale->SaveValue();
m_pRbtBlackWhite->SaveValue();
- ClickBookletHdl( NULL );
+ ClickBookletHdl( nullptr );
}
VclPtr<SfxTabPage> SdPrintOptions::Create( vcl::Window* pWindow,
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index 1f64f291fc2e..236d8d676ced 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -38,7 +38,7 @@ extern "C" SdAbstractDialogFactory* SdCreateDialogFactory();
SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
{
- SdFuncPtrCreateDialogFactory fp = 0;
+ SdFuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -52,7 +52,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index 0cfbc05d68bd..b2a97d3620f2 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -238,7 +238,7 @@ public:
virtual AbstractSdInsertLayerDlg* CreateSdInsertLayerDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr ) override;
virtual AbstractSdInsertPagesObjsDlg* CreateSdInsertPagesObjsDlg( vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName ) override;
virtual AbstractMorphDlg* CreateMorphDlg( vcl::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2) override;
- virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) override;
+ virtual SfxAbstractTabDialog* CreateSdOutlineBulletTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = nullptr ) override;
virtual SfxAbstractTabDialog* CreateSdParagraphTabDlg ( vcl::Window* pParent, const SfxItemSet* pAttr ) override;
virtual AbstractSdStartPresDlg* CreateSdStartPresentationDlg( vcl::Window* pWindow, const SfxItemSet& rInAttrs,
const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList ) override;
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index c8a5177c9d98..21c58dc7529e 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -72,7 +72,7 @@ void SdPresLayoutDlg::dispose()
*/
void SdPresLayoutDlg::Reset()
{
- const SfxPoolItem *pPoolItem = NULL;
+ const SfxPoolItem *pPoolItem = nullptr;
long nName;
// replace master page
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index ef90a5278560..e10f241f69bf 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -88,7 +88,7 @@ SdPageObjsTLB::SdPageObjsTransferable::SdPageObjsTransferable(
const INetBookmark& rBookmark,
::sd::DrawDocShell& rDocShell,
NavigatorDragType eDragType)
- : SdTransferable(rDocShell.GetDoc(), NULL, true),
+ : SdTransferable(rDocShell.GetDoc(), nullptr, true),
mrParent( rParent ),
maBookmark( rBookmark ),
mrDocShell( rDocShell ),
@@ -183,7 +183,7 @@ SdPageObjsTLB::SdPageObjsTransferable* SdPageObjsTLB::SdPageObjsTransferable::ge
catch( const css::uno::Exception& )
{
}
- return 0;
+ return nullptr;
}
SotClipboardFormatId SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormatId()
@@ -197,15 +197,15 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, const SdResId& rSdResId )
: SvTreeListBox ( pParentWin, rSdResId )
, bisInSdNavigatorWin ( false )
, mpParent ( pParentWin )
-, mpDoc ( NULL )
-, mpBookmarkDoc ( NULL )
-, mpMedium ( NULL )
-, mpOwnMedium ( NULL )
+, mpDoc ( nullptr )
+, mpBookmarkDoc ( nullptr )
+, mpMedium ( nullptr )
+, mpOwnMedium ( nullptr )
, maImgOle ( BitmapEx( SdResId( BMP_OLE ) ) )
, maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) )
, mbLinkableSelected ( false )
-, mpDropNavWin ( NULL )
-, mpFrame ( NULL )
+, mpDropNavWin ( nullptr )
+, mpFrame ( nullptr )
, mbSaveTreeItemState ( false )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
@@ -228,15 +228,15 @@ SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
: SvTreeListBox ( pParentWin, nStyle )
, bisInSdNavigatorWin ( false )
, mpParent ( pParentWin )
-, mpDoc ( NULL )
-, mpBookmarkDoc ( NULL )
-, mpMedium ( NULL )
-, mpOwnMedium ( NULL )
+, mpDoc ( nullptr )
+, mpBookmarkDoc ( nullptr )
+, mpMedium ( nullptr )
+, mpOwnMedium ( nullptr )
, maImgOle ( BitmapEx( SdResId( BMP_OLE ) ) )
, maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) )
, mbLinkableSelected ( false )
-, mpDropNavWin ( NULL )
-, mpFrame ( NULL )
+, mpDropNavWin ( nullptr )
+, mpFrame ( nullptr )
, mbSaveTreeItemState ( false )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
@@ -277,7 +277,7 @@ OUString SdPageObjsTLB::getAltLongDescText(SvTreeListEntry* pEntry , bool isAltT
{
sal_uInt16 maxPages = mpDoc->GetPageCount();
sal_uInt16 pageNo;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
OUString ParentName = GetEntryText( GetRootLevelParent( pEntry ) );
@@ -319,16 +319,16 @@ void SdPageObjsTLB::MarkCurEntry( const OUString& rName )
if (!rName.isEmpty())
{
SvTreeListEntry* pCurEntry =GetCurEntry();
- SvTreeListEntry* pEntry =NULL;
+ SvTreeListEntry* pEntry =nullptr;
OUString aTmp1;
OUString aTmp2;
- if( GetParent(pCurEntry)==NULL )
+ if( GetParent(pCurEntry)==nullptr )
{
aTmp1 = GetEntryText( pCurEntry );
for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
{
- if(GetParent( pEntry )==NULL)
+ if(GetParent( pEntry )==nullptr)
continue;
aTmp2 = GetEntryText( GetParent( pEntry ));
if( aTmp1 != aTmp2)
@@ -359,7 +359,7 @@ void SdPageObjsTLB::MarkCurEntry( const OUString& rName )
void SdPageObjsTLB:: FreshCurEntry()
{
- SvTreeListEntry* pEntry =NULL;
+ SvTreeListEntry* pEntry =nullptr;
for( pEntry = First(); pEntry ; pEntry = Next( pEntry ) )
{
pEntry->SetMarked(false);
@@ -404,7 +404,7 @@ void SdPageObjsTLB::Clear()
maTreeItem.clear();
if (GetCurEntry())
maSelectionEntryText = GetSelectEntry();
- SvTreeListEntry* pEntry = FirstChild(NULL);
+ SvTreeListEntry* pEntry = FirstChild(nullptr);
SaveExpandedTreeItemState(pEntry, maTreeItem);
}
return SvTreeListBox::Clear();
@@ -427,7 +427,7 @@ OUString SdPageObjsTLB::GetObjectName(
if (bCreate
&& mbShowAllShapes
&& aRet.isEmpty()
- && pObject!=NULL)
+ && pObject!=nullptr)
{
aRet = SD_RESSTR(STR_NAVIGATOR_SHAPE_BASE_NAME);
aRet = aRet.replaceFirst("%1", OUString::number(pObject->GetOrdNum() + 1));
@@ -445,7 +445,7 @@ bool SdPageObjsTLB::SelectEntry( const OUString& rName )
if( !rName.isEmpty() )
{
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
OUString aTmp;
for( pEntry = First(); pEntry && !bFound; pEntry = Next( pEntry ) )
@@ -471,7 +471,7 @@ bool SdPageObjsTLB::HasSelectedChildren( const OUString& rName )
if( !rName.isEmpty() )
{
bool bFound = false;
- SvTreeListEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = nullptr;
OUString aTmp;
for( pEntry = First(); pEntry && !bFound; pEntry = Next( pEntry ) )
@@ -506,7 +506,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages,
mpDoc = pInDoc;
maDocName = rDocName;
mbShowAllPages = bAllPages;
- mpMedium = NULL;
+ mpMedium = nullptr;
IconProvider aIconProvider;
@@ -525,7 +525,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages,
bool bPageBelongsToShow = PageBelongsToCurrentShow (pPage);
bPageExluded |= !bPageBelongsToShow;
- AddShapeList(*pPage, NULL, pPage->GetName(), bPageExluded, NULL, aIconProvider);
+ AddShapeList(*pPage, nullptr, pPage->GetName(), bPageExluded, nullptr, aIconProvider);
}
nPage++;
}
@@ -539,7 +539,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, bool bAllPages,
while( nPage < nMaxMasterPages )
{
const SdPage* pPage = static_cast<const SdPage*>( mpDoc->GetMasterPage( nPage ) );
- AddShapeList(*pPage, NULL, pPage->GetName(), false, NULL, aIconProvider);
+ AddShapeList(*pPage, nullptr, pPage->GetName(), false, nullptr, aIconProvider);
nPage++;
}
}
@@ -567,7 +567,7 @@ void SdPageObjsTLB::Fill( const SdDrawDocument* pInDoc, SfxMedium* pInMedium,
Image aImgDocClosed=Image( BitmapEx( SdResId( BMP_DOC_CLOSED ) ) );
// insert document name
- InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, NULL, true, TREELIST_APPEND,
+ InsertEntry( maDocName, aImgDocOpen, aImgDocClosed, nullptr, true, TREELIST_APPEND,
reinterpret_cast< void* >( 1 )
);
}
@@ -583,11 +583,11 @@ void SdPageObjsTLB::AddShapeList (
Image aIcon (rIconProvider.maImgPage);
if (bIsExcluded)
aIcon = rIconProvider.maImgPageExcl;
- else if (pShape != NULL)
+ else if (pShape != nullptr)
aIcon = rIconProvider.maImgGroup;
void* pUserData (reinterpret_cast<void*>(1));
- if (pShape != NULL)
+ if (pShape != nullptr)
pUserData = pShape;
SvTreeListEntry* pEntry = InsertEntry(
@@ -608,9 +608,9 @@ void SdPageObjsTLB::AddShapeList (
bool bMarked=false;
if(bisInSdNavigatorWin)
{
- vcl::Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
+ vcl::Window* pWindow=nullptr;
+ SdNavigatorWin* pSdNavigatorWin=nullptr;
+ sd::DrawDocShell* pSdDrawDocShell = nullptr;
if(pEntry)
pWindow=reinterpret_cast<vcl::Window*>(GetParent(pEntry));
if(pWindow)
@@ -630,7 +630,7 @@ void SdPageObjsTLB::AddShapeList (
while( aIter.IsMore() )
{
SdrObject* pObj = aIter.Next();
- OSL_ASSERT(pObj!=NULL);
+ OSL_ASSERT(pObj!=nullptr);
// Get the shape name.
OUString aStr (GetObjectName( pObj ) );
@@ -651,9 +651,9 @@ void SdPageObjsTLB::AddShapeList (
if(bisInSdNavigatorWin)
{
- vcl::Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
+ vcl::Window* pWindow=nullptr;
+ SdNavigatorWin* pSdNavigatorWin=nullptr;
+ sd::DrawDocShell* pSdDrawDocShell = nullptr;
if(pNewEntry)
pWindow=reinterpret_cast<vcl::Window*>(GetParent(pNewEntry));
if(pWindow)
@@ -685,9 +685,9 @@ void SdPageObjsTLB::AddShapeList (
if(bisInSdNavigatorWin)
{
- vcl::Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
+ vcl::Window* pWindow=nullptr;
+ SdNavigatorWin* pSdNavigatorWin=nullptr;
+ sd::DrawDocShell* pSdDrawDocShell = nullptr;
if(pNewEntry)
pWindow=reinterpret_cast<vcl::Window*>(GetParent(pNewEntry));
if(pWindow)
@@ -734,9 +734,9 @@ void SdPageObjsTLB::AddShapeList (
if(bisInSdNavigatorWin)
{
- vcl::Window* pWindow=NULL;
- SdNavigatorWin* pSdNavigatorWin=NULL;
- sd::DrawDocShell* pSdDrawDocShell = NULL;
+ vcl::Window* pWindow=nullptr;
+ SdNavigatorWin* pSdNavigatorWin=nullptr;
+ sd::DrawDocShell* pSdDrawDocShell = nullptr;
if(pNewEntry)
pWindow=reinterpret_cast<vcl::Window*>(GetParent(pNewEntry));
if(pWindow)
@@ -795,7 +795,7 @@ void SdPageObjsTLB::SetShowAllShapes (
mbShowAllShapes = bShowAllShapes;
if (bFillList)
{
- if (mpMedium == NULL)
+ if (mpMedium == nullptr)
Fill(mpDoc, mbShowAllPages, maDocName);
else
Fill(mpDoc, mpMedium, maDocName);
@@ -816,7 +816,7 @@ bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc )
if( !mpDoc )
return false;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
SvTreeListEntry* pEntry = First();
OUString aName;
@@ -905,8 +905,8 @@ void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry )
{
if( GetBookmarkDoc() )
{
- SdrObject* pObj = NULL;
- SvTreeListEntry* pPageEntry = NULL;
+ SdrObject* pObj = nullptr;
+ SvTreeListEntry* pPageEntry = nullptr;
Image aImgPage = Image( BitmapEx( SdResId( BMP_PAGE ) ) );
Image aImgPageObjs = Image( BitmapEx( SdResId( BMP_PAGEOBJS ) ) );
@@ -989,7 +989,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
// it looks that it is undefined if a Medium was set by Fill() already
DBG_ASSERT( !mpMedium, "SfxMedium confusion!" );
delete mpMedium;
- mpMedium = NULL;
+ mpMedium = nullptr;
// take over this Medium (currently used only be Navigator)
mpOwnMedium = pMed;
@@ -1004,7 +1004,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
if (mxBookmarkDocShRef->DoLoad(pMed))
mpBookmarkDoc = mxBookmarkDocShRef->GetDoc();
else
- mpBookmarkDoc = NULL;
+ mpBookmarkDoc = nullptr;
}
else if ( mpMedium )
// in this mode the document is owned and controlled by the SdDrawDocument
@@ -1016,7 +1016,7 @@ SdDrawDocument* SdPageObjsTLB::GetBookmarkDoc(SfxMedium* pMed)
{
ScopedVclPtrInstance< MessageDialog > aErrorBox(this, SD_RESSTR(STR_READ_DATA_ERROR));
aErrorBox->Execute();
- mpMedium = 0; //On failure the SfxMedium is invalid
+ mpMedium = nullptr; //On failure the SfxMedium is invalid
}
}
@@ -1034,7 +1034,7 @@ void SdPageObjsTLB::CloseBookmarkDoc()
mxBookmarkDocShRef.Clear();
// Medium is owned by document, so it's destroyed already
- mpOwnMedium = 0;
+ mpOwnMedium = nullptr;
}
else if ( mpBookmarkDoc )
{
@@ -1043,17 +1043,17 @@ void SdPageObjsTLB::CloseBookmarkDoc()
{
// The document owns the Medium, so the Medium will be invalid after closing the document
const_cast<SdDrawDocument*>(mpDoc)->CloseBookmarkDoc();
- mpMedium = 0;
+ mpMedium = nullptr;
}
}
else
{
// perhaps mpOwnMedium provided, but no successful creation of BookmarkDoc
delete mpOwnMedium;
- mpOwnMedium = NULL;
+ mpOwnMedium = nullptr;
}
- mpBookmarkDoc = NULL;
+ mpBookmarkDoc = nullptr;
}
void SdPageObjsTLB::SelectHdl()
@@ -1064,7 +1064,7 @@ void SdPageObjsTLB::SelectHdl()
while( pEntry && mbLinkableSelected )
{
- if( NULL == pEntry->GetUserData() )
+ if( nullptr == pEntry->GetUserData() )
mbLinkableSelected = false;
pEntry = NextSelected( pEntry );
@@ -1128,17 +1128,17 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
(void)nAction;
(void)rPosPixel;
- SdNavigatorWin* pNavWin = NULL;
+ SdNavigatorWin* pNavWin = nullptr;
SvTreeListEntry* pEntry = GetEntry(rPosPixel);
if (mpFrame->HasChildWindow(SID_NAVIGATOR))
{
SfxChildWindow* pWnd = mpFrame->GetChildWindow(SID_NAVIGATOR);
- pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL;
+ pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : nullptr;
}
- if (pEntry != NULL
- && pNavWin !=NULL
+ if (pEntry != nullptr
+ && pNavWin !=nullptr
&& pNavWin == mpParent
&& pNavWin->GetNavigatorDragType() != NAVIGATOR_DRAGTYPE_NONE )
{
@@ -1147,14 +1147,14 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
// Select all entries and disable them as drop targets.
SetSelectionMode(MULTIPLE_SELECTION);
- SetCursor(static_cast<SvTreeListEntry*>(NULL));
+ SetCursor(static_cast<SvTreeListEntry*>(nullptr));
SelectAll(true, false);
EnableSelectionAsDropTarget(false);
// Enable only the entries as drop targets that are children of the
// page under the mouse.
SvTreeListEntry* pParent = GetRootLevelParent(pEntry);
- if (pParent != NULL)
+ if (pParent != nullptr)
{
SelectAll(false, false);
Select(pParent);
@@ -1172,7 +1172,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
// another document type), but that would kill the StarView MouseMove
// Handler which is calling Command().
// For this reason, Drag&Drop is asynchronous.
- Application::PostUserEvent( LINK( this, SdPageObjsTLB, ExecDragHdl ), NULL, true );
+ Application::PostUserEvent( LINK( this, SdPageObjsTLB, ExecDragHdl ), nullptr, true );
}
}
@@ -1181,8 +1181,8 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel)
*/
void SdPageObjsTLB::DoDrag()
{
- SfxChildWindow* pWnd = mpFrame->HasChildWindow(SID_NAVIGATOR) ? mpFrame->GetChildWindow(SID_NAVIGATOR) : NULL;
- mpDropNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL;
+ SfxChildWindow* pWnd = mpFrame->HasChildWindow(SID_NAVIGATOR) ? mpFrame->GetChildWindow(SID_NAVIGATOR) : nullptr;
+ mpDropNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : nullptr;
if( mpDropNavWin )
{
@@ -1214,23 +1214,23 @@ void SdPageObjsTLB::DoDrag()
// Get the view.
::sd::ViewShell* pViewShell = GetViewShellForDocShell(*pDocShell);
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
{
- OSL_ASSERT(pViewShell!=NULL);
+ OSL_ASSERT(pViewShell!=nullptr);
return;
}
sd::View* pView = pViewShell->GetView();
- if (pView == NULL)
+ if (pView == nullptr)
{
- OSL_ASSERT(pView!=NULL);
+ OSL_ASSERT(pView!=nullptr);
return;
}
- SdrObject* pObject = NULL;
+ SdrObject* pObject = nullptr;
void* pUserData = GetCurEntry()->GetUserData();
- if (pUserData != NULL && pUserData != reinterpret_cast<void*>(1))
+ if (pUserData != nullptr && pUserData != reinterpret_cast<void*>(1))
pObject = static_cast<SdrObject*>(pUserData);
- if (pObject != NULL)
+ if (pObject != nullptr)
{
// For shapes without a user supplied name (the automatically
// created name does not count), a different drag and drop technique
@@ -1265,7 +1265,7 @@ void SdPageObjsTLB::OnDragFinished( sal_uInt8 )
if( mpFrame->HasChildWindow( SID_NAVIGATOR ) )
{
SfxChildWindow* pWnd = mpFrame->GetChildWindow(SID_NAVIGATOR);
- SdNavigatorWin* pNewNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL;
+ SdNavigatorWin* pNewNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : nullptr;
if (mpDropNavWin == pNewNavWin)
{
MouseEvent aMEvt( mpDropNavWin->GetPointerPosPixel() );
@@ -1273,7 +1273,7 @@ void SdPageObjsTLB::OnDragFinished( sal_uInt8 )
}
}
- mpDropNavWin = NULL;
+ mpDropNavWin = nullptr;
bIsInDrag = false;
}
@@ -1331,13 +1331,13 @@ sal_Int8 SdPageObjsTLB::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
if( !bIsInDrag )
{
- SdNavigatorWin* pNavWin = NULL;
+ SdNavigatorWin* pNavWin = nullptr;
sal_uInt16 nId = SID_NAVIGATOR;
if (mpFrame->HasChildWindow(nId))
{
SfxChildWindow* pWnd = mpFrame->GetChildWindow(nId);
- pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : NULL;
+ pNavWin = pWnd ? static_cast<SdNavigatorWin*>(pWnd->GetContextWindow(SD_MOD())) : nullptr;
}
if( pNavWin && ( pNavWin == mpParent ) )
@@ -1383,16 +1383,16 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
if (mpDoc->getPresentationSettings().mbCustomShow)
{
// Get the current custom show.
- SdCustomShow* pCustomShow = NULL;
+ SdCustomShow* pCustomShow = nullptr;
SdCustomShowList* pShowList = const_cast<SdDrawDocument*>(mpDoc)->GetCustomShowList();
- if (pShowList != NULL)
+ if (pShowList != nullptr)
{
sal_uLong nCurrentShowIndex = pShowList->GetCurPos();
pCustomShow = (*pShowList)[nCurrentShowIndex];
}
// Check whether the given page is part of that custom show.
- if (pCustomShow != NULL)
+ if (pCustomShow != nullptr)
{
bBelongsToShow = false;
size_t nPageCount = pCustomShow->PagesVector().size();
@@ -1412,18 +1412,18 @@ TriState SdPageObjsTLB::NotifyMoving(
sal_uLong& rNewChildPos)
{
SvTreeListEntry* pDestination = pTarget;
- while (GetParent(pDestination) != NULL && GetParent(GetParent(pDestination)) != NULL)
+ while (GetParent(pDestination) != nullptr && GetParent(GetParent(pDestination)) != nullptr)
pDestination = GetParent(pDestination);
SdrObject* pTargetObject = static_cast<SdrObject*>(pDestination->GetUserData());
SdrObject* pSourceObject = static_cast<SdrObject*>(pEntry->GetUserData());
if (pSourceObject == reinterpret_cast<SdrObject*>(1))
- pSourceObject = NULL;
+ pSourceObject = nullptr;
- if (pTargetObject != NULL && pSourceObject != NULL)
+ if (pTargetObject != nullptr && pSourceObject != nullptr)
{
SdrPage* pObjectList = pSourceObject->GetPage();
- if (pObjectList != NULL)
+ if (pObjectList != nullptr)
{
sal_uInt32 nNewPosition;
if (pTargetObject == reinterpret_cast<SdrObject*>(1))
@@ -1434,7 +1434,7 @@ TriState SdPageObjsTLB::NotifyMoving(
}
// Update the tree list.
- if (GetParent(pDestination) == NULL)
+ if (GetParent(pDestination) == nullptr)
{
rpNewParent = pDestination;
rNewChildPos = 0;
@@ -1455,10 +1455,10 @@ TriState SdPageObjsTLB::NotifyMoving(
SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
{
SvTreeListEntry* pEntry = SvTreeListBox::GetDropTarget(rLocation);
- if (pEntry == NULL)
- return NULL;
+ if (pEntry == nullptr)
+ return nullptr;
- if (GetParent(pEntry) == NULL)
+ if (GetParent(pEntry) == nullptr)
{
// Use page entry as insertion position.
}
@@ -1466,7 +1466,7 @@ SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
{
// Go to second hierarchy level, i.e. top level shapes,
// i.e. children of pages.
- while (GetParent(pEntry) != NULL && GetParent(GetParent(pEntry)) != NULL)
+ while (GetParent(pEntry) != nullptr && GetParent(GetParent(pEntry)) != nullptr)
pEntry = GetParent(pEntry);
// Advance to next sibling.
@@ -1475,12 +1475,12 @@ SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
do
{
pNext = dynamic_cast<SvTreeListEntry*>(NextVisible(pEntry, &nDepth));
- if (pNext != NULL && nDepth > 0 && nDepth!=0xffff)
+ if (pNext != nullptr && nDepth > 0 && nDepth!=0xffff)
pEntry = pNext;
else
break;
}
- while (pEntry != NULL);
+ while (pEntry != nullptr);
}
return pEntry;
@@ -1488,7 +1488,7 @@ SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
bool SdPageObjsTLB::IsDropAllowed (SvTreeListEntry* pEntry)
{
- if (pEntry == NULL)
+ if (pEntry == nullptr)
return false;
if ( ! IsDropFormatSupported(SdPageObjsTransferable::GetListBoxDropFormatId()))
@@ -1508,7 +1508,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
bool bIsDescriptorFillingPending (true);
const SdrOle2Obj* pOleObject = dynamic_cast<const SdrOle2Obj*>(&rObject);
- if (pOleObject != NULL && pOleObject->GetObjRef().is())
+ if (pOleObject != nullptr && pOleObject->GetObjRef().is())
{
// If object has no persistence it must be copied as part of the document
try
@@ -1530,7 +1530,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
}
::sd::DrawDocShell* pDocShell = mpDoc->GetDocSh();
- if (bIsDescriptorFillingPending && pDocShell!=NULL)
+ if (bIsDescriptorFillingPending && pDocShell!=nullptr)
{
pDocShell->FillTransferableObjectDescriptor(aObjectDescriptor);
}
@@ -1539,7 +1539,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
//Point aDragPos (0,0);
aObjectDescriptor.maDragStartPos = aDragPos;
// aObjectDescriptor.maSize = GetAllMarkedRect().GetSize();
- if (pDocShell != NULL)
+ if (pDocShell != nullptr)
aObjectDescriptor.maDisplayName = pDocShell->GetMedium()->GetURLObject().GetURLNoPass();
else
aObjectDescriptor.maDisplayName.clear();
@@ -1553,7 +1553,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
{
{
::sd::ViewShell* pViewShell = rDocShell.GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
return pViewShell;
}
@@ -1566,11 +1566,11 @@ void SdPageObjsTLB::AddShapeToTransferable (
uno::Reference<frame::XFramesSupplier> xFrameSupplier (xDesktop, uno::UNO_QUERY);
if ( ! xFrameSupplier.is())
- return NULL;
+ return nullptr;
uno::Reference<container::XIndexAccess> xFrameAccess (xFrameSupplier->getFrames(), uno::UNO_QUERY);
if ( ! xFrameAccess.is())
- return NULL;
+ return nullptr;
for (sal_Int32 nIndex=0,nCount=xFrameAccess->getCount(); nIndex<nCount; ++nIndex)
{
@@ -1579,10 +1579,10 @@ void SdPageObjsTLB::AddShapeToTransferable (
continue;
::sd::DrawController* pController = dynamic_cast<sd::DrawController*>(xFrame->getController().get());
- if (pController == NULL)
+ if (pController == nullptr)
continue;
::sd::ViewShellBase* pBase = pController->GetViewShellBase();
- if (pBase == NULL)
+ if (pBase == nullptr)
continue;
if (pBase->GetDocShell() != &rDocShell)
continue;
@@ -1597,7 +1597,7 @@ void SdPageObjsTLB::AddShapeToTransferable (
// When there is an exception then simply use the default value of
// bIsEnabled and disable the controls.
}
- return NULL;
+ return nullptr;
}
//===== IconProvider ==========================================================
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 7ba6b428c29f..3a6ed516e930 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -99,8 +99,8 @@ SdActionDlg::SdActionDlg (
SdTPAction::SdTPAction(vcl::Window* pWindow, const SfxItemSet& rInAttrs)
: SfxTabPage(pWindow, "InteractionPage",
"modules/simpress/ui/interactionpage.ui", &rInAttrs)
- , mpView(NULL)
- , mpDoc(NULL)
+ , mpView(nullptr)
+ , mpDoc(nullptr)
, bTreeUpdated(false)
{
get(m_pLbAction, "listbox");
@@ -188,8 +188,8 @@ void SdTPAction::SetView( const ::sd::View* pSdView )
void SdTPAction::Construct()
{
// fill OLE-Actionlistbox
- SdrOle2Obj* pOleObj = NULL;
- SdrGrafObj* pGrafObj = NULL;
+ SdrOle2Obj* pOleObj = nullptr;
+ SdrGrafObj* pGrafObj = nullptr;
bool bOLEAction = false;
if ( mpView->AreObjectsMarked() )
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 8c72b571e39a..df67367bcfdd 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -96,7 +96,7 @@ void SdTpOptionsSnap::Reset( const SfxItemSet* rAttrs )
pMtrFldAngle->SetValue( aOptsItem.GetOptionsSnap().GetAngle() );
pMtrFldBezAngle->SetValue( aOptsItem.GetOptionsSnap().GetEliminatePolyPointLimitAngle() );
- pCbxRotate->GetClickHdl().Call(0);
+ pCbxRotate->GetClickHdl().Call(nullptr);
}
VclPtr<SfxTabPage> SdTpOptionsSnap::Create( vcl::Window* pWindow,
@@ -327,7 +327,7 @@ void SdTpOptionsMisc::ActivatePage( const SfxItemSet& rSet )
m_pLbMetric->SaveValue();
// change metric if necessary (since TabPage is in the Dialog where
// the metric is set)
- const SfxPoolItem* pAttr = NULL;
+ const SfxPoolItem* pAttr = nullptr;
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_METRIC , false,
&pAttr ))
{
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 87b97987748f..3ec1a9eb3ae6 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -52,7 +52,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
// THUMBNAIL: here we may can set the draft mode
}
- ClientView* pView = new ClientView(this, pOut, NULL);
+ ClientView* pView = new ClientView(this, pOut, nullptr);
pView->SetHlplVisible(false);
pView->SetGridVisible(false);
@@ -60,7 +60,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
pView->SetPageVisible(false);
pView->SetGlueVisible(false);
- SdPage* pSelectedPage = NULL;
+ SdPage* pSelectedPage = nullptr;
const std::vector<sd::FrameView*> &rViews = mpDoc->GetFrameViewList();
if( !rViews.empty() )
@@ -73,9 +73,9 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
}
}
- if( NULL == pSelectedPage )
+ if( nullptr == pSelectedPage )
{
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sal_uInt16 nPageCnt = (sal_uInt16) mpDoc->GetSdPageCount(PK_STANDARD);
for (sal_uInt16 i = 0; i < nPageCnt; i++)
@@ -86,7 +86,7 @@ void DrawDocShell::Draw(OutputDevice* pOut, const JobSetup&, sal_uInt16 nAspect)
pSelectedPage = pPage;
}
- if( NULL == pSelectedPage )
+ if( nullptr == pSelectedPage )
pSelectedPage = mpDoc->GetSdPage(0, PK_STANDARD);
}
@@ -163,13 +163,13 @@ void DrawDocShell::Disconnect(ViewShell* pViewSh)
{
if (mpViewShell == pViewSh)
{
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
}
FrameView* DrawDocShell::GetFrameView()
{
- FrameView* pFrameView = NULL;
+ FrameView* pFrameView = nullptr;
if (mpViewShell)
{
@@ -211,7 +211,7 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
aMapMode.SetScaleY( aFrac );
pVDev->SetMapMode( aMapMode );
- ClientView* pView = new ClientView( this, pVDev, NULL );
+ ClientView* pView = new ClientView( this, pVDev, nullptr );
FrameView* pFrameView = GetFrameView();
pView->ShowSdrPage( pPage );
@@ -290,7 +290,7 @@ bool DrawDocShell::CheckPageName (vcl::Window* pWin, OUString& rName )
{
OUString aDesc( SD_RESSTR( STR_WARN_PAGE_EXISTS ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : 0;
+ AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : nullptr;
if( aNameDlg )
{
aNameDlg->SetEditHelpId( HID_SD_NAMEDIALOG_PAGE );
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 7775d83c5c3b..ccbc6989fe36 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -183,11 +183,11 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if (pShell == pFirstShell)
{
- pShell = NULL;
+ pShell = nullptr;
}
}
- SetDocShellFunction(0);
+ SetDocShellFunction(nullptr);
Invalidate();
rReq.Done();
}
@@ -256,7 +256,7 @@ void DrawDocShell::Execute( SfxRequest& rReq )
if( mpViewShell )
{
rtl::Reference<FuPoor> aFunc( FuHangulHanjaConversion::Create( mpViewShell, mpViewShell->GetActiveWindow(), mpViewShell->GetView(), mpDoc, rReq ) );
- static_cast< FuHangulHanjaConversion* >( aFunc.get() )->StartConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, NULL, i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true );
+ static_cast< FuHangulHanjaConversion* >( aFunc.get() )->StartConversion( LANGUAGE_KOREAN, LANGUAGE_KOREAN, nullptr, i18n::TextConversionOption::CHARACTER_BY_CHARACTER, true );
}
}
break;
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index b91cd3407b0f..0ab60d24b0dd 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -157,12 +157,12 @@ void DrawDocShell::SetPrinter(SfxPrinter *pNewPrinter)
void DrawDocShell::UpdateFontList()
{
delete mpFontList;
- OutputDevice* pRefDevice = NULL;
+ OutputDevice* pRefDevice = nullptr;
if ( mpDoc->GetPrinterIndependentLayout() == css::document::PrinterIndependentLayout::DISABLED )
pRefDevice = GetPrinter(true);
else
pRefDevice = SD_MOD()->GetVirtualRefDevice();
- mpFontList = new FontList( pRefDevice, NULL, false );
+ mpFontList = new FontList( pRefDevice, nullptr, false );
SvxFontListItem aFontListItem( mpFontList, SID_ATTR_CHAR_FONTLIST );
PutItem( aFontListItem );
}
@@ -341,7 +341,7 @@ bool DrawDocShell::LoadFrom( SfxMedium& rMedium )
{
mbNewDocument = false;
- WaitObject* pWait = NULL;
+ WaitObject* pWait = nullptr;
if( mpViewShell )
pWait = new WaitObject( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) );
@@ -574,7 +574,7 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
{
const SfxFilter* pMediumFilter = rMedium.GetFilter();
const OUString aTypeName( pMediumFilter->GetTypeName() );
- SdFilter* pFilter = NULL;
+ SdFilter* pFilter = nullptr;
if( aTypeName.indexOf( "graphic_HTML" ) >= 0 )
{
@@ -678,7 +678,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
bool bIsMasterPage = false;
sal_uInt16 nPageNumber = SDRPAGE_NOTFOUND;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
OUString sBookmark( rBookmark );
const OUString sInteraction( "action?" );
@@ -781,11 +781,11 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
}
else
{
- pDrawViewShell = NULL;
+ pDrawViewShell = nullptr;
}
}
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
{
setEditMode(pDrawViewShell, bIsMasterPage);
@@ -808,7 +808,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
pDrawViewShell->SwitchPage(nSdPgNum);
}
- if (pObj != NULL)
+ if (pObj != nullptr)
{
// show and select object
pDrawViewShell->MakeVisible(pObj->GetLogicRect(),
@@ -821,7 +821,7 @@ bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
}
}
- SfxBindings& rBindings = ((pDrawViewShell && pDrawViewShell->GetViewFrame()!=NULL)
+ SfxBindings& rBindings = ((pDrawViewShell && pDrawViewShell->GetViewFrame()!=nullptr)
? pDrawViewShell->GetViewFrame()
: SfxViewFrame::Current() )->GetBindings();
@@ -867,7 +867,7 @@ bool DrawDocShell::GetObjectIsmarked(const OUString& rBookmark)
// Is the bookmark a page ?
bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if (nPgNum == SDRPAGE_NOTFOUND)
{
@@ -946,7 +946,7 @@ bool DrawDocShell::GotoTreeBookmark(const OUString& rBookmark)
// is the bookmark a page ?
bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aBookmark, bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if (nPgNum == SDRPAGE_NOTFOUND)
{
@@ -1111,7 +1111,7 @@ OutputDevice* DrawDocShell::GetDocumentRefDev()
OutputDevice* pReferenceDevice = SfxObjectShell::GetDocumentRefDev ();
// Only when our parent does not have a reference device then we return
// our own.
- if (pReferenceDevice == NULL && mpDoc != NULL)
+ if (pReferenceDevice == nullptr && mpDoc != nullptr)
pReferenceDevice = mpDoc->GetRefDevice ();
return pReferenceDevice;
}
@@ -1122,7 +1122,7 @@ void DrawDocShell::OpenBookmark( const OUString& rBookmarkURL )
{
SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL );
SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() );
- const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, 0 };
+ const SfxPoolItem* ppArgs[] = { &aStrItem, &aReferer, nullptr };
( mpViewShell ? mpViewShell->GetViewFrame() : SfxViewFrame::Current() )->GetBindings().Execute( SID_OPENHYPERLINK, ppArgs );
}
diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx
index 7b252ff9268c..6c83b119c884 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -97,7 +97,7 @@ void DrawDocShell::Construct( bool bClipboard )
mbInDestruction = false;
SetSlotFilter(); // setzt Filter zurueck
- mbOwnDocument = mpDoc == 0;
+ mbOwnDocument = mpDoc == nullptr;
if( mbOwnDocument )
mpDoc = new SdDrawDocument(meDocType, this);
@@ -118,13 +118,13 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
bool bDataObject,
DocumentType eDocumentType) :
SfxObjectShell( eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode),
- mpDoc(NULL),
- mpUndoManager(NULL),
- mpPrinter(NULL),
- mpViewShell(NULL),
- mpFontList(NULL),
+ mpDoc(nullptr),
+ mpUndoManager(nullptr),
+ mpPrinter(nullptr),
+ mpViewShell(nullptr),
+ mpFontList(nullptr),
meDocType(eDocumentType),
- mpFilterSIDs(0),
+ mpFilterSIDs(nullptr),
mbSdDataObj(bDataObject),
mbOwnPrinter(false),
mbNewDocument( true )
@@ -134,13 +134,13 @@ DrawDocShell::DrawDocShell(SfxObjectCreateMode eMode,
DrawDocShell::DrawDocShell( SfxModelFlags nModelCreationFlags, bool bDataObject, DocumentType eDocumentType ) :
SfxObjectShell( nModelCreationFlags ),
- mpDoc(NULL),
- mpUndoManager(NULL),
- mpPrinter(NULL),
- mpViewShell(NULL),
- mpFontList(NULL),
+ mpDoc(nullptr),
+ mpUndoManager(nullptr),
+ mpPrinter(nullptr),
+ mpViewShell(nullptr),
+ mpFontList(nullptr),
meDocType(eDocumentType),
- mpFilterSIDs(0),
+ mpFilterSIDs(nullptr),
mbSdDataObj(bDataObject),
mbOwnPrinter(false),
mbNewDocument( true )
@@ -153,12 +153,12 @@ DrawDocShell::DrawDocShell(SdDrawDocument* pDoc, SfxObjectCreateMode eMode,
DocumentType eDocumentType) :
SfxObjectShell(eMode == SfxObjectCreateMode::INTERNAL ? SfxObjectCreateMode::EMBEDDED : eMode),
mpDoc(pDoc),
- mpUndoManager(NULL),
- mpPrinter(NULL),
- mpViewShell(NULL),
- mpFontList(NULL),
+ mpUndoManager(nullptr),
+ mpPrinter(nullptr),
+ mpViewShell(nullptr),
+ mpFontList(nullptr),
meDocType(eDocumentType),
- mpFilterSIDs(0),
+ mpFilterSIDs(nullptr),
mbSdDataObj(bDataObject),
mbOwnPrinter(false),
mbNewDocument( true )
@@ -176,12 +176,12 @@ DrawDocShell::~DrawDocShell()
mbInDestruction = true;
- SetDocShellFunction(0);
+ SetDocShellFunction(nullptr);
delete mpFontList;
if( mpDoc )
- mpDoc->SetSdrUndoManager( 0 );
+ mpDoc->SetSdrUndoManager( nullptr );
delete mpUndoManager;
if (mbOwnPrinter)
@@ -366,7 +366,7 @@ void DrawDocShell::CancelSearching()
{
if( dynamic_cast<FuSearch*>( mxDocShellFunction.get() ) )
{
- SetDocShellFunction(0);
+ SetDocShellFunction(nullptr);
}
}
@@ -421,8 +421,8 @@ void DrawDocShell::SetModified( bool bSet /* = true */ )
// to get hands on the outliner and the text object.
IMPL_LINK_TYPED(DrawDocShell, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void)
{
- SdrObject* pObj = NULL;
- SdrOutliner* pOutl = NULL;
+ SdrObject* pObj = nullptr;
+ SdrOutliner* pOutl = nullptr;
if(GetViewShell())
{
diff --git a/sd/source/ui/docshell/sdclient.cxx b/sd/source/ui/docshell/sdclient.cxx
index d33e05478896..55f3295834e8 100644
--- a/sd/source/ui/docshell/sdclient.cxx
+++ b/sd/source/ui/docshell/sdclient.cxx
@@ -41,7 +41,7 @@ Client::Client(SdrOle2Obj* pObj, ViewShell* pViewShell, vcl::Window* pWindow) :
SfxInPlaceClient(pViewShell->GetViewShell(), pWindow, pObj->GetAspect() ),
mpViewShell(pViewShell),
pSdrOle2Obj(pObj),
- pSdrGrafObj(NULL)
+ pSdrGrafObj(nullptr)
{
SetObject( pObj->GetObjRef() );
DBG_ASSERT( GetObject().is(), "No object connected!" );
diff --git a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
index 7db8da3b573f..9ea1ddd30c94 100644
--- a/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
+++ b/sd/source/ui/framework/configuration/ChangeRequestQueueProcessor.cxx
@@ -55,7 +55,7 @@ ChangeRequestQueueProcessor::ChangeRequestQueueProcessor (
const std::shared_ptr<ConfigurationUpdater>& rpConfigurationUpdater)
: maMutex(),
maQueue(),
- mnUserEventId(0),
+ mnUserEventId(nullptr),
mxConfiguration(),
mpConfigurationController(rpConfigurationController),
mpConfigurationUpdater(rpConfigurationUpdater)
@@ -64,7 +64,7 @@ ChangeRequestQueueProcessor::ChangeRequestQueueProcessor (
ChangeRequestQueueProcessor::~ChangeRequestQueueProcessor()
{
- if (mnUserEventId != 0)
+ if (mnUserEventId != nullptr)
Application::RemoveUserEvent(mnUserEventId);
}
@@ -101,7 +101,7 @@ void ChangeRequestQueueProcessor::StartProcessing()
{
::osl::MutexGuard aGuard (maMutex);
- if (mnUserEventId == 0
+ if (mnUserEventId == nullptr
&& mxConfiguration.is()
&& ! maQueue.empty())
{
@@ -115,7 +115,7 @@ IMPL_LINK_NOARG_TYPED(ChangeRequestQueueProcessor, ProcessEvent, void*, void)
{
::osl::MutexGuard aGuard (maMutex);
- mnUserEventId = 0;
+ mnUserEventId = nullptr;
ProcessOneEvent();
@@ -153,7 +153,7 @@ void ChangeRequestQueueProcessor::ProcessOneEvent()
SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": All requests are processed");
// The queue is empty so tell the ConfigurationManager to update
// its state.
- if (mpConfigurationUpdater.get() != NULL)
+ if (mpConfigurationUpdater.get() != nullptr)
{
#if OSL_DEBUG_LEVEL >= 2
ConfigurationTracer::TraceConfiguration (
diff --git a/sd/source/ui/framework/configuration/Configuration.cxx b/sd/source/ui/framework/configuration/Configuration.cxx
index 614a69984292..e930f9dcc072 100644
--- a/sd/source/ui/framework/configuration/Configuration.cxx
+++ b/sd/source/ui/framework/configuration/Configuration.cxx
@@ -84,7 +84,7 @@ void SAL_CALL Configuration::disposing()
{
::osl::MutexGuard aGuard (maMutex);
mpResourceContainer->clear();
- mxBroadcaster = NULL;
+ mxBroadcaster = nullptr;
}
//----- XConfiguration --------------------------------------------------------
@@ -302,10 +302,10 @@ bool AreConfigurationsEquivalent (
// Get the lists of resources from the two given configurations.
const Sequence<Reference<XResourceId> > aResources1(
rxConfiguration1->getResources(
- NULL, OUString(), AnchorBindingMode_INDIRECT));
+ nullptr, OUString(), AnchorBindingMode_INDIRECT));
const Sequence<Reference<XResourceId> > aResources2(
rxConfiguration2->getResources(
- NULL, OUString(), AnchorBindingMode_INDIRECT));
+ nullptr, OUString(), AnchorBindingMode_INDIRECT));
// When the number of resources differ then the configurations can not
// be equivalent.
@@ -342,7 +342,7 @@ com_sun_star_comp_Draw_framework_configuration_Configuration_get_implementation(
css::uno::XComponentContext*,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(new sd::framework::Configuration(NULL, false));
+ return cppu::acquire(new sd::framework::Configuration(nullptr, false));
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
index 7319ef15a3ea..2e0b5b33dfa5 100644
--- a/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationClassifier.cxx
@@ -45,8 +45,8 @@ bool ConfigurationClassifier::Partition()
maC1andC2.clear();
PartitionResources(
- mxConfiguration1->getResources(NULL, OUString(), AnchorBindingMode_DIRECT),
- mxConfiguration2->getResources(NULL, OUString(), AnchorBindingMode_DIRECT));
+ mxConfiguration1->getResources(nullptr, OUString(), AnchorBindingMode_DIRECT),
+ mxConfiguration2->getResources(nullptr, OUString(), AnchorBindingMode_DIRECT));
return !maC1minusC2.empty() || !maC2minusC1.empty();
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationController.cxx b/sd/source/ui/framework/configuration/ConfigurationController.cxx
index cd3424d9e4e9..ff3d2f1577fc 100644
--- a/sd/source/ui/framework/configuration/ConfigurationController.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationController.cxx
@@ -118,7 +118,7 @@ ConfigurationController::~ConfigurationController() throw()
void SAL_CALL ConfigurationController::disposing()
{
- if (mpImplementation.get() == NULL)
+ if (mpImplementation.get() == nullptr)
return;
SAL_INFO("sd.fwk", OSL_THIS_FUNC << ": ConfigurationController::disposing");
@@ -144,15 +144,15 @@ void SAL_CALL ConfigurationController::disposing()
}
mpImplementation->mpQueueProcessor.reset();
- mpImplementation->mxRequestedConfiguration = NULL;
+ mpImplementation->mxRequestedConfiguration = nullptr;
mpImplementation.reset();
}
void ConfigurationController::ProcessEvent()
{
- if (mpImplementation.get() != NULL)
+ if (mpImplementation.get() != nullptr)
{
- OSL_ASSERT(mpImplementation->mpQueueProcessor.get()!=NULL);
+ OSL_ASSERT(mpImplementation->mpQueueProcessor.get()!=nullptr);
mpImplementation->mpQueueProcessor->ProcessOneEvent();
}
@@ -160,9 +160,9 @@ void ConfigurationController::ProcessEvent()
void ConfigurationController::RequestSynchronousUpdate()
{
- if (mpImplementation.get() == NULL)
+ if (mpImplementation.get() == nullptr)
return;
- if (mpImplementation->mpQueueProcessor.get() == 0)
+ if (mpImplementation->mpQueueProcessor.get() == nullptr)
return;
mpImplementation->mpQueueProcessor->ProcessUntilEmpty();
}
@@ -178,7 +178,7 @@ void SAL_CALL ConfigurationController::addConfigurationChangeListener (
::osl::MutexGuard aGuard (maMutex);
ThrowIfDisposed();
- OSL_ASSERT(mpImplementation.get()!=NULL);
+ OSL_ASSERT(mpImplementation.get()!=nullptr);
mpImplementation->mpBroadcaster->AddListener(rxListener, rsEventType, rUserData);
}
@@ -205,14 +205,14 @@ void SAL_CALL ConfigurationController::notifyEvent (
void SAL_CALL ConfigurationController::lock()
throw (RuntimeException, std::exception)
{
- OSL_ASSERT(mpImplementation.get()!=NULL);
- OSL_ASSERT(mpImplementation->mpConfigurationUpdater.get()!=NULL);
+ OSL_ASSERT(mpImplementation.get()!=nullptr);
+ OSL_ASSERT(mpImplementation->mpConfigurationUpdater.get()!=nullptr);
::osl::MutexGuard aGuard (maMutex);
ThrowIfDisposed();
++mpImplementation->mnLockCount;
- if (mpImplementation->mpConfigurationUpdaterLock.get()==NULL)
+ if (mpImplementation->mpConfigurationUpdaterLock.get()==nullptr)
mpImplementation->mpConfigurationUpdaterLock
= mpImplementation->mpConfigurationUpdater->GetLock();
}
@@ -534,9 +534,9 @@ void ConfigurationController::ThrowIfDisposed () const
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
- if (mpImplementation.get() == NULL)
+ if (mpImplementation.get() == nullptr)
{
- OSL_ASSERT(mpImplementation.get() != NULL);
+ OSL_ASSERT(mpImplementation.get() != nullptr);
throw RuntimeException("ConfigurationController not initialized",
const_cast<uno::XWeak*>(static_cast<const uno::XWeak*>(this)));
}
@@ -550,7 +550,7 @@ ConfigurationController::Implementation::Implementation (
: mxControllerManager(rxController, UNO_QUERY_THROW),
mpBroadcaster(new ConfigurationControllerBroadcaster(&rController)),
mxRequestedConfiguration(new Configuration(&rController, true)),
- mpBase(NULL),
+ mpBase(nullptr),
mpResourceFactoryContainer(new ResourceFactoryManager(mxControllerManager)),
mpResourceManager(
new ConfigurationControllerResourceManager(mpResourceFactoryContainer,mpBroadcaster)),
diff --git a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
index 9d23701fc5cd..38f3aac13e51 100644
--- a/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationControllerResourceManager.cxx
@@ -230,7 +230,7 @@ void ConfigurationControllerResourceManager::DeactivateResource (
mpBroadcaster->NotifyListeners(
FrameworkHelper::msResourceDeactivationEndEvent,
rxResourceId,
- NULL);
+ nullptr);
#if OSL_DEBUG_LEVEL >= 1
if (bSuccess)
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 9d110e15b00f..060727fbc1fc 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -65,7 +65,7 @@ ConfigurationUpdater::ConfigurationUpdater (
const Reference<XControllerManager>& rxControllerManager)
: mxControllerManager(),
mpBroadcaster(rpBroadcaster),
- mxCurrentConfiguration(Reference<XConfiguration>(new Configuration(NULL, false))),
+ mxCurrentConfiguration(Reference<XConfiguration>(new Configuration(nullptr, false))),
mxRequestedConfiguration(),
mbUpdatePending(false),
mbUpdateBeingProcessed(false),
@@ -283,7 +283,7 @@ void ConfigurationUpdater::CheckPureAnchors (
// Get a list of all resources in the configuration.
Sequence<Reference<XResourceId> > aResources(
rxConfiguration->getResources(
- NULL, OUString(), AnchorBindingMode_INDIRECT));
+ nullptr, OUString(), AnchorBindingMode_INDIRECT));
sal_Int32 nCount (aResources.getLength());
// Prepare the list of pure anchors that have to be deactivated.
diff --git a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
index e3a7cd911783..85cc18070772 100644
--- a/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
+++ b/sd/source/ui/framework/configuration/ResourceFactoryManager.cxx
@@ -206,7 +206,7 @@ Reference<XResourceFactory> ResourceFactoryManager::FindFactory (const OUString&
return iPattern->second;
}
}
- return NULL;
+ return nullptr;
}
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/configuration/ResourceId.cxx b/sd/source/ui/framework/configuration/ResourceId.cxx
index 71461c57d6d1..96d348c3429e 100644
--- a/sd/source/ui/framework/configuration/ResourceId.cxx
+++ b/sd/source/ui/framework/configuration/ResourceId.cxx
@@ -121,7 +121,7 @@ util::URL SAL_CALL
ResourceId::getFullResourceURL()
throw(css::uno::RuntimeException, std::exception)
{
- if (mpURL.get() != NULL)
+ if (mpURL.get() != nullptr)
return *mpURL;
Reference<util::XURLTransformer> xURLTransformer (mxURLTransformerWeak);
@@ -215,11 +215,11 @@ sal_Int16 SAL_CALL
}
else
{
- ResourceId* pId = NULL;
+ ResourceId* pId = nullptr;
#ifdef USE_OPTIMIZATIONS
pId = dynamic_cast<ResourceId*>(rxResourceId.get());
#endif
- if (pId != NULL)
+ if (pId != nullptr)
{
// We have direct access to the implementation of the given
// resource id object.
@@ -332,14 +332,14 @@ sal_Bool SAL_CALL
if ( ! rxResourceId.is())
{
// An empty reference is interpreted as empty resource id.
- return IsBoundToAnchor(NULL, NULL, eMode);
+ return IsBoundToAnchor(nullptr, nullptr, eMode);
}
- ResourceId* pId = NULL;
+ ResourceId* pId = nullptr;
#ifdef USE_OPTIMIZATIONS
pId = dynamic_cast<ResourceId*>(rxResourceId.get());
#endif
- if (pId != NULL)
+ if (pId != nullptr)
{
return IsBoundToAnchor(pId->maResourceURLs, eMode);
}
@@ -357,7 +357,7 @@ sal_Bool SAL_CALL
AnchorBindingMode eMode)
throw (RuntimeException, std::exception)
{
- return IsBoundToAnchor(&rsAnchorURL, NULL, eMode);
+ return IsBoundToAnchor(&rsAnchorURL, nullptr, eMode);
}
Reference<XResourceId> SAL_CALL
@@ -428,9 +428,9 @@ bool ResourceId::IsBoundToAnchor (
AnchorBindingMode eMode) const
{
const sal_uInt32 nLocalAnchorURLCount (maResourceURLs.size() - 1);
- const bool bHasFirstAnchorURL (psFirstAnchorURL!=NULL);
+ const bool bHasFirstAnchorURL (psFirstAnchorURL!=nullptr);
const sal_uInt32 nAnchorURLCount ((bHasFirstAnchorURL?1:0)
- + (paAnchorURLs!=NULL ? paAnchorURLs->getLength() : 0));
+ + (paAnchorURLs!=nullptr ? paAnchorURLs->getLength() : 0));
// Check the lengths.
if (nLocalAnchorURLCount<nAnchorURLCount ||
@@ -442,7 +442,7 @@ bool ResourceId::IsBoundToAnchor (
// Compare the nAnchorURLCount bottom-most anchor URLs of this resource
// id and the given anchor.
sal_uInt32 nOffset = 0;
- if (paAnchorURLs != NULL)
+ if (paAnchorURLs != nullptr)
{
sal_uInt32 nCount = paAnchorURLs->getLength();
while (nOffset < nCount)
diff --git a/sd/source/ui/framework/factories/BasicPaneFactory.cxx b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
index a74bc4cfc37f..14d2a02c4c79 100644
--- a/sd/source/ui/framework/factories/BasicPaneFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicPaneFactory.cxx
@@ -91,7 +91,7 @@ BasicPaneFactory::BasicPaneFactory (
: BasicPaneFactoryInterfaceBase(m_aMutex),
mxComponentContext(rxContext),
mxConfigurationControllerWeak(),
- mpViewShellBase(NULL),
+ mpViewShellBase(nullptr),
mpPaneContainer(new PaneContainer)
{
}
@@ -265,7 +265,7 @@ Reference<XResource> SAL_CALL BasicPaneFactory::createResource (
// The requested pane can not be created by any of the factories
// managed by the called BasicPaneFactory object.
throw lang::IllegalArgumentException("BasicPaneFactory::createPane() called for unknown resource id",
- NULL,
+ nullptr,
0);
}
@@ -294,14 +294,14 @@ void SAL_CALL BasicPaneFactory::releaseResource (
// on the next createPane() call for the same pane type the pane is
// created anew.
ChildWindowPane* pChildWindowPane = dynamic_cast<ChildWindowPane*>(rxPane.get());
- if (pChildWindowPane != NULL)
+ if (pChildWindowPane != nullptr)
{
iDescriptor->mbIsReleased = true;
pChildWindowPane->Hide();
}
else
{
- iDescriptor->mxPane = NULL;
+ iDescriptor->mxPane = nullptr;
Reference<XComponent> xComponent (rxPane, UNO_QUERY);
if (xComponent.is())
{
@@ -318,7 +318,7 @@ void SAL_CALL BasicPaneFactory::releaseResource (
// created by any of the factories managed by the called
// BasicPaneFactory object.
throw lang::IllegalArgumentException("BasicPaneFactory::releasePane() called for pane that was not created by same factory.",
- NULL,
+ nullptr,
0);
}
}
@@ -354,7 +354,7 @@ void SAL_CALL BasicPaneFactory::disposing (
::boost::bind(&PaneDescriptor::ComparePane, _1, xPane)));
if (iDescriptor != mpPaneContainer->end())
{
- iDescriptor->mxPane = NULL;
+ iDescriptor->mxPane = nullptr;
}
}
}
@@ -364,7 +364,7 @@ Reference<XResource> BasicPaneFactory::CreateFrameWindowPane (
{
Reference<XResource> xPane;
- if (mpViewShellBase != NULL)
+ if (mpViewShellBase != nullptr)
{
xPane = new FrameWindowPane(rxPaneId, mpViewShellBase->GetViewWindow());
}
@@ -391,7 +391,7 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
{
Reference<XResource> xPane;
- if (mpViewShellBase != NULL)
+ if (mpViewShellBase != nullptr)
{
// Create the corresponding shell and determine the id of the child window.
sal_uInt16 nChildWindowId = 0;
@@ -414,7 +414,7 @@ Reference<XResource> BasicPaneFactory::CreateChildWindowPane (
// With shell and child window id create the ChildWindowPane
// wrapper.
- if (pShell.get() != NULL)
+ if (pShell.get() != nullptr)
{
xPane = new ChildWindowPane(
rxPaneId,
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 1004ae6a01bf..9efdefb9a820 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -41,7 +41,7 @@ BasicToolBarFactory::BasicToolBarFactory (
: BasicToolBarFactoryInterfaceBase(m_aMutex),
mxConfigurationController(),
mxController(),
- mpViewShellBase(NULL)
+ mpViewShellBase(nullptr)
{
(void)rxContext;
}
@@ -57,14 +57,14 @@ void SAL_CALL BasicToolBarFactory::disposing()
void BasicToolBarFactory::Shutdown()
{
- mpViewShellBase = NULL;
+ mpViewShellBase = nullptr;
Reference<lang::XComponent> xComponent (mxConfigurationController, UNO_QUERY);
if (xComponent.is())
xComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
if (mxConfigurationController.is())
{
mxConfigurationController->removeResourceFactoryForReference(this);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
}
@@ -84,7 +84,7 @@ void SAL_CALL BasicToolBarFactory::initialize (const Sequence<Any>& aArguments)
Reference<lang::XUnoTunnel> xTunnel (mxController, UNO_QUERY_THROW);
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
mpViewShellBase = pController->GetViewShellBase();
utl::MediaDescriptor aDescriptor (mxController->getModel()->getArgs());
@@ -109,7 +109,7 @@ void SAL_CALL BasicToolBarFactory::initialize (const Sequence<Any>& aArguments)
{
// The view shell is in preview mode and thus does not need
// the view tab bar.
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
}
catch (RuntimeException&)
@@ -127,7 +127,7 @@ void SAL_CALL BasicToolBarFactory::disposing (
throw (RuntimeException, std::exception)
{
if (rEventObject.Source == mxConfigurationController)
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
//===== XPaneFactory ==========================================================
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index a0cfc145f67f..9a83bca1b95c 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -89,8 +89,8 @@ BasicViewFactory::BasicViewFactory (
: BasicViewFactoryInterfaceBase(MutexOwner::maMutex),
mxConfigurationController(),
mpViewShellContainer(new ViewShellContainer()),
- mpBase(NULL),
- mpFrameView(NULL),
+ mpBase(nullptr),
+ mpFrameView(nullptr),
mpWindow(VclPtr<WorkWindow>::Create(nullptr,WB_STDWORK)),
mpViewCache(new ViewCache()),
mxLocalPane(new Pane(Reference<XResourceId>(), mpWindow.get()))
@@ -105,10 +105,10 @@ BasicViewFactory::~BasicViewFactory()
void SAL_CALL BasicViewFactory::disposing()
{
// Disconnect from the frame view.
- if (mpFrameView != NULL)
+ if (mpFrameView != nullptr)
{
mpFrameView->Disconnect();
- mpFrameView = NULL;
+ mpFrameView = nullptr;
}
// Relase the view cache.
@@ -144,34 +144,34 @@ Reference<XResource> SAL_CALL BasicViewFactory::createResource (
xPane.set(mxConfigurationController->getResource(rxViewId->getAnchor()), UNO_QUERY);
// For main views use the frame view of the last main view.
- ::sd::FrameView* pFrameView = NULL;
+ ::sd::FrameView* pFrameView = nullptr;
if (xPane.is() && bIsCenterPane)
{
pFrameView = mpFrameView;
}
// Get Window pointer for XWindow of the pane.
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if (xPane.is())
pWindow = VCLUnoHelper::GetWindow(xPane->getWindow());
// Get the view frame.
- SfxViewFrame* pFrame = NULL;
- if (mpBase != NULL)
+ SfxViewFrame* pFrame = nullptr;
+ if (mpBase != nullptr)
pFrame = mpBase->GetViewFrame();
- if (pFrame != NULL && mpBase!=NULL && pWindow!=NULL)
+ if (pFrame != nullptr && mpBase!=nullptr && pWindow!=nullptr)
{
// Try to get the view from the cache.
std::shared_ptr<ViewDescriptor> pDescriptor (GetViewFromCache(rxViewId, xPane));
// When the requested view is not in the cache then create a new view.
- if (pDescriptor.get() == NULL)
+ if (pDescriptor.get() == nullptr)
{
pDescriptor = CreateView(rxViewId, *pFrame, *pWindow, xPane, pFrameView, bIsCenterPane);
}
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
xView = pDescriptor->mxView;
mpViewShellContainer->push_back(pDescriptor);
@@ -191,7 +191,7 @@ void SAL_CALL BasicViewFactory::releaseResource (const Reference<XResource>& rxV
if ( ! rxView.is())
throw lang::IllegalArgumentException();
- if (rxView.is() && mpBase!=NULL)
+ if (rxView.is() && mpBase!=nullptr)
{
ViewShellContainer::iterator iViewShell (
::std::find_if(
@@ -208,7 +208,7 @@ void SAL_CALL BasicViewFactory::releaseResource (const Reference<XResource>& rxV
// Obtain a pointer to and connect to the frame view of the
// view. The next view, that is created, will be
// initialized with this frame view.
- if (mpFrameView == NULL)
+ if (mpFrameView == nullptr)
{
mpFrameView = pViewShell->GetFrameView();
if (mpFrameView)
@@ -221,7 +221,7 @@ void SAL_CALL BasicViewFactory::releaseResource (const Reference<XResource>& rxV
Reference<drawing::XDrawSubController>());
SfxViewShell* pSfxViewShell = pViewShell->GetViewShell();
- if (pSfxViewShell != NULL)
+ if (pSfxViewShell != nullptr)
pSfxViewShell->DisconnectAllClients();
}
@@ -251,7 +251,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
Reference<lang::XUnoTunnel> xTunnel (xController, UNO_QUERY_THROW);
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
mpBase = pController->GetViewShellBase();
// Register the factory for its supported views.
@@ -269,7 +269,7 @@ void SAL_CALL BasicViewFactory::initialize (const Sequence<Any>& aArguments)
}
catch (RuntimeException&)
{
- mpBase = NULL;
+ mpBase = nullptr;
if (mxConfigurationController.is())
mxConfigurationController->removeResourceFactoryForReference(this);
throw;
@@ -295,7 +295,7 @@ std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView (
bIsCenterPane);
pDescriptor->mxViewId = rxViewId;
- if (pDescriptor->mpViewShell.get() != NULL)
+ if (pDescriptor->mpViewShell.get() != nullptr)
{
pDescriptor->mpViewShell->Init(bIsCenterPane);
mpBase->GetViewShellManager()->ActivateViewShell(pDescriptor->mpViewShell.get());
@@ -310,7 +310,7 @@ std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::CreateView (
if (xWindow.is())
{
xWindow->addWindowListener(pDescriptor->mpWrapper);
- if (pDescriptor->mpViewShell != 0)
+ if (pDescriptor->mpViewShell != nullptr)
{
pDescriptor->mpViewShell->Resize();
}
@@ -493,7 +493,7 @@ std::shared_ptr<BasicViewFactory::ViewDescriptor> BasicViewFactory::GetViewFromC
// When the view has been found then relocate it to the given pane and
// remove it from the cache.
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
bool bRelocationSuccessfull (false);
Reference<XRelocatableResource> xResource (pDescriptor->mxView, UNO_QUERY);
diff --git a/sd/source/ui/framework/factories/ChildWindowPane.cxx b/sd/source/ui/framework/factories/ChildWindowPane.cxx
index 240c1686323a..11354816aa1d 100644
--- a/sd/source/ui/framework/factories/ChildWindowPane.cxx
+++ b/sd/source/ui/framework/factories/ChildWindowPane.cxx
@@ -50,7 +50,7 @@ ChildWindowPane::ChildWindowPane (
mrViewShellBase.GetViewShellManager()->ActivateShell(mpShell.get());
SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame != NULL)
+ if (pViewFrame != nullptr)
{
if (mrViewShellBase.IsActive())
{
@@ -95,14 +95,14 @@ ChildWindowPane::~ChildWindowPane()
void ChildWindowPane::Hide()
{
SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame != NULL)
+ if (pViewFrame != nullptr)
if (pViewFrame->KnowsChildWindow(mnChildWindowId))
if (pViewFrame->HasChildWindow(mnChildWindowId))
pViewFrame->SetChildWindow(mnChildWindowId, false);
// Release the window because when the child window is shown again it
// may use a different window.
- mxWindow = NULL;
+ mxWindow = nullptr;
}
void SAL_CALL ChildWindowPane::disposing()
@@ -135,12 +135,12 @@ vcl::Window* ChildWindowPane::GetWindow()
// visible to early then some layouting seems to be made twice or at
// an inconvenient time and the overall process of initializing the
// Impress takes longer.
- if ( ! mbHasBeenActivated && mpShell.get()!=NULL && ! mpShell->IsActive())
+ if ( ! mbHasBeenActivated && mpShell.get()!=nullptr && ! mpShell->IsActive())
break;
mbHasBeenActivated = true;
SfxViewFrame* pViewFrame = mrViewShellBase.GetViewFrame();
- if (pViewFrame == NULL)
+ if (pViewFrame == nullptr)
break;
// The view frame has to know the child window. This can be the
// case, when for example the document is in read-only mode: the
@@ -150,7 +150,7 @@ vcl::Window* ChildWindowPane::GetWindow()
pViewFrame->SetChildWindow(mnChildWindowId, true);
SfxChildWindow* pChildWindow = pViewFrame->GetChildWindow(mnChildWindowId);
- if (pChildWindow == NULL)
+ if (pChildWindow == nullptr)
if (pViewFrame->HasChildWindow(mnChildWindowId))
{
// The child window is not yet visible. Ask the view frame
@@ -161,14 +161,14 @@ vcl::Window* ChildWindowPane::GetWindow()
}
// When the child window is still not visible then we have to try later.
- if (pChildWindow == NULL)
+ if (pChildWindow == nullptr)
break;
// From the child window get the docking window and from that the
// content window that is the container for the actual content.
PaneDockingWindow* pDockingWindow = dynamic_cast<PaneDockingWindow*>(
pChildWindow->GetWindow());
- if (pDockingWindow == NULL)
+ if (pDockingWindow == nullptr)
break;
// At last, we have access to the window and its UNO wrapper.
@@ -213,8 +213,8 @@ void SAL_CALL ChildWindowPane::disposing (const lang::EventObject& rEvent)
{
// The window is gone but the pane remains alive. The next call to
// GetWindow() may create the window anew.
- mxWindow = NULL;
- mpWindow = NULL;
+ mxWindow = nullptr;
+ mpWindow = nullptr;
}
}
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx
index fdb0c37b77c3..ab98530f1e20 100644
--- a/sd/source/ui/framework/factories/FullScreenPane.cxx
+++ b/sd/source/ui/framework/factories/FullScreenPane.cxx
@@ -41,10 +41,10 @@ FullScreenPane::FullScreenPane (
const Reference<XComponentContext>& rxComponentContext,
const Reference<XResourceId>& rxPaneId,
const vcl::Window* pViewShellWindow)
- : FrameWindowPane(rxPaneId,NULL),
+ : FrameWindowPane(rxPaneId,nullptr),
mxComponentContext(rxComponentContext)
{
- vcl::Window* pParent = NULL;
+ vcl::Window* pParent = nullptr;
mpWorkWindow.reset(VclPtr<WorkWindow>::Create(
pParent,
@@ -56,7 +56,7 @@ FullScreenPane::FullScreenPane (
sal_Int32 nScreenNumber = 1;
ExtractArguments(rxPaneId, nScreenNumber);
- if (mpWorkWindow.get() == NULL)
+ if (mpWorkWindow.get() == nullptr)
return;
// Create a new top-leve window that is displayed full screen.
@@ -76,7 +76,7 @@ FullScreenPane::FullScreenPane (
// Set title and icon of the new window to those of the current window
// of the view shell.
- if (pViewShellWindow != NULL)
+ if (pViewShellWindow != nullptr)
{
const SystemWindow* pSystemWindow = pViewShellWindow->GetSystemWindow();
mpWorkWindow->SetText(pSystemWindow->GetText());
@@ -105,7 +105,7 @@ void SAL_CALL FullScreenPane::disposing()
{
mpWindow.disposeAndClear();
- if (mpWorkWindow.get() != NULL)
+ if (mpWorkWindow.get() != nullptr)
{
Link<VclWindowEvent&,void> aWindowEventHandler (LINK(this, FullScreenPane, WindowEventHandler));
mpWorkWindow->RemoveEventListener(aWindowEventHandler);
@@ -147,7 +147,7 @@ Reference<css::accessibility::XAccessible> SAL_CALL FullScreenPane::getAccessibl
if (mpWorkWindow != nullptr)
return mpWorkWindow->GetAccessible(false);
else
- return NULL;
+ return nullptr;
}
void SAL_CALL FullScreenPane::setAccessible (
@@ -163,7 +163,7 @@ void SAL_CALL FullScreenPane::setAccessible (
{
vcl::Window* pParentWindow = mpWindow->GetParent();
Reference<css::accessibility::XAccessible> xAccessibleParent;
- if (pParentWindow != NULL)
+ if (pParentWindow != nullptr)
xAccessibleParent = pParentWindow->GetAccessible();
Sequence<Any> aArguments (1);
aArguments[0] = Any(xAccessibleParent);
@@ -194,7 +194,7 @@ Reference<rendering::XCanvas> FullScreenPane::CreateCanvas()
throw (RuntimeException)
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow(mxWindow);
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
Sequence<Any> aArg (5);
diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx
index 8d369d9e1073..20fec54b9f64 100644
--- a/sd/source/ui/framework/factories/Pane.cxx
+++ b/sd/source/ui/framework/factories/Pane.cxx
@@ -49,8 +49,8 @@ Pane::~Pane()
void Pane::disposing()
{
- mxWindow = NULL;
- mpWindow = NULL;
+ mxWindow = nullptr;
+ mpWindow = nullptr;
}
vcl::Window* Pane::GetWindow()
@@ -58,7 +58,7 @@ vcl::Window* Pane::GetWindow()
if (mxWindow.is())
return mpWindow;
else
- return NULL;
+ return nullptr;
}
//----- XPane -----------------------------------------------------------------
@@ -91,7 +91,7 @@ sal_Bool SAL_CALL Pane::isVisible()
ThrowIfDisposed();
const vcl::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
return pWindow->IsVisible();
else
return false;
@@ -103,7 +103,7 @@ void SAL_CALL Pane::setVisible (sal_Bool bIsVisible)
ThrowIfDisposed();
vcl::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
pWindow->Show(bIsVisible);
}
@@ -112,10 +112,10 @@ Reference<css::accessibility::XAccessible> SAL_CALL Pane::getAccessible()
{
ThrowIfDisposed();
vcl::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
return pWindow->GetAccessible(false);
else
- return NULL;
+ return nullptr;
}
void SAL_CALL Pane::setAccessible (
@@ -124,7 +124,7 @@ void SAL_CALL Pane::setAccessible (
{
ThrowIfDisposed();
vcl::Window* pWindow = GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
pWindow->SetAccessible(rxAccessible);
}
@@ -179,7 +179,7 @@ Reference<rendering::XCanvas> Pane::CreateCanvas()
{
::cppcanvas::SpriteCanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createSpriteCanvas(*mpWindow));
- if (pCanvas.get() != NULL)
+ if (pCanvas.get() != nullptr)
xCanvas.set(pCanvas->getUNOSpriteCanvas(), UNO_QUERY);
}
diff --git a/sd/source/ui/framework/factories/PresentationFactory.cxx b/sd/source/ui/framework/factories/PresentationFactory.cxx
index 16e168dde94e..47ca4653ba6f 100644
--- a/sd/source/ui/framework/factories/PresentationFactory.cxx
+++ b/sd/source/ui/framework/factories/PresentationFactory.cxx
@@ -144,10 +144,10 @@ void SAL_CALL PresentationFactory::releaseResource (
{
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
{
ViewShellBase* pBase = pController->GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
SlideShow::Stop( *pBase );
}
}
diff --git a/sd/source/ui/framework/factories/ViewShellWrapper.cxx b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
index 41bdda7a8de7..079f4bbf3e7a 100644
--- a/sd/source/ui/framework/factories/ViewShellWrapper.cxx
+++ b/sd/source/ui/framework/factories/ViewShellWrapper.cxx
@@ -206,12 +206,12 @@ sal_Bool SAL_CALL ViewShellWrapper::relocateToAnchor (
Reference<awt::XWindow> xWindow (mxWindow);
if (xWindow.is())
xWindow->removeWindowListener(this);
- mxWindow = NULL;
+ mxWindow = nullptr;
- if (mpViewShell.get() != NULL)
+ if (mpViewShell.get() != nullptr)
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow(xPane->getWindow());
- if (pWindow != NULL && mpViewShell->RelocateToParentWindow(pWindow))
+ if (pWindow != nullptr && mpViewShell->RelocateToParentWindow(pWindow))
{
bResult = true;
@@ -262,7 +262,7 @@ void SAL_CALL ViewShellWrapper::windowResized (const awt::WindowEvent& rEvent)
{
(void)rEvent;
ViewShell* pViewShell (mpViewShell.get());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->Resize();
}
@@ -277,7 +277,7 @@ void SAL_CALL ViewShellWrapper::windowShown (const lang::EventObject& rEvent)
{
(void)rEvent;
ViewShell* pViewShell (mpViewShell.get());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->Resize();
}
@@ -293,7 +293,7 @@ void SAL_CALL ViewShellWrapper::disposing (const lang::EventObject& rEvent)
throw (RuntimeException, std::exception)
{
if (rEvent.Source == mxWindow)
- mxWindow = NULL;
+ mxWindow = nullptr;
}
} } // end of namespace sd::framework
diff --git a/sd/source/ui/framework/module/CenterViewFocusModule.cxx b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
index eb4ae58f630b..5e7f1e8d9421 100644
--- a/sd/source/ui/framework/module/CenterViewFocusModule.cxx
+++ b/sd/source/ui/framework/module/CenterViewFocusModule.cxx
@@ -48,7 +48,7 @@ CenterViewFocusModule::CenterViewFocusModule (Reference<frame::XController>& rxC
: CenterViewFocusModuleInterfaceBase(MutexOwner::maMutex),
mbValid(false),
mxConfigurationController(),
- mpBase(NULL),
+ mpBase(nullptr),
mbNewViewCreated(false)
{
Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY);
@@ -62,12 +62,12 @@ CenterViewFocusModule::CenterViewFocusModule (Reference<frame::XController>& rxC
{
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
mpBase = pController->GetViewShellBase();
}
// Check, if all required objects do exist.
- if (mxConfigurationController.is() && mpBase!=NULL)
+ if (mxConfigurationController.is() && mpBase!=nullptr)
{
mbValid = true;
}
@@ -96,8 +96,8 @@ void SAL_CALL CenterViewFocusModule::disposing()
mxConfigurationController->removeConfigurationChangeListener(this);
mbValid = false;
- mxConfigurationController = NULL;
- mpBase = NULL;
+ mxConfigurationController = nullptr;
+ mpBase = nullptr;
}
void SAL_CALL CenterViewFocusModule::notifyConfigurationChange (
@@ -135,14 +135,14 @@ void CenterViewFocusModule::HandleNewView (
if (xViewIds.getLength() > 0)
xView.set( mxConfigurationController->getResource(xViewIds[0]),UNO_QUERY);
Reference<lang::XUnoTunnel> xTunnel (xView, UNO_QUERY);
- if (xTunnel.is() && mpBase!=NULL)
+ if (xTunnel.is() && mpBase!=nullptr)
{
ViewShellWrapper* pViewShellWrapper = reinterpret_cast<ViewShellWrapper*>(
xTunnel->getSomething(ViewShellWrapper::getUnoTunnelId()));
- if (pViewShellWrapper != NULL)
+ if (pViewShellWrapper != nullptr)
{
std::shared_ptr<ViewShell> pViewShell = pViewShellWrapper->GetViewShell();
- if (pViewShell.get() != NULL)
+ if (pViewShell.get() != nullptr)
mpBase->GetViewShellManager()->MoveToTop(*pViewShell);
}
}
@@ -157,8 +157,8 @@ void SAL_CALL CenterViewFocusModule::disposing (
if (rEvent.Source == mxConfigurationController)
{
mbValid = false;
- mxConfigurationController = NULL;
- mpBase = NULL;
+ mxConfigurationController = nullptr;
+ mpBase = nullptr;
}
}
diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx
index a3255c9fd763..b3cb41442d4a 100644
--- a/sd/source/ui/framework/module/ResourceManager.cxx
+++ b/sd/source/ui/framework/module/ResourceManager.cxx
@@ -105,7 +105,7 @@ void SAL_CALL ResourceManager::disposing()
if (mxConfigurationController.is())
{
mxConfigurationController->removeConfigurationChangeListener(this);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
}
@@ -235,7 +235,7 @@ void SAL_CALL ResourceManager::disposing (
{
SaveResourceState();
// Without the configuration controller this class can do nothing.
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
dispose();
}
}
diff --git a/sd/source/ui/framework/module/ShellStackGuard.cxx b/sd/source/ui/framework/module/ShellStackGuard.cxx
index bfcbdf5e7f24..9e64562c1d57 100644
--- a/sd/source/ui/framework/module/ShellStackGuard.cxx
+++ b/sd/source/ui/framework/module/ShellStackGuard.cxx
@@ -41,7 +41,7 @@ namespace sd { namespace framework {
ShellStackGuard::ShellStackGuard (Reference<frame::XController>& rxController)
: ShellStackGuardInterfaceBase(m_aMutex),
mxConfigurationController(),
- mpBase(NULL),
+ mpBase(nullptr),
mpUpdateLock(),
maPrinterPollingIdle()
{
@@ -56,7 +56,7 @@ ShellStackGuard::ShellStackGuard (Reference<frame::XController>& rxController)
{
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
mpBase = pController->GetViewShellBase();
}
}
@@ -85,8 +85,8 @@ void SAL_CALL ShellStackGuard::disposing()
if (mxConfigurationController.is())
mxConfigurationController->removeConfigurationChangeListener(this);
- mxConfigurationController = NULL;
- mpBase = NULL;
+ mxConfigurationController = nullptr;
+ mpBase = nullptr;
}
void SAL_CALL ShellStackGuard::notifyConfigurationChange (
@@ -95,7 +95,7 @@ void SAL_CALL ShellStackGuard::notifyConfigurationChange (
{
if (rEvent.Type.equals(FrameworkHelper::msConfigurationUpdateStartEvent))
{
- if (mpUpdateLock.get() == NULL && IsPrinting())
+ if (mpUpdateLock.get() == nullptr && IsPrinting())
{
// Prevent configuration updates while the printer is printing.
mpUpdateLock.reset(new ConfigurationController::Lock(mxConfigurationController));
@@ -113,8 +113,8 @@ void SAL_CALL ShellStackGuard::disposing (
if (mxConfigurationController.is())
if (rEvent.Source == mxConfigurationController)
{
- mxConfigurationController = NULL;
- mpBase = NULL;
+ mxConfigurationController = nullptr;
+ mpBase = nullptr;
}
}
@@ -125,7 +125,7 @@ IMPL_LINK_TYPED(ShellStackGuard, TimeoutHandler, Idle*, pIdle, void)
#else
(void)pIdle;
#endif
- if (mpUpdateLock.get() != NULL)
+ if (mpUpdateLock.get() != nullptr)
{
if ( ! IsPrinting())
{
@@ -142,10 +142,10 @@ IMPL_LINK_TYPED(ShellStackGuard, TimeoutHandler, Idle*, pIdle, void)
bool ShellStackGuard::IsPrinting() const
{
- if (mpBase != NULL)
+ if (mpBase != nullptr)
{
SfxPrinter* pPrinter = mpBase->GetPrinter();
- if (pPrinter != NULL
+ if (pPrinter != nullptr
&& pPrinter->IsPrinting())
{
return true;
diff --git a/sd/source/ui/framework/module/SlideSorterModule.cxx b/sd/source/ui/framework/module/SlideSorterModule.cxx
index 93a2420d22a4..fcf643711d62 100644
--- a/sd/source/ui/framework/module/SlideSorterModule.cxx
+++ b/sd/source/ui/framework/module/SlideSorterModule.cxx
@@ -49,7 +49,7 @@ SlideSorterModule::SlideSorterModule (
{
if (mxConfigurationController.is())
{
- UpdateViewTabBar(NULL);
+ UpdateViewTabBar(nullptr);
if (SvtSlideSorterBarOptions().GetVisibleImpressView())
AddActiveMainView(FrameworkHelper::msImpressViewURL);
@@ -105,7 +105,7 @@ void SAL_CALL SlideSorterModule::notifyConfigurationChange (
{
// Update the view tab bar because the view in the center pane
// has changed.
- UpdateViewTabBar(NULL);
+ UpdateViewTabBar(nullptr);
}
}
else
diff --git a/sd/source/ui/framework/module/ToolBarModule.cxx b/sd/source/ui/framework/module/ToolBarModule.cxx
index 3e665834a57a..b88cd32e2b92 100644
--- a/sd/source/ui/framework/module/ToolBarModule.cxx
+++ b/sd/source/ui/framework/module/ToolBarModule.cxx
@@ -44,7 +44,7 @@ ToolBarModule::ToolBarModule (
const Reference<frame::XController>& rxController)
: ToolBarModuleInterfaceBase(m_aMutex),
mxConfigurationController(),
- mpBase(NULL),
+ mpBase(nullptr),
mpToolBarManagerLock(),
mbMainViewSwitchUpdatePending(false)
{
@@ -54,7 +54,7 @@ ToolBarModule::ToolBarModule (
{
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
mpBase = pController->GetViewShellBase();
}
@@ -93,7 +93,7 @@ void SAL_CALL ToolBarModule::disposing()
if (mxConfigurationController.is())
mxConfigurationController->removeConfigurationChangeListener(this);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
void SAL_CALL ToolBarModule::notifyConfigurationChange (
@@ -139,7 +139,7 @@ void ToolBarModule::HandleUpdateStart()
// well. This way the ToolBarManager can optimize the releasing of
// locks and arranging of updates of both tool bars and the view shell
// stack.
- if (mpBase != NULL)
+ if (mpBase != nullptr)
{
std::shared_ptr<ToolBarManager> pToolBarManager (mpBase->GetToolBarManager());
mpToolBarManagerLock.reset(new ToolBarManager::UpdateLock(pToolBarManager));
@@ -161,7 +161,7 @@ void ToolBarModule::HandleUpdateEnd()
FrameworkHelper::Instance(*mpBase));
ViewShell* pViewShell
= pFrameworkHelper->GetViewShell(FrameworkHelper::msCenterPaneURL).get();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
pToolBarManager->MainViewShellChanged(*pViewShell);
pToolBarManager->SelectionHasChanged(
@@ -190,7 +190,7 @@ void SAL_CALL ToolBarModule::disposing (const lang::EventObject& rEvent)
&& rEvent.Source == mxConfigurationController)
{
// Without the configuration controller this class can do nothing.
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
dispose();
}
}
diff --git a/sd/source/ui/framework/module/ViewTabBarModule.cxx b/sd/source/ui/framework/module/ViewTabBarModule.cxx
index ca564db51c4f..cfa0b3155de5 100644
--- a/sd/source/ui/framework/module/ViewTabBarModule.cxx
+++ b/sd/source/ui/framework/module/ViewTabBarModule.cxx
@@ -68,7 +68,7 @@ ViewTabBarModule::ViewTabBarModule (
FrameworkHelper::msResourceDeactivationRequestEvent,
makeAny(ResourceDeactivationRequestEvent));
- UpdateViewTabBar(NULL);
+ UpdateViewTabBar(nullptr);
mxConfigurationController->addConfigurationChangeListener(
this,
FrameworkHelper::msResourceActivationEvent,
@@ -86,7 +86,7 @@ void SAL_CALL ViewTabBarModule::disposing()
if (mxConfigurationController.is())
mxConfigurationController->removeConfigurationChangeListener(this);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
void SAL_CALL ViewTabBarModule::notifyConfigurationChange (
@@ -132,7 +132,7 @@ void SAL_CALL ViewTabBarModule::disposing (
&& rEvent.Source == mxConfigurationController)
{
// Without the configuration controller this class can do nothing.
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
disposing();
}
}
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 0cb11c0899b7..564f75605f4c 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -264,7 +264,7 @@ namespace
{
DBG_UNHANDLED_EXCEPTION();
}
- return NULL;
+ return nullptr;
}
}
@@ -398,7 +398,7 @@ void FrameworkHelper::Dispose()
{
if (mxDisposeListener.is())
mxDisposeListener->dispose();
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
bool FrameworkHelper::IsValid()
@@ -425,7 +425,7 @@ Reference<XView> FrameworkHelper::GetView (const Reference<XResourceId>& rxPaneO
Reference<XView> xView;
if ( ! rxPaneOrViewId.is() || ! mxConfigurationController.is())
- return NULL;
+ return nullptr;
try
{
@@ -471,11 +471,11 @@ Reference<XResourceId> FrameworkHelper::RequestView (
catch (lang::DisposedException&)
{
Dispose();
- xViewId = NULL;
+ xViewId = nullptr;
}
catch (RuntimeException&)
{
- xViewId = NULL;
+ xViewId = nullptr;
}
return xViewId;
@@ -591,7 +591,7 @@ void FrameworkHelper::HandleModeChangeSlot (
// has changed.
DrawViewShell* pDrawViewShell
= dynamic_cast<DrawViewShell*>(pCenterViewShell.get());
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
{
pCenterViewShell->Broadcast (
ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_START));
@@ -702,7 +702,7 @@ void FrameworkHelper::RunOnEvent(
void FrameworkHelper::disposing (const lang::EventObject& rEventObject)
{
if (rEventObject.Source == mxConfigurationController)
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
void FrameworkHelper::UpdateConfiguration()
@@ -797,7 +797,7 @@ void SAL_CALL FrameworkHelper::DisposeListener::disposing()
void SAL_CALL FrameworkHelper::DisposeListener::disposing (const lang::EventObject& rEventObject)
throw(RuntimeException, std::exception)
{
- if (mpHelper.get() != NULL)
+ if (mpHelper.get() != nullptr)
mpHelper->disposing(rEventObject);
}
@@ -842,7 +842,7 @@ CallbackCaller::CallbackCaller (
// called.
// Call the callback now and tell him that the event it is
// waiting for was not sent.
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
maCallback(false);
}
}
@@ -864,7 +864,7 @@ void CallbackCaller::disposing()
if (mxConfigurationController.is())
{
Reference<XConfigurationController> xCC (mxConfigurationController);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
xCC->removeConfigurationChangeListener(this);
}
}
@@ -879,7 +879,7 @@ void SAL_CALL CallbackCaller::disposing (const lang::EventObject& rEvent)
{
if (rEvent.Source == mxConfigurationController)
{
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
maCallback(false);
}
}
@@ -896,7 +896,7 @@ void SAL_CALL CallbackCaller::notifyConfigurationChange (
// Reset the reference to the configuration controller so that
// dispose() will not try to remove the listener a second time.
Reference<XConfigurationController> xCC (mxConfigurationController);
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
// Removing this object from the controller may very likely lead
// to its destruction, so no calls after that.
@@ -951,7 +951,7 @@ void LifetimeController::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rH
{
(void)rBroadcaster;
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != NULL && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (pSimpleHint != nullptr && pSimpleHint->GetId() == SFX_HINT_DYING)
{
mbListeningToViewShellBase = false;
Update();
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 5c351f5dcbc8..ece3c890f0b2 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -61,10 +61,10 @@ void FuArea::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( aNewAttr );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( NULL,
+ std::unique_ptr<AbstractSvxAreaTabDialog> pDlg(pFact ? pFact->CreateSvxAreaTabDialog( nullptr,
&aNewAttr,
mpDoc,
- true) : 0);
+ true) : nullptr);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
mpView->SetAttributes (*(pDlg->GetOutputItemSet ()));
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 1beffa4aa6e2..d8686f1e0e71 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -99,8 +99,8 @@ void FuBullet::DoExecute( SfxRequest& rReq )
void FuBullet::InsertFormattingMark( sal_Unicode cMark )
{
- OutlinerView* pOV = NULL;
- ::Outliner* pOL = NULL;
+ OutlinerView* pOV = nullptr;
+ ::Outliner* pOL = nullptr;
// depending on ViewShell set Outliner and OutlinerView
if( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr)
@@ -151,7 +151,7 @@ void FuBullet::InsertFormattingMark( sal_Unicode cMark )
void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
{
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), false, &pItem);
@@ -160,7 +160,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
if ( pItem )
{
aChars = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( mpDoc->GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
@@ -192,7 +192,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreateSfxDialog( &mpView->GetViewShell()->GetViewFrame()->GetWindow(), aSet,
mpView->GetViewShell()->GetViewFrame()->GetFrame().GetFrameInterface(),
- RID_SVXDLG_CHARMAP ) : 0);
+ RID_SVXDLG_CHARMAP ) : nullptr);
if( !pDlg )
return;
@@ -219,8 +219,8 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
if (!aChars.isEmpty())
{
- OutlinerView* pOV = NULL;
- ::Outliner* pOL = NULL;
+ OutlinerView* pOV = nullptr;
+ ::Outliner* pOL = nullptr;
// determine depending on ViewShell Outliner and OutlinerView
if(mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr)
@@ -299,8 +299,8 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFra
SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWNBSP ) ||
SfxItemState::DEFAULT == rSet.GetItemState( SID_INSERT_ZWSP ))
{
- ::sd::View* pView = pViewShell ? pViewShell->GetView() : 0;
- OutlinerView* pOLV = pView ? pView->GetTextEditOutlinerView() : 0;
+ ::sd::View* pView = pViewShell ? pViewShell->GetView() : nullptr;
+ OutlinerView* pOLV = pView ? pView->GetTextEditOutlinerView() : nullptr;
const bool bTextEdit = pOLV;
@@ -314,7 +314,7 @@ void FuBullet::GetSlotState( SfxItemSet& rSet, ViewShell* pViewShell, SfxViewFra
rSet.DisableItem(FN_INSERT_HARD_SPACE);
}
- if( !bTextEdit && (dynamic_cast<OutlineViewShell*>( pViewShell ) == 0) )
+ if( !bTextEdit && (dynamic_cast<OutlineViewShell*>( pViewShell ) == nullptr) )
rSet.DisableItem(SID_CHARMAP);
if(!bTextEdit || !bCtlEnabled )
diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx
index 705cb166ef51..d94754d9f351 100644
--- a/sd/source/ui/func/fuchar.cxx
+++ b/sd/source/ui/func/fuchar.cxx
@@ -96,7 +96,7 @@ void FuChar::DoExecute( SfxRequest& rReq )
}
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog( NULL, &aNewAttr, mpDoc->GetDocSh() ) : 0);
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdTabCharDialog( nullptr, &aNewAttr, mpDoc->GetDocSh() ) : nullptr);
sal_uInt16 nResult = RET_CANCEL;
if( pDlg )
{
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx
index 6ab57c6b234e..715464bec13d 100644
--- a/sd/source/ui/func/fucon3d.cxx
+++ b/sd/source/ui/func/fucon3d.cxx
@@ -83,7 +83,7 @@ void FuConstruct3dObject::DoExecute( SfxRequest& rReq )
E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape()
{
- E3dCompoundObject* p3DObj = NULL;
+ E3dCompoundObject* p3DObj = nullptr;
switch (nSlotId)
{
@@ -310,7 +310,7 @@ bool FuConstruct3dObject::MouseButtonDown(const MouseEvent& rMEvt)
mpWindow->CaptureMouse();
sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
- E3dCompoundObject* p3DObj = NULL;
+ E3dCompoundObject* p3DObj = nullptr;
WaitObject aWait( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) );
diff --git a/sd/source/ui/func/fuconarc.cxx b/sd/source/ui/func/fuconarc.cxx
index 3360b3efa4a5..c491b4b1c62d 100644
--- a/sd/source/ui/func/fuconarc.cxx
+++ b/sd/source/ui/func/fuconarc.cxx
@@ -223,7 +223,7 @@ SdrObject* FuConstructArc::CreateDefaultObject(const sal_uInt16 nID, const Recta
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if(pObj)
{
diff --git a/sd/source/ui/func/fuconbez.cxx b/sd/source/ui/func/fuconbez.cxx
index fb7a29e0fe8a..d5f7a374ba91 100644
--- a/sd/source/ui/func/fuconbez.cxx
+++ b/sd/source/ui/func/fuconbez.cxx
@@ -78,7 +78,7 @@ void FuConstructBezierPolygon::DoExecute( SfxRequest& rReq )
const SfxItemSet* pArgs = rReq.GetArgs();
if( pArgs )
{
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == pArgs->GetItemState( SID_ADD_MOTION_PATH, true, &pPoolItem ) )
maTargets = static_cast<const SfxUnoAnyItem*>( pPoolItem )->GetValue();
}
@@ -177,7 +177,7 @@ bool FuConstructBezierPolygon::MouseButtonUp(const MouseEvent& rMEvt )
if( bCreated && maTargets.hasValue() )
{
SdrPathObj* pPathObj = dynamic_cast< SdrPathObj* >( mpView->GetSdrPageView()->GetObjList()->GetObj( nCount ) );
- SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : 0 );
+ SdPage* pPage = dynamic_cast< SdPage* >( pPathObj ? pPathObj->GetPage() : nullptr );
if( pPage )
{
std::shared_ptr< sd::MainSequence > pMainSequence( pPage->getMainSequence() );
@@ -325,7 +325,7 @@ SdrObject* FuConstructBezierPolygon::CreateDefaultObject(const sal_uInt16 nID, c
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if(pObj)
{
diff --git a/sd/source/ui/func/fuconcs.cxx b/sd/source/ui/func/fuconcs.cxx
index b7d6c754890c..e2fcf2b392e6 100644
--- a/sd/source/ui/func/fuconcs.cxx
+++ b/sd/source/ui/func/fuconcs.cxx
@@ -257,7 +257,7 @@ SdrObject* FuConstructCustomShape::CreateDefaultObject(const sal_uInt16, const R
{
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if( pObj )
{
diff --git a/sd/source/ui/func/fuconnct.cxx b/sd/source/ui/func/fuconnct.cxx
index 494fc75ecbec..1b7fa4661a94 100644
--- a/sd/source/ui/func/fuconnct.cxx
+++ b/sd/source/ui/func/fuconnct.cxx
@@ -58,7 +58,7 @@ void FuConnectionDlg::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : 0);
+ std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_CONNECTION) : nullptr);
if( pDlg.get() && (pDlg->Execute() == RET_OK) )
{
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 4918f20ac6a2..3454c86afa1f 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -783,7 +783,7 @@ SdrObject* FuConstructRectangle::CreateDefaultObject(const sal_uInt16 nID, const
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if(pObj)
{
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index b170b6684273..71a356b46a41 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -86,7 +86,7 @@ bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
SdrHdl* pHdl = mpView->PickHandle(aMDPos);
- if ( pHdl != NULL || mpView->IsMarkedHit(aMDPos, nHitLog) )
+ if ( pHdl != nullptr || mpView->IsMarkedHit(aMDPos, nHitLog) )
{
sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
@@ -186,7 +186,7 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
{
// toggle between selection and rotation
- SdrObject* pSingleObj = NULL;
+ SdrObject* pSingleObj = nullptr;
if (mpView->GetMarkedObjectList().GetMarkCount()==1)
{
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index af015b9a923b..cf7104d299ad 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -154,7 +154,7 @@ SdrObject* FuConstructUnoControl::CreateDefaultObject(const sal_uInt16, const Re
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if(pObj)
{
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index e7cd23f6d4b0..b57421045fda 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -82,7 +82,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
// indicate color attribute
SfxItemSet aAttr( mpDoc->GetPool() );
mpView->GetAttributes( aAttr );
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
if( SfxItemState::SET == aAttr.GetItemState( XATTR_FILLSTYLE, true, &pPoolItem ) )
{
@@ -102,7 +102,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
if( pFact )
{
- std::unique_ptr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorList(), mpView ));
+ std::unique_ptr<AbstractCopyDlg> pDlg(pFact->CreateCopyDlg(nullptr, aSet, mpDoc->GetColorList(), mpView ));
if (!pDlg)
return;
@@ -131,7 +131,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
sal_uInt16 nNumber = 0;
Color aStartColor, aEndColor;
bool bColor = false;
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
// Count
if( pArgs && SfxItemState::SET == pArgs->GetItemState( ATTR_COPY_NUMBER, true, &pPoolItem ) )
@@ -184,7 +184,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
const SdrMarkList aMarkList( mpView->GetMarkedObjectList() );
const size_t nMarkCount = aMarkList.GetMarkCount();
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
// calculate number of possible copies
aRect = mpView->GetAllMarkedRect();
diff --git a/sd/source/ui/func/fucushow.cxx b/sd/source/ui/func/fucushow.cxx
index 78548c3f3fe1..e30e864be45a 100644
--- a/sd/source/ui/func/fucushow.cxx
+++ b/sd/source/ui/func/fucushow.cxx
@@ -57,7 +57,7 @@ rtl::Reference<FuPoor> FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window
void FuCustomShowDlg::DoExecute( SfxRequest& )
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0);
+ std::unique_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg( nullptr, *mpDoc ) : nullptr);
if( pDlg )
{
sal_uInt16 nRet = pDlg->Execute();
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 1655822dee2b..41921ea7e07d 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -214,14 +214,14 @@ bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
DoModifiers(rMEvt, bSnapModPressed);
- SdrPageView* pPV = 0;
+ SdrPageView* pPV = nullptr;
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
// look only for HelpLines when they are visible (!)
bool bHelpLine(false);
if(mpView->IsHlplVisible())
bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV);
- bool bHitHdl = (mpView->PickHandle(aMDPos) != NULL);
+ bool bHitHdl = (mpView->PickHandle(aMDPos) != nullptr);
if ( bHelpLine
&& !mpView->IsCreateObj()
@@ -369,11 +369,11 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
avoid the restoration of an no more existing object in
::SelectionHasChanged after deletion. All other OLE
objects are not affected. */
- OSL_ASSERT (mpViewShell->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewShell->GetViewShell()!=nullptr);
Client* pIPClient = static_cast<Client*>(
mpViewShell->GetViewShell()->GetIPClient());
if (pIPClient && pIPClient->IsObjectInPlaceActive())
- pIPClient->SetSdrGrafObj(NULL);
+ pIPClient->SetSdrGrafObj(nullptr);
// wait-mousepointer while deleting object
WaitObject aWait( static_cast<vcl::Window*>(mpViewShell->GetActiveWindow()) );
@@ -529,7 +529,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
{
// pipette mode
SfxChildWindow* pWnd = mpViewShell->GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId());
- SvxBmpMask* pMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
+ SvxBmpMask* pMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
if (pMask && pMask->IsEyedropping())
{
bDefPointer = false;
@@ -538,8 +538,8 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
}
else if (!mpView->IsAction())
{
- SdrObject* pObj = NULL;
- SdrPageView* pPV = NULL;
+ SdrObject* pObj = nullptr;
+ SdrPageView* pPV = nullptr;
SdrViewEvent aVEvt;
SdrHitKind eHit = SDRHIT_NONE;
SdrDragMode eDragMode = mpView->GetDragMode();
@@ -582,7 +582,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt)
nSdrObjKind != OBJ_OUTLINETEXT &&
aVEvt.pObj->IsEmptyPresObj() )
{
- pObj = NULL;
+ pObj = nullptr;
bDefPointer = false;
mpWindow->SetPointer(Pointer(PointerStyle::Arrow));
}
@@ -771,7 +771,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
SdrObject* pObj = aVEvt.pObj;
- if (eHit != SDRHIT_NONE && pObj != NULL)
+ if (eHit != SDRHIT_NONE && pObj != nullptr)
{
Point aPosPixel = rHEvt.GetMousePosPixel();
@@ -780,7 +780,7 @@ bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
if (!bReturn && (dynamic_cast< const SdrObjGroup *>( pObj ) != nullptr || dynamic_cast< const E3dPolyScene* >(pObj) != nullptr))
{
// take a glance into the group
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(aPosPixel)));
diff --git a/sd/source/ui/func/fudspord.cxx b/sd/source/ui/func/fudspord.cxx
index 3f4f3a11b218..13bea87b2d3e 100644
--- a/sd/source/ui/func/fudspord.cxx
+++ b/sd/source/ui/func/fudspord.cxx
@@ -35,8 +35,8 @@ TYPEINIT1( FuDisplayOrder, FuPoor );
FuDisplayOrder::FuDisplayOrder( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq)
: FuPoor(pViewSh, pWin, pView, pDoc, rReq)
-, mpRefObj(NULL)
-, mpOverlay(0L)
+, mpRefObj(nullptr)
+, mpOverlay(nullptr)
{
}
@@ -50,7 +50,7 @@ void FuDisplayOrder::implClearOverlay()
if(mpOverlay)
{
delete mpOverlay;
- mpOverlay = 0L;
+ mpOverlay = nullptr;
}
}
@@ -90,7 +90,7 @@ bool FuDisplayOrder::MouseMove(const MouseEvent& rMEvt)
}
else
{
- mpRefObj = NULL;
+ mpRefObj = nullptr;
implClearOverlay();
}
@@ -102,7 +102,7 @@ bool FuDisplayOrder::MouseButtonUp(const MouseEvent& rMEvt)
// remember button state for creation of own MouseEvents
SetMouseButtonCode(rMEvt.GetButtons());
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
if ( mpView->PickObj(aPnt, mpView->getHitTolLog(), mpRefObj, pPV) )
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index bfa94a26c9a6..28340fa8ccbf 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -109,7 +109,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
if (mpView->IsGluePointMarked(aVEvt.pObj, aVEvt.nGlueId) && rMEvt.IsShift())
{
mpView->UnmarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, aVEvt.pPV);
- pHdl = NULL;
+ pHdl = nullptr;
}
if (pHdl)
@@ -134,7 +134,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
{
// move object
- mpView->BegDragObj(aMDPos, nullptr, NULL, nDrgLog);
+ mpView->BegDragObj(aMDPos, nullptr, nullptr, nDrgLog);
}
else if (eHit == SDRHIT_GLUEPOINT)
{
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 0f54f3371037..96af35b7de46 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -72,7 +72,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
mpView->SdrEndTextEdit();
// find selected page (only standard pages)
- SdPage* pActualPage = NULL;
+ SdPage* pActualPage = nullptr;
sal_uInt16 i = 0;
sal_uInt16 nCount = mpDoc->GetSdPageCount(PK_STANDARD);
@@ -209,7 +209,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
pTextObj->NbcSetStyleSheet(pSheet, false);
- SdrTextObj* pOutlineObj = NULL;
+ SdrTextObj* pOutlineObj = nullptr;
sal_Int32 nChildCount = pOutl->GetChildCount(pPara);
if (nChildCount > 0)
pOutlineObj = static_cast<SdrTextObj*>( pPage->GetPresObj(PRESOBJ_OUTLINE) );
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx b/sd/source/ui/func/fuformatpaintbrush.cxx
index 6ffcbbd3ef41..10210e71fcea 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -98,14 +98,14 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
- if( (eHit == SDRHIT_TEXTEDIT) || (eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) ))
+ if( (eHit == SDRHIT_TEXTEDIT) || (eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != nullptr ) ))
{
- SdrObject* pPickObj=0;
- SdrPageView* pPV=0;
+ SdrObject* pPickObj=nullptr;
+ SdrPageView* pPV=nullptr;
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pPickObj, pPV, SdrSearchOptions::PICKMARKABLE);
- if( (pPickObj != 0) && !pPickObj->IsEmptyPresObj() )
+ if( (pPickObj != nullptr) && !pPickObj->IsEmptyPresObj() )
{
// if we text hit another shape than the one currently selected, unselect the old one now
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
@@ -130,7 +130,7 @@ bool FuFormatPaintBrush::MouseButtonDown(const MouseEvent& rMEvt)
return FuText::MouseButtonDown(aMEvt);
}
- if( aVEvt.pObj == 0 )
+ if( aVEvt.pObj == nullptr )
aVEvt.pObj = pPickObj;
}
@@ -160,8 +160,8 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
else
{
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
- SdrObject* pObj=0;
- SdrPageView* pPV=0;
+ SdrObject* pObj=nullptr;
+ SdrPageView* pPV=nullptr;
bool bOverMarkableObject = mpView->PickObj( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ),nHitLog, pObj, pPV, SdrSearchOptions::PICKMARKABLE);
if(bOverMarkableObject && HasContentForThisType(pObj->GetObjInventor(),pObj->GetObjIdentifier()) )
@@ -233,7 +233,7 @@ void FuFormatPaintBrush::Deactivate()
bool FuFormatPaintBrush::HasContentForThisType( sal_uInt32 nObjectInventor, sal_uInt16 nObjectIdentifier ) const
{
- if( mxItemSet.get() == 0 )
+ if( mxItemSet.get() == nullptr )
return false;
if( !mpView || (!SdrObjEditView::SupportsFormatPaintbrush( nObjectInventor, nObjectIdentifier) ) )
return false;
@@ -245,7 +245,7 @@ void FuFormatPaintBrush::Paste( bool bNoCharacterFormats, bool bNoParagraphForma
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
if( mxItemSet.get() && ( rMarkList.GetMarkCount() == 1 ) )
{
- SdrObject* pObj( NULL );
+ SdrObject* pObj( nullptr );
bool bUndo = mpDoc->IsUndoEnabled();
if( bUndo && !mpView->GetTextEditOutlinerView() )
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index 6b7a259d0209..30215376371d 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -60,7 +60,7 @@ FuHangulHanjaConversion::FuHangulHanjaConversion (
SdDrawDocument* pDocument,
SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pView, pDocument, rReq),
- pSdOutliner(NULL),
+ pSdOutliner(nullptr),
bOwnOutliner(false)
{
if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr )
@@ -103,7 +103,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
mpView->BegUndo(SD_RESSTR(STR_UNDO_HANGULHANJACONVERSION));
ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() );
- if (pBase != NULL)
+ if (pBase != nullptr)
mpViewShell = pBase->GetMainViewShell().get();
if( mpViewShell )
@@ -132,19 +132,19 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
// Due to changing between edit mode, notes mode, and handout mode the
// view has most likely changed. Get the new one.
- mpViewShell = pBase ? pBase->GetMainViewShell().get() : NULL;
- if (mpViewShell != NULL)
+ mpViewShell = pBase ? pBase->GetMainViewShell().get() : nullptr;
+ if (mpViewShell != nullptr)
{
mpView = mpViewShell->GetView();
mpWindow = mpViewShell->GetActiveWindow();
}
else
{
- mpView = 0;
- mpWindow = NULL;
+ mpView = nullptr;
+ mpWindow = nullptr;
}
- if (mpView != NULL)
+ if (mpView != nullptr)
mpView->EndUndo();
}
@@ -203,7 +203,7 @@ void FuHangulHanjaConversion::StartChineseConversion()
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index a4b9cbdde791..5c7864357c1b 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -144,7 +144,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
Rectangle aRect(aPos, mpWindow->GetOutputSizePixel() );
aPos = aRect.Center();
aPos = mpWindow->PixelToLogic(aPos);
- SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, NULL);
+ SdrGrafObj* pGrafObj = mpView->InsertGraphic(aGraphic, nAction, aPos, pPickObj, nullptr);
if(pGrafObj && aDlg.IsAsLink())
{
@@ -244,7 +244,7 @@ void FuInsertClipboard::DoExecute( SfxRequest& )
( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
{
- pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", NULL );
+ pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", nullptr );
}
}
}
@@ -583,7 +583,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
// the empty OLE object gets a new IPObj
bInsertNewObject = false;
pObj->SetEmptyPresObj(false);
- static_cast<SdrOle2Obj*>(pObj)->SetOutlinerParaObject(NULL);
+ static_cast<SdrOle2Obj*>(pObj)->SetOutlinerParaObject(nullptr);
static_cast<SdrOle2Obj*>(pObj)->SetObjRef(xObj);
static_cast<SdrOle2Obj*>(pObj)->SetPersistName(aName);
static_cast<SdrOle2Obj*>(pObj)->SetName(aName);
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 03c723e7cf29..187691a0e1c6 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -209,7 +209,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
while( aOtherIter != aOtherFilterVector.end() )
{
- if( ( pFilter = rMatcher.GetFilter4Mime( *aOtherIter ) ) != NULL )
+ if( ( pFilter = rMatcher.GetFilter4Mime( *aOtherIter ) ) != nullptr )
lcl_AddFilter( aFilterVector, pFilter );
++aOtherIter;
@@ -260,7 +260,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
mpDocSh->SetWaitCursor( true );
SfxMedium* pMedium = new SfxMedium( aFile, StreamMode::READ | StreamMode::NOCREATE );
- const SfxFilter* pFilter = NULL;
+ const SfxFilter* pFilter = nullptr;
SfxGetpApp()->GetFilterMatcher().GuessFilter( *pMedium, &pFilter );
@@ -329,7 +329,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
mpDocSh->SetWaitCursor( false );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( NULL, mpDoc, pMedium, aFile ) : 0);
+ std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg( nullptr, mpDoc, pMedium, aFile ) : nullptr);
if( !pDlg )
return false;
@@ -351,8 +351,8 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
First, insert pages */
std::vector<OUString> aBookmarkList = pDlg->GetList( 1 ); // pages
bool bLink = pDlg->IsLink();
- SdPage* pPage = NULL;
- ::sd::View* pView = mpViewShell ? mpViewShell->GetView() : NULL;
+ SdPage* pPage = nullptr;
+ ::sd::View* pView = mpViewShell ? mpViewShell->GetView() : nullptr;
if (pView)
{
@@ -398,7 +398,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
if( bNameOK )
bOK = mpDoc->InsertBookmarkAsPage( aBookmarkList, &aExchangeList,
bLink, bReplace, nPos,
- false, NULL, true, true, false );
+ false, nullptr, true, true, false );
aBookmarkList.clear();
aExchangeList.clear();
@@ -409,7 +409,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
if( bNameOK )
bOK = mpDoc->InsertBookmarkAsObject( aObjectBookmarkList, aExchangeList,
- bLink, NULL, NULL);
+ bLink, nullptr, nullptr);
if( pDlg->IsRemoveUnnessesaryMasterPages() )
mpDoc->RemoveUnnecessaryMasterPages();
@@ -421,7 +421,7 @@ bool FuInsertFile::InsSDDinDrMode(SfxMedium* pMedium)
void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(NULL, mpDoc, NULL, aFile ) : 0);
+ std::unique_ptr<AbstractSdInsertPagesObjsDlg> pDlg(pFact ? pFact->CreateSdInsertPagesObjsDlg(nullptr, mpDoc, nullptr, aFile ) : nullptr);
if( !pDlg )
return;
@@ -566,7 +566,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
std::vector<Paragraph*> aSelList;
rDocliner.GetView(0)->CreateSelectionList(aSelList);
- Paragraph* pPara = aSelList.empty() ? NULL : *(aSelList.begin());
+ Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
// what should we insert?
while (pPara && !Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE))
@@ -728,17 +728,17 @@ bool FuInsertFile::InsSDDinOlMode(SfxMedium* pMedium)
void FuInsertFile::GetSupportedFilterVector( ::std::vector< OUString >& rFilterVector )
{
SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher();
- const SfxFilter* pSearchFilter = NULL;
+ const SfxFilter* pSearchFilter = nullptr;
rFilterVector.clear();
- if( ( pSearchFilter = rMatcher.GetFilter4Mime( "text/plain" )) != NULL )
+ if( ( pSearchFilter = rMatcher.GetFilter4Mime( "text/plain" )) != nullptr )
rFilterVector.push_back( pSearchFilter->GetMimeType() );
- if( ( pSearchFilter = rMatcher.GetFilter4Mime( "application/rtf" ) ) != NULL )
+ if( ( pSearchFilter = rMatcher.GetFilter4Mime( "application/rtf" ) ) != nullptr )
rFilterVector.push_back( pSearchFilter->GetMimeType() );
- if( ( pSearchFilter = rMatcher.GetFilter4Mime( "text/html" ) ) != NULL )
+ if( ( pSearchFilter = rMatcher.GetFilter4Mime( "text/html" ) ) != nullptr )
rFilterVector.push_back( pSearchFilter->GetMimeType() );
}
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index 6b97442ffd52..6d24224576fc 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -67,7 +67,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
- const SdrObject* pObj = NULL;
+ const SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
if( rMarkList.GetMarkCount() == 1 )
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
@@ -76,7 +76,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
mpView->GetAttributes( *pNewAttr );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(NULL,pNewAttr.get(),mpDoc,pObj,bHasMarked) : 0);
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSvxLineTabDialog(nullptr,pNewAttr.get(),mpDoc,pObj,bHasMarked) : nullptr);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
mpView->SetAttributes (*(pDlg->GetOutputItemSet ()));
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index 9aa90de5db82..2db668052fbb 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -59,7 +59,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
{
const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
const SdrObject* pNewObj;
- SdrObject* pConvPolyObj = NULL;
+ SdrObject* pConvPolyObj = nullptr;
if( dynamic_cast< const SdrPathObj *>( pObj ) != nullptr )
{
@@ -114,7 +114,7 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( NULL, aName, aDesc ) : 0);
+ std::unique_ptr<AbstractSvxNameDialog> pDlg(pFact ? pFact->CreateSvxNameDialog( nullptr, aName, aDesc ) : nullptr);
if( pDlg )
{
diff --git a/sd/source/ui/func/fumeasur.cxx b/sd/source/ui/func/fumeasur.cxx
index 7b5bbb280629..17f693714dda 100644
--- a/sd/source/ui/func/fumeasur.cxx
+++ b/sd/source/ui/func/fumeasur.cxx
@@ -58,7 +58,7 @@ void FuMeasureDlg::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( NULL, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : 0 );
+ std::unique_ptr<SfxAbstractDialog> pDlg( pFact ? pFact->CreateSfxDialog( nullptr, aNewAttr, mpView, RID_SVXPAGE_MEASURE) : nullptr );
if( pDlg.get() && (pDlg->Execute() == RET_OK) )
{
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index 523ad26798c2..c4a68b57ce0a 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -89,14 +89,14 @@ void FuMorph::DoExecute( SfxRequest& )
SdrObject* pCloneObj2 = pObj2->Clone();
// delete text at clone, otherwise we do net get a correct PathObj
- pCloneObj1->SetOutlinerParaObject(NULL);
- pCloneObj2->SetOutlinerParaObject(NULL);
+ pCloneObj1->SetOutlinerParaObject(nullptr);
+ pCloneObj2->SetOutlinerParaObject(nullptr);
// create path objects
SdrObject* pPolyObj1 = pCloneObj1->ConvertToPolyObj(false, false);
SdrObject* pPolyObj2 = pCloneObj2->ConvertToPolyObj(false, false);
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : 0);
+ std::unique_ptr<AbstractMorphDlg> pDlg(pFact ? pFact->CreateMorphDlg( static_cast< vcl::Window*>(mpWindow), pObj1, pObj2 ) : nullptr);
if(pPolyObj1 && pPolyObj2 && pDlg && (pDlg->Execute() == RET_OK))
{
B2DPolyPolygonList_impl aPolyPolyList;
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index 6216f82033bc..6d2e16aa18aa 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -292,7 +292,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
SdrObjKind eKind2 = (SdrObjKind)pObject2->GetObjIdentifier();
SdAnimationInfo* pInfo1 = mpDoc->GetAnimationInfo(pObject1);
SdAnimationInfo* pInfo2 = mpDoc->GetAnimationInfo(pObject2);
- pInfo = NULL;
+ pInfo = nullptr;
if (pObject1->GetObjInventor() == SdrInventor &&
((eKind1 == OBJ_LINE) || // 2 point line
@@ -446,7 +446,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
aSet.Put(SfxBoolItem(ATTR_ACTION_PLAYFULL, false));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog( NULL, &aSet, mpView ) : 0);
+ std::unique_ptr<SfxAbstractDialog> pDlg(pFact ? pFact->CreatSdActionDialog( nullptr, &aSet, mpView ) : nullptr);
short nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL);
@@ -626,7 +626,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
pUndoGroup->SetComment(aComment);
// for the path effect, remember some stuff
- SdrPathObj* pPath = NULL;
+ SdrPathObj* pPath = nullptr;
if (eEffect == presentation::AnimationEffect_PATH && nEffectSet == ATTR_SET)
{
DBG_ASSERT(nCount == 2, "This effect expects two selected objects");
@@ -634,7 +634,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
SdrObject* pObject2 = rMarkList.GetMark(1)->GetMarkedSdrObj();
SdrObjKind eKind1 = (SdrObjKind)pObject1->GetObjIdentifier();
SdrObjKind eKind2 = (SdrObjKind)pObject2->GetObjIdentifier();
- SdrObject* pRunningObj = NULL;
+ SdrObject* pRunningObj = nullptr;
if (pObject1->GetObjInventor() == SdrInventor &&
((eKind1 == OBJ_LINE) || // 2 point line
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 80cdcc22792b..4b9f1e5ef90b 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -82,7 +82,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
// create and execute dialog
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( NULL, &aNewAttr, mpView ) : 0);
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdOutlineBulletTabDlg( nullptr, &aNewAttr, mpView ) : nullptr);
if( pDlg )
{
if ( pPageItem )
@@ -192,7 +192,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
sal_uInt32 nNumItemId = SID_ATTR_NUMBERING_RULE;
const SfxPoolItem* pTmpItem = GetNumBulletItem( aNewAttr, nNumItemId );
- SvxNumRule* pNumRule = NULL;
+ SvxNumRule* pNumRule = nullptr;
if ( pTmpItem )
{
pNumRule = new SvxNumRule(*static_cast<const SvxNumBulletItem*>(pTmpItem)->GetNumRule());
@@ -204,7 +204,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
if ( pNumRuleMgr )
{
sal_uInt16 nActNumLvl = (sal_uInt16)0xFFFF;
- const SfxPoolItem* pNumLevelItem = NULL;
+ const SfxPoolItem* pNumLevelItem = nullptr;
if(SfxItemState::SET == aNewAttr.GetItemState(SID_PARAM_CUR_NUM_LEVEL, false, &pNumLevelItem))
nActNumLvl = static_cast<const SfxUInt16Item*>(pNumLevelItem)->GetValue();
@@ -245,9 +245,9 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
}
}
- SdrOutliner* pOwner = bInMasterView ? mpView->GetTextEditOutliner() : 0;
+ SdrOutliner* pOwner = bInMasterView ? mpView->GetTextEditOutliner() : nullptr;
const bool bOutlinerUndoEnabled = pOwner && !pOwner->IsInUndo() && pOwner->IsUndoEnabled();
- SdrModel* pSdrModel = bInMasterView ? mpView->GetModel() : 0;
+ SdrModel* pSdrModel = bInMasterView ? mpView->GetModel() : nullptr;
const bool bModelUndoEnabled = pSdrModel && pSdrModel->IsUndoEnabled();
if ( bOutlinerUndoEnabled )
@@ -261,11 +261,11 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
if ( pOLV )
{
- pOLV->ToggleBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? 0 : pNumRule );
+ pOLV->ToggleBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule );
}
else
{
- mpView->ChangeMarkedObjectsBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? 0 : pNumRule );
+ mpView->ChangeMarkedObjectsBulletsNumbering( bToggle, nSId == FN_SVX_SET_BULLET, bInMasterView ? nullptr : pNumRule );
}
if ( bInMasterView )
{
@@ -290,7 +290,7 @@ void FuOutlineBullet::SetCurrentBulletsNumbering(SfxRequest& rReq)
const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt32& nNumItemId)
{
//SvxNumBulletItem* pRetItem = NULL;
- const SfxPoolItem* pTmpItem = NULL;
+ const SfxPoolItem* pTmpItem = nullptr;
if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET)
{
@@ -330,7 +330,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
}
}
- const SvxNumBulletItem *pItem = NULL;
+ const SvxNumBulletItem *pItem = nullptr;
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
@@ -340,7 +340,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
- if( pItem == NULL )
+ if( pItem == nullptr )
pItem = static_cast<const SvxNumBulletItem*>( aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
//DBG_ASSERT( pItem, "No EE_PARA_NUMBULLET in the Pool!" );
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index f4bed84fd778..cee740ff54af 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -110,12 +110,12 @@ FuPage::FuPage( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
: FuPoor(pViewSh, pWin, pView, pDoc, rReq),
mrReq(rReq),
mpArgs( rReq.GetArgs() ),
- mpBackgroundObjUndoAction( 0 ),
+ mpBackgroundObjUndoAction( nullptr ),
mbPageBckgrdDeleted( false ),
mbMasterPage( false ),
mbDisplayBackgroundTabPage( true ),
- mpPage(0),
- mpDrawViewShell(0)
+ mpPage(nullptr),
+ mpDrawViewShell(nullptr)
{
}
@@ -203,7 +203,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
{
if (!mpDrawViewShell)
- return NULL;
+ return nullptr;
PageKind ePageKind = mpDrawViewShell->GetPageKind();
@@ -329,7 +329,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
{
// create the dialog
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(NULL, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : 0 );
+ std::unique_ptr<SfxAbstractTabDialog> pDlg( pFact ? pFact->CreateSdTabPageDialog(nullptr, &aMergedAttr, mpDocSh, mbDisplayBackgroundTabPage ) : nullptr );
if( pDlg.get() && pDlg->Execute() == RET_OK )
pTempSet.reset( new SfxItemSet(*pDlg->GetOutputItemSet()) );
}
@@ -482,7 +482,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
SdrPage& rUsedMasterPage = mpPage->IsMasterPage() ? *mpPage : mpPage->TRG_GetMasterPage();
OSL_ENSURE(rUsedMasterPage.IsMasterPage(), "No MasterPage (!)");
rUsedMasterPage.getSdrPageProperties().ClearItem();
- OSL_ENSURE(0 != rUsedMasterPage.getSdrPageProperties().GetStyleSheet(),
+ OSL_ENSURE(nullptr != rUsedMasterPage.getSdrPageProperties().GetStyleSheet(),
"MasterPage without StyleSheet detected (!)");
}
@@ -493,7 +493,7 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
}
else
{
- return 0;
+ return nullptr;
}
}
@@ -619,7 +619,7 @@ void FuPage::ApplyItemSet( const SfxItemSet* pArgs )
{
// set merge flag, because a SdUndoGroupAction could have been inserted before
mpDocSh->GetUndoManager()->AddUndoAction( mpBackgroundObjUndoAction, true );
- mpBackgroundObjUndoAction = 0;
+ mpBackgroundObjUndoAction = nullptr;
}
// Objects can not be bigger than ViewSize
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index e349856d2350..fcfc7edf192d 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -91,7 +91,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
}
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0);
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdParagraphTabDlg(nullptr, &aNewAttr ) : nullptr);
if (!pDlg)
return;
@@ -117,7 +117,7 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
{
ESelection eSelection = pOutlView->GetSelection();
- const SfxPoolItem *pItem = 0;
+ const SfxPoolItem *pItem = nullptr;
if( SfxItemState::SET == pArgs->GetItemState( ATTR_NUMBER_NEWSTART, false, &pItem ) )
{
const bool bNewStart = static_cast<const SfxBoolItem*>(pItem)->GetValue();
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 1ab03ceba8bb..2dad9ac97b54 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -75,7 +75,7 @@ FuPoor::FuPoor (
mpDoc(pDrDoc),
nSlotId( rReq.GetSlot() ),
nSlotValue(0),
- pDialog(NULL),
+ pDialog(nullptr),
bIsInDragMode(false),
bNoScrollUntilInside (true),
bScrollable (false),
@@ -207,7 +207,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
DrawViewShell* pDrawViewShell =
static_cast<DrawViewShell*>(mpViewShell);
SdPage* pActualPage = pDrawViewShell->GetActualPage();
- SdrTextObj* pCandidate = 0L;
+ SdrTextObj* pCandidate = nullptr;
if(pActualPage)
{
@@ -551,10 +551,10 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
mpView->MarkPoint(*pHdl);
}
- if(0L == rHdlList.GetFocusHdl())
+ if(nullptr == rHdlList.GetFocusHdl())
{
// restore point with focus
- SdrHdl* pNewOne = 0L;
+ SdrHdl* pNewOne = nullptr;
for(size_t a = 0; !pNewOne && a < rHdlList.GetHdlCount(); ++a)
{
@@ -624,9 +624,9 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
bool bIsMoveOfConnectedHandle(false);
bool bOldSuppress = false;
- SdrEdgeObj* pEdgeObj = 0L;
+ SdrEdgeObj* pEdgeObj = nullptr;
- if(pHdl && pHdl->GetObj() && 0 != dynamic_cast< const SdrEdgeObj *>( pHdl->GetObj() ) && 0 == pHdl->GetPolyNum())
+ if(pHdl && pHdl->GetObj() && nullptr != dynamic_cast< const SdrEdgeObj *>( pHdl->GetObj() ) && 0 == pHdl->GetPolyNum())
{
pEdgeObj = static_cast<SdrEdgeObj*>(pHdl->GetObj());
@@ -688,7 +688,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
nY *= 100;
}
- if(0L == pHdl)
+ if(nullptr == pHdl)
{
// only take action when move is allowed
if(mpView->IsMoveAllowed())
@@ -745,7 +745,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
const SdrDragStat& rDragStat = mpView->GetDragStat();
// start dragging
- mpView->BegDragObj(aStartPoint, 0, pHdl, 0);
+ mpView->BegDragObj(aStartPoint, nullptr, pHdl, 0);
if(mpView->IsDragObj())
{
@@ -840,7 +840,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
if (pDrawViewShell && EditEngine::IsSimpleCharInput(rKEvt))
{
SdPage* pActualPage = pDrawViewShell->GetActualPage();
- SdrTextObj* pCandidate = 0L;
+ SdrTextObj* pCandidate = nullptr;
if(pActualPage)
{
@@ -959,7 +959,7 @@ IMPL_LINK_NOARG_TYPED(FuPoor, DragHdl, Timer *, void)
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
SdrHdl* pHdl = mpView->PickHandle(aMDPos);
- if ( pHdl==NULL && mpView->IsMarkedHit(aMDPos, nHitLog)
+ if ( pHdl==nullptr && mpView->IsMarkedHit(aMDPos, nHitLog)
&& !mpView->IsPresObjSelected(false) )
{
mpWindow->ReleaseMouse();
@@ -1053,7 +1053,7 @@ void FuPoor::ReceiveRequest(SfxRequest& rReq)
SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const Rectangle& )
{
// empty base implementation
- return 0L;
+ return nullptr;
}
void FuPoor::ImpForceQuadratic(Rectangle& rRect)
@@ -1093,12 +1093,12 @@ void FuPoor::SwitchLayer (sal_Int32 nOffset)
{
LayerTabBar* pLayerTabControl =
static_cast<DrawViewShell*>(mpViewShell)->GetLayerTabControl();
- if (pLayerTabControl != NULL)
+ if (pLayerTabControl != nullptr)
pLayerTabControl->SendDeactivatePageEvent ();
pDrawViewShell->SetActiveTabLayerIndex (nIndex);
- if (pLayerTabControl != NULL)
+ if (pLayerTabControl != nullptr)
pLayerTabControl->SendActivatePageEvent ();
}
}
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index ab74fae5d2ac..609cba3b849b 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -174,7 +174,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
else
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, NULL, aSet ) : 0);
+ std::unique_ptr<AbstractSdPresLayoutDlg> pDlg(pFact ? pFact->CreateSdPresLayoutDlg(mpDocSh, nullptr, aSet ) : nullptr);
sal_uInt16 nResult = pDlg ? pDlg->Execute() : static_cast<short>(RET_CANCEL);
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index e49c96762c4f..40e9df5a19ba 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -86,7 +86,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
pOutlinerView->CreateSelectionList(aSelList);
std::vector<Paragraph*>::const_iterator iter = aSelList.begin();
- Paragraph* pPara = aSelList.empty() ? NULL : *iter;
+ Paragraph* pPara = aSelList.empty() ? nullptr : *iter;
nDepth = pOutl->GetDepth(pOutl->GetAbsPos( pPara ) );
bool bPage = ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE );
@@ -140,7 +140,7 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
SfxStyleSheetBase& rStyleSheet = *pStyleSheet;
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : 0);
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, nullptr, SdResId( nDlgId ), rStyleSheet, ePO, pStyleSheetPool ) : nullptr);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
diff --git a/sd/source/ui/func/fuscale.cxx b/sd/source/ui/func/fuscale.cxx
index b33f264edba9..7300c14a9f3f 100644
--- a/sd/source/ui/func/fuscale.cxx
+++ b/sd/source/ui/func/fuscale.cxx
@@ -114,7 +114,7 @@ void FuScale::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- pDlg.reset(pFact->CreateSvxZoomDialog(NULL, aNewAttr));
+ pDlg.reset(pFact->CreateSvxZoomDialog(nullptr, aNewAttr));
}
if( pDlg )
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index a6d535f43821..b7186a70866d 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -57,7 +57,7 @@ FuSearch::FuSearch (
SdDrawDocument* pDoc,
SfxRequest& rReq )
: FuPoor(pViewSh, pWin, pView, pDoc, rReq),
- pSdOutliner(NULL),
+ pSdOutliner(nullptr),
bOwnOutliner(false)
{
}
@@ -90,7 +90,7 @@ void FuSearch::DoExecute( SfxRequest& )
FuSearch::~FuSearch()
{
- if ( ! mpDocSh->IsInDestruction() && mpDocSh->GetViewShell()!=NULL)
+ if ( ! mpDocSh->IsInDestruction() && mpDocSh->GetViewShell()!=nullptr)
mpDocSh->GetViewShell()->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
if (pSdOutliner)
@@ -103,11 +103,11 @@ FuSearch::~FuSearch()
void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
{
ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() );
- ViewShell* pViewShell = NULL;
- if (pBase != NULL)
+ ViewShell* pViewShell = nullptr;
+ if (pBase != nullptr)
pViewShell = pBase->GetMainViewShell().get();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
if ( pSdOutliner && dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr && !bOwnOutliner )
{
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 077e66e16651..c163fb7f6217 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -89,11 +89,11 @@ FuSelection::FuSelection (
bTempRotation(false),
bSelectionChanged(false),
bHideAndAnimate(false),
- pHdl(NULL),
+ pHdl(nullptr),
bSuppressChangesOfSelection(false),
bMirrorSide0(false),
nEditMode(SID_BEZIER_MOVE),
- pWaterCanCandidate(NULL)
+ pWaterCanCandidate(nullptr)
//Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
//and SHIFT+ENTER key to decide the position and draw the new insert point
,bBeginInsertPoint(false),
@@ -133,7 +133,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
// Hack for #?????#
bHideAndAnimate = false;
- pHdl = NULL;
+ pHdl = nullptr;
bool bReturn = FuDraw::MouseButtonDown(rMEvt);
bool bWaterCan = SD_MOD()->GetWaterCan();
const bool bReadOnly = mpDocSh->IsReadOnly();
@@ -202,14 +202,14 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
SdrViewEvent aVEvt;
SdrHitKind eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
- if ( eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) )
+ if ( eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != nullptr ) )
{
bTextEdit = true;
}
if(!bTextEdit
&& !mpDocSh->IsReadOnly()
- && ((mpView->IsMarkedHit(aMDPos, nHitLog) && !rMEvt.IsShift() && !rMEvt.IsMod2()) || pHdl != NULL)
+ && ((mpView->IsMarkedHit(aMDPos, nHitLog) && !rMEvt.IsShift() && !rMEvt.IsMod2()) || pHdl != nullptr)
&& (rMEvt.GetClicks() != 2)
)
{
@@ -360,7 +360,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if ( !rMEvt.IsShift() && !rMEvt.IsMod2() )
{
- OSL_ASSERT (mpViewShell->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewShell->GetViewShell()!=nullptr);
Client* pIPClient = static_cast<Client*>(
mpViewShell->GetViewShell()->GetIPClient());
@@ -472,7 +472,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
* Move object
******************************************************************/
if ( ! rMEvt.IsRight())
- mpView->BegDragObj(aMDPos, nullptr, NULL, nDrgLog);
+ mpView->BegDragObj(aMDPos, nullptr, nullptr, nDrgLog);
}
else if (eHit == SDRHIT_HANDLE)
{
@@ -491,7 +491,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
if (mpView->IsPointMarked(*aVEvt.pHdl))
{
mpView->UnmarkPoint(*aVEvt.pHdl);
- pHdl = NULL;
+ pHdl = nullptr;
}
else
{
@@ -630,7 +630,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
// Animation is still running -> return immediately
bHideAndAnimate = false;
- pHdl = NULL;
+ pHdl = nullptr;
mpWindow->ReleaseMouse();
return true;
}
@@ -694,7 +694,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
/**************************************************************
* Toggle between selection and rotation
**************************************************************/
- SdrObject* pSingleObj = NULL;
+ SdrObject* pSingleObj = nullptr;
if (mpView->GetMarkedObjectList().GetMarkCount()==1)
{
@@ -776,18 +776,18 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
// In watering-can mode, on press onto right mouse button, a undo is executed
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_UNDO, SfxCallMode::ASYNCHRON );
}
- else if (pWaterCanCandidate != NULL)
+ else if (pWaterCanCandidate != nullptr)
{
// Is the candidate object still under the mouse?
if (pickObject (aPnt) == pWaterCanCandidate)
{
SdStyleSheetPool* pPool = static_cast<SdStyleSheetPool*>(
mpDocSh->GetStyleSheetPool());
- if (pPool != NULL)
+ if (pPool != nullptr)
{
SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
pPool->GetActualStyleSheet());
- if (pStyleSheet != NULL && mpView->IsUndoEnabled() )
+ if (pStyleSheet != nullptr && mpView->IsUndoEnabled() )
{
// Added UNDOs for the WaterCan mode. This was never done in
// the past, thus it was missing all the time.
@@ -819,9 +819,9 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
bMBDown = false;
ForcePointer(&rMEvt);
- pHdl = NULL;
+ pHdl = nullptr;
mpWindow->ReleaseMouse();
- SdrObject* pSingleObj = NULL;
+ SdrObject* pSingleObj = nullptr;
const size_t nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
if (nMarkCount==1)
@@ -840,7 +840,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
{
bReturn = true;
ForcePointer(&rMEvt);
- pHdl = NULL;
+ pHdl = nullptr;
mpWindow->ReleaseMouse();
FuDraw::MouseButtonUp(rMEvt);
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::SYNCHRON);
@@ -904,7 +904,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
}
ForcePointer(&rMEvt);
- pHdl = NULL;
+ pHdl = nullptr;
mpWindow->ReleaseMouse();
FuDraw::MouseButtonUp(rMEvt);
@@ -1496,7 +1496,7 @@ bool FuSelection::cancel()
SdrObject* FuSelection::pickObject (const Point& rTestPoint)
{
- SdrObject* pObject = NULL;
+ SdrObject* pObject = nullptr;
SdrPageView* pPageView;
sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SdrSearchOptions::PICKMARKABLE);
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index c7b563f0d3d7..9609ee8c3546 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -65,7 +65,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD ));
const OUString& rPresPage = rPresentationSettings.maPresPage;
OUString aFirstPage;
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
long nPage;
for( nPage = mpDoc->GetSdPageCount( PK_STANDARD ) - 1L; nPage >= 0L; nPage-- )
@@ -110,7 +110,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : 0);
+ std::unique_ptr<AbstractSdStartPresDlg> pDlg(pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : nullptr);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
OUString aPage;
diff --git a/sd/source/ui/func/fusnapln.cxx b/sd/source/ui/func/fusnapln.cxx
index 8e121c990389..667c3230ad57 100644
--- a/sd/source/ui/func/fusnapln.cxx
+++ b/sd/source/ui/func/fusnapln.cxx
@@ -62,11 +62,11 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
// Get index of snap line or snap point from the request.
const SfxUInt32Item* pHelpLineIndex = rReq.GetArg<SfxUInt32Item>(ID_VAL_INDEX);
- if (pHelpLineIndex != NULL)
+ if (pHelpLineIndex != nullptr)
{
nHelpLine = static_cast<sal_uInt16>(pHelpLineIndex->GetValue());
// Reset the argument pointer to trigger the display of the dialog.
- pArgs = NULL;
+ pArgs = nullptr;
}
SdrPageView* pPV = mpView->GetSdrPageView();
@@ -77,7 +77,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
bool bLineExist (false);
Point aLinePos;
- if (pHelpLineIndex == NULL)
+ if (pHelpLineIndex == nullptr)
{
// The index of the snap line is not provided as argument to the
// request. Determine it from the mouse position.
@@ -102,7 +102,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
}
else
{
- assert(pPV!=NULL);
+ assert(pPV!=nullptr);
aLinePos = (pPV->GetHelpLines())[nHelpLine].GetPos();
pPV->LogicToPagePos(aLinePos);
bLineExist = true;
@@ -111,7 +111,7 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0);
+ std::unique_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( nullptr, aNewAttr, mpView ) : nullptr);
OSL_ASSERT(pDlg);
if (!pDlg)
return;
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index f81950cc2bab..c3c27fb8dc10 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -63,8 +63,8 @@ rtl::Reference<FuPoor> FuSummaryPage::Create( ViewShell* pViewSh, ::sd::Window*
void FuSummaryPage::DoExecute( SfxRequest& )
{
- ::sd::Outliner* pOutl = NULL;
- SdPage* pSummaryPage = NULL;
+ ::sd::Outliner* pOutl = nullptr;
+ SdPage* pSummaryPage = nullptr;
sal_uInt16 i = 0;
sal_uInt16 nFirstPage = SDRPAGE_NOTFOUND;
sal_uInt16 nSelectedPages = 0;
@@ -92,7 +92,7 @@ void FuSummaryPage::DoExecute( SfxRequest& )
bool bBegUndo = false;
- SfxStyleSheet* pStyle = NULL;
+ SfxStyleSheet* pStyle = nullptr;
for (i = nFirstPage; i < nCount; i++)
{
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 21ddb1a1882a..c7c34095c412 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -101,7 +101,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
// get StyleSheet parameter
SfxStyleSheetBasePool* pSSPool = mpDoc->GetDocSh()->GetStyleSheetPool();
- SfxStyleSheetBase* pStyleSheet = NULL;
+ SfxStyleSheetBase* pStyleSheet = nullptr;
const SfxPoolItem* pItem;
sal_uInt16 nFamily = USHRT_MAX;
@@ -167,7 +167,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if(p)
{
pSSPool->Remove(p);
- p = 0;
+ p = nullptr;
}
pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF );
@@ -190,7 +190,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if(p)
{
pSSPool->Remove(p);
- p = 0;
+ p = nullptr;
}
pStyleSheet = &pSSPool->Make( aStyleName, (SfxStyleFamily) nFamily, SFXSTYLEBIT_USERDEF );
pStyleSheet->SetParent(SD_RESSTR(STR_STANDARD_STYLESHEET_NAME));
@@ -306,7 +306,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if (eFamily == SD_STYLE_FAMILY_GRAPHICS)
{
- pStdDlg.reset(pFact ? pFact->CreateSdTabTemplateDlg( 0, mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView ) : 0);
+ pStdDlg.reset(pFact ? pFact->CreateSdTabTemplateDlg( nullptr, mpDoc->GetDocSh(), *pStyleSheet, mpDoc, mpView ) : nullptr);
}
else if (eFamily == SD_STYLE_FAMILY_PSEUDO)
{
@@ -370,7 +370,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if( !bOldDocInOtherLanguage )
{
- pPresDlg.reset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, NULL, SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : 0);
+ pPresDlg.reset(pFact ? pFact->CreateSdPresLayoutTemplateDlg( mpDocSh, nullptr, SdResId(nDlgId), *pStyleSheet, ePO, pSSPool ) : nullptr);
}
}
else if (eFamily == SD_STYLE_FAMILY_CELL)
@@ -378,7 +378,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
sal_uInt16 nResult = RET_CANCEL;
- const SfxItemSet* pOutSet = NULL;
+ const SfxItemSet* pOutSet = nullptr;
if (pStdDlg)
{
nResult = pStdDlg->Execute();
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 8dc5bcb5215e..ae88b076689a 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -157,7 +157,7 @@ void FuText::disposing()
if(mpView)
{
if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
- mxTextObj.reset( 0 );
+ mxTextObj.reset( nullptr );
// reset the RequestHandler of the used Outliner to the handler of the document
::Outliner* pOutliner = mpView->GetTextEditOutliner();
@@ -280,7 +280,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
list. The call MarkObj further below accesses then the dead
object. As a simple fix, we determine eHit after
SdrEndTextEdit again, this returns then SDRHIT_NONE. */
- mxTextObj.reset( NULL );
+ mxTextObj.reset( nullptr );
eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
}
@@ -377,7 +377,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
// force new handle identification, the pointer will be dead here
// since SdrEndTextEdit has resetted (deleted) the handles.
- aVEvt.pHdl = 0;
+ aVEvt.pHdl = nullptr;
mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
}
}
@@ -618,7 +618,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
if (bReset)
{
- mxTextObj.reset( 0 );
+ mxTextObj.reset( nullptr );
}
}
@@ -707,7 +707,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
if (!mpView->EndCreateObj(SDRCREATE_FORCEEND))
{
// it was not possible to create text object
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
}
else if (nSlotId == SID_TEXT_FITTOSIZE)
{
@@ -782,7 +782,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
if(!mpView->EndCreateObj(SDRCREATE_FORCEEND))
{
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
}
if(bSnapEnabled)
@@ -873,7 +873,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
// switch to selection
if (mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
{
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
}
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_OBJECT_SELECT,
@@ -906,7 +906,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
{
// maybe object is deleted, test if it's equal to the selected object
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- SdrObject* pSelectedObj = 0L;
+ SdrObject* pSelectedObj = nullptr;
if(1 == rMarkList.GetMarkCount())
{
@@ -916,7 +916,7 @@ bool FuText::KeyInput(const KeyEvent& rKEvt)
if(mxTextObj.get() != pSelectedObj)
{
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
}
}
@@ -1097,7 +1097,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
{
// Move cursor to end of text
ESelection aNewSelection(EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND, EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND);
- if (pOLV != NULL)
+ if (pOLV != nullptr)
pOLV->SetSelection(aNewSelection);
}
}
@@ -1111,7 +1111,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, bool bQuickDrag)
}
else
{
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
}
}
@@ -1219,7 +1219,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
{
MouseEvent aMEvt(mpWindow->GetPointerPosPixel());
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
if (nSlotId == SID_TEXTEDIT)
{
@@ -1289,7 +1289,7 @@ SdrObject* FuText::CreateDefaultObject(const sal_uInt16 nID, const Rectangle& rR
SdrObject* pObj = SdrObjFactory::MakeNewObject(
mpView->GetCurrentObjInventor(), mpView->GetCurrentObjIdentifier(),
- 0L, mpDoc);
+ nullptr, mpDoc);
if(pObj)
{
@@ -1340,7 +1340,7 @@ bool FuText::cancel()
if ( mpView->IsTextEdit() )
{
if(mpView->SdrEndTextEdit() == SDRENDTEXTEDIT_DELETED)
- mxTextObj.reset(0);
+ mxTextObj.reset(nullptr);
mpView->SetCurrentObj(OBJ_TEXT);
mpView->SetEditMode(SDREDITMODE_EDIT);
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index b3218da08a3a..41a7cbc373ea 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -72,7 +72,7 @@ void FuThesaurus::DoExecute( SfxRequest& )
if (mpViewShell && dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr)
{
- SdrTextObj* pTextObj = NULL;
+ SdrTextObj* pTextObj = nullptr;
if ( mpView->AreObjectsMarked() )
{
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 16a07a9cefac..560c3efb5436 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -74,7 +74,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
- std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( NULL, mpView ) );
+ std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateCaptionDialog( nullptr, mpView ) );
const sal_uInt16* pRange = pDlg->GetInputRanges( *aNewAttr.GetPool() );
SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
@@ -94,7 +94,7 @@ void FuTransform::DoExecute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( NULL, &aSet, mpView ) );
+ std::unique_ptr< SfxAbstractTabDialog > pDlg( pFact->CreateSvxTransformTabDialog( nullptr, &aSet, mpView ) );
if( pDlg.get() && (pDlg->Execute() == RET_OK) )
{
rReq.Done( *( pDlg->GetOutputItemSet() ) );
diff --git a/sd/source/ui/func/futxtatt.cxx b/sd/source/ui/func/futxtatt.cxx
index 7342f7b9934b..792d49cd4ab1 100644
--- a/sd/source/ui/func/futxtatt.cxx
+++ b/sd/source/ui/func/futxtatt.cxx
@@ -59,7 +59,7 @@ void FuTextAttrDlg::DoExecute( SfxRequest& rReq )
if( !pArgs )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( NULL, &aNewAttr, mpView ));
+ std::unique_ptr<SfxAbstractTabDialog> pDlg(pFact->CreateTextTabDialog( nullptr, &aNewAttr, mpView ));
sal_uInt16 nResult = pDlg->Execute();
diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx
index a4fbbf00c654..dee4a4d1d96b 100644
--- a/sd/source/ui/func/fuvect.cxx
+++ b/sd/source/ui/func/fuvect.cxx
@@ -64,7 +64,7 @@ void FuVectorize::DoExecute( SfxRequest& )
if( pObj && dynamic_cast< const SdrGrafObj *>( pObj ) != nullptr )
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : 0);
+ std::unique_ptr<AbstractSdVectorizeDlg> pDlg(pFact ? pFact->CreateSdVectorizeDlg( mpWindow, static_cast<SdrGrafObj*>( pObj )->GetGraphic().GetBitmap(), mpDocSh ) : nullptr);
if( pDlg && pDlg->Execute() == RET_OK )
{
const GDIMetaFile& rMtf = pDlg->GetGDIMetaFile();
diff --git a/sd/source/ui/func/unoaprms.cxx b/sd/source/ui/func/unoaprms.cxx
index e777fb1a2692..6af2c2d017c1 100644
--- a/sd/source/ui/func/unoaprms.cxx
+++ b/sd/source/ui/func/unoaprms.cxx
@@ -66,7 +66,7 @@ void SdAnimationPrmsUndoAction::Undo()
void SdAnimationPrmsUndoAction::Redo()
{
- SdAnimationInfo* pInfo = NULL;
+ SdAnimationInfo* pInfo = nullptr;
pInfo = SdDrawDocument::GetShapeUserData(*pObject,true);
diff --git a/sd/source/ui/inc/ClientView.hxx b/sd/source/ui/inc/ClientView.hxx
index 03f492d7cc7b..7a475ed5592f 100644
--- a/sd/source/ui/inc/ClientView.hxx
+++ b/sd/source/ui/inc/ClientView.hxx
@@ -39,7 +39,7 @@ public:
DrawViewShell* pShell);
virtual ~ClientView();
- virtual void CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) override;
+ virtual void CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
/* if the view should not do a Invalidate() on the windows, you have to
override the following two methods and do something different */
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 93817ef99384..70566b6fefbd 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -156,7 +156,7 @@ public:
*/
bool CheckPageName(vcl::Window* pWin, OUString& rName );
- void SetSlotFilter(bool bEnable = false, sal_uInt16 nCount = 0, const sal_uInt16* pSIDs = NULL) { mbFilterEnable = bEnable; mnFilterCount = nCount; mpFilterSIDs = pSIDs; }
+ void SetSlotFilter(bool bEnable = false, sal_uInt16 nCount = 0, const sal_uInt16* pSIDs = nullptr) { mbFilterEnable = bEnable; mnFilterCount = nCount; mpFilterSIDs = pSIDs; }
void ApplySlotFilter() const;
sal_uInt16 GetStyleFamily() const { return mnStyleFamily; }
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 54527dddd9d7..db77fc5aa5cb 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -90,7 +90,7 @@ public:
ViewShellBase& rViewShellBase,
vcl::Window* pParentWindow,
PageKind ePageKind = PK_STANDARD,
- FrameView* pFrameView = NULL);
+ FrameView* pFrameView = nullptr);
virtual ~DrawViewShell();
diff --git a/sd/source/ui/inc/EventMultiplexer.hxx b/sd/source/ui/inc/EventMultiplexer.hxx
index f5dd36018465..112f27b0c49b 100644
--- a/sd/source/ui/inc/EventMultiplexer.hxx
+++ b/sd/source/ui/inc/EventMultiplexer.hxx
@@ -201,7 +201,7 @@ public:
*/
void MultiplexEvent(
EventMultiplexerEvent::EventId eEventId,
- void* pUserData = 0);
+ void* pUserData = nullptr);
private:
class Implementation;
diff --git a/sd/source/ui/inc/FrameView.hxx b/sd/source/ui/inc/FrameView.hxx
index c13aee245fa2..ffc37cb8a53b 100644
--- a/sd/source/ui/inc/FrameView.hxx
+++ b/sd/source/ui/inc/FrameView.hxx
@@ -36,7 +36,7 @@ class SD_DLLPUBLIC FrameView
: public SdrView
{
public:
- FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = NULL );
+ FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView = nullptr );
FrameView(const FrameView& rFrameView);
virtual ~FrameView();
diff --git a/sd/source/ui/inc/GraphicViewShell.hxx b/sd/source/ui/inc/GraphicViewShell.hxx
index 0e48b098b151..5e3740ab40fb 100644
--- a/sd/source/ui/inc/GraphicViewShell.hxx
+++ b/sd/source/ui/inc/GraphicViewShell.hxx
@@ -60,7 +60,7 @@ public:
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
vcl::Window* pParentWindow,
- FrameView* pFrameView = NULL);
+ FrameView* pFrameView = nullptr);
virtual ~GraphicViewShell();
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index d7016b13379e..37f5a9e3765e 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -126,13 +126,13 @@ public:
virtual sal_Int8 AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND) override;
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND) override;
diff --git a/sd/source/ui/inc/OutlineViewShell.hxx b/sd/source/ui/inc/OutlineViewShell.hxx
index dcf2a5a72646..a2c666df6cde 100644
--- a/sd/source/ui/inc/OutlineViewShell.hxx
+++ b/sd/source/ui/inc/OutlineViewShell.hxx
@@ -57,7 +57,7 @@ public:
SfxViewFrame* pFrame,
ViewShellBase& rViewShellBase,
vcl::Window* pParentWindow,
- FrameView* pFrameView = NULL);
+ FrameView* pFrameView = nullptr);
virtual ~OutlineViewShell();
diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
index 0b4f60b4a60e..18468e8d46ce 100644
--- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx
+++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx
@@ -84,7 +84,7 @@ public:
Returns a copy of this object. When this method is called with
an argument then this value will be returned.
*/
- virtual IteratorImplBase* Clone (IteratorImplBase* pObject=NULL) const;
+ virtual IteratorImplBase* Clone (IteratorImplBase* pObject=nullptr) const;
/** Test the equality of the this object and the given iterator. Two
iterators are taken to be equal when they point to the same object.
Iteration direction is not taken into account.
diff --git a/sd/source/ui/inc/PresentationViewShell.hxx b/sd/source/ui/inc/PresentationViewShell.hxx
index 6992b49990b1..39c7ecc029a7 100644
--- a/sd/source/ui/inc/PresentationViewShell.hxx
+++ b/sd/source/ui/inc/PresentationViewShell.hxx
@@ -39,7 +39,7 @@ private:
static void InitInterface_Impl();
public:
- PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView = NULL);
+ PresentationViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBase, vcl::Window* pParentWindow, FrameView* pFrameView = nullptr);
virtual ~PresentationViewShell();
/** This method is used by a simple class that passes some
diff --git a/sd/source/ui/inc/PreviewRenderer.hxx b/sd/source/ui/inc/PreviewRenderer.hxx
index 59aa549429be..692010999259 100644
--- a/sd/source/ui/inc/PreviewRenderer.hxx
+++ b/sd/source/ui/inc/PreviewRenderer.hxx
@@ -48,7 +48,7 @@ public:
preview. This makes the actual preview smaller.
*/
PreviewRenderer (
- OutputDevice* pTemplate = NULL,
+ OutputDevice* pTemplate = nullptr,
const bool bPaintFrame = true);
virtual ~PreviewRenderer();
diff --git a/sd/source/ui/inc/ShellFactory.hxx b/sd/source/ui/inc/ShellFactory.hxx
index 9c8eb4e6aab9..3be6aa17a46c 100644
--- a/sd/source/ui/inc/ShellFactory.hxx
+++ b/sd/source/ui/inc/ShellFactory.hxx
@@ -50,7 +50,7 @@ public:
virtual ShellType* CreateShell (
ShellId nId,
vcl::Window* pParentWindow,
- FrameView* pFrameView = NULL) = 0;
+ FrameView* pFrameView = nullptr) = 0;
/** Tell the factory that a shell is no longer in use. It may destroy
it or put it for future use in a cache.
diff --git a/sd/source/ui/inc/SlideSorterViewShell.hxx b/sd/source/ui/inc/SlideSorterViewShell.hxx
index 71f95de44bc8..4a81623f00f3 100644
--- a/sd/source/ui/inc/SlideSorterViewShell.hxx
+++ b/sd/source/ui/inc/SlideSorterViewShell.hxx
@@ -137,13 +137,13 @@ public:
virtual sal_Int8 AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND ) override;
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND) override;
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 184f4095a45c..c2f966fe9e4c 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -74,7 +74,7 @@ private:
bool m_bReadOnly;
public:
OutlinerMasterViewFilter()
- : m_pOutl(0)
+ : m_pOutl(nullptr)
, m_bReadOnly(false)
{
}
@@ -90,19 +90,19 @@ public:
View (
SdDrawDocument& rDrawDoc,
OutputDevice* pOutDev,
- ViewShell* pViewSh=NULL);
+ ViewShell* pViewSh=nullptr);
virtual ~View();
- void CompleteRedraw( OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) override;
+ void CompleteRedraw( OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
virtual bool GetAttributes( SfxItemSet& rTargetSet, bool bOnlyHardAttr = false ) const;
virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false);
virtual void MarkListHasChanged() override;
virtual void ModelHasChanged() override;
void SelectAll();
- void DoCut(vcl::Window* pWindow=NULL);
- void DoCopy(vcl::Window* pWindow=NULL);
- void DoPaste(vcl::Window* pWindow=NULL);
+ void DoCut(vcl::Window* pWindow=nullptr);
+ void DoCopy(vcl::Window* pWindow=nullptr);
+ void DoPaste(vcl::Window* pWindow=nullptr);
virtual void DoConnect(SdrOle2Obj* pOleObj) override;
virtual bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr = false);
void StartDrag( const Point& rStartPos, vcl::Window* pWindow );
@@ -110,13 +110,13 @@ public:
virtual sal_Int8 AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
virtual sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
@@ -134,8 +134,8 @@ public:
inline SdDrawDocument& GetDoc() const;
inline ViewShell* GetViewShell() const { return mpViewSh; }
- virtual bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = 0L, vcl::Window* pWin = 0L, bool bIsNewObj = false,
- SdrOutliner* pGivenOutliner = 0L, OutlinerView* pGivenOutlinerView = 0L,
+ virtual bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = nullptr, vcl::Window* pWin = nullptr, bool bIsNewObj = false,
+ SdrOutliner* pGivenOutliner = nullptr, OutlinerView* pGivenOutlinerView = nullptr,
bool bDontDeleteOutliner = false, bool bOnlyOneView = false, bool bGrabFocus = true) override;
virtual SdrEndTextEditKind SdrEndTextEdit(bool bDontDeleteReally = false) override;
diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx
index 1363fe57e200..0ea8a356deef 100644
--- a/sd/source/ui/inc/WindowUpdater.hxx
+++ b/sd/source/ui/inc/WindowUpdater.hxx
@@ -97,7 +97,7 @@ public:
text objects. This refromatting is necessary for the new values
to take effect.
*/
- void Update (OutputDevice* pDevice, SdDrawDocument* pDocument=0) const;
+ void Update (OutputDevice* pDevice, SdDrawDocument* pDocument=nullptr) const;
/** Callback that waits for notifications of a
<type>SvtCTLOptions</type> object.
diff --git a/sd/source/ui/inc/drawview.hxx b/sd/source/ui/inc/drawview.hxx
index 6b6ed16a4979..9dde2280c456 100644
--- a/sd/source/ui/inc/drawview.hxx
+++ b/sd/source/ui/inc/drawview.hxx
@@ -42,7 +42,7 @@ public:
virtual ~DrawView();
virtual void MarkListHasChanged() override;
- void CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0L) override;
+ void CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
virtual bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll = false) override;
diff --git a/sd/source/ui/inc/fudraw.hxx b/sd/source/ui/inc/fudraw.hxx
index 34426480cb64..cf7f0611ee8b 100644
--- a/sd/source/ui/inc/fudraw.hxx
+++ b/sd/source/ui/inc/fudraw.hxx
@@ -46,7 +46,7 @@ public:
virtual void Activate() override;
virtual void Deactivate() override;
- virtual void ForcePointer(const MouseEvent* pMEvt = NULL);
+ virtual void ForcePointer(const MouseEvent* pMEvt = nullptr);
virtual void DoubleClick(const MouseEvent& rMEvt);
diff --git a/sd/source/ui/inc/fuediglu.hxx b/sd/source/ui/inc/fuediglu.hxx
index 779f0b41fdb9..17e21dea69ac 100644
--- a/sd/source/ui/inc/fuediglu.hxx
+++ b/sd/source/ui/inc/fuediglu.hxx
@@ -46,7 +46,7 @@ public:
//Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
//and SHIFT+ENTER key to decide the position and draw the new insert point
- virtual void ForcePointer(const MouseEvent* pMEvt = NULL) override;
+ virtual void ForcePointer(const MouseEvent* pMEvt = nullptr) override;
private:
bool bBeginInsertPoint;
Point oldPoint;
diff --git a/sd/source/ui/inc/fusel.hxx b/sd/source/ui/inc/fusel.hxx
index 2ce910acc08e..867932c97d87 100644
--- a/sd/source/ui/inc/fusel.hxx
+++ b/sd/source/ui/inc/fusel.hxx
@@ -63,7 +63,7 @@ public:
virtual bool cancel() override;
//let mouse cursor move
- virtual void ForcePointer(const MouseEvent* pMEvt = NULL) override;
+ virtual void ForcePointer(const MouseEvent* pMEvt = nullptr) override;
protected:
FuSelection (ViewShell* pViewSh,
::sd::Window* pWin,
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index e0c1694ce85f..2a15962c9c8f 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -60,7 +60,7 @@ public:
NavDocInfo()
: bName(false)
, bActive(false)
- , mpDocShell(NULL)
+ , mpDocShell(nullptr)
{
}
@@ -102,7 +102,7 @@ public:
virtual void KeyInput( const KeyEvent& rKEvt ) override;
void InitTreeLB( const SdDrawDocument* pDoc );
- void RefreshDocumentLB( const OUString* pDocName = NULL );
+ void RefreshDocumentLB( const OUString* pDocName = nullptr );
bool InsertFile(const OUString& rFileName);
diff --git a/sd/source/ui/inc/optsitem.hxx b/sd/source/ui/inc/optsitem.hxx
index 6a9383a7f912..0d9ec215e6a1 100644
--- a/sd/source/ui/inc/optsitem.hxx
+++ b/sd/source/ui/inc/optsitem.hxx
@@ -144,9 +144,9 @@ class SD_DLLPUBLIC SdOptionsLayoutItem : public SfxPoolItem
public:
explicit SdOptionsLayoutItem( sal_uInt16 nWhich);
- SdOptionsLayoutItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsLayoutItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void SetOptions( SdOptions* pOpts ) const;
@@ -177,9 +177,9 @@ class SD_DLLPUBLIC SdOptionsContentsItem : public SfxPoolItem
{
public:
- SdOptionsContentsItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsContentsItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
private:
@@ -320,9 +320,9 @@ class SD_DLLPUBLIC SdOptionsMiscItem : public SfxPoolItem
public:
explicit SdOptionsMiscItem( sal_uInt16 nWhich);
- SdOptionsMiscItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsMiscItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void SetOptions( SdOptions* pOpts ) const;
@@ -389,9 +389,9 @@ class SD_DLLPUBLIC SdOptionsSnapItem : public SfxPoolItem
public:
explicit SdOptionsSnapItem( sal_uInt16 nWhich);
- SdOptionsSnapItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsSnapItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void SetOptions( SdOptions* pOpts ) const;
@@ -468,7 +468,7 @@ class SdOptionsGridItem : public SvxGridItem
{
public:
- SdOptionsGridItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsGridItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
void SetOptions( SdOptions* pOpts ) const;
};
@@ -562,9 +562,9 @@ class SD_DLLPUBLIC SdOptionsPrintItem : public SfxPoolItem
public:
explicit SdOptionsPrintItem( sal_uInt16 nWhich);
- SdOptionsPrintItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = NULL );
+ SdOptionsPrintItem( sal_uInt16 nWhich, SdOptions* pOpts, ::sd::FrameView* pView = nullptr );
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
virtual bool operator==( const SfxPoolItem& ) const override;
void SetOptions( SdOptions* pOpts ) const;
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index b134c54d5278..2976b65ae1d7 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -199,7 +199,7 @@ public:
void Fill( const SdDrawDocument*, SfxMedium* pSfxMedium, const OUString& rDocName );
void SetShowAllShapes (const bool bShowAllShapes, const bool bFill);
bool GetShowAllShapes() const { return mbShowAllShapes;}
- bool IsEqualToDoc( const SdDrawDocument* pInDoc = NULL );
+ bool IsEqualToDoc( const SdDrawDocument* pInDoc = nullptr );
bool HasSelectedChildren( const OUString& rName );
bool SelectEntry( const OUString& rName );
OUString GetSelectEntry();
@@ -219,7 +219,7 @@ public:
std::vector<OUString> GetSelectEntryList (const sal_uInt16 nDepth) const;
- SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = NULL);
+ SdDrawDocument* GetBookmarkDoc(SfxMedium* pMedium = nullptr);
bool IsLinkableSelected() const { return mbLinkableSelected; }
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index 5dd55c11e7e9..8d7e1d3bfd45 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -96,7 +96,7 @@ public:
static bool StartPreview( ViewShellBase& rBase,
const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode,
- vcl::Window* pParent = 0 );
+ vcl::Window* pParent = nullptr );
static void Stop( ViewShellBase& rBase );
@@ -112,7 +112,7 @@ public:
bool startPreview(
const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage,
const css::uno::Reference< css::animations::XAnimationNode >& xAnimationNode,
- vcl::Window* pParent = 0 );
+ vcl::Window* pParent = nullptr );
// uno api
diff --git a/sd/source/ui/inc/tools/IdleDetection.hxx b/sd/source/ui/inc/tools/IdleDetection.hxx
index 63690dc84662..a5c4639b871a 100644
--- a/sd/source/ui/inc/tools/IdleDetection.hxx
+++ b/sd/source/ui/inc/tools/IdleDetection.hxx
@@ -64,7 +64,7 @@ public:
IdleStates values or-ed together that describe what the system
is currently doing so that the caller can decide what to do.
*/
- static sal_Int32 GetIdleState (const vcl::Window* pWindow = NULL);
+ static sal_Int32 GetIdleState (const vcl::Window* pWindow = nullptr);
private:
/** Check whether there are input events pending.
diff --git a/sd/source/ui/inc/unoaprms.hxx b/sd/source/ui/inc/unoaprms.hxx
index 330e9a0f4b63..a53684b780d2 100644
--- a/sd/source/ui/inc/unoaprms.hxx
+++ b/sd/source/ui/inc/unoaprms.hxx
@@ -104,8 +104,8 @@ public:
, eNewSecondEffect(css::presentation::AnimationEffect_NONE)
, eOldSecondSpeed(css::presentation::AnimationSpeed_SLOW)
, eNewSecondSpeed(css::presentation::AnimationSpeed_SLOW)
- , pOldPathObj(NULL)
- , pNewPathObj(NULL)
+ , pOldPathObj(nullptr)
+ , pNewPathObj(nullptr)
, eOldClickAction(css::presentation::ClickAction_NONE)
, eNewClickAction(css::presentation::ClickAction_NONE)
, nOldVerb(0)
diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx
index 2246b597c619..f9f83c4e581d 100644
--- a/sd/source/ui/inc/unopage.hxx
+++ b/sd/source/ui/inc/unopage.hxx
@@ -95,7 +95,7 @@ public:
virtual ~SdGenericDrawPage() throw();
// intern
- bool isValid() { return (SvxDrawPage::mpPage != NULL) && (mpModel != NULL); }
+ bool isValid() { return (SvxDrawPage::mpPage != nullptr) && (mpModel != nullptr); }
SdPage* GetPage() const { return static_cast<SdPage*>(SvxDrawPage::mpPage); }
SdXImpressDocument* GetModel() const;
diff --git a/sd/source/ui/presenter/CanvasUpdateRequester.cxx b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
index 8a82cc2f0dab..ca56effd9f68 100644
--- a/sd/source/ui/presenter/CanvasUpdateRequester.cxx
+++ b/sd/source/ui/presenter/CanvasUpdateRequester.cxx
@@ -58,7 +58,7 @@ std::shared_ptr<CanvasUpdateRequester> CanvasUpdateRequester::Instance (
CanvasUpdateRequester::CanvasUpdateRequester (
const Reference<rendering::XSpriteCanvas>& rxCanvas)
: mxCanvas(rxCanvas),
- mnUserEventId(0),
+ mnUserEventId(nullptr),
mbUpdateFlag(false)
{
Reference<lang::XComponent> xComponent (mxCanvas, UNO_QUERY);
@@ -70,13 +70,13 @@ CanvasUpdateRequester::CanvasUpdateRequester (
CanvasUpdateRequester::~CanvasUpdateRequester()
{
- if (mnUserEventId != 0)
+ if (mnUserEventId != nullptr)
Application::RemoveUserEvent(mnUserEventId);
}
void CanvasUpdateRequester::RequestUpdate (const bool bUpdateAll)
{
- if (mnUserEventId == 0)
+ if (mnUserEventId == nullptr)
{
mbUpdateFlag = bUpdateAll;
mnUserEventId = Application::PostUserEvent(LINK(this, CanvasUpdateRequester, Callback));
@@ -89,7 +89,7 @@ void CanvasUpdateRequester::RequestUpdate (const bool bUpdateAll)
IMPL_LINK_NOARG_TYPED(CanvasUpdateRequester, Callback, void*, void)
{
- mnUserEventId = 0;
+ mnUserEventId = nullptr;
if (mxCanvas.is())
{
mxCanvas->updateScreen(mbUpdateFlag);
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx b/sd/source/ui/presenter/PresenterCanvas.cxx
index 2339fd0f735a..43d5b7b28684 100644
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -203,8 +203,8 @@ void SAL_CALL PresenterCanvas::initialize (
}
catch (RuntimeException&)
{
- mxSharedWindow = NULL;
- mxWindow = NULL;
+ mxSharedWindow = nullptr;
+ mxWindow = nullptr;
throw;
}
}
@@ -491,7 +491,7 @@ Reference<rendering::XAnimatedSprite> SAL_CALL
if (xSpriteCanvas.is())
return xSpriteCanvas->createSpriteFromAnimation(rAnimation);
else
- return NULL;
+ return nullptr;
}
Reference<rendering::XAnimatedSprite> SAL_CALL
@@ -509,7 +509,7 @@ Reference<rendering::XAnimatedSprite> SAL_CALL
if (xSpriteCanvas.is())
return xSpriteCanvas->createSpriteFromBitmaps(rAnimationBitmaps, nInterpolationMode);
else
- return NULL;
+ return nullptr;
}
Reference<rendering::XCustomSprite> SAL_CALL
@@ -533,7 +533,7 @@ Reference<rendering::XCustomSprite> SAL_CALL
mxUpdateWindow,
rSpriteSize);
else
- return NULL;
+ return nullptr;
}
Reference<rendering::XSprite> SAL_CALL
@@ -548,7 +548,7 @@ Reference<rendering::XSprite> SAL_CALL
return xSpriteCanvas->createClonedSprite(rxOriginal);
if (mxUpdateCanvas.is())
return mxUpdateCanvas->createClonedSprite(rxOriginal);
- return NULL;
+ return nullptr;
}
sal_Bool SAL_CALL PresenterCanvas::updateScreen (sal_Bool bUpdateAll)
@@ -557,7 +557,7 @@ sal_Bool SAL_CALL PresenterCanvas::updateScreen (sal_Bool bUpdateAll)
ThrowIfDisposed();
mbOffsetUpdatePending = true;
- if (mpUpdateRequester.get() != NULL)
+ if (mpUpdateRequester.get() != nullptr)
{
mpUpdateRequester->RequestUpdate(bUpdateAll);
return sal_True;
@@ -575,7 +575,7 @@ void SAL_CALL PresenterCanvas::disposing (const css::lang::EventObject& rEvent)
{
ThrowIfDisposed();
if (rEvent.Source == mxWindow)
- mxWindow = NULL;
+ mxWindow = nullptr;
}
//----- XWindowListener -------------------------------------------------------
@@ -651,7 +651,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterCanvas::getScaledBitmap(
// Not implemented.
- return NULL;
+ return nullptr;
}
rendering::ViewState PresenterCanvas::MergeViewState (
@@ -725,7 +725,7 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow(mxWindow);
vcl::Window* pSharedWindow = VCLUnoHelper::GetWindow(rxBaseWindow);
- if (pWindow!=NULL && pSharedWindow!=NULL)
+ if (pWindow!=nullptr && pSharedWindow!=nullptr)
{
Rectangle aBox = pWindow->GetWindowExtentsRelative(pSharedWindow);
@@ -745,11 +745,11 @@ awt::Point PresenterCanvas::GetOffset (const Reference<awt::XWindow>& rxBaseWind
::basegfx::B2DRectangle aClipRectangle;
vcl::Window* pWindow = VCLUnoHelper::GetWindow(mxWindow);
- if (pWindow == NULL)
+ if (pWindow == nullptr)
return ::basegfx::B2DRectangle();
vcl::Window* pSharedWindow = VCLUnoHelper::GetWindow(mxSharedWindow);
- if (pSharedWindow == NULL)
+ if (pSharedWindow == nullptr)
return ::basegfx::B2DRectangle();
// Get the bounding box of the window and create a range in the
@@ -891,7 +891,7 @@ void SAL_CALL PresenterCustomSprite::disposing()
throw (RuntimeException)
{
Reference<XComponent> xComponent (mxSprite, UNO_QUERY);
- mxSprite = NULL;
+ mxSprite = nullptr;
if (xComponent.is())
xComponent->dispose();
mpCanvas.clear();
@@ -922,7 +922,7 @@ void SAL_CALL PresenterCustomSprite::move (
// sprite clipping is done in the corrdinate system of the sprite.
// Therefore, after each change of the sprites location the window
// bounds have to be transformed into the sprites coordinate system.
- clip(NULL);
+ clip(nullptr);
}
void SAL_CALL PresenterCustomSprite::transform (const geometry::AffineMatrix2D& rTransformation)
diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx
index b2ff18223acb..6b1a76f0ec6a 100644
--- a/sd/source/ui/presenter/PresenterHelper.cxx
+++ b/sd/source/ui/presenter/PresenterHelper.cxx
@@ -91,7 +91,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow (
{
// Make the frame window transparent and make the parent able to
// draw behind it.
- if (pParentWindow.get() != NULL)
+ if (pParentWindow.get() != nullptr)
pParentWindow->EnableChildTransparentMode();
}
@@ -150,7 +150,7 @@ Reference<rendering::XCanvas> SAL_CALL PresenterHelper::createCanvas (
// No shared window is given or an explicit canvas service name is
// specified. Create a new canvas.
vcl::Window* pWindow = VCLUnoHelper::GetWindow(rxWindow);
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
Sequence<Any> aArg (5);
@@ -180,10 +180,10 @@ void SAL_CALL PresenterHelper::toTop (
throw (css::uno::RuntimeException, std::exception)
{
vcl::Window* pWindow = VCLUnoHelper::GetWindow(rxWindow);
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
pWindow->ToTop();
- pWindow->SetZOrder(NULL, ZOrderFlags::Last);
+ pWindow->SetZOrder(nullptr, ZOrderFlags::Last);
}
}
@@ -202,7 +202,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
throw (RuntimeException, std::exception)
{
if ( ! rxCanvas.is())
- return NULL;
+ return nullptr;
static IdMapEntry const map[] = {
{ "bitmaps/Background.png", BMP_PRESENTERSCREEN_BACKGROUND },
@@ -396,7 +396,7 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
}
}
if (nid == 0) {
- return 0;
+ return nullptr;
}
::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex());
@@ -405,18 +405,18 @@ Reference<rendering::XBitmap> SAL_CALL PresenterHelper::loadBitmap (
cppcanvas::VCLFactory::createCanvas(
Reference<css::rendering::XCanvas>(rxCanvas,UNO_QUERY)));
- if (pCanvas.get() != NULL)
+ if (pCanvas.get() != nullptr)
{
BitmapEx aBitmapEx = SdResId(nid);
cppcanvas::BitmapSharedPtr xBitmap(
cppcanvas::VCLFactory::createBitmap(pCanvas,
aBitmapEx));
- if (xBitmap.get() == NULL)
- return NULL;
+ if (xBitmap.get() == nullptr)
+ return nullptr;
return xBitmap->getUNOBitmap();
}
- return NULL;
+ return nullptr;
}
void SAL_CALL PresenterHelper::captureMouse (
@@ -427,7 +427,7 @@ void SAL_CALL PresenterHelper::captureMouse (
// Capture the mouse (if not already done.)
vcl::Window* pWindow = VCLUnoHelper::GetWindow(rxWindow);
- if (pWindow != NULL && ! pWindow->IsMouseCaptured())
+ if (pWindow != nullptr && ! pWindow->IsMouseCaptured())
{
pWindow->CaptureMouse();
}
@@ -440,7 +440,7 @@ void SAL_CALL PresenterHelper::releaseMouse (const Reference<awt::XWindow>& rxWi
// Release the mouse (if not already done.)
vcl::Window* pWindow = VCLUnoHelper::GetWindow(rxWindow);
- if (pWindow != NULL && pWindow->IsMouseCaptured())
+ if (pWindow != nullptr && pWindow->IsMouseCaptured())
{
pWindow->ReleaseMouse();
}
@@ -453,7 +453,7 @@ awt::Rectangle PresenterHelper::getWindowExtentsRelative (
{
vcl::Window* pChildWindow = VCLUnoHelper::GetWindow(rxChildWindow);
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(rxParentWindow);
- if (pChildWindow!=NULL && pParentWindow!=NULL)
+ if (pChildWindow!=nullptr && pParentWindow!=nullptr)
{
Rectangle aBox (pChildWindow->GetWindowExtentsRelative(pParentWindow));
return awt::Rectangle(aBox.Left(),aBox.Top(),aBox.GetWidth(),aBox.GetHeight());
diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx
index 9be1ee005d37..dac0ce3baddf 100644
--- a/sd/source/ui/presenter/PresenterPreviewCache.cxx
+++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx
@@ -102,7 +102,7 @@ void SAL_CALL PresenterPreviewCache::setDocumentSlides (
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCacheContext.get()!=NULL);
+ OSL_ASSERT(mpCacheContext.get()!=nullptr);
mpCacheContext->SetDocumentSlides(rxSlides, rxDocument);
}
@@ -113,7 +113,7 @@ void SAL_CALL PresenterPreviewCache::setVisibleRange (
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCacheContext.get()!=NULL);
+ OSL_ASSERT(mpCacheContext.get()!=nullptr);
mpCacheContext->SetVisibleSlideRange (nFirstVisibleSlideIndex, nLastVisibleSlideIndex);
}
@@ -123,7 +123,7 @@ void SAL_CALL PresenterPreviewCache::setPreviewSize (
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCache.get()!=NULL);
+ OSL_ASSERT(mpCache.get()!=nullptr);
maPreviewSize = Size(rSize.Width, rSize.Height);
mpCache->ChangeSize(maPreviewSize, Bitmap::HasFastScale());
@@ -135,18 +135,18 @@ Reference<rendering::XBitmap> SAL_CALL PresenterPreviewCache::getSlidePreview (
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCacheContext.get()!=NULL);
+ OSL_ASSERT(mpCacheContext.get()!=nullptr);
cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createCanvas(rxCanvas));
const SdrPage* pPage = mpCacheContext->GetPage(nSlideIndex);
- if (pPage == NULL)
+ if (pPage == nullptr)
throw RuntimeException();
const BitmapEx aPreview (mpCache->GetPreviewBitmap(pPage,true));
if (aPreview.IsEmpty())
- return NULL;
+ return nullptr;
else
return cppcanvas::VCLFactory::createBitmap(
pCanvas,
@@ -175,7 +175,7 @@ void SAL_CALL PresenterPreviewCache::pause()
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCache.get()!=NULL);
+ OSL_ASSERT(mpCache.get()!=nullptr);
mpCache->Pause();
}
@@ -183,7 +183,7 @@ void SAL_CALL PresenterPreviewCache::resume()
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- OSL_ASSERT(mpCache.get()!=NULL);
+ OSL_ASSERT(mpCache.get()!=nullptr);
mpCache->Resume();
}
@@ -346,9 +346,9 @@ const SdrPage* PresenterPreviewCache::PresenterCacheContext::GetPage (
const sal_Int32 nSlideIndex) const
{
if ( ! mxSlides.is())
- return NULL;
+ return nullptr;
if (nSlideIndex < 0 || nSlideIndex >= mxSlides->getCount())
- return NULL;
+ return nullptr;
Reference<drawing::XDrawPage> xSlide (mxSlides->getByIndex(nSlideIndex), UNO_QUERY);
const SdPage* pPage = SdPage::getImplementation(xSlide);
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 2988f7fcff8a..face96dd5e65 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -222,7 +222,7 @@ void PresenterTextView::ThrowIfDisposed()
{
if (PresenterTextViewInterfaceBase::rBHelper.bDisposed
|| PresenterTextViewInterfaceBase::rBHelper.bInDispose
- || mpImplementation.get()==NULL)
+ || mpImplementation.get()==nullptr)
{
throw lang::DisposedException ("PresenterTextView object has already been disposed",
static_cast<uno::XWeak*>(this));
@@ -243,7 +243,7 @@ PresenterTextView::Implementation::Implementation()
mxBitmap(),
mpCanvas(),
mpOutputDevice(VclPtr<VirtualDevice>::Create(*Application::GetDefaultDevice(), 0, 0)),
- mpEditEngine(NULL),
+ mpEditEngine(nullptr),
mpEditEngineItemPool(EditEngine::CreatePool()),
maSize(100,100),
maBackgroundColor(0xffffffff),
@@ -266,7 +266,7 @@ PresenterTextView::Implementation::~Implementation()
EditEngine * PresenterTextView::Implementation::GetEditEngine()
{
- if (mpEditEngine == NULL)
+ if (mpEditEngine == nullptr)
mpEditEngine = CreateEditEngine ();
return mpEditEngine;
}
@@ -274,7 +274,7 @@ EditEngine * PresenterTextView::Implementation::GetEditEngine()
EditEngine* PresenterTextView::Implementation::CreateEditEngine()
{
EditEngine* pEditEngine = mpEditEngine;
- if (pEditEngine == NULL)
+ if (pEditEngine == nullptr)
{
// set fonts to be used
@@ -344,26 +344,26 @@ EditEngine* PresenterTextView::Implementation::CreateEditEngine()
void PresenterTextView::Implementation::SetCanvas (const cppcanvas::CanvasSharedPtr& rpCanvas)
{
mpCanvas = rpCanvas;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
}
void PresenterTextView::Implementation::SetSize (const Size aSize)
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
maSize = aSize;
mpEditEngine->SetPaperSize(maSize);
mnTotalHeight = -1;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
}
void PresenterTextView::Implementation::SetBackgroundColor (const Color aColor)
{
maBackgroundColor = aColor;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
- DBG_ASSERT(mpEditEngineItemPool!=NULL, "EditEngineItemPool missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
+ DBG_ASSERT(mpEditEngineItemPool!=nullptr, "EditEngineItemPool missing");
mpEditEngine->SetBackgroundColor(aColor);
mpEditEngine->EnableAutoColor(false);
mpEditEngine->ForceAutoColor(false);
@@ -372,18 +372,18 @@ void PresenterTextView::Implementation::SetBackgroundColor (const Color aColor)
void PresenterTextView::Implementation::SetTextColor (const Color aColor)
{
maTextColor = aColor;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
- DBG_ASSERT(mpEditEngineItemPool!=NULL, "EditEngineItemPool missing");
+ DBG_ASSERT(mpEditEngineItemPool!=nullptr, "EditEngineItemPool missing");
mpEditEngineItemPool->SetPoolDefaultItem(SvxColorItem(aColor, EE_CHAR_COLOR));
}
void PresenterTextView::Implementation::SetFontDescriptor (
const awt::FontDescriptor& rFontDescriptor)
{
- mxBitmap = NULL;
+ mxBitmap = nullptr;
- DBG_ASSERT(mpEditEngineItemPool!=NULL, "EditEngineItemPool missing");
+ DBG_ASSERT(mpEditEngineItemPool!=nullptr, "EditEngineItemPool missing");
const sal_Int32 nFontHeight = rFontDescriptor.Height;
@@ -403,7 +403,7 @@ void PresenterTextView::Implementation::SetFontDescriptor (
mpEditEngineItemPool->SetPoolDefaultItem(aSvxFontItem);
mnTotalHeight = -1;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
CheckTop();
mnTotalHeight = -1;
@@ -415,22 +415,22 @@ void PresenterTextView::Implementation::SetTop (const sal_Int32 nTop)
return;
mnTop = nTop;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
CheckTop();
}
void PresenterTextView::Implementation::SetText (const OUString& rText)
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
msText = rText;
mpEditEngine->SetPaperSize(maSize);
mnTotalHeight = -1;
- mxBitmap = NULL;
+ mxBitmap = nullptr;
}
sal_Int32 PresenterTextView::Implementation::ParseDistance (const OUString& rsDistance) const
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
sal_Int32 nDistance (0);
if (rsDistance.endsWith("px"))
{
@@ -449,7 +449,7 @@ sal_Int32 PresenterTextView::Implementation::ParseDistance (const OUString& rsDi
Reference<rendering::XBitmap> PresenterTextView::Implementation::GetBitmap()
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
if ( ! mxBitmap.is())
{
@@ -485,7 +485,7 @@ Reference<rendering::XBitmap> PresenterTextView::Implementation::GetBitmap()
sal_Int32 PresenterTextView::Implementation::GetTotalHeight()
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
if (mnTotalHeight < 0)
{
@@ -498,11 +498,11 @@ sal_Int32 PresenterTextView::Implementation::GetTotalHeight()
void PresenterTextView::Implementation::CheckTop()
{
- DBG_ASSERT(mpEditEngine!=NULL, "EditEngine missing");
+ DBG_ASSERT(mpEditEngine!=nullptr, "EditEngine missing");
- if (mpEditEngine!=NULL && mnTotalHeight < 0)
+ if (mpEditEngine!=nullptr && mnTotalHeight < 0)
mnTotalHeight = mpEditEngine->GetTextHeight();
- if (mpEditEngine!=NULL && mnTop >= mnTotalHeight)
+ if (mpEditEngine!=nullptr && mnTop >= mnTotalHeight)
mnTop = mnTotalHeight - mpEditEngine->GetLineHeight(0);
if (mnTotalHeight < maSize.Height())
diff --git a/sd/source/ui/presenter/SlideRenderer.cxx b/sd/source/ui/presenter/SlideRenderer.cxx
index f794fe3ff506..8ca8b5af667b 100644
--- a/sd/source/ui/presenter/SlideRenderer.cxx
+++ b/sd/source/ui/presenter/SlideRenderer.cxx
@@ -108,12 +108,12 @@ Reference<rendering::XBitmap> SlideRenderer::createPreviewForCanvas (
cppcanvas::CanvasSharedPtr pCanvas (
cppcanvas::VCLFactory::createCanvas(rxCanvas));
- if (pCanvas.get() != NULL)
+ if (pCanvas.get() != nullptr)
return cppcanvas::VCLFactory::createBitmap(
pCanvas,
CreatePreview(rxSlide, rMaximalSize, nSuperSampleFactor))->getUNOBitmap();
else
- return NULL;
+ return nullptr;
}
awt::Size SAL_CALL SlideRenderer::calculatePreviewSize (
@@ -147,7 +147,7 @@ BitmapEx SlideRenderer::CreatePreview (
std::exception)
{
const SdPage* pPage = SdPage::getImplementation(rxSlide);
- if (pPage == NULL)
+ if (pPage == nullptr)
throw lang::IllegalArgumentException("SlideRenderer::createPreview() called with invalid slide",
static_cast<XWeak*>(this),
0);
diff --git a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
index 895cf7cb3ba3..a5c5a94d5dfb 100644
--- a/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
+++ b/sd/source/ui/remotecontrol/AvahiNetworkService.cxx
@@ -31,15 +31,15 @@
using namespace sd;
-static AvahiClient *client = NULL;
-static AvahiThreadedPoll *threaded_poll = NULL;
-static AvahiEntryGroup *group = NULL;
-static AvahiNetworkService *avahiService = NULL;
+static AvahiClient *client = nullptr;
+static AvahiThreadedPoll *threaded_poll = nullptr;
+static AvahiEntryGroup *group = nullptr;
+static AvahiNetworkService *avahiService = nullptr;
static bool create_services(AvahiClient *c);
static void entry_group_callback(AvahiEntryGroup *g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void *userdata) {
- assert(g == group || group == NULL);
+ assert(g == group || group == nullptr);
group = g;
/* Called whenever the entry group state changes */
@@ -88,7 +88,7 @@ static bool create_services(AvahiClient *c) {
return false;
if (!group)
- if (!(group = avahi_entry_group_new(c, entry_group_callback, NULL))) {
+ if (!(group = avahi_entry_group_new(c, entry_group_callback, nullptr))) {
SAL_WARN("sdremote.wifi", "avahi_entry_group_new() failed: " << avahi_strerror(avahi_client_errno(c)));
avahiService->clear();
return false;
@@ -104,7 +104,7 @@ static bool create_services(AvahiClient *c) {
snprintf(r, sizeof(r), "random=%i", nRandom);
int ret = avahi_entry_group_add_service(
group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, static_cast<AvahiPublishFlags>(0),
- avahiService->getName().c_str(), kREG_TYPE, NULL, NULL, 1599, "local", r, NULL
+ avahiService->getName().c_str(), kREG_TYPE, nullptr, nullptr, 1599, "local", r, NULL
);
if (ret < 0) {
@@ -175,7 +175,7 @@ void AvahiNetworkService::setup() {
return;
}
- if (!(client = avahi_client_new(avahi_threaded_poll_get(threaded_poll), static_cast<AvahiClientFlags>(0), client_callback, NULL, &error))) {
+ if (!(client = avahi_client_new(avahi_threaded_poll_get(threaded_poll), static_cast<AvahiClientFlags>(0), client_callback, nullptr, &error))) {
SAL_WARN("sdremote.wifi", "avahi_client_new failed");
return;
}
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index fb817ddc443f..103ad97f9dc7 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -104,8 +104,8 @@ struct sd::BluetoothServer::Impl {
Impl()
: mpContext( g_main_context_new() )
- , mpConnection( NULL )
- , mpService( NULL )
+ , mpConnection( nullptr )
+ , mpService( nullptr )
, mbExitMainloop( false )
, maBluezVersion( UNKNOWN )
{ }
@@ -123,7 +123,7 @@ struct sd::BluetoothServer::Impl {
}
else
{
- return NULL;
+ return nullptr;
}
}
};
@@ -141,7 +141,7 @@ dbusConnectToNameOnBus()
{
SAL_WARN( "sdremote.bluetooth", "failed to get dbus system bus: " << aError.message );
dbus_error_free( &aError );
- return NULL;
+ return nullptr;
}
return pConnection;
@@ -150,14 +150,14 @@ dbusConnectToNameOnBus()
static DBusMessage *
sendUnrefAndWaitForReply( DBusConnection *pConnection, DBusMessage *pMsg )
{
- DBusPendingCall *pPending = NULL;
+ DBusPendingCall *pPending = nullptr;
if( !pMsg || !dbus_connection_send_with_reply( pConnection, pMsg, &pPending,
-1 /* default timeout */ ) )
{
SAL_WARN( "sdremote.bluetooth", "Memory allocation failed on message send" );
dbus_message_unref( pMsg );
- return NULL;
+ return nullptr;
}
dbus_connection_flush( pConnection );
dbus_message_unref( pMsg );
@@ -217,7 +217,7 @@ getBluez5Adapter(DBusConnection *pConnection)
// org.bluez.Adapter1 .
pMsg = DBusObject( "org.bluez", "/", "org.freedesktop.DBus.ObjectManager" ).getMethodCall( "GetManagedObjects" );
if (!pMsg)
- return NULL;
+ return nullptr;
const gchar* pInterfaceType = "org.bluez.Adapter1";
@@ -236,7 +236,7 @@ getBluez5Adapter(DBusConnection *pConnection)
{
DBusMessageIter aContainerIter;
dbus_message_iter_recurse(&aObject, &aContainerIter);
- char *pPath = 0;
+ char *pPath = nullptr;
do
{
if (DBUS_TYPE_OBJECT_PATH == dbus_message_iter_get_arg_type(&aContainerIter))
@@ -287,7 +287,7 @@ getBluez5Adapter(DBusConnection *pConnection)
dbus_message_unref(pMsg);
}
- return NULL;
+ return nullptr;
}
static DBusObject *
@@ -305,7 +305,7 @@ bluez4GetDefaultService( DBusConnection *pConnection )
if (!pMsg)
{
SAL_WARN("sdremote.bluetooth", "Couldn't retrieve DBusObject for DefaultAdapter");
- return NULL;
+ return nullptr;
}
SAL_INFO("sdremote.bluetooth", "successfully retrieved org.bluez.Manager.DefaultAdapter, attempting to use.");
@@ -313,13 +313,13 @@ bluez4GetDefaultService( DBusConnection *pConnection )
if(!pMsg || !dbus_message_iter_init( pMsg, &it ) )
{
- return NULL;
+ return nullptr;
}
// This works for Bluez 4
if( DBUS_TYPE_OBJECT_PATH == dbus_message_iter_get_arg_type( &it ) )
{
- const char *pObjectPath = NULL;
+ const char *pObjectPath = nullptr;
dbus_message_iter_get_basic( &it, &pObjectPath );
SAL_INFO( "sdremote.bluetooth", "DefaultAdapter retrieved: '"
<< pObjectPath << "' '" << pInterfaceType << "'" );
@@ -330,7 +330,7 @@ bluez4GetDefaultService( DBusConnection *pConnection )
// this method doesn't exist.
else if ( DBUS_TYPE_STRING == dbus_message_iter_get_arg_type( &it ) )
{
- const char *pMessage = NULL;
+ const char *pMessage = nullptr;
dbus_message_iter_get_basic( &it, &pMessage );
SAL_INFO( "sdremote.bluetooth", "Error message: '"
<< pMessage << "' '" << pInterfaceType << "'" );
@@ -341,7 +341,7 @@ bluez4GetDefaultService( DBusConnection *pConnection )
<< (const char) dbus_message_iter_get_arg_type( &it ) << "'" );
}
dbus_message_unref(pMsg);
- return NULL;
+ return nullptr;
}
static bool
@@ -642,11 +642,11 @@ getBluez4BooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter,
DBusMessageIter dictIt;
dbus_message_iter_recurse( &arrayIt, &dictIt );
- const char *pName = NULL;
+ const char *pName = nullptr;
if( dbus_message_iter_get_arg_type( &dictIt ) == DBUS_TYPE_STRING )
{
dbus_message_iter_get_basic( &dictIt, &pName );
- if( pName != NULL && !strcmp( pName, pPropertyName ) )
+ if( pName != nullptr && !strcmp( pName, pPropertyName ) )
{
SAL_INFO( "sdremote.bluetooth", "hit " << pPropertyName << " property" );
dbus_message_iter_next( &dictIt );
@@ -843,7 +843,7 @@ setDiscoverable( DBusConnection *pConnection, DBusObject *pAdapter, bool bDiscov
dbus_uint32_t nTimeout = 0;
dbus_message_iter_append_basic( &varIt, DBUS_TYPE_UINT32, &nTimeout );
dbus_message_iter_close_container( &it, &varIt );
- dbus_connection_send( pConnection, pMsg, NULL ); // async send - why not ?
+ dbus_connection_send( pConnection, pMsg, nullptr ); // async send - why not ?
dbus_message_unref( pMsg );
// set discoverable value
@@ -856,7 +856,7 @@ setDiscoverable( DBusConnection *pConnection, DBusObject *pAdapter, bool bDiscov
dbus_bool_t bValue = bDiscoverable;
dbus_message_iter_append_basic( &varIt, DBUS_TYPE_BOOLEAN, &bValue );
dbus_message_iter_close_container( &it, &varIt ); // async send - why not ?
- dbus_connection_send( pConnection, pMsg, NULL );
+ dbus_connection_send( pConnection, pMsg, nullptr );
dbus_message_unref( pMsg );
}
else if (pAdapter->maInterface == "org.bluez.Adapter1") // Bluez 5
@@ -876,7 +876,7 @@ registerWithDefaultAdapter( DBusConnection *pConnection )
bluetooth_service_record ) )
{
delete pService;
- return NULL;
+ return nullptr;
}
}
@@ -943,7 +943,7 @@ DBusHandlerResult ProfileMessageFunction
// For some reason an (empty?) reply is expected.
DBusMessage* pRet = dbus_message_new_method_return(pMessage);
- dbus_connection_send(pConnection, pRet, NULL);
+ dbus_connection_send(pConnection, pRet, nullptr);
dbus_message_unref(pRet);
// We could read the remote profile version and features here
@@ -1032,7 +1032,7 @@ registerBluez5Profile(DBusConnection* pConnection, std::vector<Communicator*>* p
DBusMessageIter aEntry;
{
- dbus_message_iter_open_container(&aOptionsIter, DBUS_TYPE_DICT_ENTRY, NULL, &aEntry);
+ dbus_message_iter_open_container(&aOptionsIter, DBUS_TYPE_DICT_ENTRY, nullptr, &aEntry);
const char *pString = "Name";
dbus_message_iter_append_basic(&aEntry, DBUS_TYPE_STRING, &pString);
@@ -1105,7 +1105,7 @@ void BluetoothServer::ensureDiscoverable()
if( !spServer )
return;
GSource *pIdle = g_idle_source_new();
- g_source_set_callback( pIdle, ensureDiscoverable_cb, NULL, NULL );
+ g_source_set_callback( pIdle, ensureDiscoverable_cb, nullptr, nullptr );
g_source_set_priority( pIdle, G_PRIORITY_DEFAULT );
g_source_attach( pIdle, spServer->mpImpl->mpContext );
g_source_unref( pIdle );
@@ -1119,7 +1119,7 @@ void BluetoothServer::restoreDiscoverable()
if( !spServer )
return;
GSource *pIdle = g_idle_source_new();
- g_source_set_callback( pIdle, restoreDiscoverable_cb, NULL, NULL );
+ g_source_set_callback( pIdle, restoreDiscoverable_cb, nullptr, nullptr );
g_source_set_priority( pIdle, G_PRIORITY_DEFAULT_IDLE );
g_source_attach( pIdle, spServer->mpImpl->mpContext );
g_source_unref( pIdle );
@@ -1222,8 +1222,8 @@ void SAL_CALL BluetoothServer::run()
}
unregisterBluez5Profile( pConnection );
g_main_context_unref( mpImpl->mpContext );
- mpImpl->mpConnection = NULL;
- mpImpl->mpContext = NULL;
+ mpImpl->mpConnection = nullptr;
+ mpImpl->mpContext = nullptr;
return;
}
@@ -1311,8 +1311,8 @@ void SAL_CALL BluetoothServer::run()
unregisterBluez5Profile( pConnection );
g_main_context_unref( mpImpl->mpContext );
- mpImpl->mpConnection = NULL;
- mpImpl->mpContext = NULL;
+ mpImpl->mpConnection = nullptr;
+ mpImpl->mpContext = nullptr;
#elif defined(WIN32)
WORD wVersionRequested;
@@ -1528,7 +1528,7 @@ void SAL_CALL BluetoothServer::run()
#endif
}
-BluetoothServer *sd::BluetoothServer::spServer = NULL;
+BluetoothServer *sd::BluetoothServer::spServer = nullptr;
void BluetoothServer::setup( std::vector<Communicator*>* pCommunicators )
{
diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx
index 33f05f228246..f983937554ac 100644
--- a/sd/source/ui/remotecontrol/Communicator.cxx
+++ b/sd/source/ui/remotecontrol/Communicator.cxx
@@ -29,8 +29,8 @@ using namespace osl;
Communicator::Communicator( IBluetoothSocket *pSocket ):
Thread( "CommunicatorThread" ),
mpSocket( pSocket ),
- pTransmitter( 0 ),
- mListener( 0 )
+ pTransmitter( nullptr ),
+ mListener( nullptr )
{
}
@@ -120,11 +120,11 @@ void Communicator::execute()
pTransmitter->notifyFinished();
pTransmitter->join();
- pTransmitter = NULL;
+ pTransmitter = nullptr;
mpSocket->close();
delete mpSocket;
- mpSocket = NULL;
+ mpSocket = nullptr;
RemoteServer::removeCommunicator( this );
}
@@ -152,7 +152,7 @@ void Communicator::disposeListener()
if ( mListener.is() )
{
mListener->disposing();
- mListener = NULL;
+ mListener = nullptr;
}
}
diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index d60ea34d5a27..4fa31fbfe659 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -55,7 +55,7 @@ using namespace sd;
DiscoveryService::DiscoveryService()
: mSocket(-1)
- , zService(0)
+ , zService(nullptr)
{
}
@@ -188,7 +188,7 @@ void SAL_CALL DiscoveryService::run()
}
}
-DiscoveryService *sd::DiscoveryService::spService = NULL;
+DiscoveryService *sd::DiscoveryService::spService = nullptr;
void DiscoveryService::setup()
{
diff --git a/sd/source/ui/remotecontrol/ImagePreparer.cxx b/sd/source/ui/remotecontrol/ImagePreparer.cxx
index 7de0bf84fccd..dd50f1f3516a 100644
--- a/sd/source/ui/remotecontrol/ImagePreparer.cxx
+++ b/sd/source/ui/remotecontrol/ImagePreparer.cxx
@@ -113,7 +113,7 @@ uno::Sequence<sal_Int8> ImagePreparer::preparePreview(
sal_uInt64 &rSize )
{
OUString aFileURL;
- FileBase::createTempFile( 0, 0, &aFileURL );
+ FileBase::createTempFile( nullptr, nullptr, &aFileURL );
uno::Reference< drawing::XGraphicExportFilter > xFilter =
drawing::GraphicExportFilter::create( ::comphelper::getProcessComponentContext() );
diff --git a/sd/source/ui/remotecontrol/Listener.cxx b/sd/source/ui/remotecontrol/Listener.cxx
index 72b3c95b8d3b..4792d6e61bfa 100644
--- a/sd/source/ui/remotecontrol/Listener.cxx
+++ b/sd/source/ui/remotecontrol/Listener.cxx
@@ -24,7 +24,7 @@ Listener::Listener( const ::rtl::Reference<Communicator>& rCommunicator,
sd::Transmitter *aTransmitter ):
::cppu::WeakComponentImplHelper< XSlideShowListener >( m_aMutex ),
mCommunicator( rCommunicator ),
- pTransmitter( NULL )
+ pTransmitter( nullptr )
{
pTransmitter = aTransmitter;
}
@@ -134,11 +134,11 @@ void SAL_CALL Listener::slideAnimationsEnded()
void SAL_CALL Listener::disposing()
{
- pTransmitter = NULL;
+ pTransmitter = nullptr;
if ( mController.is() )
{
mController->removeSlideShowListener( this );
- mController = NULL;
+ mController = nullptr;
}
mCommunicator->informListenerDestroyed();
}
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index ad9dcc345df2..82c67c7e5e21 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -82,21 +82,21 @@ void RemoteServer::execute()
if (!xContext.is()/* || !officecfg::Office::Common::Misc::ExperimentalMode::get(xContext)*/)
{
// SAL_INFO("sdremote", "not in experimental mode, disabling TCP server");
- spServer = NULL;
+ spServer = nullptr;
return;
}
osl::SocketAddr aAddr( "0", PORT );
if ( !mSocket.bind( aAddr ) )
{
SAL_WARN( "sdremote", "bind failed" << mSocket.getErrorAsString() );
- spServer = NULL;
+ spServer = nullptr;
return;
}
if ( !mSocket.listen(3) )
{
SAL_WARN( "sdremote", "listen failed" << mSocket.getErrorAsString() );
- spServer = NULL;
+ spServer = nullptr;
return;
}
while ( true )
@@ -106,7 +106,7 @@ void RemoteServer::execute()
if ( mSocket.acceptConnection( aSocket ) == osl_Socket_Error )
{
SAL_WARN( "sdremote", "accept failed" << mSocket.getErrorAsString() );
- spServer = NULL;
+ spServer = nullptr;
return; // Closed, or other issue.
}
BufferedStreamSocket *pSocket = new BufferedStreamSocket( aSocket);
@@ -179,10 +179,10 @@ void RemoteServer::execute()
}
}
SAL_INFO( "sdremote", "shutting down RemoteServer" );
- spServer = NULL; // Object is destroyed when Thread::execute() ends.
+ spServer = nullptr; // Object is destroyed when Thread::execute() ends.
}
-RemoteServer *sd::RemoteServer::spServer = NULL;
+RemoteServer *sd::RemoteServer::spServer = nullptr;
::osl::Mutex sd::RemoteServer::sDataMutex;
::std::vector<Communicator*> sd::RemoteServer::sCommunicators;
diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
index 769ffd1aac77..9654c7b85877 100644
--- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
@@ -83,8 +83,8 @@ VclPtr<vcl::Window> AllMasterPagesSelector::Create (
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
{
SdDrawDocument* pDocument = rViewShellBase.GetDocument();
- if (pDocument == NULL)
- return NULL;
+ if (pDocument == nullptr)
+ return nullptr;
std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer());
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index adb5de107452..6470397cb271 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -48,8 +48,8 @@ VclPtr<vcl::Window> CurrentMasterPagesSelector::Create (
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
{
SdDrawDocument* pDocument = rViewShellBase.GetDocument();
- if (pDocument == NULL)
- return NULL;
+ if (pDocument == nullptr)
+ return nullptr;
std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer());
@@ -95,13 +95,13 @@ CurrentMasterPagesSelector::~CurrentMasterPagesSelector()
void CurrentMasterPagesSelector::dispose()
{
- if (mrDocument.GetDocSh() != NULL)
+ if (mrDocument.GetDocSh() != nullptr)
{
EndListening(*mrDocument.GetDocSh());
}
else
{
- OSL_ASSERT(mrDocument.GetDocSh() != NULL);
+ OSL_ASSERT(mrDocument.GetDocSh() != nullptr);
}
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this,CurrentMasterPagesSelector,EventMultiplexerListener));
@@ -114,13 +114,13 @@ void CurrentMasterPagesSelector::LateInit()
{
MasterPagesSelector::LateInit();
MasterPagesSelector::Fill();
- if (mrDocument.GetDocSh() != NULL)
+ if (mrDocument.GetDocSh() != nullptr)
{
StartListening(*mrDocument.GetDocSh());
}
else
{
- OSL_ASSERT(mrDocument.GetDocSh() != NULL);
+ OSL_ASSERT(mrDocument.GetDocSh() != nullptr);
}
}
@@ -133,7 +133,7 @@ void CurrentMasterPagesSelector::Fill (ItemList& rItemList)
for (sal_uInt16 nIndex=0; nIndex<nPageCount; nIndex++)
{
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD);
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
continue;
// Use the name of the master page to avoid duplicate entries.
@@ -179,7 +179,7 @@ void CurrentMasterPagesSelector::UpdateSelection()
for (nIndex=0; nIndex<nPageCount && bLoop; nIndex++)
{
SdPage* pPage = mrDocument.GetSdPage (nIndex, PK_STANDARD);
- if (pPage != NULL && pPage->IsSelected())
+ if (pPage != nullptr && pPage->IsSelected())
{
if ( ! pPage->TRG_HasMasterPage())
{
@@ -195,7 +195,7 @@ void CurrentMasterPagesSelector::UpdateSelection()
{
SdrPage& rMasterPage (pPage->TRG_GetMasterPage());
SdPage* pMasterPage = static_cast<SdPage*>(&rMasterPage);
- if (pMasterPage != NULL)
+ if (pMasterPage != nullptr)
aNames.insert (pMasterPage->GetName());
}
}
@@ -220,7 +220,7 @@ void CurrentMasterPagesSelector::ExecuteCommand (const sal_Int32 nCommandId)
// Check once again that the master page can safely be deleted,
// i.e. is not used.
SdPage* pMasterPage = GetSelectedMasterPage();
- if (pMasterPage != NULL
+ if (pMasterPage != nullptr
&& mrDocument.GetMasterPageUserCount(pMasterPage) == 0)
{
// Removing the precious flag so that the following call to
diff --git a/sd/source/ui/sidebar/DocumentHelper.cxx b/sd/source/ui/sidebar/DocumentHelper.cxx
index 05bd618e5921..9e1d855e469d 100644
--- a/sd/source/ui/sidebar/DocumentHelper.cxx
+++ b/sd/source/ui/sidebar/DocumentHelper.cxx
@@ -43,17 +43,17 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
SdDrawDocument& rTargetDocument,
SdPage* pMasterPage)
{
- SdPage* pNewMasterPage = NULL;
+ SdPage* pNewMasterPage = nullptr;
do
{
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
break;
// Check the presence of the source document.
SdDrawDocument* pSourceDocument = static_cast<SdDrawDocument*>(
pMasterPage->GetModel());
- if (pSourceDocument == NULL)
+ if (pSourceDocument == nullptr)
break;
// When the given master page already belongs to the target document
@@ -84,7 +84,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
// Get the notes master page.
SdPage* pNotesMasterPage = static_cast<SdPage*>(
pSourceDocument->GetMasterPage(nIndex+1));
- if (pNotesMasterPage == NULL)
+ if (pNotesMasterPage == nullptr)
break;
// Check if a master page with the same name as that of the given
@@ -95,7 +95,7 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
{
SdPage* pCandidate = static_cast<SdPage*>(
rTargetDocument.GetMasterSdPage (nMaster, PK_STANDARD));
- if (pMasterPage!=NULL
+ if (pMasterPage!=nullptr
&& pCandidate->GetName() == pMasterPage->GetName())
{
bPageExists = true;
@@ -121,18 +121,18 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
SdPage* pSlide = rTargetDocument.GetSdPage(
rTargetDocument.GetSdPageCount(PK_STANDARD)-1,
PK_STANDARD);
- if (pSlide == NULL)
+ if (pSlide == nullptr)
break;
pSlide->SetAutoLayout(AUTOLAYOUT_TITLE, true);
// Create a copy of the master page and the associated notes
// master page and insert them into our document.
pNewMasterPage = AddMasterPage(rTargetDocument, pMasterPage);
- if (pNewMasterPage==NULL)
+ if (pNewMasterPage==nullptr)
break;
SdPage* pNewNotesMasterPage
= AddMasterPage(rTargetDocument, pNotesMasterPage);
- if (pNewNotesMasterPage==NULL)
+ if (pNewNotesMasterPage==nullptr)
break;
// Make the connection from the new slide to the master page
@@ -156,15 +156,15 @@ SdPage* DocumentHelper::CopyMasterPageToLocalDocument (
SdPage* DocumentHelper::GetSlideForMasterPage (SdPage* pMasterPage)
{
- SdPage* pCandidate = NULL;
+ SdPage* pCandidate = nullptr;
- SdDrawDocument* pDocument = NULL;
- if (pMasterPage != NULL)
+ SdDrawDocument* pDocument = nullptr;
+ if (pMasterPage != nullptr)
pDocument = dynamic_cast<SdDrawDocument*>(pMasterPage->GetModel());
// Iterate over all pages and check if it references the given master
// page.
- if (pDocument!=NULL && pDocument->GetSdPageCount(PK_STANDARD) > 0)
+ if (pDocument!=nullptr && pDocument->GetSdPageCount(PK_STANDARD) > 0)
{
// In most cases a new slide has just been inserted so start with
// the last page.
@@ -175,7 +175,7 @@ SdPage* DocumentHelper::GetSlideForMasterPage (SdPage* pMasterPage)
pCandidate = pDocument->GetSdPage(
nPageIndex,
PK_STANDARD);
- if (pCandidate != NULL)
+ if (pCandidate != nullptr)
{
if (static_cast<SdPage*>(&pCandidate->TRG_GetMasterPage())
== pMasterPage)
@@ -194,7 +194,7 @@ SdPage* DocumentHelper::GetSlideForMasterPage (SdPage* pMasterPage)
// If no page was found that refernced the given master page reset
// the pointer that is returned.
if ( ! bFound)
- pCandidate = NULL;
+ pCandidate = nullptr;
}
return pCandidate;
@@ -204,9 +204,9 @@ SdPage* DocumentHelper::AddMasterPage (
SdDrawDocument& rTargetDocument,
SdPage* pMasterPage)
{
- SdPage* pClonedMasterPage = NULL;
+ SdPage* pClonedMasterPage = nullptr;
- if (pMasterPage!=NULL)
+ if (pMasterPage!=nullptr)
{
try
{
@@ -216,7 +216,7 @@ SdPage* DocumentHelper::AddMasterPage (
// Copy the necessary styles.
SdDrawDocument* pSourceDocument
= static_cast<SdDrawDocument*>(pMasterPage->GetModel());
- if (pSourceDocument != NULL)
+ if (pSourceDocument != nullptr)
ProvideStyles (*pSourceDocument, rTargetDocument, pClonedMasterPage);
// Copy the precious flag.
@@ -228,17 +228,17 @@ SdPage* DocumentHelper::AddMasterPage (
}
catch(const uno::Exception&)
{
- pClonedMasterPage = NULL;
+ pClonedMasterPage = nullptr;
DBG_UNHANDLED_EXCEPTION();
}
catch(const ::std::exception&)
{
- pClonedMasterPage = NULL;
+ pClonedMasterPage = nullptr;
OSL_TRACE ("caught general exception");
}
catch(...)
{
- pClonedMasterPage = NULL;
+ pClonedMasterPage = nullptr;
OSL_TRACE ("caught general exception");
}
}
@@ -272,7 +272,7 @@ void DocumentHelper::ProvideStyles (
if( !aCreatedStyles.empty() )
{
::svl::IUndoManager* pUndoManager = rTargetDocument.GetDocSh()->GetUndoManager();
- if (pUndoManager != NULL)
+ if (pUndoManager != nullptr)
{
SdMoveStyleSheetsUndoAction* pMovStyles =
new SdMoveStyleSheetsUndoAction (
@@ -289,7 +289,7 @@ void DocumentHelper::AssignMasterPageToPageList (
SdPage* pMasterPage,
const std::shared_ptr<std::vector<SdPage*> >& rpPageList)
{
- if (pMasterPage == NULL || !pMasterPage->IsMasterPage())
+ if (pMasterPage == nullptr || !pMasterPage->IsMasterPage())
return;
// Make the layout name by stripping ouf the layout postfix from the
@@ -309,8 +309,8 @@ void DocumentHelper::AssignMasterPageToPageList (
::std::vector<SdPage*> aCleanedList;
for (iPage=rpPageList->begin(); iPage!=rpPageList->end(); ++iPage)
{
- OSL_ASSERT(*iPage!=NULL && (*iPage)->GetModel() == &rTargetDocument);
- if (*iPage != NULL && (*iPage)->GetLayoutName() != sFullLayoutName)
+ OSL_ASSERT(*iPage!=nullptr && (*iPage)->GetModel() == &rTargetDocument);
+ if (*iPage != nullptr && (*iPage)->GetLayoutName() != sFullLayoutName)
{
aCleanedList.push_back(*iPage);
}
@@ -323,7 +323,7 @@ void DocumentHelper::AssignMasterPageToPageList (
pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString());
SdPage* pMasterPageInDocument = ProvideMasterPage(rTargetDocument,pMasterPage,rpPageList);
- if (pMasterPageInDocument == NULL)
+ if (pMasterPageInDocument == nullptr)
return;
// Assign the master pages to the given list of pages.
@@ -346,9 +346,9 @@ SdPage* DocumentHelper::AddMasterPage (
SdPage* pMasterPage,
sal_uInt16 nInsertionIndex)
{
- SdPage* pClonedMasterPage = NULL;
+ SdPage* pClonedMasterPage = nullptr;
- if (pMasterPage!=NULL)
+ if (pMasterPage!=nullptr)
{
// Duplicate the master page.
pClonedMasterPage = static_cast<SdPage*>(pMasterPage->Clone());
@@ -359,7 +359,7 @@ SdPage* DocumentHelper::AddMasterPage (
// Copy the necessary styles.
SdDrawDocument* pSourceDocument
= static_cast<SdDrawDocument*>(pMasterPage->GetModel());
- if (pSourceDocument != NULL)
+ if (pSourceDocument != nullptr)
{
ProvideStyles (*pSourceDocument, rTargetDocument, pClonedMasterPage);
@@ -403,10 +403,10 @@ void DocumentHelper::AssignMasterPageToPage (
SdPage* pPage)
{
// Leave early when the parameters are invalid.
- if (pPage == NULL || pMasterPage == NULL)
+ if (pPage == nullptr || pMasterPage == nullptr)
return;
SdDrawDocument* pDocument = dynamic_cast<SdDrawDocument*>(pPage->GetModel());
- if (pDocument == NULL)
+ if (pDocument == nullptr)
return;
if ( ! pPage->IsMasterPage())
@@ -430,12 +430,12 @@ void DocumentHelper::AssignMasterPageToPage (
else
{
// Find first slide that uses the master page.
- SdPage* pSlide = NULL;
+ SdPage* pSlide = nullptr;
sal_uInt16 nPageCount = pDocument->GetSdPageCount(PK_STANDARD);
- for (sal_uInt16 nPage=0; nPage<nPageCount&&pSlide==NULL; nPage++)
+ for (sal_uInt16 nPage=0; nPage<nPageCount&&pSlide==nullptr; nPage++)
{
SdrPage* pCandidate = pDocument->GetSdPage(nPage,PK_STANDARD);
- if (pCandidate != NULL
+ if (pCandidate != nullptr
&& pCandidate->TRG_HasMasterPage()
&& &(pCandidate->TRG_GetMasterPage()) == pPage)
{
@@ -443,7 +443,7 @@ void DocumentHelper::AssignMasterPageToPage (
}
}
- if (pSlide != NULL)
+ if (pSlide != nullptr)
{
// 2. Assign the given master pages to the first slide that was
// found above that uses the master page.
@@ -472,26 +472,26 @@ SdPage* DocumentHelper::ProvideMasterPage (
// Make sure that both the master page and its notes master exist
// in the source document. If one is missing then return without
// making any changes.
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
{
// The caller should make sure that the master page is valid.
- OSL_ASSERT(pMasterPage != NULL);
- return NULL;
+ OSL_ASSERT(pMasterPage != nullptr);
+ return nullptr;
}
SdDrawDocument* pSourceDocument = static_cast<SdDrawDocument*>(pMasterPage->GetModel());
- if (pSourceDocument == NULL)
- return NULL;
+ if (pSourceDocument == nullptr)
+ return nullptr;
SdPage* pNotesMasterPage = static_cast<SdPage*>(
pSourceDocument->GetMasterPage(pMasterPage->GetPageNum()+1));
- if (pNotesMasterPage == NULL)
+ if (pNotesMasterPage == nullptr)
{
// The model is not in a valid state. Maybe a new master page
// is being (not finished yet) created? Return without making
// any changes.
- return NULL;
+ return nullptr;
}
- SdPage* pMasterPageInDocument = NULL;
+ SdPage* pMasterPageInDocument = nullptr;
// Search for a master page with the same name as the given one in
// the target document.
const OUString sMasterPageLayoutName (pMasterPage->GetLayoutName());
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx
index 6ec03406c5ee..212d0a6c17c4 100644
--- a/sd/source/ui/sidebar/LayoutMenu.cxx
+++ b/sd/source/ui/sidebar/LayoutMenu.cxx
@@ -129,7 +129,7 @@ LayoutMenu::LayoutMenu (
DropTargetHelper(this),
mrBase(rViewShellBase),
mbUseOwnScrollBar(false),
- mxListener(NULL),
+ mxListener(nullptr),
mbSelectionUpdatePending(true),
mbIsMainViewChangePending(false),
mxSidebar(rxSidebar),
@@ -231,7 +231,7 @@ AutoLayout LayoutMenu::GetSelectedAutoLayout()
if ( ! IsNoSelection() && GetSelectItemId()!=0)
{
AutoLayout* pLayout = static_cast<AutoLayout*>(GetItemData(GetSelectItemId()));
- if (pLayout != NULL)
+ if (pLayout != nullptr)
aResult = *pLayout;
}
@@ -318,21 +318,21 @@ void LayoutMenu::MouseButtonDown (const MouseEvent& rEvent)
void LayoutMenu::InsertPageWithLayout (AutoLayout aLayout)
{
ViewShell* pViewShell = mrBase.GetMainViewShell().get();
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
return;
SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
- if (pViewFrame == NULL)
+ if (pViewFrame == nullptr)
return;
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
- if (pDispatcher == NULL)
+ if (pDispatcher == nullptr)
return;
// Call SID_INSERTPAGE with the right arguments. This is because
// the popup menu can not call this slot with arguments directly.
SfxRequest aRequest (CreateRequest(SID_INSERTPAGE, aLayout));
- if (aRequest.GetArgs() != NULL)
+ if (aRequest.GetArgs() != nullptr)
{
pDispatcher->Execute(
SID_INSERTPAGE,
@@ -384,7 +384,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
{
// The view shell in the center pane has to be present.
ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
- if (pMainViewShell == NULL)
+ if (pMainViewShell == nullptr)
break;
// Determine if the current view is in an invalid master page mode.
@@ -397,7 +397,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
case ViewShell::ST_IMPRESS:
{
DrawViewShell* pDrawViewShell = static_cast<DrawViewShell*>(pMainViewShell);
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
if (pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
bMasterPageMode = true;
}
@@ -416,7 +416,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
// possible only some of the view shells in the center pane. When
// no valid slide sorter is available then ask the main view shell
// for its current page.
- SlideSorterViewShell* pSlideSorter = NULL;
+ SlideSorterViewShell* pSlideSorter = nullptr;
switch (pMainViewShell->GetShellType())
{
case ViewShell::ST_IMPRESS:
@@ -427,13 +427,13 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
default:
break;
}
- if (pSlideSorter != NULL)
+ if (pSlideSorter != nullptr)
{
// There is a slide sorter visible so get the list of selected pages from it.
pPageSelection = pSlideSorter->GetPageSelection();
}
- if( (pSlideSorter == NULL) || (pPageSelection.get() == 0) || pPageSelection->empty() )
+ if( (pSlideSorter == nullptr) || (pPageSelection.get() == nullptr) || pPageSelection->empty() )
{
// No valid slide sorter available. Ask the main view shell for
// its current page.
@@ -447,7 +447,7 @@ void LayoutMenu::AssignLayoutToSelectedSlides (AutoLayout aLayout)
::std::vector<SdPage*>::iterator iPage;
for (iPage=pPageSelection->begin(); iPage!=pPageSelection->end(); ++iPage)
{
- if ((*iPage) == NULL)
+ if ((*iPage) == nullptr)
continue;
// Call the SID_ASSIGN_LAYOUT slot with all the necessary parameters.
@@ -474,10 +474,10 @@ SfxRequest LayoutMenu::CreateRequest (
sal_uInt8 aBackgroundObject (rLayerAdmin.GetLayerID(
SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false));
ViewShell* pViewShell = mrBase.GetMainViewShell().get();
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
break;
SdPage* pPage = pViewShell->GetActualPage();
- if (pPage == NULL)
+ if (pPage == nullptr)
break;
SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
@@ -502,7 +502,7 @@ void LayoutMenu::Fill()
SvtLanguageOptions aLanguageOptions;
bool bVertical = aLanguageOptions.IsVerticalTextEnabled();
SdDrawDocument* pDocument = mrBase.GetDocument();
- bool bRightToLeft = (pDocument!=NULL
+ bool bRightToLeft = (pDocument!=nullptr
&& pDocument->GetDefaultWritingMode() == WritingMode_RL_TB);
// Get URL of the view in the center pane.
@@ -521,7 +521,7 @@ void LayoutMenu::Fill()
catch (RuntimeException&)
{}
- const snewfoil_value_info* pInfo = NULL;
+ const snewfoil_value_info* pInfo = nullptr;
if (sCenterPaneViewName.equals(framework::FrameworkHelper::msNotesViewURL))
{
pInfo = notes;
@@ -537,12 +537,12 @@ void LayoutMenu::Fill()
}
else
{
- pInfo = NULL;
+ pInfo = nullptr;
}
Clear();
int n = 0;
- for (sal_uInt16 i=1; pInfo!=NULL&&pInfo->mnBmpResId!=0; i++,pInfo++)
+ for (sal_uInt16 i=1; pInfo!=nullptr&&pInfo->mnBmpResId!=0; i++,pInfo++)
{
if ((WritingMode_TB_RL != pInfo->meWritingMode) || bVertical)
{
@@ -610,14 +610,14 @@ void LayoutMenu::Command (const CommandEvent& rEvent)
// Setup the menu.
std::shared_ptr<PopupMenu> pMenu (new PopupMenu(SdResId(RID_TASKPANE_LAYOUTMENU_POPUP)));
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
- if (pMenuWindow != NULL)
+ if (pMenuWindow != nullptr)
pMenuWindow->SetPopupModeFlags(
pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose);
pMenu->SetSelectHdl(LINK(this, LayoutMenu, OnMenuItemSelected));
// Disable the SID_INSERTPAGE_LAYOUT_MENU item when
// the document is read-only.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
const SfxItemState aState (
mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem));
if (aState == SfxItemState::DISABLED)
@@ -641,9 +641,9 @@ IMPL_LINK_NOARG_TYPED(LayoutMenu, StateChangeHandler, const OUString&, void)
IMPL_LINK_TYPED(LayoutMenu, OnMenuItemSelected, Menu*, pMenu, bool)
{
- if (pMenu == NULL)
+ if (pMenu == nullptr)
{
- OSL_ENSURE(pMenu!=NULL, "LayoutMenu::OnMenuItemSelected: illegal menu!");
+ OSL_ENSURE(pMenu!=nullptr, "LayoutMenu::OnMenuItemSelected: illegal menu!");
return false;
}
@@ -672,11 +672,11 @@ void LayoutMenu::UpdateSelection()
{
// Get current page of main view.
ViewShell* pViewShell = mrBase.GetMainViewShell().get();
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
break;
SdPage* pCurrentPage = pViewShell->getCurrentPage();
- if (pCurrentPage == NULL)
+ if (pCurrentPage == nullptr)
break;
// Get layout of current page.
diff --git a/sd/source/ui/sidebar/MasterPageContainer.cxx b/sd/source/ui/sidebar/MasterPageContainer.cxx
index 71121d38352e..a75743aa2da9 100644
--- a/sd/source/ui/sidebar/MasterPageContainer.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainer.cxx
@@ -580,7 +580,7 @@ void MasterPageContainer::Implementation::UpdatePreviewSizePixel()
MasterPageContainerType::const_iterator iDescriptor;
MasterPageContainerType::const_iterator iContainerEnd(maContainer.end());
for (iDescriptor=maContainer.begin(); iDescriptor!=iContainerEnd; ++iDescriptor)
- if (*iDescriptor!=0 && (*iDescriptor)->mpMasterPage != nullptr)
+ if (*iDescriptor!=nullptr && (*iDescriptor)->mpMasterPage != nullptr)
{
Size aPageSize ((*iDescriptor)->mpMasterPage->GetSize());
OSL_ASSERT(aPageSize.Width() > 0 && aPageSize.Height() > 0);
diff --git a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
index c47d2ed52cc0..43e60a1ff9c3 100644
--- a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
@@ -32,7 +32,7 @@ MasterPageContainerFiller::MasterPageContainerFiller (ContainerAdapter& rpAdapte
: mrContainerAdapter(rpAdapter),
meState(INITIALIZE_TEMPLATE_SCANNER),
mpScannerTask(),
- mpLastAddedEntry(NULL),
+ mpLastAddedEntry(nullptr),
mnIndex(1)
{
// Add one entry for the default master page. We use temporarily the
@@ -85,7 +85,7 @@ void MasterPageContainerFiller::RunNextStep()
{
case DONE:
case ERROR:
- if (mpScannerTask.get() != NULL)
+ if (mpScannerTask.get() != nullptr)
{
mrContainerAdapter.FillingDone();
mpScannerTask.reset();
@@ -112,7 +112,7 @@ MasterPageContainerFiller::State MasterPageContainerFiller::ScanTemplate()
{
State eState (ERROR);
- if (mpScannerTask.get() != NULL)
+ if (mpScannerTask.get() != nullptr)
{
if (mpScannerTask->HasNextStep())
{
@@ -120,7 +120,7 @@ MasterPageContainerFiller::State MasterPageContainerFiller::ScanTemplate()
if (mpScannerTask->GetLastAddedEntry() != mpLastAddedEntry)
{
mpLastAddedEntry = mpScannerTask->GetLastAddedEntry();
- if (mpLastAddedEntry != NULL)
+ if (mpLastAddedEntry != nullptr)
eState = ADD_TEMPLATE;
else
eState = SCAN_TEMPLATE;
@@ -137,7 +137,7 @@ MasterPageContainerFiller::State MasterPageContainerFiller::ScanTemplate()
MasterPageContainerFiller::State MasterPageContainerFiller::AddTemplate()
{
- if (mpLastAddedEntry != NULL)
+ if (mpLastAddedEntry != nullptr)
{
SharedMasterPageDescriptor pDescriptor (new MasterPageDescriptor(
MasterPageContainer::TEMPLATE,
diff --git a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
index 1c73b514ff09..3bd897d56614 100644
--- a/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerProviders.cxx
@@ -51,7 +51,7 @@ Image PagePreviewProvider::operator () (
{
Image aPreview;
- if (pPage != NULL)
+ if (pPage != nullptr)
{
// Use the given renderer to create a preview of the given page
// object.
@@ -118,24 +118,24 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
// Unused parameters.
(void)pContainerDocument;
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
- mxDocumentShell = NULL;
- ::sd::DrawDocShell* pDocumentShell = NULL;
+ mxDocumentShell = nullptr;
+ ::sd::DrawDocShell* pDocumentShell = nullptr;
try
{
// Load the template document and return its first page.
pDocumentShell = LoadDocument (msURL);
- if (pDocumentShell != NULL)
+ if (pDocumentShell != nullptr)
{
SdDrawDocument* pDocument = pDocumentShell->GetDoc();
- if (pDocument != NULL)
+ if (pDocument != nullptr)
{
pPage = pDocument->GetMasterSdPage(0, PK_STANDARD);
// In order to make the newly loaded master page deletable
// when copied into documents it is marked as no "precious".
// When it is modified then it is marked as "precious".
- if (pPage != NULL)
+ if (pPage != nullptr)
pPage->SetPrecious(false);
}
}
@@ -143,7 +143,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
catch (const uno::RuntimeException&)
{
DBG_UNHANDLED_EXCEPTION();
- pPage = NULL;
+ pPage = nullptr;
}
return pPage;
@@ -157,7 +157,7 @@ SdPage* TemplatePageObjectProvider::operator() (SdDrawDocument* pContainerDocume
pSet->Put (SfxBoolItem (SID_PREVIEW, true));
if (pSfxApp->LoadTemplate (mxDocumentShell, sFileName, true, pSet))
{
- mxDocumentShell = NULL;
+ mxDocumentShell = nullptr;
}
SfxObjectShell* pShell = mxDocumentShell;
return dynamic_cast< ::sd::DrawDocShell *>( pShell );
@@ -172,7 +172,7 @@ bool TemplatePageObjectProvider::operator== (const PageObjectProvider& rProvider
{
const TemplatePageObjectProvider* pTemplatePageObjectProvider
= dynamic_cast<const TemplatePageObjectProvider*>(&rProvider);
- if (pTemplatePageObjectProvider != NULL)
+ if (pTemplatePageObjectProvider != nullptr)
return (msURL == pTemplatePageObjectProvider->msURL);
else
return false;
@@ -186,16 +186,16 @@ DefaultPageObjectProvider::DefaultPageObjectProvider()
SdPage* DefaultPageObjectProvider::operator () (SdDrawDocument* pContainerDocument)
{
- SdPage* pLocalMasterPage = NULL;
- if (pContainerDocument != NULL)
+ SdPage* pLocalMasterPage = nullptr;
+ if (pContainerDocument != nullptr)
{
sal_Int32 nIndex (0);
SdPage* pLocalSlide = pContainerDocument->GetSdPage((sal_uInt16)nIndex, PK_STANDARD);
- if (pLocalSlide!=NULL && pLocalSlide->TRG_HasMasterPage())
+ if (pLocalSlide!=nullptr && pLocalSlide->TRG_HasMasterPage())
pLocalMasterPage = dynamic_cast<SdPage*>(&pLocalSlide->TRG_GetMasterPage());
}
- if (pLocalMasterPage == NULL)
+ if (pLocalMasterPage == nullptr)
{
DBG_ASSERT(false, "can not create master page for slide");
}
@@ -210,7 +210,7 @@ int DefaultPageObjectProvider::GetCostIndex()
bool DefaultPageObjectProvider::operator== (const PageObjectProvider& rProvider)
{
- return (dynamic_cast<const DefaultPageObjectProvider*>(&rProvider) != NULL);
+ return (dynamic_cast<const DefaultPageObjectProvider*>(&rProvider) != nullptr);
}
//===== ExistingPageProvider ==================================================
@@ -236,7 +236,7 @@ bool ExistingPageProvider::operator== (const PageObjectProvider& rProvider)
{
const ExistingPageProvider* pExistingPageProvider
= dynamic_cast<const ExistingPageProvider*>(&rProvider);
- if (pExistingPageProvider != NULL)
+ if (pExistingPageProvider != nullptr)
return (mpPage == pExistingPageProvider->mpPage);
else
return false;
diff --git a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
index 65a5af93ba1a..76a121b8a917 100644
--- a/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerQueue.cxx
@@ -116,7 +116,7 @@ void MasterPageContainerQueue::LateInit()
bool MasterPageContainerQueue::RequestPreview (const SharedMasterPageDescriptor& rpDescriptor)
{
bool bSuccess (false);
- if (rpDescriptor.get() != NULL
+ if (rpDescriptor.get() != nullptr
&& rpDescriptor->maLargePreview.GetSizePixel().Width() == 0)
{
sal_Int32 nPriority (CalculatePriority(rpDescriptor));
@@ -153,11 +153,11 @@ sal_Int32 MasterPageContainerQueue::CalculatePriority (
// The cost is used as a starting value.
int nCost (0);
- if (rpDescriptor->mpPreviewProvider.get() != NULL)
+ if (rpDescriptor->mpPreviewProvider.get() != nullptr)
{
nCost = rpDescriptor->mpPreviewProvider->GetCostIndex();
if (rpDescriptor->mpPreviewProvider->NeedsPageObject())
- if (rpDescriptor->mpPageObjectProvider.get() != NULL)
+ if (rpDescriptor->mpPageObjectProvider.get() != nullptr)
nCost += rpDescriptor->mpPageObjectProvider->GetCostIndex();
}
@@ -214,13 +214,13 @@ IMPL_LINK_TYPED(MasterPageContainerQueue, DelayedPreviewCreation, Timer*, pTimer
mpRequestQueue->erase(mpRequestQueue->begin());
- if (aRequest.mpDescriptor.get() != NULL)
+ if (aRequest.mpDescriptor.get() != nullptr)
{
mnRequestsServedCount += 1;
if ( ! mpWeakContainer.expired())
{
std::shared_ptr<ContainerAdapter> pContainer (mpWeakContainer);
- if (pContainer.get() != NULL)
+ if (pContainer.get() != nullptr)
pContainer->UpdateDescriptor(aRequest.mpDescriptor,false,true,true);
}
}
diff --git a/sd/source/ui/sidebar/MasterPageDescriptor.cxx b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
index 025b3f23512e..7a1d461b956d 100644
--- a/sd/source/ui/sidebar/MasterPageDescriptor.cxx
+++ b/sd/source/ui/sidebar/MasterPageDescriptor.cxx
@@ -42,8 +42,8 @@ MasterPageDescriptor::MasterPageDescriptor (
msPageName(rsPageName),
msStyleName(rsStyleName),
mbIsPrecious(bIsPrecious),
- mpMasterPage(NULL),
- mpSlide(NULL),
+ mpMasterPage(nullptr),
+ mpSlide(nullptr),
maSmallPreview(),
maLargePreview(),
mpPreviewProvider(rpPreviewProvider),
@@ -123,13 +123,13 @@ Image MasterPageDescriptor::GetPreview (MasterPageContainer::PreviewSize eSize)
bDataChanged = true;
}
- if (mpPageObjectProvider.get()==NULL && rDescriptor.mpPageObjectProvider.get()!=NULL)
+ if (mpPageObjectProvider.get()==nullptr && rDescriptor.mpPageObjectProvider.get()!=nullptr)
{
mpPageObjectProvider = rDescriptor.mpPageObjectProvider;
bDataChanged = true;
}
- if (mpPreviewProvider.get()==NULL && rDescriptor.mpPreviewProvider.get()!=NULL)
+ if (mpPreviewProvider.get()==nullptr && rDescriptor.mpPreviewProvider.get()!=nullptr)
{
mpPreviewProvider = rDescriptor.mpPreviewProvider;
bPreviewChanged = true;
@@ -164,8 +164,8 @@ int MasterPageDescriptor::UpdatePageObject (
int nModified = 0;
// Update the page object when that is not yet known.
- if (mpMasterPage == NULL
- && mpPageObjectProvider.get()!=NULL
+ if (mpMasterPage == nullptr
+ && mpPageObjectProvider.get()!=nullptr
&& (nCostThreshold<0 || mpPageObjectProvider->GetCostIndex()<=nCostThreshold))
{
// Note that pDocument may be NULL.
@@ -174,18 +174,18 @@ int MasterPageDescriptor::UpdatePageObject (
if (meOrigin == MasterPageContainer::MASTERPAGE)
{
mpMasterPage = pPage;
- if (mpMasterPage != NULL)
+ if (mpMasterPage != nullptr)
mpMasterPage->SetPrecious(mbIsPrecious);
}
else
{
// Master pages from templates are copied into the local document.
- if (pDocument != NULL)
+ if (pDocument != nullptr)
mpMasterPage = DocumentHelper::CopyMasterPageToLocalDocument(*pDocument,pPage);
mpSlide = DocumentHelper::GetSlideForMasterPage(mpMasterPage);
}
- if (mpMasterPage != NULL)
+ if (mpMasterPage != nullptr)
{
// Update page name and style name.
if (msPageName.isEmpty())
@@ -220,11 +220,11 @@ bool MasterPageDescriptor::UpdatePreview (
// Update the preview when that is not yet known.
if (maLargePreview.GetSizePixel().Width()==0
- && mpPreviewProvider.get()!=NULL
+ && mpPreviewProvider.get()!=nullptr
&& (nCostThreshold<0 || mpPreviewProvider->GetCostIndex()<=nCostThreshold))
{
SdPage* pPage = mpSlide;
- if (pPage == NULL)
+ if (pPage == nullptr)
{
pPage = mpMasterPage;
}
@@ -288,7 +288,7 @@ MasterPageDescriptor::URLComparator::URLComparator (const OUString& sURL)
bool MasterPageDescriptor::URLComparator::operator() (
const SharedMasterPageDescriptor& rDescriptor)
{
- if (rDescriptor.get() == NULL)
+ if (rDescriptor.get() == nullptr)
return false;
else
return rDescriptor->msURL.equals(msURL);
@@ -304,7 +304,7 @@ MasterPageDescriptor::StyleNameComparator::StyleNameComparator (const OUString&
bool MasterPageDescriptor::StyleNameComparator::operator() (
const SharedMasterPageDescriptor& rDescriptor)
{
- if (rDescriptor.get() == NULL)
+ if (rDescriptor.get() == nullptr)
return false;
else
return rDescriptor->msStyleName.equals(msStyleName);
@@ -320,7 +320,7 @@ MasterPageDescriptor::PageObjectComparator::PageObjectComparator (const SdPage*
bool MasterPageDescriptor::PageObjectComparator::operator() (
const SharedMasterPageDescriptor& rDescriptor)
{
- if (rDescriptor.get() == NULL)
+ if (rDescriptor.get() == nullptr)
return false;
else
return rDescriptor->mpMasterPage==mpMasterPage;
@@ -335,7 +335,7 @@ MasterPageDescriptor::AllComparator::AllComparator(const SharedMasterPageDescrip
bool MasterPageDescriptor::AllComparator::operator() (const SharedMasterPageDescriptor&rDescriptor)
{
- if (rDescriptor.get() == NULL)
+ if (rDescriptor.get() == nullptr)
return false;
else
{
@@ -353,10 +353,10 @@ bool MasterPageDescriptor::AllComparator::operator() (const SharedMasterPageDesc
&& mpDescriptor->msPageName.equals(rDescriptor->msPageName))
|| (!mpDescriptor->msStyleName.isEmpty()
&& mpDescriptor->msStyleName.equals(rDescriptor->msStyleName))
- || (mpDescriptor->mpMasterPage!=NULL
+ || (mpDescriptor->mpMasterPage!=nullptr
&& mpDescriptor->mpMasterPage==rDescriptor->mpMasterPage)
- || (mpDescriptor->mpPageObjectProvider.get()!=NULL
- && rDescriptor->mpPageObjectProvider.get()!=NULL
+ || (mpDescriptor->mpPageObjectProvider.get()!=nullptr
+ && rDescriptor->mpPageObjectProvider.get()!=nullptr
&& mpDescriptor->mpPageObjectProvider==rDescriptor->mpPageObjectProvider));
}
}
diff --git a/sd/source/ui/sidebar/MasterPageObserver.cxx b/sd/source/ui/sidebar/MasterPageObserver.cxx
index a9855f6a113d..1e0a14ecd687 100644
--- a/sd/source/ui/sidebar/MasterPageObserver.cxx
+++ b/sd/source/ui/sidebar/MasterPageObserver.cxx
@@ -88,17 +88,17 @@ private:
void SendEvent (MasterPageObserverEvent& rEvent);
};
-MasterPageObserver* MasterPageObserver::Implementation::mpInstance = NULL;
+MasterPageObserver* MasterPageObserver::Implementation::mpInstance = nullptr;
//===== MasterPageObserver ====================================================
MasterPageObserver& MasterPageObserver::Instance()
{
- if (Implementation::mpInstance == NULL)
+ if (Implementation::mpInstance == nullptr)
{
::osl::GetGlobalMutex aMutexFunctor;
::osl::MutexGuard aGuard (aMutexFunctor());
- if (Implementation::mpInstance == NULL)
+ if (Implementation::mpInstance == nullptr)
{
MasterPageObserver* pInstance = new MasterPageObserver ();
SdGlobalResourceContainer::Instance().AddResource (
@@ -112,7 +112,7 @@ MasterPageObserver& MasterPageObserver::Instance()
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
- DBG_ASSERT(Implementation::mpInstance!=NULL,
+ DBG_ASSERT(Implementation::mpInstance!=nullptr,
"MasterPageObserver::Instance(): instance is NULL");
return *Implementation::mpInstance;
}
@@ -156,7 +156,7 @@ void MasterPageObserver::Implementation::RegisterDocument (
for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD);
- if (pMasterPage != NULL)
+ if (pMasterPage != nullptr)
aMasterPageSet.insert (pMasterPage->GetName());
}
@@ -259,7 +259,7 @@ void MasterPageObserver::Implementation::AnalyzeUsedMasterPages (
for (sal_uInt16 nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = rDocument.GetMasterSdPage (nIndex, PK_STANDARD);
- if (pMasterPage != NULL)
+ if (pMasterPage != nullptr)
aCurrentMasterPages.insert (pMasterPage->GetName());
OSL_TRACE("currently used master page %d is %s",
nIndex,
diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx
index 0f24434b8fc7..2daa5ec3f09e 100644
--- a/sd/source/ui/sidebar/MasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx
@@ -188,10 +188,10 @@ IMPL_LINK_TYPED(MasterPagesSelector, RightClickHandler, const MouseEvent&, rEven
PreviewValueSet::GrabFocus ();
PreviewValueSet::ReleaseMouse();
SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
- if (pViewFrame != NULL)
+ if (pViewFrame != nullptr)
{
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
- if (pDispatcher != NULL)
+ if (pDispatcher != nullptr)
{
sal_uInt16 nIndex = PreviewValueSet::GetItemId (rEvent.GetPosPixel());
if (nIndex > 0)
@@ -225,7 +225,7 @@ void MasterPagesSelector::Command (const CommandEvent& rEvent)
// Setup the menu.
std::unique_ptr<PopupMenu> pMenu (new PopupMenu(GetContextMenuResId()));
FloatingWindow* pMenuWindow = dynamic_cast<FloatingWindow*>(pMenu->GetWindow());
- if (pMenuWindow != NULL)
+ if (pMenuWindow != nullptr)
pMenuWindow->SetPopupModeFlags(
pMenuWindow->GetPopupModeFlags() | FloatWinPopupFlags::NoMouseUpClose);
pMenu->SetSelectHdl(LINK(this, MasterPagesSelector, OnMenuItemSelected));
@@ -252,9 +252,9 @@ void MasterPagesSelector::ProcessPopupMenu (Menu& rMenu)
IMPL_LINK_TYPED(MasterPagesSelector, OnMenuItemSelected, Menu*, pMenu, bool)
{
- if (pMenu == NULL)
+ if (pMenu == nullptr)
{
- OSL_ENSURE(pMenu!=NULL, "MasterPagesSelector::OnMenuItemSelected: illegal menu!");
+ OSL_ENSURE(pMenu!=nullptr, "MasterPagesSelector::OnMenuItemSelected: illegal menu!");
return false;
}
@@ -308,10 +308,10 @@ void MasterPagesSelector::ExecuteCommand (const sal_Int32 nCommandId)
if (pMasterPage)
xSelectedMaster.set(pMasterPage->getUnoPage(), uno::UNO_QUERY);
SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
- if (pViewFrame != NULL && xSelectedMaster.is())
+ if (pViewFrame != nullptr && xSelectedMaster.is())
{
SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher();
- if (pDispatcher != NULL)
+ if (pDispatcher != nullptr)
{
sal_uInt16 nIndex = PreviewValueSet::GetSelectItemId();
pDispatcher->Execute(SID_MASTERPAGE, SfxCallMode::SYNCHRON);
@@ -339,10 +339,10 @@ SdPage* MasterPagesSelector::GetSelectedMasterPage()
{
const ::osl::MutexGuard aGuard (maMutex);
- SdPage* pMasterPage = NULL;
+ SdPage* pMasterPage = nullptr;
sal_uInt16 nIndex = PreviewValueSet::GetSelectItemId();
UserData* pData = GetUserData(nIndex);
- if (pData != NULL)
+ if (pData != nullptr)
{
pMasterPage = mpContainer->GetPageObjectForToken(pData->second);
}
@@ -354,7 +354,7 @@ SdPage* MasterPagesSelector::GetSelectedMasterPage()
*/
void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
{
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
return;
sal_uInt16 nPageCount = mrDocument.GetSdPageCount(PK_STANDARD);
@@ -370,7 +370,7 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
{
SdPage* pPage = mrDocument.GetSdPage (nPageIndex, PK_STANDARD);
- if (pPage != NULL && pPage->GetLayoutName() != sFullLayoutName)
+ if (pPage != nullptr && pPage->GetLayoutName() != sFullLayoutName)
{
pPageList->push_back (pPage);
}
@@ -388,12 +388,12 @@ void MasterPagesSelector::AssignMasterPageToSelectedSlides (
using namespace ::sd::slidesorter;
using namespace ::sd::slidesorter::controller;
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
return;
// Find a visible slide sorter.
SlideSorterViewShell* pSlideSorter = SlideSorterViewShell::GetSlideSorter(mrBase);
- if (pSlideSorter == NULL)
+ if (pSlideSorter == nullptr)
return;
// Get a list of selected pages.
@@ -470,7 +470,7 @@ MasterPagesSelector::UserData* MasterPagesSelector::GetUserData (int nIndex) con
if (nIndex>0 && static_cast<unsigned int>(nIndex)<=PreviewValueSet::GetItemCount())
return static_cast<UserData*>(PreviewValueSet::GetItemData((sal_uInt16)nIndex));
else
- return NULL;
+ return nullptr;
}
void MasterPagesSelector::SetUserData (int nIndex, UserData* pData)
@@ -480,7 +480,7 @@ void MasterPagesSelector::SetUserData (int nIndex, UserData* pData)
if (nIndex>0 && static_cast<unsigned int>(nIndex)<=PreviewValueSet::GetItemCount())
{
UserData* pOldData = GetUserData(nIndex);
- if (pOldData!=NULL && pOldData!=pData)
+ if (pOldData!=nullptr && pOldData!=pData)
delete pOldData;
PreviewValueSet::SetItemData((sal_uInt16)nIndex, pData);
}
@@ -552,7 +552,7 @@ void MasterPagesSelector::RemoveTokenToIndexEntry (
const ::osl::MutexGuard aGuard (maMutex);
UserData* pData = GetUserData(nIndex);
- if (pData != NULL)
+ if (pData != nullptr)
{
// Get the token that the index pointed to previously.
MasterPageContainer::Token aOldToken (pData->second);
@@ -572,7 +572,7 @@ void MasterPagesSelector::InvalidatePreview (const SdPage* pPage)
for (size_t nIndex=1; nIndex<=PreviewValueSet::GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
- if (pData != NULL)
+ if (pData != nullptr)
{
MasterPageContainer::Token aToken (pData->second);
if (pPage == mpContainer->GetPageObjectForToken(aToken,false))
@@ -592,7 +592,7 @@ void MasterPagesSelector::UpdateAllPreviews()
for (size_t nIndex=1; nIndex<=PreviewValueSet::GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
- if (pData != NULL)
+ if (pData != nullptr)
{
MasterPageContainer::Token aToken (pData->second);
PreviewValueSet::SetItemImage(
@@ -612,7 +612,7 @@ void MasterPagesSelector::ClearPageSet()
for (size_t nIndex=1; nIndex<=PreviewValueSet::GetItemCount(); nIndex++)
{
UserData* pData = GetUserData(nIndex);
- if (pData != NULL)
+ if (pData != nullptr)
delete pData;
}
PreviewValueSet::Clear();
diff --git a/sd/source/ui/sidebar/PanelBase.cxx b/sd/source/ui/sidebar/PanelBase.cxx
index 3aaa0b2cd90f..c96f5fbab376 100644
--- a/sd/source/ui/sidebar/PanelBase.cxx
+++ b/sd/source/ui/sidebar/PanelBase.cxx
@@ -25,7 +25,7 @@ PanelBase::PanelBase (
vcl::Window* pParentWindow,
ViewShellBase& rViewShellBase)
: Control(pParentWindow),
- mpWrappedControl(NULL),
+ mpWrappedControl(nullptr),
mxSidebar(),
mrViewShellBase(rViewShellBase)
{
@@ -75,7 +75,7 @@ bool PanelBase::ProvideWrappedControl()
if (mxSidebar.is())
mxSidebar->requestLayout();
}
- return mpWrappedControl.get() != NULL;
+ return mpWrappedControl.get() != nullptr;
}
ISidebarReceiver::~ISidebarReceiver()
diff --git a/sd/source/ui/sidebar/PanelFactory.cxx b/sd/source/ui/sidebar/PanelFactory.cxx
index 139cd91f5540..8939525859ba 100644
--- a/sd/source/ui/sidebar/PanelFactory.cxx
+++ b/sd/source/ui/sidebar/PanelFactory.cxx
@@ -80,7 +80,7 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
// Throw exceptions when the arguments are not as expected.
vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow);
- if ( ! xParentWindow.is() || pParentWindow==NULL)
+ if ( ! xParentWindow.is() || pParentWindow==nullptr)
throw RuntimeException(
"PanelFactory::createUIElement called without ParentWindow");
if ( ! xFrame.is())
@@ -88,16 +88,16 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement (
"PanelFactory::createUIElement called without XFrame");
// Tunnel through the controller to obtain a ViewShellBase.
- ViewShellBase* pBase = NULL;
+ ViewShellBase* pBase = nullptr;
Reference<lang::XUnoTunnel> xTunnel (xFrame->getController(), UNO_QUERY);
if (xTunnel.is())
{
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
pBase = pController->GetViewShellBase();
}
- if (pBase == NULL)
+ if (pBase == nullptr)
throw RuntimeException("can not get ViewShellBase for frame");
// Get bindings from given arguments.
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index c4492e837b87..f9a23f115aab 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -38,8 +38,8 @@ VclPtr<vcl::Window> RecentMasterPagesSelector::Create (
const css::uno::Reference<css::ui::XSidebar>& rxSidebar)
{
SdDrawDocument* pDocument = rViewShellBase.GetDocument();
- if (pDocument == NULL)
- return NULL;
+ if (pDocument == nullptr)
+ return nullptr;
std::shared_ptr<MasterPageContainer> pContainer (new MasterPageContainer());
@@ -100,7 +100,7 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
for (nIndex=0; nIndex<nMasterPageCount; nIndex++)
{
SdPage* pMasterPage = mrDocument.GetMasterSdPage (nIndex, PK_STANDARD);
- if (pMasterPage != NULL)
+ if (pMasterPage != nullptr)
aCurrentNames.insert (pMasterPage->GetName());
}
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 318108d19987..7d52c78540bb 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -61,15 +61,15 @@ static OUString GetPathToSetNode()
namespace sd { namespace sidebar {
-RecentlyUsedMasterPages* RecentlyUsedMasterPages::mpInstance = NULL;
+RecentlyUsedMasterPages* RecentlyUsedMasterPages::mpInstance = nullptr;
RecentlyUsedMasterPages& RecentlyUsedMasterPages::Instance()
{
- if (mpInstance == NULL)
+ if (mpInstance == nullptr)
{
::osl::GetGlobalMutex aMutexFunctor;
::osl::MutexGuard aGuard (aMutexFunctor());
- if (mpInstance == NULL)
+ if (mpInstance == nullptr)
{
RecentlyUsedMasterPages* pInstance = new RecentlyUsedMasterPages();
pInstance->LateInit();
diff --git a/sd/source/ui/slideshow/PaneHider.cxx b/sd/source/ui/slideshow/PaneHider.cxx
index bcef62055eb3..09094687b3d5 100644
--- a/sd/source/ui/slideshow/PaneHider.cxx
+++ b/sd/source/ui/slideshow/PaneHider.cxx
@@ -45,7 +45,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
{
// Hide the left and right pane windows when a slideshow exists and is
// not full screen.
- if (pSlideShow!=NULL && !pSlideShow->isFullScreen()) try
+ if (pSlideShow!=nullptr && !pSlideShow->isFullScreen()) try
{
Reference<XControllerManager> xControllerManager (
mrViewShell.GetViewShellBase().GetController(), UNO_QUERY_THROW);
@@ -59,7 +59,7 @@ PaneHider::PaneHider (const ViewShell& rViewShell, SlideshowImpl* pSlideShow)
// Iterate over the resources and deactivate the panes.
Sequence<Reference<XResourceId> > aResources (
mxConfiguration->getResources(
- NULL,
+ nullptr,
framework::FrameworkHelper::msPaneURLPrefix,
AnchorBindingMode_DIRECT));
for (sal_Int32 nIndex=0; nIndex<aResources.getLength(); ++nIndex)
diff --git a/sd/source/ui/slideshow/SlideShowRestarter.cxx b/sd/source/ui/slideshow/SlideShowRestarter.cxx
index be3db6ab1958..fdd3fadaebb8 100644
--- a/sd/source/ui/slideshow/SlideShowRestarter.cxx
+++ b/sd/source/ui/slideshow/SlideShowRestarter.cxx
@@ -38,7 +38,7 @@ namespace sd {
SlideShowRestarter::SlideShowRestarter (
const ::rtl::Reference<SlideShow>& rpSlideShow,
ViewShellBase* pViewShellBase)
- : mnEventId(0),
+ : mnEventId(nullptr),
mpSlideShow(rpSlideShow),
mpViewShellBase(pViewShellBase),
mnDisplayCount(Application::GetScreenCount()),
@@ -54,7 +54,7 @@ SlideShowRestarter::~SlideShowRestarter()
void SlideShowRestarter::Restart (bool bForce)
{
// Prevent multiple and concurrently restarts.
- if (mnEventId != 0)
+ if (mnEventId != nullptr)
return;
if (bForce)
@@ -78,7 +78,7 @@ void SlideShowRestarter::Restart (bool bForce)
IMPL_LINK_NOARG_TYPED(SlideShowRestarter, EndPresentation, void*, void)
{
- mnEventId = 0;
+ mnEventId = nullptr;
if (mpSlideShow.is())
{
if (mnDisplayCount != (sal_Int32)Application::GetScreenCount())
@@ -98,7 +98,7 @@ IMPL_LINK_NOARG_TYPED(SlideShowRestarter, EndPresentation, void*, void)
// console, to disappear. Only when it is gone, call
// InitiatePresenterStart(), in order to begin the asynchronous
// restart of the slide show.
- if (mpViewShellBase != NULL)
+ if (mpViewShellBase != nullptr)
{
::std::shared_ptr<FrameworkHelper> pHelper(
FrameworkHelper::Instance(*mpViewShellBase));
@@ -131,11 +131,11 @@ void SlideShowRestarter::StartPresentation()
if (mpViewShellBase && mpViewShellBase->GetDrawController().IsDisposing())
return;
- if (mpDispatcher == NULL && mpViewShellBase!=NULL)
+ if (mpDispatcher == nullptr && mpViewShellBase!=nullptr)
mpDispatcher = mpViewShellBase->GetViewFrame()->GetDispatcher();
// Start the slide show on the saved current slide.
- if (mpDispatcher != NULL)
+ if (mpDispatcher != nullptr)
{
mpDispatcher->Execute(SID_PRESENTATION, SfxCallMode::ASYNCHRON);
if (mpSlideShow.is())
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 63719b59a24c..feeff3ac1471 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -613,7 +613,7 @@ void ShowWindow::DeleteWindowFromPaintView()
void ShowWindow::AddWindowToPaintView()
{
if( mpViewShell->GetView() )
- mpViewShell->GetView()->AddWindowToPaintView( this, 0 );
+ mpViewShell->GetView()->AddWindowToPaintView( this, nullptr );
sal_uInt16 nChild = GetChildCount();
while( nChild-- )
@@ -629,7 +629,7 @@ css::uno::Reference<css::accessibility::XAccessible>
{
return xAcc;
}
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
{
xAcc = mpViewShell->CreateAccessibleDocumentView (this);
SetAccessible(xAcc);
diff --git a/sd/source/ui/slideshow/showwindow.hxx b/sd/source/ui/slideshow/showwindow.hxx
index fec236a62d17..af9a9ea1a655 100644
--- a/sd/source/ui/slideshow/showwindow.hxx
+++ b/sd/source/ui/slideshow/showwindow.hxx
@@ -54,7 +54,7 @@ public:
virtual void dispose() override;
bool SetEndMode();
- bool SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = NULL );
+ bool SetPauseMode( sal_Int32 nPageIndexToRestart, sal_Int32 nTimeoutSec = SLIDE_NO_TIMEOUT, Graphic* pLogo = nullptr );
bool SetBlankMode( sal_Int32 nPageIndexToRestart, const Color& rBlankColor );
const Color& GetBlankColor() const { return maShowBackground.GetColor(); }
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 9d91aacf43a3..c18c3880b2e4 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -78,7 +78,7 @@ namespace {
FullScreenWorkWindow (
const ::rtl::Reference<SlideShow>& rpSlideShow,
ViewShellBase* pViewShellBase)
- : WorkWindow(NULL, WB_HIDE | WB_CLIPCHILDREN),
+ : WorkWindow(nullptr, WB_HIDE | WB_CLIPCHILDREN),
mpRestarter(new SlideShowRestarter(rpSlideShow, pViewShellBase))
{}
@@ -131,16 +131,16 @@ SlideShow::SlideShow( SdDrawDocument* pDoc )
, maPropSet(ImplGetPresentationPropertyMap(), SdrObject::GetGlobalDrawObjectItemPool())
, mbIsInStartup(false)
, mpDoc( pDoc )
-, mpCurrentViewShellBase( 0 )
-, mpFullScreenViewShellBase( 0 )
-, mpFullScreenFrameView( 0 )
-, mnInPlaceConfigEvent( 0 )
+, mpCurrentViewShellBase( nullptr )
+, mpFullScreenViewShellBase( nullptr )
+, mpFullScreenFrameView( nullptr )
+, mnInPlaceConfigEvent( nullptr )
{
}
void SlideShow::ThrowIfDisposed() const throw (RuntimeException)
{
- if( mpDoc == 0 )
+ if( mpDoc == nullptr )
throw DisposedException();
}
@@ -336,7 +336,7 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
if(pCustomShowList)
{
SdCustomShow* pCustomShow;
- for( pCustomShow = pCustomShowList->First(); pCustomShow != NULL; pCustomShow = pCustomShowList->Next() )
+ for( pCustomShow = pCustomShowList->First(); pCustomShow != nullptr; pCustomShow = pCustomShowList->Next() )
{
if( pCustomShow->GetName() == aShowName )
break;
@@ -551,7 +551,7 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
case ATTR_PRESENT_CUSTOMSHOW:
{
SdCustomShowList* pList = mpDoc->GetCustomShowList();
- SdCustomShow* pShow = (pList && rPresSettings.mbCustomShow) ? pList->GetCurObject() : NULL;
+ SdCustomShow* pShow = (pList && rPresSettings.mbCustomShow) ? pList->GetCurObject() : nullptr;
OUString aShowName;
if(pShow)
@@ -624,12 +624,12 @@ void SAL_CALL SlideShow::start() throw(RuntimeException, std::exception)
WorkWindow *SlideShow::GetWorkWindow()
{
if( !mpFullScreenViewShellBase )
- return NULL;
+ return nullptr;
PresentationViewShell* pShell = dynamic_cast<PresentationViewShell*>(mpFullScreenViewShellBase->GetMainViewShell().get());
if( !pShell || !pShell->GetViewFrame() )
- return NULL;
+ return nullptr;
return dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent());
}
@@ -667,11 +667,11 @@ void SAL_CALL SlideShow::end()
if( mpFullScreenFrameView )
{
delete mpFullScreenFrameView;
- mpFullScreenFrameView = 0;
+ mpFullScreenFrameView = nullptr;
}
ViewShellBase* pFullScreenViewShellBase = mpFullScreenViewShellBase;
- mpFullScreenViewShellBase = 0;
+ mpFullScreenViewShellBase = nullptr;
// dispose before fullscreen window changes screens
// (potentially). If this needs to be moved behind
@@ -696,7 +696,7 @@ void SAL_CALL SlideShow::end()
if( pFullScreenViewShellBase )
{
- PresentationViewShell* pShell = NULL;
+ PresentationViewShell* pShell = nullptr;
{
// Get the shell pointer in its own scope to be sure that
// the shared_ptr to the shell is released before DoClose()
@@ -787,7 +787,7 @@ void SAL_CALL SlideShow::end()
if (pViewShell)
pViewShell->SwitchActiveViewFireFocus();
}
- mpCurrentViewShellBase = 0;
+ mpCurrentViewShellBase = nullptr;
}
}
@@ -828,7 +828,7 @@ void SAL_CALL SlideShow::startWithArguments(const Sequence< PropertyValue >& rAr
mxCurrentSettings->SetArguments( rArguments );
// if there is no view shell base set, use the current one or the first using this document
- if( mpCurrentViewShellBase == 0 )
+ if( mpCurrentViewShellBase == nullptr )
{
// first check current
::sd::ViewShellBase* pBase = ::sd::ViewShellBase::GetViewShellBase( SfxViewFrame::Current() );
@@ -886,7 +886,7 @@ void SAL_CALL SlideShow::disposing()
if( mnInPlaceConfigEvent )
{
Application::RemoveUserEvent( mnInPlaceConfigEvent );
- mnInPlaceConfigEvent = 0;
+ mnInPlaceConfigEvent = nullptr;
}
if( mxController.is() )
@@ -895,9 +895,9 @@ void SAL_CALL SlideShow::disposing()
mxController.clear();
}
- mpCurrentViewShellBase = 0;
- mpFullScreenViewShellBase = 0;
- mpDoc = 0;
+ mpCurrentViewShellBase = nullptr;
+ mpFullScreenViewShellBase = nullptr;
+ mpDoc = nullptr;
}
bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Reference< XAnimationNode >& xAnimationNode, vcl::Window* pParent )
@@ -927,7 +927,7 @@ bool SlideShow::startPreview( const Reference< XDrawPage >& xDrawPage, const Ref
OutputDevice* SlideShow::getShowWindow()
{
- return mxController.is() ? mxController->mpShowWindow.get() : 0;
+ return mxController.is() ? mxController->mpShowWindow.get() : nullptr;
}
int SlideShow::getAnimationMode()
@@ -974,10 +974,10 @@ void SlideShow::activate( ViewShellBase& rBase )
if( (mpFullScreenViewShellBase == &rBase) && !mxController.is() )
{
::std::shared_ptr<PresentationViewShell> pShell = std::dynamic_pointer_cast<PresentationViewShell>(rBase.GetMainViewShell());
- if(pShell.get() != NULL)
+ if(pShell.get() != nullptr)
{
pShell->FinishInitialization( mpFullScreenFrameView );
- mpFullScreenFrameView = 0;
+ mpFullScreenFrameView = nullptr;
CreateController( pShell.get(), pShell->GetView(), rBase.GetViewWindow() );
@@ -1071,7 +1071,7 @@ bool SlideShow::longpress(const CommandLongPressData& rLongPressData)
void SlideShow::StartInPlacePresentationConfigurationCallback()
{
- if( mnInPlaceConfigEvent != 0 )
+ if( mnInPlaceConfigEvent != nullptr )
Application::RemoveUserEvent( mnInPlaceConfigEvent );
mnInPlaceConfigEvent = Application::PostUserEvent( LINK( this, SlideShow, StartInPlacePresentationConfigurationHdl ) );
@@ -1079,7 +1079,7 @@ void SlideShow::StartInPlacePresentationConfigurationCallback()
IMPL_LINK_NOARG_TYPED(SlideShow, StartInPlacePresentationConfigurationHdl, void*, void)
{
- mnInPlaceConfigEvent = 0;
+ mnInPlaceConfigEvent = nullptr;
StartInPlacePresentation();
}
@@ -1118,7 +1118,7 @@ void SlideShow::StartInPlacePresentation()
else
{
vcl::Window* pParentWindow = mxCurrentSettings->mpParentWindow;
- if( pParentWindow == 0 )
+ if( pParentWindow == nullptr )
pParentWindow = mpCurrentViewShellBase->GetViewWindow();
CreateController( pMainViewShell.get(), pMainViewShell->GetView(), pParentWindow );
@@ -1127,7 +1127,7 @@ void SlideShow::StartInPlacePresentation()
else if( mxCurrentSettings->mpParentWindow )
{
// no current view shell, but parent window
- CreateController( 0, 0, mxCurrentSettings->mpParentWindow );
+ CreateController( nullptr, nullptr, mxCurrentSettings->mpParentWindow );
}
if( mxController.is() )
@@ -1169,7 +1169,7 @@ void SlideShow::StartFullscreenPresentation( )
// frame view of the current view shell. This avoids that
// changes made by the presentation have an effect on the other
// view shells.
- FrameView* pOriginalFrameView = 0;
+ FrameView* pOriginalFrameView = nullptr;
::std::shared_ptr<ViewShell> xShell(mpCurrentViewShellBase->GetMainViewShell());
if (xShell.get())
pOriginalFrameView = xShell->GetFrameView();
@@ -1184,7 +1184,7 @@ void SlideShow::StartFullscreenPresentation( )
pNewFrame->SetPresentationMode(true);
mpFullScreenViewShellBase = static_cast<ViewShellBase*>(pNewFrame->GetCurrentViewFrame()->GetViewShell());
- if(mpFullScreenViewShellBase != NULL)
+ if(mpFullScreenViewShellBase != nullptr)
{
// The following GrabFocus() is responsible for activating the
// new view shell. Without it the screen remains blank (under
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 0c5e1aef2c6b..5fadc3d57f88 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -496,14 +496,14 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
, mpViewShell(pViewSh)
, mpDocSh(pDoc->GetDocSh())
, mpDoc(pDoc)
-, mpNewAttr(0)
+, mpNewAttr(nullptr)
, mpParentWindow(pParentWindow)
-, mpShowWindow(0)
-, mpTimeButton(0)
+, mpShowWindow(nullptr)
+, mpTimeButton(nullptr)
, mnRestoreSlide(0)
, maPresSize( -1, -1 )
, meAnimationMode(ANIMATIONMODE_SHOW)
-, mpOldActiveWindow(0)
+, mpOldActiveWindow(nullptr)
, mnChildMask( 0 )
, mbGridVisible(false)
, mbBordVisible(false)
@@ -530,8 +530,8 @@ SlideshowImpl::SlideshowImpl( const Reference< XPresentation2 >& xPresentation,
, msOnClick( "OnClick" )
, msBookmark( "Bookmark" )
, msVerb( "Verb" )
-, mnEndShowEvent(0)
-, mnContextMenuEvent(0)
+, mnEndShowEvent(nullptr)
+, mnContextMenuEvent(nullptr)
, mxPresentation( xPresentation )
{
if( mpViewShell )
@@ -568,7 +568,7 @@ SlideshowImpl::~SlideshowImpl()
SdModule *pModule = SD_MOD();
//rhbz#806663 SlideshowImpl can outlive SdModule
SdOptions* pOptions = pModule ?
- pModule->GetSdOptions(DOCUMENT_TYPE_IMPRESS) : NULL;
+ pModule->GetSdOptions(DOCUMENT_TYPE_IMPRESS) : nullptr;
if( pOptions )
{
pOptions->SetPresentationPenColor(mnUserPaintColor);
@@ -658,7 +658,7 @@ void SAL_CALL SlideshowImpl::disposing()
{
mpViewShell->SetActiveWindow(mpOldActiveWindow);
if (mpShowWindow)
- mpShowWindow->SetViewShell( NULL );
+ mpShowWindow->SetViewShell( nullptr );
}
if( mpView )
@@ -802,7 +802,7 @@ bool SlideshowImpl::startPreview(
mpSlideController->insertSlideNumber( nSlideNumber-1 );
mpSlideController->setPreviewNode( xAnimationNode );
- mpShowWindow = VclPtr<ShowWindow>::Create( this, ((pParent == 0) && mpViewShell) ? mpParentWindow.get() : pParent );
+ mpShowWindow = VclPtr<ShowWindow>::Create( this, ((pParent == nullptr) && mpViewShell) ? mpParentWindow.get() : pParent );
if( mpViewShell )
{
mpViewShell->SetActiveWindow( mpShowWindow );
@@ -812,7 +812,7 @@ bool SlideshowImpl::startPreview(
if( mpView )
{
- mpView->AddWindowToPaintView( mpShowWindow, 0 );
+ mpView->AddWindowToPaintView( mpShowWindow, nullptr );
mpView->SetAnimationPause( true );
}
@@ -1006,7 +1006,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( mpView )
{
- mpView->AddWindowToPaintView( mpShowWindow, 0 );
+ mpView->AddWindowToPaintView( mpShowWindow, nullptr );
mpView->SetAnimationPause( true );
}
@@ -1426,7 +1426,7 @@ void SlideshowImpl::endPresentation()
IMPL_LINK_NOARG_TYPED(SlideshowImpl, endPresentationHdl, void*, void)
{
- mnEndShowEvent = 0;
+ mnEndShowEvent = nullptr;
if( mxPresentation.is() )
mxPresentation->end();
@@ -2091,9 +2091,9 @@ void SlideshowImpl::mouseButtonUp(const MouseEvent& rMEvt)
IMPL_LINK_NOARG_TYPED(SlideshowImpl, ContextMenuHdl, void*, void)
{
- mnContextMenuEvent = 0;
+ mnContextMenuEvent = nullptr;
- if( mpSlideController.get() == 0 )
+ if( mpSlideController.get() == nullptr )
return;
mbWasPaused = mbIsPaused;
@@ -2411,7 +2411,7 @@ void SlideshowImpl::createSlideList( bool bAll, const OUString& rPresSlide )
if( mpDoc->GetCustomShowList() && maPresSettings.mbCustomShow )
pCustomShow = mpDoc->GetCustomShowList()->GetCurObject();
else
- pCustomShow = NULL;
+ pCustomShow = nullptr;
// create animation slide controller
AnimationSlideController::Mode eMode =
@@ -2514,7 +2514,7 @@ void SlideshowImpl::hideChildWindows()
if( pViewFrame )
{
- if( pViewFrame->GetChildWindow( SID_NAVIGATOR ) != NULL )
+ if( pViewFrame->GetChildWindow( SID_NAVIGATOR ) != nullptr )
mnChildMask |= NAVIGATOR_CHILD_MASK;
for( sal_uLong i = 0, nCount = sizeof( aShowChildren ) / sizeof( FncGetChildWindowId ); i < nCount; i++ )
@@ -2551,17 +2551,17 @@ void SlideshowImpl::showChildWindows()
SfxViewFrame* SlideshowImpl::getViewFrame() const
{
- return mpViewShell ? mpViewShell->GetViewFrame() : 0;
+ return mpViewShell ? mpViewShell->GetViewFrame() : nullptr;
}
SfxDispatcher* SlideshowImpl::getDispatcher() const
{
- return (mpViewShell && mpViewShell->GetViewFrame()) ? mpViewShell->GetViewFrame()->GetDispatcher() : 0;
+ return (mpViewShell && mpViewShell->GetViewFrame()) ? mpViewShell->GetViewFrame()->GetDispatcher() : nullptr;
}
SfxBindings* SlideshowImpl::getBindings() const
{
- return (mpViewShell && mpViewShell->GetViewFrame()) ? &mpViewShell->GetViewFrame()->GetBindings() : 0;
+ return (mpViewShell && mpViewShell->GetViewFrame()) ? &mpViewShell->GetViewFrame()->GetBindings() : nullptr;
}
void SlideshowImpl::resize( const Size& rSize )
@@ -2640,7 +2640,7 @@ void SAL_CALL SlideshowImpl::activate() throw (RuntimeException, std::exception)
if( mpShowWindow )
{
SfxViewFrame* pViewFrame = getViewFrame();
- SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : 0;
+ SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : nullptr;
hideChildWindows();
@@ -2729,7 +2729,7 @@ void SlideshowImpl::receiveRequest(SfxRequest& rReq)
// is the bookmark a Slide?
bool bIsMasterPage;
sal_uInt16 nPgNum = mpDoc->GetPageByName( aTarget, bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if( nPgNum == SDRPAGE_NOTFOUND )
{
@@ -2817,7 +2817,7 @@ sal_Int32 SAL_CALL SlideshowImpl::getCurrentSlideIndex() throw (RuntimeException
Reference< XDrawPage > SAL_CALL SlideshowImpl::getSlideByIndex(::sal_Int32 Index) throw (RuntimeException, css::lang::IndexOutOfBoundsException, std::exception)
{
- if( (mpSlideController.get() == 0 ) || (Index < 0) || (Index >= mpSlideController->getSlideIndexCount() ) )
+ if( (mpSlideController.get() == nullptr ) || (Index < 0) || (Index >= mpSlideController->getSlideIndexCount() ) )
throw IndexOutOfBoundsException();
return mpSlideController->getSlideByNumber( mpSlideController->getSlideNumber( Index ) );
@@ -3277,7 +3277,7 @@ PresentationSettingsEx::PresentationSettingsEx( const PresentationSettingsEx& r
: PresentationSettings( r )
, mbRehearseTimings(r.mbRehearseTimings)
, mbPreview(r.mbPreview)
-, mpParentWindow( 0 )
+, mpParentWindow( nullptr )
{
}
@@ -3285,7 +3285,7 @@ PresentationSettingsEx::PresentationSettingsEx( PresentationSettings& r )
: PresentationSettings( r )
, mbRehearseTimings(false)
, mbPreview(false)
-, mpParentWindow(0)
+, mpParentWindow(nullptr)
{
}
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 9b28f8ea16fa..fd38e6272966 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -211,7 +211,7 @@ void SAL_CALL SlideShowView::dispose() throw (RuntimeException, std::exception)
{
::osl::MutexGuard aGuard( m_aMutex );
- mpSlideShow = 0;
+ mpSlideShow = nullptr;
// deregister listeners
if( mxWindow.is() )
@@ -241,19 +241,19 @@ void SAL_CALL SlideShowView::disposing( const lang::EventObject& ) throw(Runtime
// notify all listeners that _we_ are going down (send a disposing()),
// then delete listener containers:
lang::EventObject const evt( static_cast<OWeakObject *>(this) );
- if (mpViewListeners.get() != 0) {
+ if (mpViewListeners.get() != nullptr) {
mpViewListeners->disposing( evt );
mpViewListeners.reset();
}
- if (mpPaintListeners.get() != 0) {
+ if (mpPaintListeners.get() != nullptr) {
mpPaintListeners->disposing( evt );
mpPaintListeners.reset();
}
- if (mpMouseListeners.get() != 0) {
+ if (mpMouseListeners.get() != nullptr) {
mpMouseListeners->disposing( evt );
mpMouseListeners.reset();
}
- if (mpMouseMotionListeners.get() != 0) {
+ if (mpMouseMotionListeners.get() != nullptr) {
mpMouseMotionListeners->disposing( evt );
mpMouseMotionListeners.reset();
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
index 46a3fca292af..06476ad639cd 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx
@@ -58,7 +58,7 @@ public:
Bitmap GetMarkedPreview() const { return maMarkedPreview; }
inline void SetMarkedPreview (const Bitmap& rMarkePreview);
- bool HasReplacement() const { return (mpReplacement.get() != NULL); }
+ bool HasReplacement() const { return (mpReplacement.get() != nullptr); }
inline bool HasLosslessReplacement() const;
void Invalidate() { mpReplacement.reset(); mpCompressor.reset(); mbIsUpToDate = false; }
bool IsPrecious() const { return mbIsPrecious; }
@@ -499,7 +499,7 @@ inline sal_Int32 BitmapCache::CacheEntry::GetMemorySize() const
sal_Int32 nSize (0);
nSize += maPreview.GetSizeBytes();
nSize += maMarkedPreview.GetSizeBytes();
- if (mpReplacement.get() != NULL)
+ if (mpReplacement.get() != nullptr)
nSize += mpReplacement->GetMemorySize();
return nSize;
}
@@ -508,7 +508,7 @@ void BitmapCache::CacheEntry::Compress (const std::shared_ptr<BitmapCompressor>&
{
if ( ! maPreview.IsEmpty())
{
- if (mpReplacement.get() == NULL)
+ if (mpReplacement.get() == nullptr)
{
mpReplacement = rpCompressor->Compress(maPreview);
@@ -531,7 +531,7 @@ void BitmapCache::CacheEntry::Compress (const std::shared_ptr<BitmapCompressor>&
inline void BitmapCache::CacheEntry::Decompress()
{
- if (mpReplacement.get()!=NULL && mpCompressor.get()!=NULL && maPreview.IsEmpty())
+ if (mpReplacement.get()!=nullptr && mpCompressor.get()!=nullptr && maPreview.IsEmpty())
{
maPreview = mpCompressor->Decompress(*mpReplacement);
maMarkedPreview.SetEmpty();
@@ -560,8 +560,8 @@ inline void BitmapCache::CacheEntry::SetMarkedPreview (const Bitmap& rMarkedPrev
inline bool BitmapCache::CacheEntry::HasLosslessReplacement() const
{
- return mpReplacement.get()!=NULL
- && mpCompressor.get()!=NULL
+ return mpReplacement.get()!=nullptr
+ && mpCompressor.get()!=nullptr
&& mpCompressor->IsLossless();
}
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
index 92b54c8c12d8..3a4954163b70 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapCompressor.cxx
@@ -147,7 +147,7 @@ public:
sal_Int32 mnDataSize;
Size maImageSize;
PngReplacement()
- : mpData(NULL),
+ : mpData(nullptr),
mnDataSize(0),
maImageSize(0,0)
{}
@@ -181,7 +181,7 @@ Bitmap PngCompression::Decompress (
{
Bitmap aResult;
const PngReplacement* pData (dynamic_cast<const PngReplacement*>(&rBitmapData));
- if (pData != NULL)
+ if (pData != nullptr)
{
SvMemoryStream aStream (pData->mpData, pData->mnDataSize, StreamMode::READ);
vcl::PNGReader aReader (aStream);
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index d68ee263d57c..7ad3ea278097 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -39,7 +39,7 @@ class PageObjectViewObjectContact;
namespace sd { namespace slidesorter { namespace cache {
BitmapFactory::BitmapFactory()
- : maRenderer(NULL, false)
+ : maRenderer(nullptr, false)
{
}
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
index 4890d5014b2d..27403e489c46 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
@@ -176,7 +176,7 @@ void CacheCompactionByCompression::Run()
::sd::slidesorter::cache::BitmapCache::CacheIndex::iterator iIndex;
for (iIndex=pIndex->begin(); iIndex!=pIndex->end(); ++iIndex)
{
- if (*iIndex == NULL)
+ if (*iIndex == nullptr)
continue;
mrCache.Compress(*iIndex, mpCompressor);
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
index 7a786964c464..3f7207d754cd 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx
@@ -47,12 +47,12 @@ std::shared_ptr<CacheConfiguration> CacheConfiguration::Instance()
{
SolarMutexGuard aSolarGuard;
CacheConfigSharedPtr &rInstancePtr = theInstance::get();
- if (rInstancePtr.get() == NULL)
+ if (rInstancePtr.get() == nullptr)
{
// Maybe somebody else kept a previously created instance alive.
if ( ! mpWeakInstance.expired())
rInstancePtr = std::shared_ptr<CacheConfiguration>(mpWeakInstance);
- if (rInstancePtr.get() == NULL)
+ if (rInstancePtr.get() == nullptr)
{
// We have to create a new instance.
rInstancePtr.reset(new CacheConfiguration());
@@ -121,7 +121,7 @@ Any CacheConfiguration::GetValue (const OUString& rName)
{
Any aResult;
- if (mxCacheNode != NULL)
+ if (mxCacheNode != nullptr)
{
try
{
diff --git a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
index d2058991eb92..8b13028b5dd6 100644
--- a/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsGenericPageCache.cxx
@@ -49,24 +49,24 @@ GenericPageCache::GenericPageCache (
GenericPageCache::~GenericPageCache()
{
- if (mpQueueProcessor.get() != NULL)
+ if (mpQueueProcessor.get() != nullptr)
mpQueueProcessor->Stop();
maRequestQueue.Clear();
mpQueueProcessor.reset();
- if (mpBitmapCache.get() != NULL)
+ if (mpBitmapCache.get() != nullptr)
PageCacheManager::Instance()->ReleaseCache(mpBitmapCache);
mpBitmapCache.reset();
}
void GenericPageCache::ProvideCacheAndProcessor()
{
- if (mpBitmapCache.get() == NULL)
+ if (mpBitmapCache.get() == nullptr)
mpBitmapCache = PageCacheManager::Instance()->GetCache(
mpCacheContext->GetModel(),
maPreviewSize);
- if (mpQueueProcessor.get() == NULL)
+ if (mpQueueProcessor.get() == nullptr)
mpQueueProcessor.reset(new QueueProcessor(
maRequestQueue,
mpBitmapCache,
@@ -87,11 +87,11 @@ void GenericPageCache::ChangePreviewSize (
"GenericPageCache<>::GetPreviewBitmap(): bitmap requested with large width. "
"This may indicate an error.");
- if (mpBitmapCache.get() != NULL)
+ if (mpBitmapCache.get() != nullptr)
{
mpBitmapCache = PageCacheManager::Instance()->ChangeSize(
mpBitmapCache, maPreviewSize, rPreviewSize);
- if (mpQueueProcessor.get() != NULL)
+ if (mpQueueProcessor.get() != nullptr)
{
mpQueueProcessor->SetPreviewSize(rPreviewSize, bDoSuperSampling);
mpQueueProcessor->SetBitmapCache(mpBitmapCache);
@@ -106,7 +106,7 @@ Bitmap GenericPageCache::GetPreviewBitmap (
const CacheKey aKey,
const bool bResize)
{
- OSL_ASSERT(aKey != NULL);
+ OSL_ASSERT(aKey != nullptr);
Bitmap aPreview;
bool bMayBeUpToDate = true;
@@ -144,7 +144,7 @@ Bitmap GenericPageCache::GetMarkedPreviewBitmap (
const CacheKey aKey,
const bool bResize)
{
- OSL_ASSERT(aKey != NULL);
+ OSL_ASSERT(aKey != nullptr);
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
@@ -167,7 +167,7 @@ void GenericPageCache::SetMarkedPreviewBitmap (
const CacheKey aKey,
const Bitmap& rMarkedBitmap)
{
- OSL_ASSERT(aKey != NULL);
+ OSL_ASSERT(aKey != nullptr);
ProvideCacheAndProcessor();
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
@@ -178,7 +178,7 @@ void GenericPageCache::RequestPreviewBitmap (
const CacheKey aKey,
const bool bMayBeUpToDate)
{
- OSL_ASSERT(aKey != NULL);
+ OSL_ASSERT(aKey != nullptr);
const SdrPage* pPage = mpCacheContext->GetPage(aKey);
@@ -220,7 +220,7 @@ bool GenericPageCache::InvalidatePreviewBitmap (const CacheKey aKey)
return pCacheManager->InvalidatePreviewBitmap(
mpCacheContext->GetModel(),
aKey);
- else if (mpBitmapCache.get() != NULL)
+ else if (mpBitmapCache.get() != nullptr)
return mpBitmapCache->InvalidateBitmap(mpCacheContext->GetPage(aKey));
else
return false;
@@ -277,14 +277,14 @@ void GenericPageCache::SetPreciousFlag (
void GenericPageCache::Pause()
{
ProvideCacheAndProcessor();
- if (mpQueueProcessor.get() != NULL)
+ if (mpQueueProcessor.get() != nullptr)
mpQueueProcessor->Pause();
}
void GenericPageCache::Resume()
{
ProvideCacheAndProcessor();
- if (mpQueueProcessor.get() != NULL)
+ if (mpQueueProcessor.get() != nullptr)
mpQueueProcessor->Resume();
}
diff --git a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
index 3a751df9c679..0d48069a31e9 100644
--- a/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsPageCacheManager.cxx
@@ -169,7 +169,7 @@ std::shared_ptr<PageCacheManager> PageCacheManager::Instance()
::osl::MutexGuard aGuard (::osl::Mutex::getGlobalMutex());
pInstance = mpInstance.lock();
- if (pInstance.get() == NULL)
+ if (pInstance.get() == nullptr)
{
pInstance = std::shared_ptr<PageCacheManager>(
new PageCacheManager(),
@@ -204,11 +204,11 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetCache (
pResult = iCache->second;
// Look for the cache in the list of recently used caches.
- if (pResult.get() == NULL)
+ if (pResult.get() == nullptr)
pResult = GetRecentlyUsedCache(pDocument, rPreviewSize);
// Create the cache when no suitable one does exist.
- if (pResult.get() == NULL)
+ if (pResult.get() == nullptr)
pResult.reset(new Cache());
// The cache may be newly created and thus empty or is old and may
@@ -217,7 +217,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::GetCache (
Recycle(pResult, pDocument,rPreviewSize);
// Put the new (or old) cache into the container.
- if (pResult.get() != NULL)
+ if (pResult.get() != nullptr)
mpPageCaches->insert(PageCacheContainer::value_type(aKey, pResult));
return pResult;
@@ -284,7 +284,7 @@ std::shared_ptr<PageCacheManager::Cache> PageCacheManager::ChangeSize (
std::shared_ptr<Cache> pResult;
- if (rpCache.get() != NULL)
+ if (rpCache.get() != nullptr)
{
// Look up the given cache in the list of active caches.
PageCacheContainer::iterator iCacheToChange (::std::find_if(
@@ -322,7 +322,7 @@ bool PageCacheManager::InvalidatePreviewBitmap (
{
bool bHasChanged (false);
- if (pDocument!=NULL)
+ if (pDocument!=nullptr)
{
// Iterate over all caches that are currently in use and invalidate
// the previews in those that belong to the document.
@@ -347,7 +347,7 @@ bool PageCacheManager::InvalidatePreviewBitmap (
void PageCacheManager::InvalidateAllPreviewBitmaps (DocumentKey pDocument)
{
- if (pDocument == NULL)
+ if (pDocument == nullptr)
return;
// Iterate over all caches that are currently in use and invalidate the
diff --git a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
index c2cc64f453f5..cf291038a7a0 100644
--- a/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx
@@ -113,7 +113,7 @@ IMPL_LINK_NOARG_TYPED(QueueProcessor, ProcessRequestHdl, Timer *, void)
void QueueProcessor::ProcessRequests()
{
- OSL_ASSERT(mpCacheContext.get()!=NULL);
+ OSL_ASSERT(mpCacheContext.get()!=nullptr);
// Never process more than one request at a time in order to prevent the
// lock up of the edit view.
@@ -121,7 +121,7 @@ void QueueProcessor::ProcessRequests()
&& ! mbIsPaused
&& mpCacheContext->IsIdle())
{
- CacheKey aKey = NULL;
+ CacheKey aKey = nullptr;
RequestPriorityClass ePriorityClass (NOT_VISIBLE);
{
::osl::MutexGuard aGuard (mrQueue.GetMutex());
@@ -135,7 +135,7 @@ void QueueProcessor::ProcessRequests()
}
}
- if (aKey != NULL)
+ if (aKey != nullptr)
ProcessOneRequest(aKey, ePriorityClass);
}
@@ -156,11 +156,11 @@ void QueueProcessor::ProcessOneRequest (
::osl::MutexGuard aGuard (maMutex);
// Create a new preview bitmap and store it in the cache.
- if (mpCache.get() != NULL
- && mpCacheContext.get() != NULL)
+ if (mpCache.get() != nullptr
+ && mpCacheContext.get() != nullptr)
{
const SdPage* pSdPage = dynamic_cast<const SdPage*>(mpCacheContext->GetPage(aKey));
- if (pSdPage != NULL)
+ if (pSdPage != nullptr)
{
const Bitmap aPreview (
maBitmapFactory.CreateBitmap(*pSdPage, maPreviewSize, mbDoSuperSampling));
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
index aec7035c3f33..3bda7baa7d0c 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestFactory.cxx
@@ -38,7 +38,7 @@ void RequestFactory::operator()(
// Add the requests for the visible pages.
aKeys = rpCacheContext->GetEntryList(true);
- if (aKeys.get() != NULL)
+ if (aKeys.get() != nullptr)
{
std::vector<CacheKey>::const_iterator iKey;
std::vector<CacheKey>::const_iterator iEnd (aKeys->end());
@@ -48,7 +48,7 @@ void RequestFactory::operator()(
// Add the requests for the non-visible pages.
aKeys = rpCacheContext->GetEntryList(false);
- if (aKeys.get() != NULL)
+ if (aKeys.get() != nullptr)
{
std::vector<CacheKey>::const_iterator iKey;
std::vector<CacheKey>::const_iterator iEnd (aKeys->end());
diff --git a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
index d75151ea1ebd..05aa18656844 100644
--- a/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsRequestQueue.cxx
@@ -197,7 +197,7 @@ CacheKey RequestQueue::GetFront()
if (mpRequestQueue->empty())
throw css::uno::RuntimeException("RequestQueue::GetFront(): queue is empty",
- NULL);
+ nullptr);
return mpRequestQueue->begin()->maKey;
}
@@ -208,7 +208,7 @@ RequestPriorityClass RequestQueue::GetFrontPriorityClass()
if (mpRequestQueue->empty())
throw css::uno::RuntimeException("RequestQueue::GetFrontPriorityClass(): queue is empty",
- NULL);
+ nullptr);
return mpRequestQueue->begin()->meClass;
}
diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
index dfa797f8333d..c4cb361b6806 100644
--- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
+++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx
@@ -115,7 +115,7 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
mbPostModelChangePending(false),
maSelectionBeforeSwitch(),
mnCurrentPageBeforeSwitch(0),
- mpEditModeChangeMasterPage(NULL),
+ mpEditModeChangeMasterPage(nullptr),
maTotalWindowArea(),
mnPaintEntranceCount(0),
mbIsContextMenuOpen(false)
@@ -126,7 +126,7 @@ SlideSorterController::SlideSorterController (SlideSorter& rSlideSorter)
{
// The whole background is painted by the view and controls.
vcl::Window* pParentWindow = pWindow->GetParent();
- OSL_ASSERT(pParentWindow!=NULL);
+ OSL_ASSERT(pParentWindow!=nullptr);
pParentWindow->SetBackground (Wallpaper());
// Connect the view with the window that has been created by our base
@@ -218,50 +218,50 @@ model::SharedPageDescriptor SlideSorterController::GetPageAt (
PageSelector& SlideSorterController::GetPageSelector()
{
- OSL_ASSERT(mpPageSelector.get()!=NULL);
+ OSL_ASSERT(mpPageSelector.get()!=nullptr);
return *mpPageSelector.get();
}
FocusManager& SlideSorterController::GetFocusManager()
{
- OSL_ASSERT(mpFocusManager.get()!=NULL);
+ OSL_ASSERT(mpFocusManager.get()!=nullptr);
return *mpFocusManager.get();
}
Clipboard& SlideSorterController::GetClipboard()
{
- OSL_ASSERT(mpClipboard.get()!=NULL);
+ OSL_ASSERT(mpClipboard.get()!=nullptr);
return *mpClipboard.get();
}
ScrollBarManager& SlideSorterController::GetScrollBarManager()
{
- OSL_ASSERT(mpScrollBarManager.get()!=NULL);
+ OSL_ASSERT(mpScrollBarManager.get()!=nullptr);
return *mpScrollBarManager.get();
}
std::shared_ptr<CurrentSlideManager> SlideSorterController::GetCurrentSlideManager() const
{
- OSL_ASSERT(mpCurrentSlideManager.get()!=NULL);
+ OSL_ASSERT(mpCurrentSlideManager.get()!=nullptr);
return mpCurrentSlideManager;
}
std::shared_ptr<SlotManager> SlideSorterController::GetSlotManager() const
{
- OSL_ASSERT(mpSlotManager.get()!=NULL);
+ OSL_ASSERT(mpSlotManager.get()!=nullptr);
return mpSlotManager;
}
std::shared_ptr<SelectionManager> SlideSorterController::GetSelectionManager() const
{
- OSL_ASSERT(mpSelectionManager.get()!=NULL);
+ OSL_ASSERT(mpSelectionManager.get()!=nullptr);
return mpSelectionManager;
}
std::shared_ptr<InsertionIndicatorHandler>
SlideSorterController::GetInsertionIndicatorHandler() const
{
- OSL_ASSERT(mpInsertionIndicatorHandler.get()!=NULL);
+ OSL_ASSERT(mpInsertionIndicatorHandler.get()!=nullptr);
return mpInsertionIndicatorHandler;
}
@@ -307,18 +307,18 @@ bool SlideSorterController::Command (
{
bool bEventHasBeenHandled = false;
- if (pWindow == NULL)
+ if (pWindow == nullptr)
return false;
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
return false;
switch (rEvent.GetCommand())
{
case CommandEventId::ContextMenu:
{
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
sal_uInt16 nPopupId;
model::PageEnumeration aSelectedPages (
@@ -332,12 +332,12 @@ bool SlideSorterController::Command (
ViewShell::ShellType eMainViewShellType (ViewShell::ST_NONE);
std::shared_ptr<ViewShell> pMainViewShell (
pViewShell->GetViewShellBase().GetMainViewShell());
- if (pMainViewShell.get() != NULL)
+ if (pMainViewShell.get() != nullptr)
eMainViewShellType = pMainViewShell->GetShellType();
switch (eMainViewShellType)
{
case ViewShell::ST_DRAW:
- if (pPage != NULL)
+ if (pPage != nullptr)
nPopupId = RID_SLIDE_SORTER_DRAW_SEL_POPUP;
else
nPopupId = RID_SLIDE_SORTER_DRAW_NOSEL_POPUP;
@@ -345,18 +345,18 @@ bool SlideSorterController::Command (
default:
if (mrModel.GetEditMode() == EM_PAGE)
- if (pPage != NULL)
+ if (pPage != nullptr)
nPopupId = RID_SLIDE_SORTER_IMPRESS_SEL_POPUP;
else
nPopupId = RID_SLIDE_SORTER_IMPRESS_NOSEL_POPUP;
else
- if (pPage != NULL)
+ if (pPage != nullptr)
nPopupId = RID_SLIDE_SORTER_MASTER_SEL_POPUP;
else
nPopupId = RID_SLIDE_SORTER_MASTER_NOSEL_POPUP;
}
std::unique_ptr<InsertionIndicatorHandler::ForceShowContext> pContext;
- if (pPage == NULL)
+ if (pPage == nullptr)
{
// When there is no selection, then we show the insertion
// indicator so that the user knows where a page insertion
@@ -387,7 +387,7 @@ bool SlideSorterController::Command (
// focused page as top left position of the context menu.
model::SharedPageDescriptor pDescriptor (
GetFocusManager().GetFocusedPageDescriptor());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
Rectangle aBBox (
mrView.GetLayouter().GetPageObjectLayouter()->GetBoundingBox (
@@ -399,10 +399,10 @@ bool SlideSorterController::Command (
}
mbIsContextMenuOpen = true;
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
SfxDispatcher* pDispatcher = pViewShell->GetDispatcher();
- if (pDispatcher != NULL)
+ if (pDispatcher != nullptr)
{
pDispatcher->ExecutePopup(
SdResId(nPopupId),
@@ -415,7 +415,7 @@ bool SlideSorterController::Command (
}
}
mbIsContextMenuOpen = false;
- if (pPage == NULL)
+ if (pPage == nullptr)
{
// Remember the position of the insertion indicator before
// it is hidden, so that a pending slide insertion slot call
@@ -431,7 +431,7 @@ bool SlideSorterController::Command (
case CommandEventId::Wheel:
{
const CommandWheelData* pData = rEvent.GetWheelData();
- if (pData == NULL)
+ if (pData == nullptr)
return false;
if (pData->IsMod1())
{
@@ -489,7 +489,7 @@ void SlideSorterController::PreModelChange()
return;
mbPreModelChangeDone = true;
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
@@ -522,7 +522,7 @@ void SlideSorterController::PostModelChange()
Rearrange(mbIsForcedRearrangePending);
}
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->Broadcast(
ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_END));
}
@@ -591,7 +591,7 @@ IMPL_LINK_TYPED(SlideSorterController, WindowEventHandler, VclWindowEvent&, rEve
DrawModeFlags nDrawMode (Application::GetSettings().GetStyleSettings().GetHighContrastMode()
? sd::OUTPUT_DRAWMODE_CONTRAST
: sd::OUTPUT_DRAWMODE_COLOR);
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->GetFrameView()->SetDrawMode(nDrawMode);
if (pActiveWindow != nullptr)
pActiveWindow->SetDrawMode(nDrawMode);
@@ -619,11 +619,11 @@ void SlideSorterController::GetCtrlState (SfxItemSet& rSet)
{
// let SFx en-/disable "last version"
SfxViewFrame* pSlideViewFrame = SfxViewFrame::Current();
- DBG_ASSERT(pSlideViewFrame!=NULL,
+ DBG_ASSERT(pSlideViewFrame!=nullptr,
"SlideSorterController::GetCtrlState: ViewFrame not found");
if (pSlideViewFrame)
{
- pSlideViewFrame->GetSlotState (SID_RELOAD, NULL, &rSet);
+ pSlideViewFrame->GetSlotState (SID_RELOAD, nullptr, &rSet);
}
else // MI says: no MDIFrame --> disable
{
@@ -785,7 +785,7 @@ void SlideSorterController::PrepareEditModeChange()
SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
SdPage* pPage = pDescriptor->GetPage();
// Remember the master page of the first selected descriptor.
- if (pPage!=NULL && mpEditModeChangeMasterPage==NULL)
+ if (pPage!=nullptr && mpEditModeChangeMasterPage==nullptr)
mpEditModeChangeMasterPage = &static_cast<SdPage&>(
pPage->TRG_GetMasterPage());
@@ -793,7 +793,7 @@ void SlideSorterController::PrepareEditModeChange()
}
// Remember the current page.
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
mnCurrentPageBeforeSwitch = (mrSlideSorter.GetViewShell()->GetViewShellBase()
.GetMainViewShell()->GetActualPage()->GetPageNum()-1)/2;
}
@@ -852,14 +852,14 @@ void SlideSorterController::FinishEditModeChange()
}
maSelectionBeforeSwitch.clear( );
}
- mpEditModeChangeMasterPage = NULL;
+ mpEditModeChangeMasterPage = nullptr;
}
void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& rsOldName)
{
// Request a repaint for the page object whose name has changed.
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
mrView.RequestRepaint(pDescriptor);
// Get a pointer to the corresponding accessible object and notify
@@ -885,12 +885,12 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString&
// being NULL should be safe enough.
::accessibility::AccessibleSlideSorterView* pAccessibleView
= dynamic_cast< ::accessibility::AccessibleSlideSorterView*>(xAccessible.get());
- if (pAccessibleView == NULL)
+ if (pAccessibleView == nullptr)
return;
::accessibility::AccessibleSlideSorterObject* pChild
= pAccessibleView->GetAccessibleChildImplementation(nPageIndex);
- if (pChild == NULL || pChild->GetPage() == NULL)
+ if (pChild == nullptr || pChild->GetPage() == nullptr)
return;
OUString sOldName (rsOldName);
@@ -968,10 +968,10 @@ SlideSorterController::ModelChangeLock::~ModelChangeLock()
void SlideSorterController::ModelChangeLock::Release()
{
- if (mpController != NULL)
+ if (mpController != nullptr)
{
mpController->UnlockModelChange();
- mpController = NULL;
+ mpController = nullptr;
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 9f72e7ab078e..a2b1c1dc3246 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -115,7 +115,7 @@ public:
: mpDocument(pDocument),
mpMainViewShell(rpMainViewShell)
{
- if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ if (mpDocument!=nullptr && mpDocument->IsUndoEnabled())
{
if (mpMainViewShell && mpMainViewShell->GetShellType() == ViewShell::ST_DRAW)
mpDocument->BegUndo(SD_RESSTR(STRING_DRAG_AND_DROP_PAGES));
@@ -126,9 +126,9 @@ public:
~UndoContext()
{
- if (mpDocument!=NULL && mpDocument->IsUndoEnabled())
+ if (mpDocument!=nullptr && mpDocument->IsUndoEnabled())
mpDocument->EndUndo();
- if (mpMainViewShell && mpMainViewShell->GetViewFrame()!=NULL)
+ if (mpMainViewShell && mpMainViewShell->GetViewFrame()!=nullptr)
{
SfxBindings& rBindings = mpMainViewShell->GetViewFrame()->GetBindings();
rBindings.Invalidate(SID_UNDO);
@@ -149,13 +149,13 @@ Clipboard::Clipboard (SlideSorter& rSlideSorter)
mbUpdateSelectionPending(false),
mxUndoContext(),
mxSelectionObserverContext(),
- mnDragFinishedUserEventId(0)
+ mnDragFinishedUserEventId(nullptr)
{
}
Clipboard::~Clipboard()
{
- if (mnDragFinishedUserEventId != 0)
+ if (mnDragFinishedUserEventId != nullptr)
Application::RemoveUserEvent(mnDragFinishedUserEventId);
}
@@ -167,7 +167,7 @@ void Clipboard::HandleSlotCall (SfxRequest& rRequest)
{
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
rtl::Reference<FuPoor> xFunc;
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
xFunc = pViewShell->GetCurrentFunction();
switch (rRequest.GetSlot())
{
@@ -242,7 +242,7 @@ void Clipboard::DoPaste (vcl::Window* pWindow)
{
SdTransferable* pClipTransferable = SD_MOD()->pTransferClip;
- if (pClipTransferable!=NULL && pClipTransferable->IsPageTransferable())
+ if (pClipTransferable!=nullptr && pClipTransferable->IsPageTransferable())
{
sal_Int32 nInsertPosition = GetInsertionPosition(pWindow);
@@ -313,7 +313,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
nInsertPageCount = (sal_uInt16) rBookmarkList.size();
rModel.GetDocument()->InsertBookmarkAsPage(
rBookmarkList,
- NULL,
+ nullptr,
false,
false,
nInsertIndex,
@@ -329,7 +329,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
DrawDocShell* pDataDocSh = static_cast<DrawDocShell*>(pShell);
SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
- if (pDataDoc!=NULL
+ if (pDataDoc!=nullptr
&& pDataDoc->GetSdPageCount(PK_STANDARD))
{
const SolarMutexGuard aGuard;
@@ -338,7 +338,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition)
nInsertPageCount = pDataDoc->GetSdPageCount( PK_STANDARD );
rModel.GetDocument()->InsertBookmarkAsPage(
std::vector<OUString>(),
- NULL,
+ nullptr,
false,
false,
nInsertIndex,
@@ -363,7 +363,7 @@ void Clipboard::SelectPageRange (sal_Int32 nFirstIndex, sal_Int32 nPageCount)
{
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor(nFirstIndex + i));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
rSelector.SelectPage(pDescriptor);
// The first page of the new selection is made the current page.
@@ -404,7 +404,7 @@ void Clipboard::CreateSlideTransferable (
while (aSelectedPages.HasMoreElements())
{
model::SharedPageDescriptor pDescriptor (aSelectedPages.GetNextElement());
- if ( ! pDescriptor || pDescriptor->GetPage()==NULL)
+ if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
continue;
Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
aRepresentatives.push_back(TransferableData::Representative(
@@ -420,7 +420,7 @@ void Clipboard::CreateSlideTransferable (
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
SdTransferable* pTransferable = TransferableData::CreateTransferable (
pDocument,
- NULL,
+ nullptr,
false,
dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell()),
aRepresentatives);
@@ -432,20 +432,20 @@ void Clipboard::CreateSlideTransferable (
pDocument->CreatingDataObj (pTransferable);
pTransferable->SetWorkDocument(pDocument->AllocSdDrawDocument());
- pDocument->CreatingDataObj (NULL);
+ pDocument->CreatingDataObj (nullptr);
TransferableObjectDescriptor aObjDesc;
pTransferable->GetWorkDocument()->GetDocSh()
->FillTransferableObjectDescriptor (aObjDesc);
- if (pDocument->GetDocSh() != NULL)
+ if (pDocument->GetDocSh() != nullptr)
aObjDesc.maDisplayName = pDocument->GetDocSh()
->GetMedium()->GetURLObject().GetURLNoPass();
vcl::Window* pActionWindow = pWindow;
- if (pActionWindow == NULL)
+ if (pActionWindow == nullptr)
{
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pActionWindow = pViewShell->GetActiveWindow();
}
@@ -474,19 +474,19 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
{
SdPageObjsTLB::SdPageObjsTransferable* pTreeListBoxTransferable
= dynamic_cast<SdPageObjsTLB::SdPageObjsTransferable*>(pTransferable);
- if (pTreeListBoxTransferable == NULL)
+ if (pTreeListBoxTransferable == nullptr)
break;
// Find view shell for the document of the transferable.
::sd::ViewShell* pViewShell
= SdPageObjsTLB::GetViewShellForDocShell(pTreeListBoxTransferable->GetDocShell());
- if (pViewShell == NULL)
+ if (pViewShell == nullptr)
break;
// Find slide sorter for the document of the transferable.
SlideSorterViewShell* pSlideSorterViewShell
= SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase());
- if (pSlideSorterViewShell == NULL)
+ if (pSlideSorterViewShell == nullptr)
break;
SlideSorter& rSlideSorter (pSlideSorterViewShell->GetSlideSorter());
@@ -503,7 +503,7 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
// Make sure that the bookmark points to a page.
SdDrawDocument* pTransferableDocument = rSlideSorter.GetModel().GetDocument();
- if (pTransferableDocument == NULL)
+ if (pTransferableDocument == nullptr)
break;
bool bIsMasterPage = false;
const sal_uInt16 nPageIndex (pTransferableDocument->GetPageByName(sBookmark, bIsMasterPage));
@@ -516,7 +516,7 @@ std::shared_ptr<SdTransferable::UserData> Clipboard::CreateTransferableUserData
std::shared_ptr<cache::PageCache> pPreviewCache (
rSlideSorter.GetView().GetPreviewCache());
model::SharedPageDescriptor pDescriptor (rSlideSorter.GetModel().GetPageDescriptor((nPageIndex-1)/2));
- if ( ! pDescriptor || pDescriptor->GetPage()==NULL)
+ if ( ! pDescriptor || pDescriptor->GetPage()==nullptr)
break;
Bitmap aPreview (pPreviewCache->GetPreviewBitmap(pDescriptor->GetPage(), false));
aRepresentatives.push_back(TransferableData::Representative(
@@ -569,7 +569,7 @@ void Clipboard::StartDrag (
void Clipboard::DragFinished (sal_Int8 nDropAction)
{
- if (mnDragFinishedUserEventId == 0)
+ if (mnDragFinishedUserEventId == nullptr)
{
mnDragFinishedUserEventId = Application::PostUserEvent(
LINK(this, Clipboard, ProcessDragFinished),
@@ -581,7 +581,7 @@ IMPL_LINK_TYPED(Clipboard, ProcessDragFinished, void*, pUserData, void)
{
const sal_Int8 nDropAction (static_cast<sal_Int8>(reinterpret_cast<sal_IntPtr>(pUserData)));
- mnDragFinishedUserEventId = 0;
+ mnDragFinishedUserEventId = nullptr;
// Hide the substitution display and insertion indicator.
::rtl::Reference<SelectionFunction> pFunction (mrController.GetCurrentSelectionFunction());
@@ -631,7 +631,7 @@ sal_Int8 Clipboard::AcceptDrop (
// explicitly set to move or link, and when the source and
// target models are not the same.
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
- if (pDragTransferable != NULL
+ if (pDragTransferable != nullptr
&& pDragTransferable->IsPageTransferable()
&& ((rEvent.maDragEvent.DropAction
& css::datatransfer::dnd::DNDConstants::ACTION_DEFAULT) != 0)
@@ -648,7 +648,7 @@ sal_Int8 Clipboard::AcceptDrop (
// Show the insertion marker and the substitution for a drop.
SelectionFunction* pSelectionFunction = dynamic_cast<SelectionFunction*>(
mrSlideSorter.GetViewShell()->GetCurrentFunction().get());
- if (pSelectionFunction != NULL)
+ if (pSelectionFunction != nullptr)
pSelectionFunction->MouseDragged(rEvent, nAction);
// Scroll the window when the mouse reaches the window border.
@@ -828,7 +828,7 @@ sal_uInt16 Clipboard::InsertSlides (
// operation is finished.
maPagesToSelect.clear();
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- if (pDocument != NULL)
+ if (pDocument != nullptr)
for (sal_Int32 i=0; i<=nInsertedPageCount; i+=2)
maPagesToSelect.push_back(
dynamic_cast<SdPage*>(pDocument->GetPage(nInsertPosition+i)));
@@ -841,7 +841,7 @@ sal_uInt16 Clipboard::InsertSlides (
Clipboard::DropType Clipboard::IsDropAccepted (DropTargetHelper&) const
{
const SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
- if (pDragTransferable == NULL)
+ if (pDragTransferable == nullptr)
return DT_NONE;
if (pDragTransferable->IsPageTransferable())
@@ -854,7 +854,7 @@ Clipboard::DropType Clipboard::IsDropAccepted (DropTargetHelper&) const
const SdPageObjsTLB::SdPageObjsTransferable* pPageObjsTransferable
= dynamic_cast<const SdPageObjsTLB::SdPageObjsTransferable*>(pDragTransferable);
- if (pPageObjsTransferable != NULL)
+ if (pPageObjsTransferable != nullptr)
return DT_PAGE_FROM_NAVIGATOR;
return DT_SHAPE;
@@ -877,10 +877,10 @@ sal_Int8 Clipboard::ExecuteOrAcceptShapeDrop (
// is implemented in the ViewShell class and uses the page view of the
// main edit view. This is not possible without a DrawViewShell.
std::shared_ptr<DrawViewShell> pDrawViewShell;
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>(
mrSlideSorter.GetViewShell()->GetViewShellBase().GetMainViewShell());
- if (pDrawViewShell.get() != NULL
+ if (pDrawViewShell.get() != nullptr
&& (pDrawViewShell->GetShellType() == ViewShell::ST_IMPRESS
|| pDrawViewShell->GetShellType() == ViewShell::ST_DRAW))
{
diff --git a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
index 79b34a445423..a8e6a4925b81 100644
--- a/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsCurrentSlideManager.cxx
@@ -55,7 +55,7 @@ CurrentSlideManager::~CurrentSlideManager()
void CurrentSlideManager::NotifyCurrentSlideChange (const SdPage* pPage)
{
- if (pPage != NULL)
+ if (pPage != nullptr)
NotifyCurrentSlideChange(
mrSlideSorter.GetModel().GetIndex(
Reference<drawing::XDrawPage>(
@@ -87,7 +87,7 @@ void CurrentSlideManager::NotifyCurrentSlideChange (const sal_Int32 nSlideIndex)
void CurrentSlideManager::ReleaseCurrentSlide()
{
- if (mpCurrentSlide.get() != NULL)
+ if (mpCurrentSlide.get() != nullptr)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, false);
mpCurrentSlide.reset();
@@ -109,7 +109,7 @@ void CurrentSlideManager::AcquireCurrentSlide (const sal_Int32 nSlideIndex)
// given XDrawPage may or may not be member of the slide sorter
// document.
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
- if (mpCurrentSlide.get() != NULL)
+ if (mpCurrentSlide.get() != nullptr)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
@@ -125,17 +125,17 @@ void CurrentSlideManager::SwitchCurrentSlide (
const SharedPageDescriptor& rpDescriptor,
const bool bUpdateSelection)
{
- if (rpDescriptor.get() != NULL && mpCurrentSlide!=rpDescriptor)
+ if (rpDescriptor.get() != nullptr && mpCurrentSlide!=rpDescriptor)
{
ReleaseCurrentSlide();
AcquireCurrentSlide((rpDescriptor->GetPage()->GetPageNum()-1)/2);
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL && pViewShell->IsMainViewShell())
+ if (pViewShell != nullptr && pViewShell->IsMainViewShell())
{
// The slide sorter is the main view.
FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
pFrameView->SetSelectedPage(sal::static_int_cast<sal_uInt16>(mnCurrentSlideIndex));
mrSlideSorter.GetController().GetPageSelector().SetCoreSelection();
}
@@ -167,14 +167,14 @@ void CurrentSlideManager::SwitchCurrentSlide (
void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != NULL);
+ OSL_ASSERT(rpDescriptor.get() != nullptr);
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(
pBase->GetMainViewShell().get());
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
{
sal_uInt16 nPageNumber = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
pDrawViewShell->SwitchPage(nPageNumber);
@@ -185,10 +185,10 @@ void CurrentSlideManager::SetCurrentSlideAtViewShellBase (const SharedPageDescri
void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != NULL);
+ OSL_ASSERT(rpDescriptor.get() != nullptr);
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
{
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell()));
@@ -202,7 +202,7 @@ void CurrentSlideManager::SetCurrentSlideAtTabControl (const SharedPageDescripto
void CurrentSlideManager::SetCurrentSlideAtXController (const SharedPageDescriptor& rpDescriptor)
{
- OSL_ASSERT(rpDescriptor.get() != NULL);
+ OSL_ASSERT(rpDescriptor.get() != nullptr);
try
{
@@ -232,7 +232,7 @@ void CurrentSlideManager::HandleModelChange()
if (mnCurrentSlideIndex >= 0)
{
mpCurrentSlide = mrSlideSorter.GetModel().GetPageDescriptor(mnCurrentSlideIndex);
- if (mpCurrentSlide.get() != NULL)
+ if (mpCurrentSlide.get() != nullptr)
mrSlideSorter.GetView().SetState(mpCurrentSlide, PageDescriptor::ST_Current, true);
}
}
@@ -247,7 +247,7 @@ IMPL_LINK_NOARG_TYPED(CurrentSlideManager, SwitchPageCallback, Timer *, void)
// changes). Therefore, we call DrawViewShell::SwitchPage(),
// too.
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell==NULL || ! pViewShell->IsMainViewShell())
+ if (pViewShell==nullptr || ! pViewShell->IsMainViewShell())
SetCurrentSlideAtViewShellBase(mpCurrentSlide);
SetCurrentSlideAtXController(mpCurrentSlide);
}
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
index fedeb0108041..e6068f5ad218 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.cxx
@@ -54,7 +54,7 @@ DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
SdTransferable* pTransferable = SD_MOD()->pTransferDrag;
SdPageObjsTLB::SdPageObjsTransferable* pTreeListBoxTransferable
= dynamic_cast<SdPageObjsTLB::SdPageObjsTransferable*>(pTransferable);
- if (pTreeListBoxTransferable!=NULL && !TransferableData::GetFromTransferable(pTransferable))
+ if (pTreeListBoxTransferable!=nullptr && !TransferableData::GetFromTransferable(pTransferable))
{
pTransferable->AddUserData(
sd::slidesorter::controller::Clipboard::CreateTransferableUserData(pTransferable));
@@ -65,7 +65,7 @@ DragAndDropContext::DragAndDropContext (SlideSorter& rSlideSorter)
DragAndDropContext::~DragAndDropContext()
{
- SetTargetSlideSorter (NULL, Point(0,0));
+ SetTargetSlideSorter (nullptr, Point(0,0));
}
void DragAndDropContext::Dispose()
@@ -78,7 +78,7 @@ void DragAndDropContext::UpdatePosition (
const InsertionIndicatorHandler::Mode eMode,
const bool bAllowAutoScroll)
{
- if (mpTargetSlideSorter == NULL)
+ if (mpTargetSlideSorter == nullptr)
return;
if (mpTargetSlideSorter->GetProperties()->IsUIReadOnly())
@@ -115,7 +115,7 @@ void DragAndDropContext::SetTargetSlideSorter (
const InsertionIndicatorHandler::Mode eMode,
const bool bIsOverSourceView)
{
- if (mpTargetSlideSorter != NULL)
+ if (mpTargetSlideSorter != nullptr)
{
mpTargetSlideSorter->GetController().GetScrollBarManager().StopAutoScroll();
mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->End(
@@ -124,7 +124,7 @@ void DragAndDropContext::SetTargetSlideSorter (
mpTargetSlideSorter = pSlideSorter;
- if (mpTargetSlideSorter != NULL)
+ if (mpTargetSlideSorter != nullptr)
{
mpTargetSlideSorter->GetController().GetInsertionIndicatorHandler()->Start(
bIsOverSourceView);
diff --git a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
index 58709200ba8d..fad9c8b02eca 100644
--- a/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
+++ b/sd/source/ui/slidesorter/controller/SlsDragAndDropContext.hxx
@@ -61,7 +61,7 @@ public:
const bool bAllowAutoScroll = true);
void SetTargetSlideSorter (
- SlideSorter* pSlideSorter = NULL,
+ SlideSorter* pSlideSorter = nullptr,
const Point& rMousePosition = Point(0,0),
const InsertionIndicatorHandler::Mode eMode = InsertionIndicatorHandler::UnknownMode,
const bool bIsOverSourceView = false);
diff --git a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
index 94ac7d76c3a0..83e764b3ec66 100644
--- a/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsFocusManager.cxx
@@ -189,7 +189,7 @@ model::SharedPageDescriptor FocusManager::GetFocusedPageDescriptor() const
void FocusManager::SetFocusedPage (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get() != NULL)
+ if (rpDescriptor.get() != nullptr)
{
FocusHider aFocusHider (*this);
mnPageIndex = (rpDescriptor->GetPage()->GetPageNum()-1)/2;
@@ -214,7 +214,7 @@ bool FocusManager::IsFocusShowing() const
void FocusManager::HideFocusIndicator (const model::SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get() != NULL)
+ if (rpDescriptor.get() != nullptr)
{
mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, false);
@@ -227,7 +227,7 @@ void FocusManager::ShowFocusIndicator (
const model::SharedPageDescriptor& rpDescriptor,
const bool bScrollToFocus)
{
- if (rpDescriptor.get() != NULL)
+ if (rpDescriptor.get() != nullptr)
{
mrSlideSorter.GetView().SetState(rpDescriptor, model::PageDescriptor::ST_Focused, true);
@@ -268,7 +268,7 @@ void FocusManager::NotifyFocusChangeListeners() const
::std::vector<Link<LinkParamNone*,void>>::iterator iEnd (aListeners.end());
for (; iListener!=iEnd; ++iListener)
{
- iListener->Call(NULL);
+ iListener->Call(nullptr);
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index c69c49ad6723..22e6f7118316 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -92,7 +92,7 @@ Listener::Listener (
// Connect to the frame to listen for controllers being exchanged.
bool bIsMainViewShell (false);
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
bIsMainViewShell = pViewShell->IsMainViewShell();
if ( ! bIsMainViewShell)
{
@@ -116,10 +116,10 @@ Listener::Listener (
// Listen for hints of the MainViewShell as well. If that is not yet
// present then the EventMultiplexer will tell us when it is available.
- if (mpBase != NULL)
+ if (mpBase != nullptr)
{
ViewShell* pMainViewShell = mpBase->GetMainViewShell().get();
- if (pMainViewShell != NULL
+ if (pMainViewShell != nullptr
&& pMainViewShell!=pViewShell)
{
StartListening(*pMainViewShell);
@@ -183,7 +183,7 @@ void Listener::ReleaseListeners()
DisconnectFromController ();
- if (mpBase != NULL)
+ if (mpBase != nullptr)
{
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, Listener, EventMultiplexerCallback));
mpBase->GetEventMultiplexer()->RemoveEventListener(
@@ -202,7 +202,7 @@ void Listener::ConnectToController()
// Register at the controller of the main view shell (if we are that not
// ourself).
- if (pShell==NULL || ! pShell->IsMainViewShell())
+ if (pShell==nullptr || ! pShell->IsMainViewShell())
{
Reference<frame::XController> xController (mrSlideSorter.GetXController());
@@ -351,10 +351,10 @@ IMPL_LINK_TYPED(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexe
{
case tools::EventMultiplexerEvent::EID_MAIN_VIEW_REMOVED:
{
- if (mpBase != NULL)
+ if (mpBase != nullptr)
{
ViewShell* pMainViewShell = mpBase->GetMainViewShell().get();
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
EndListening(*pMainViewShell);
}
}
@@ -365,11 +365,11 @@ IMPL_LINK_TYPED(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexe
break;
case tools::EventMultiplexerEvent::EID_CONFIGURATION_UPDATED:
- if (mbIsMainViewChangePending && mpBase != NULL)
+ if (mbIsMainViewChangePending && mpBase != nullptr)
{
mbIsMainViewChangePending = false;
ViewShell* pMainViewShell = mpBase->GetMainViewShell().get();
- if (pMainViewShell != NULL
+ if (pMainViewShell != nullptr
&& pMainViewShell!=mrSlideSorter.GetViewShell())
{
StartListening (*pMainViewShell);
@@ -396,7 +396,7 @@ IMPL_LINK_TYPED(Listener, EventMultiplexerCallback, ::sd::tools::EventMultiplexe
break;
case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
- if (rEvent.mpUserData != NULL)
+ if (rEvent.mpUserData != nullptr)
{
const SdrObject* pObject = static_cast<const SdrObject*>(rEvent.mpUserData);
HandleShapeModification(pObject->GetPage());
@@ -415,7 +415,7 @@ void SAL_CALL Listener::disposing (
throw (RuntimeException, std::exception)
{
if ((mbListeningToDocument || mbListeningToUNODocument)
- && mrSlideSorter.GetModel().GetDocument()!=NULL
+ && mrSlideSorter.GetModel().GetDocument()!=nullptr
&& rEventObject.Source
== mrSlideSorter.GetModel().GetDocument()->getUnoModel())
{
@@ -533,7 +533,7 @@ void Listener::UpdateEditMode()
Reference<frame::XController> xController (mxControllerWeak);
Reference<beans::XPropertySet> xSet (xController, UNO_QUERY);
bool bIsMasterPageMode = false;
- if (xSet != NULL)
+ if (xSet != nullptr)
{
try
{
@@ -562,7 +562,7 @@ void Listener::HandleModelChange (const SdrPage* pPage)
// Tell the cache manager that the preview bitmaps for a deleted
// page can be removed from all caches.
- if (pPage!=NULL && ! pPage->IsInserted())
+ if (pPage!=nullptr && ! pPage->IsInserted())
cache::PageCacheManager::Instance()->ReleasePreviewBitmap(pPage);
mrController.GetSelectionManager()->GetSelectionObserver()->NotifyPageEvent(pPage);
@@ -571,7 +571,7 @@ void Listener::HandleModelChange (const SdrPage* pPage)
// Tell the controller about the model change only when the document is
// in a sane state, not just in the middle of a larger change.
SdDrawDocument* pDocument (mrSlideSorter.GetModel().GetDocument());
- if (pDocument != NULL
+ if (pDocument != nullptr
&& pDocument->GetMasterSdPageCount(PK_STANDARD) == pDocument->GetMasterSdPageCount(PK_NOTES))
{
// A model change can make updates of some text fields necessary
@@ -586,7 +586,7 @@ void Listener::HandleModelChange (const SdrPage* pPage)
void Listener::HandleShapeModification (const SdrPage* pPage)
{
- if (pPage == NULL)
+ if (pPage == nullptr)
return;
// Invalidate the preview of the page (in all slide sorters that display
@@ -595,9 +595,9 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
if ( ! pCacheManager)
return;
SdDrawDocument* pDocument = mrSlideSorter.GetModel().GetDocument();
- if (pDocument == NULL)
+ if (pDocument == nullptr)
{
- OSL_ASSERT(pDocument!=NULL);
+ OSL_ASSERT(pDocument!=nullptr);
return;
}
pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pPage);
@@ -612,14 +612,14 @@ void Listener::HandleShapeModification (const SdrPage* pPage)
++nIndex)
{
const SdPage* pCandidate = pDocument->GetSdPage(nIndex, PK_STANDARD);
- if (pCandidate!=NULL && pCandidate->TRG_HasMasterPage())
+ if (pCandidate!=nullptr && pCandidate->TRG_HasMasterPage())
{
if (&pCandidate->TRG_GetMasterPage() == pPage)
pCacheManager->InvalidatePreviewBitmap(pDocument->getUnoModel(), pCandidate);
}
else
{
- OSL_ASSERT(pCandidate!=NULL && pCandidate->TRG_HasMasterPage());
+ OSL_ASSERT(pCandidate!=nullptr && pCandidate->TRG_HasMasterPage());
}
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
index f2603e4f0af3..d47c26f15c81 100644
--- a/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsPageSelector.cxx
@@ -132,7 +132,7 @@ void PageSelector::SetCoreSelection()
void PageSelector::SelectPage (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
SelectPage(pDescriptor);
}
@@ -140,13 +140,13 @@ void PageSelector::SelectPage (const SdPage* pPage)
{
const sal_Int32 nPageIndex (mrModel.GetIndex(pPage));
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->GetPage()==pPage)
+ if (pDescriptor.get()!=nullptr && pDescriptor->GetPage()==pPage)
SelectPage(pDescriptor);
}
void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
{
- if (rpDescriptor.get()!=NULL
+ if (rpDescriptor.get()!=nullptr
&& mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, true))
{
++mnSelectedPageCount;
@@ -154,7 +154,7 @@ void PageSelector::SelectPage (const SharedPageDescriptor& rpDescriptor)
mrSlideSorter.GetView().RequestRepaint(rpDescriptor);
mpMostRecentlySelectedPage = rpDescriptor;
- if (mpSelectionAnchor == 0)
+ if (mpSelectionAnchor == nullptr)
mpSelectionAnchor = rpDescriptor;
if (mnBroadcastDisableLevel > 0)
@@ -172,7 +172,7 @@ void PageSelector::DeselectPage (
const bool bUpdateCurrentPage)
{
model::SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
DeselectPage(pDescriptor, bUpdateCurrentPage);
}
@@ -180,7 +180,7 @@ void PageSelector::DeselectPage (
const SharedPageDescriptor& rpDescriptor,
const bool bUpdateCurrentPage)
{
- if (rpDescriptor.get()!=NULL
+ if (rpDescriptor.get()!=nullptr
&& mrSlideSorter.GetView().SetState(rpDescriptor, PageDescriptor::ST_Selected, false))
{
--mnSelectedPageCount;
@@ -222,7 +222,7 @@ void PageSelector::CheckConsistency() const
bool PageSelector::IsPageSelected (int nPageIndex)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nPageIndex));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
return pDescriptor->HasState(PageDescriptor::ST_Selected);
else
return false;
@@ -270,7 +270,7 @@ std::shared_ptr<PageSelector::PageSelection> PageSelector::GetPageSelection() co
for (int nIndex=0; nIndex<nPageCount; nIndex++)
{
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(nIndex));
- if (pDescriptor.get()!=NULL && pDescriptor->HasState(PageDescriptor::ST_Selected))
+ if (pDescriptor.get()!=nullptr && pDescriptor->HasState(PageDescriptor::ST_Selected))
pSelection->push_back(pDescriptor->GetPage());
}
@@ -353,14 +353,14 @@ PageSelector::UpdateLock::~UpdateLock()
void PageSelector::UpdateLock::Release()
{
- if (mpSelector != NULL)
+ if (mpSelector != nullptr)
{
--mpSelector->mnUpdateLockCount;
OSL_ASSERT(mpSelector->mnUpdateLockCount >= 0);
if (mpSelector->mnUpdateLockCount == 0)
mpSelector->UpdateCurrentPage(true);
- mpSelector = NULL;
+ mpSelector = nullptr;
}
}
diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
index 849ab8447f05..4e202c480399 100644
--- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx
@@ -254,7 +254,7 @@ void ScrollBarManager::UpdateScrollBars (bool bResetThumbPosition, bool bUseScro
IMPL_LINK_TYPED(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollBar, void)
{
- if (pScrollBar!=NULL
+ if (pScrollBar!=nullptr
&& pScrollBar==mpVerticalScrollBar.get()
&& pScrollBar->IsVisible()
&& mrSlideSorter.GetContentWindow())
@@ -269,7 +269,7 @@ IMPL_LINK_TYPED(ScrollBarManager, VerticalScrollBarHandler, ScrollBar*, pScrollB
IMPL_LINK_TYPED(ScrollBarManager, HorizontalScrollBarHandler, ScrollBar*, pScrollBar, void)
{
- if (pScrollBar!=NULL
+ if (pScrollBar!=nullptr
&& pScrollBar==mpHorizontalScrollBar.get()
&& pScrollBar->IsVisible()
&& mrSlideSorter.GetContentWindow())
@@ -520,7 +520,7 @@ bool ScrollBarManager::RepeatAutoScroll()
{
if (maAutoScrollOffset != Size(0,0))
{
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
{
mrSlideSorter.GetViewShell()->Scroll(
maAutoScrollOffset.Width(),
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
index b65b69105a0f..9331f98de176 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx
@@ -394,7 +394,7 @@ bool SelectionFunction::KeyInput (const KeyEvent& rEvent)
{
model::SharedPageDescriptor pDescriptor (rFocusManager.GetFocusedPageDescriptor());
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (rFocusManager.HasFocus() && pDescriptor && pViewShell!=NULL)
+ if (rFocusManager.HasFocus() && pDescriptor && pViewShell!=nullptr)
{
// The Return key triggers different functions depending on
// whether the slide sorter is the main view or displayed in
@@ -404,7 +404,7 @@ bool SelectionFunction::KeyInput (const KeyEvent& rEvent)
mpModeHandler->SetCurrentPage(pDescriptor);
mpModeHandler->SwitchView(pDescriptor);
}
- else if (pViewShell->GetDispatcher() != NULL)
+ else if (pViewShell->GetDispatcher() != nullptr)
{
pViewShell->GetDispatcher()->Execute(
SID_INSERTPAGE,
@@ -628,10 +628,10 @@ void SelectionFunction::GotoNextPage (int nOffset)
{
model::SharedPageDescriptor pDescriptor
= mrController.GetCurrentSlideManager()->GetCurrentSlide();
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
SdPage* pPage = pDescriptor->GetPage();
- OSL_ASSERT(pPage!=NULL);
+ OSL_ASSERT(pPage!=nullptr);
sal_Int32 nIndex = (pPage->GetPageNum()-1) / 2;
GotoPage(nIndex + nOffset);
}
@@ -650,11 +650,11 @@ void SelectionFunction::GotoPage (int nIndex)
mrController.GetFocusManager().SetFocusedPage(nIndex);
model::SharedPageDescriptor pNextPageDescriptor (
mrSlideSorter.GetModel().GetPageDescriptor (nIndex));
- if (pNextPageDescriptor.get() != NULL)
+ if (pNextPageDescriptor.get() != nullptr)
mpModeHandler->SetCurrentPage(pNextPageDescriptor);
else
{
- OSL_ASSERT(pNextPageDescriptor.get() != NULL);
+ OSL_ASSERT(pNextPageDescriptor.get() != nullptr);
}
ResetShiftKeySelectionAnchor();
}
@@ -869,7 +869,7 @@ sal_uInt32 SelectionFunction::EventDescriptor::EncodeState() const
sal_uInt32 nEventCode (0);
// Detect whether the event has happened over a page object.
- if (mpHitPage!=NULL && mpHitDescriptor)
+ if (mpHitPage!=nullptr && mpHitDescriptor)
{
if (mpHitDescriptor->HasState(model::PageDescriptor::ST_Selected))
nEventCode |= OVER_SELECTED_PAGE;
@@ -993,15 +993,15 @@ void SelectionFunction::ModeHandler::SwitchView (const model::SharedPageDescript
// Switch to the draw view. This is done only when the current
// view is the main view.
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell!=NULL && pViewShell->IsMainViewShell())
+ if (pViewShell!=nullptr && pViewShell->IsMainViewShell())
{
- if (rpDescriptor.get()!=NULL && rpDescriptor->GetPage()!=NULL)
+ if (rpDescriptor.get()!=nullptr && rpDescriptor->GetPage()!=nullptr)
{
mrSlideSorter.GetModel().GetDocument()->SetSelected(rpDescriptor->GetPage(), true);
pViewShell->GetFrameView()->SetSelectedPage(
(rpDescriptor->GetPage()->GetPageNum()-1)/2);
}
- if (mrSlideSorter.GetViewShellBase() != NULL)
+ if (mrSlideSorter.GetViewShellBase() != nullptr)
framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())->RequestView(
framework::FrameworkHelper::msImpressViewURL,
framework::FrameworkHelper::msCenterPaneURL);
@@ -1018,7 +1018,7 @@ void SelectionFunction::ModeHandler::StartDrag (
// modifier key can trigger a MouseMotion event in the originating
// window (focus still in there). Together with the mouse button pressed
// (drag-and-drop is active) this triggers the start of drag-and-drop.)
- if (SD_MOD()->pTransferDrag != NULL)
+ if (SD_MOD()->pTransferDrag != nullptr)
return;
if ( ! mrSlideSorter.GetProperties()->IsUIReadOnly())
@@ -1234,7 +1234,7 @@ void NormalModeHandler::RangeSelect (const model::SharedPageDescriptor& rpDescri
model::SharedPageDescriptor pAnchor (rSelector.GetSelectionAnchor());
DeselectAllPages();
- if (pAnchor.get() != NULL)
+ if (pAnchor.get() != nullptr)
{
// Select all pages between the anchor and the given one, including
// the two.
@@ -1516,18 +1516,18 @@ void DragAndDropModeHandler::Initialize(const Point& rMousePosition, vcl::Window
{
#endif
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
- if (pDragTransferable==NULL && mrSlideSorter.GetViewShell() != NULL)
+ if (pDragTransferable==nullptr && mrSlideSorter.GetViewShell() != nullptr)
{
SlideSorterViewShell* pSlideSorterViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- if (pSlideSorterViewShell != NULL)
+ if (pSlideSorterViewShell != nullptr)
pSlideSorterViewShell->StartDrag(rMousePosition, pWindow);
pDragTransferable = SD_MOD()->pTransferDrag;
}
mpDragAndDropContext.reset(new DragAndDropContext(mrSlideSorter));
mrSlideSorter.GetController().GetInsertionIndicatorHandler()->Start(
- pDragTransferable != NULL
+ pDragTransferable != nullptr
&& pDragTransferable->GetView()==&mrSlideSorter.GetView());
}
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
index 4d7e7d7480d5..66c47a969f69 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
@@ -216,7 +216,7 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
mbIsMakeSelectionVisiblePending = true;
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
pViewShell->Invalidate (SID_EXPAND_PAGE);
pViewShell->Invalidate (SID_SUMMARY_PAGE);
@@ -232,13 +232,13 @@ void SelectionManager::SelectionHasChanged (const bool bMakeSelectionVisible)
OSL_ASSERT(mrController.GetCurrentSlideManager());
SharedPageDescriptor pDescriptor(mrController.GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
pViewShell->UpdatePreview(pDescriptor->GetPage());
// Tell the selection change listeners that the selection has changed.
for (auto& rLink : maSelectionChangeListeners)
{
- rLink.Call(NULL);
+ rLink.Call(nullptr);
}
// Reset the insertion position: until set again it is calculated from
diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
index 9b2f8c9da7c6..c90b10458ea7 100644
--- a/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSelectionObserver.cxx
@@ -73,7 +73,7 @@ void SelectionObserver::NotifyPageEvent (const SdrPage* pSdrPage)
return;
const SdPage* pPage = dynamic_cast<const SdPage*>(pSdrPage);
- if (pPage == NULL)
+ if (pPage == nullptr)
return;
if (pPage->IsInserted())
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index c544e70753bd..e710a05e0815 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -127,7 +127,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
SlideSorterViewShell* pShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- if (pShell == NULL)
+ if (pShell == nullptr)
return;
switch (rRequest.GetSlot())
@@ -149,10 +149,10 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
break;
case SID_PAGES_PER_ROW:
- if (rRequest.GetArgs() != NULL)
+ if (rRequest.GetArgs() != nullptr)
{
const SfxUInt16Item* pPagesPerRow = rRequest.GetArg<SfxUInt16Item>(SID_PAGES_PER_ROW);
- if (pPagesPerRow != NULL)
+ if (pPagesPerRow != nullptr)
{
sal_Int32 nColumnCount = pPagesPerRow->GetValue();
// Force the given number of columns by setting
@@ -264,7 +264,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
mrSlideSorter.GetContentWindow(),
- pDocument) : 0);
+ pDocument) : nullptr);
if (pDlg)
{
@@ -281,7 +281,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
VclAbstractDialog* pDlg = pFact ?
pFact->CreateRemoteDialog( mrSlideSorter.GetContentWindow() ) :
- 0;
+ nullptr;
if (pDlg)
pDlg->Execute();
#endif
@@ -296,7 +296,7 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
void SlotManager::FuPermanent (SfxRequest& rRequest)
{
ViewShell* pShell = mrSlideSorter.GetViewShell();
- if (pShell == NULL)
+ if (pShell == nullptr)
return;
if(pShell->GetCurrentFunction().is())
@@ -342,11 +342,11 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
switch (rRequest.GetSlot())
{
case SID_STYLE_FAMILY:
- if (rRequest.GetArgs() != NULL)
+ if (rRequest.GetArgs() != nullptr)
{
SdDrawDocument* pDocument
= mrSlideSorter.GetModel().GetDocument();
- if (pDocument != NULL)
+ if (pDocument != nullptr)
{
const SfxPoolItem& rItem (
rRequest.GetArgs()->Get(SID_STYLE_FAMILY));
@@ -371,11 +371,11 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
}
}
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
{
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell()));
- if (pDrawViewShell.get() != NULL)
+ if (pDrawViewShell.get() != nullptr)
pDrawViewShell->FuSupport(rRequest);
}
}
@@ -394,7 +394,7 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
case SID_OUTLINEMODE:
{
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
{
framework::FrameworkHelper::Instance(*pBase)->HandleModeChangeSlot(
rRequest.GetSlot(), rRequest);
@@ -407,7 +407,7 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
@@ -422,7 +422,7 @@ void SlotManager::FuSupport (SfxRequest& rRequest)
{
SlideSorterViewShell* pViewShell
= dynamic_cast<SlideSorterViewShell*>(mrSlideSorter.GetViewShell());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
view::SlideSorterView::DrawLock aDrawLock (mrSlideSorter);
SlideSorterController::ModelChangeLock aModelLock (mrSlideSorter.GetController());
@@ -450,7 +450,7 @@ void SlotManager::ExecCtrl (SfxRequest& rRequest)
mrSlideSorter.GetModel().GetDocument()->GetDocSh()->ClearUndoBuffer();
// normal forwarding to ViewFrame for execution
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->GetViewFrame()->ExecuteSlot(rRequest);
// has to be finished right away
@@ -463,14 +463,14 @@ void SlotManager::ExecCtrl (SfxRequest& rRequest)
case SID_OUTPUT_QUALITY_CONTRAST:
{
// flush page cache
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->ExecReq (rRequest);
break;
}
case SID_MAIL_SCROLLBODY_PAGEDOWN:
{
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->ExecReq (rRequest);
break;
}
@@ -478,7 +478,7 @@ void SlotManager::ExecCtrl (SfxRequest& rRequest)
case SID_OPT_LOCALE_CHANGED:
{
mrSlideSorter.GetController().UpdateAllPages();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->UpdatePreview (pViewShell->GetActualPage());
rRequest.Done();
break;
@@ -491,7 +491,7 @@ void SlotManager::ExecCtrl (SfxRequest& rRequest)
// we have to handle the execution of that slot as well.
// We try to do that by forwarding the request to the view frame
// of the view shell.
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->GetViewFrame()->ExecuteSlot(rRequest);
break;
@@ -508,7 +508,7 @@ void SlotManager::GetAttrState (SfxItemSet& rSet)
while (nWhich)
{
sal_uInt16 nSlotId (nWhich);
- if (SfxItemPool::IsWhich(nWhich) && mrSlideSorter.GetViewShell()!=NULL)
+ if (SfxItemPool::IsWhich(nWhich) && mrSlideSorter.GetViewShell()!=nullptr)
nSlotId = mrSlideSorter.GetViewShell()->GetPool().GetSlotId(nWhich);
switch (nSlotId)
{
@@ -531,7 +531,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
ViewShell* pShell = mrSlideSorter.GetViewShell();
DrawDocShell* pDocShell = mrSlideSorter.GetModel().GetDocument()->GetDocSh();
- if (pShell!=NULL && pShell->GetCurrentFunction().is())
+ if (pShell!=nullptr && pShell->GetCurrentFunction().is())
{
sal_uInt16 nSId = pShell->GetCurrentFunction()->GetSlotID();
@@ -543,7 +543,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
rSet.Put( SfxBoolItem( SID_NOTESMODE, false ) );
rSet.Put( SfxBoolItem( SID_HANDOUTMODE, false ) );
- if (pShell!=NULL && pShell->IsMainViewShell())
+ if (pShell!=nullptr && pShell->IsMainViewShell())
{
rSet.DisableItem(SID_SPELL_DIALOG);
rSet.DisableItem(SID_SEARCH_DLG);
@@ -564,7 +564,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
{
SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if (pObj!=NULL )
+ if (pObj!=nullptr )
{
if( !pObj->IsEmptyPresObj() )
{
@@ -608,7 +608,7 @@ void SlotManager::GetMenuState (SfxItemSet& rSet)
SdPage* pPage = aSelectedPages.GetNextElement()->GetPage();
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_TITLE);
- if (pObj!=NULL && !pObj->IsEmptyPresObj())
+ if (pObj!=nullptr && !pObj->IsEmptyPresObj())
bDisable = false;
}
}
@@ -730,11 +730,11 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet)
// No or just one page. Check if there is anything that can be
// pasted via a DrawViewShell.
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase != NULL)
+ if (pBase != nullptr)
{
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(pBase->GetMainViewShell()));
- if (pDrawViewShell.get() != NULL)
+ if (pDrawViewShell.get() != nullptr)
{
TransferableDataHelper aDataHelper (
TransferableDataHelper::CreateFromSystemClipboard(
@@ -828,8 +828,8 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet)
void SlotManager::GetStatusBarState (SfxItemSet& rSet)
{
// page view and layout
- SdPage* pPage = NULL;
- SdPage* pFirstPage = NULL;
+ SdPage* pPage = nullptr;
+ SdPage* pFirstPage = nullptr;
sal_uInt16 nFirstPage;
sal_Int32 nPageCount;
sal_Int32 nActivePageCount;
@@ -861,7 +861,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
}
//Set layout
- if (nSelectedPages == 1 && pPage != NULL)
+ if (nSelectedPages == 1 && pPage != nullptr)
{
pFirstPage = pPage;
aLayoutStr = pFirstPage->GetLayoutName();
@@ -889,13 +889,13 @@ void SlotManager::RenameSlide()
pDrView->SdrEndTextEdit();
}
- SdPage* pSelectedPage = NULL;
+ SdPage* pSelectedPage = nullptr;
model::PageEnumeration aSelectedPages (
model::PageEnumerationProvider::CreateSelectedPagesEnumeration(
mrSlideSorter.GetModel()));
if (aSelectedPages.HasMoreElements())
pSelectedPage = aSelectedPages.GetNextElement()->GetPage();
- if (pSelectedPage != NULL)
+ if (pSelectedPage != nullptr)
{
OUString aTitle( SdResId( STR_TITLE_RENAMESLIDE ) );
OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
@@ -940,11 +940,11 @@ IMPL_LINK_TYPED(SlotManager, RenameSlideHdl, AbstractSvxNameDialog&, rDialog, bo
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
- SdPage* pCurrentPage = NULL;
- if (pDescriptor.get() != NULL)
+ SdPage* pCurrentPage = nullptr;
+ if (pDescriptor.get() != nullptr)
pCurrentPage = pDescriptor->GetPage();
- return (pCurrentPage!=NULL && aNewName == pCurrentPage->GetName())
+ return (pCurrentPage!=nullptr && aNewName == pCurrentPage->GetName())
|| (mrSlideSorter.GetViewShell()
&& mrSlideSorter.GetViewShell()->GetDocSh()->IsNewPageNameValid( aNewName ) );
}
@@ -956,7 +956,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
if( pDocument->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
return false;
- SdPage* pPageToRename = NULL;
+ SdPage* pPageToRename = nullptr;
PageKind ePageKind = mrSlideSorter.GetModel().GetPageType();
::svl::IUndoManager* pManager = pDocument->GetDocSh()->GetUndoManager();
@@ -965,10 +965,10 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
{
model::SharedPageDescriptor pDescriptor (
mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
pPageToRename = pDescriptor->GetPage();
- if (pPageToRename != NULL)
+ if (pPageToRename != nullptr)
{
// Undo
SdPage* pUndoPage = pPageToRename;
@@ -991,7 +991,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
{
// also rename notes-page
SdPage* pNotesPage = pDocument->GetSdPage( nPageId, PK_NOTES );
- if (pNotesPage != NULL)
+ if (pNotesPage != nullptr)
pNotesPage->SetName (rName);
}
}
@@ -1000,7 +1000,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
{
// rename MasterPage -> rename LayoutTemplate
pPageToRename = pDocument->GetMasterSdPage( nPageId, ePageKind );
- if (pPageToRename != NULL)
+ if (pPageToRename != nullptr)
{
const OUString aOldLayoutName( pPageToRename->GetLayoutName() );
pManager->AddUndoAction( new RenameLayoutTemplateUndoAction( pDocument, aOldLayoutName, rName ) );
@@ -1008,7 +1008,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
}
}
- bool bSuccess = pPageToRename!=NULL && ( rName == pPageToRename->GetName() );
+ bool bSuccess = pPageToRename!=nullptr && ( rName == pPageToRename->GetName() );
if( bSuccess )
{
@@ -1020,7 +1020,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
// inform navigator about change
SfxBoolItem aItem( SID_NAVIGATOR_INIT, true );
- if (mrSlideSorter.GetViewShell() != NULL)
+ if (mrSlideSorter.GetViewShell() != nullptr)
mrSlideSorter.GetViewShell()->GetDispatcher()->Execute(
SID_NAVIGATOR_INIT, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L );
}
@@ -1048,19 +1048,19 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
PageSelector::BroadcastLock aBroadcastLock (mrSlideSorter);
- SdPage* pNewPage = NULL;
+ SdPage* pNewPage = nullptr;
if (mrSlideSorter.GetModel().GetEditMode() == EM_PAGE)
{
SlideSorterViewShell* pShell = dynamic_cast<SlideSorterViewShell*>(
mrSlideSorter.GetViewShell());
- if (pShell != NULL)
+ if (pShell != nullptr)
{
pNewPage = pShell->CreateOrDuplicatePage (
rRequest,
mrSlideSorter.GetModel().GetPageType(),
nInsertionIndex>=0
? mrSlideSorter.GetModel().GetPageDescriptor(nInsertionIndex)->GetPage()
- : NULL);
+ : nullptr);
}
}
else
@@ -1084,7 +1084,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest)
}
}
}
- if (pNewPage == NULL)
+ if (pNewPage == nullptr)
return;
// When a new page has been inserted then select it, make it the
diff --git a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
index a5c9a41eea98..8d0aa3ab17ba 100644
--- a/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsTransferableData.cxx
@@ -58,13 +58,13 @@ TransferableData::TransferableData (
: mpViewShell(pViewShell),
maRepresentatives(rRepresentatives)
{
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
StartListening(*mpViewShell);
}
TransferableData::~TransferableData()
{
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
EndListening(*mpViewShell);
}
@@ -80,7 +80,7 @@ void TransferableData::Notify (SfxBroadcaster&, const SfxHint& rHint)
// which but both are sufficient to disconnect from the
// ViewShell.
EndListening(*mpViewShell);
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
}
}
diff --git a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
index 33fc790dadb3..2180f224fc17 100644
--- a/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
+++ b/sd/source/ui/slidesorter/inc/controller/SlsClipboard.hxx
@@ -70,10 +70,10 @@ public:
void HandleSlotCall (SfxRequest& rRequest);
- void DoCut (vcl::Window* pWindow = 0);
- void DoCopy (vcl::Window* pWindow = 0);
- void DoPaste (vcl::Window* pWindow = 0);
- void DoDelete (vcl::Window* pWindow = 0);
+ void DoCut (vcl::Window* pWindow = nullptr);
+ void DoCopy (vcl::Window* pWindow = nullptr);
+ void DoPaste (vcl::Window* pWindow = nullptr);
+ void DoDelete (vcl::Window* pWindow = nullptr);
void StartDrag (
const Point& rDragPt,
@@ -85,14 +85,14 @@ public:
sal_Int8 AcceptDrop (
const AcceptDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND );
sal_Int8 ExecuteDrop (
const ExecuteDropEvent& rEvt,
DropTargetHelper& rTargetHelper,
- ::sd::Window* pTargetWindow = NULL,
+ ::sd::Window* pTargetWindow = nullptr,
sal_uInt16 nPage = SDRPAGE_NOTFOUND,
sal_uInt16 nLayer = SDRPAGE_NOTFOUND);
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 99500e63faf2..8c26f12c968f 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -129,7 +129,7 @@ public:
virtual void CompleteRedraw (
OutputDevice* pDevice,
const vcl::Region& rPaintArea,
- sdr::contact::ViewObjectContactRedirector* pRedirector = NULL) override;
+ sdr::contact::ViewObjectContactRedirector* pRedirector = nullptr) override;
void Paint (OutputDevice& rDevice, const Rectangle& rRepaintArea);
virtual void ConfigurationChanged (
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index ed77f94f407c..4d9ddfaf5e4c 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -121,10 +121,10 @@ void SlideSorterModel::Dispose()
SdDrawDocument* SlideSorterModel::GetDocument()
{
- if (mrSlideSorter.GetViewShellBase() != NULL)
+ if (mrSlideSorter.GetViewShellBase() != nullptr)
return mrSlideSorter.GetViewShellBase()->GetDocument();
else
- return NULL;
+ return nullptr;
}
bool SlideSorterModel::SetEditMode (EditMode eEditMode)
@@ -155,7 +155,7 @@ SharedPageDescriptor SlideSorterModel::GetPageDescriptor (
if (nPageIndex>=0 && nPageIndex<GetPageCount())
{
pDescriptor = maPageDescriptors[nPageIndex];
- if (pDescriptor == 0 && bCreate && mxSlides.is())
+ if (pDescriptor == nullptr && bCreate && mxSlides.is())
{
SdPage* pPage = GetPage(nPageIndex);
pDescriptor.reset(new PageDescriptor (
@@ -184,7 +184,7 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
aNumber >>= nNumber;
nNumber -= 1;
SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
- if (pDescriptor.get() != NULL
+ if (pDescriptor.get() != nullptr
&& pDescriptor->GetXDrawPage() == rxSlide)
{
return nNumber;
@@ -205,7 +205,7 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
// Make sure that the descriptor exists. Without it the given slide
// can not be found.
- if (pDescriptor.get() == NULL)
+ if (pDescriptor.get() == nullptr)
{
// Call GetPageDescriptor() to create the missing descriptor.
pDescriptor = GetPageDescriptor(nIndex);
@@ -220,7 +220,7 @@ sal_Int32 SlideSorterModel::GetIndex (const Reference<drawing::XDrawPage>& rxSli
sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
{
- if (pPage == NULL)
+ if (pPage == nullptr)
return -1;
::osl::MutexGuard aGuard (maMutex);
@@ -228,7 +228,7 @@ sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
// First try to guess the right index.
sal_Int16 nNumber ((pPage->GetPageNum()-1)/2);
SharedPageDescriptor pDescriptor (GetPageDescriptor(nNumber, false));
- if (pDescriptor.get() != NULL
+ if (pDescriptor.get() != nullptr
&& pDescriptor->GetPage() == pPage)
{
return nNumber;
@@ -243,7 +243,7 @@ sal_Int32 SlideSorterModel::GetIndex (const SdrPage* pPage) const
// Make sure that the descriptor exists. Without it the given slide
// can not be found.
- if (pDescriptor.get() == NULL)
+ if (pDescriptor.get() == nullptr)
{
// Call GetPageDescriptor() to create the missing descriptor.
pDescriptor = GetPageDescriptor(nIndex);
@@ -279,7 +279,7 @@ void SlideSorterModel::Resync()
// Check if document and this model really differ.
bool bIsUpToDate (true);
SdDrawDocument* pDocument = GetDocument();
- if (pDocument!=NULL && maPageDescriptors.size()==pDocument->GetSdPageCount(mePageKind))
+ if (pDocument!=nullptr && maPageDescriptors.size()==pDocument->GetSdPageCount(mePageKind))
{
for (sal_Int32 nIndex=0,nCount=maPageDescriptors.size(); nIndex<nCount; ++nIndex)
{
@@ -323,7 +323,7 @@ void SlideSorterModel::ClearDescriptorList()
iDescriptor!=iEnd;
++iDescriptor)
{
- if (iDescriptor->get() != NULL)
+ if (iDescriptor->get() != nullptr)
{
if ( ! iDescriptor->unique())
{
@@ -373,7 +373,7 @@ void SlideSorterModel::SetDocumentSlides (
// Make the current selection persistent and then release the
// current set of pages.
SynchronizeDocumentSelection();
- mxSlides = NULL;
+ mxSlides = nullptr;
ClearDescriptorList ();
// Reset the current page to cause everbody to release references to it.
@@ -395,10 +395,10 @@ void SlideSorterModel::SetDocumentSlides (
}
ViewShell* pViewShell = mrSlideSorter.GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
SdPage* pPage = pViewShell->getCurrentPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
pPage);
else
@@ -406,7 +406,7 @@ void SlideSorterModel::SetDocumentSlides (
// No current page. This can only be when the slide sorter is
// the main view shell. Get current slide form frame view.
const FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
mrSlideSorter.GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
pFrameView->GetSelectedPage());
else
@@ -482,7 +482,7 @@ void SlideSorterModel::AdaptSize()
bool SlideSorterModel::IsReadOnly() const
{
- if (mrSlideSorter.GetViewShellBase() != NULL
+ if (mrSlideSorter.GetViewShellBase() != nullptr
&& mrSlideSorter.GetViewShellBase()->GetDocShell())
return mrSlideSorter.GetViewShellBase()->GetDocShell()->IsReadOnly();
else
@@ -523,7 +523,7 @@ bool SlideSorterModel::NotifyPageEvent (const SdrPage* pSdrPage)
::osl::MutexGuard aGuard (maMutex);
SdPage* pPage = const_cast<SdPage*>(dynamic_cast<const SdPage*>(pSdrPage));
- if (pPage == NULL)
+ if (pPage == nullptr)
return false;
// We are only interested in pages that are currently served by this
@@ -633,7 +633,7 @@ void SlideSorterModel::UpdateIndices (const sal_Int32 nFirstIndex)
SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const
{
SdDrawDocument* pModel = const_cast<SlideSorterModel*>(this)->GetDocument();
- if (pModel != NULL)
+ if (pModel != nullptr)
{
if (meEditMode == EM_PAGE)
return pModel->GetSdPage ((sal_uInt16)nSdIndex, mePageKind);
@@ -641,7 +641,7 @@ SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const
return pModel->GetMasterSdPage ((sal_uInt16)nSdIndex, mePageKind);
}
else
- return NULL;
+ return nullptr;
}
} } } // end of namespace ::sd::slidesorter::model
diff --git a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
index e84b4cd22eb5..105460f53f5e 100644
--- a/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageDescriptor.cxx
@@ -38,7 +38,7 @@ PageDescriptor::PageDescriptor (
const sal_Int32 nIndex)
: mpPage(pPage),
mxPage(rxPage),
- mpMasterPage(NULL),
+ mpMasterPage(nullptr),
mnIndex(nIndex),
maBoundingBox(),
maVisualState(nIndex),
@@ -52,7 +52,7 @@ PageDescriptor::PageDescriptor (
{
OSL_ASSERT(mpPage);
OSL_ASSERT(mpPage == SdPage::getImplementation(rxPage));
- if (mpPage != NULL)
+ if (mpPage != nullptr)
{
if (mpPage->TRG_HasMasterPage())
mpMasterPage = &mpPage->TRG_GetMasterPage();
@@ -73,8 +73,8 @@ void PageDescriptor::SetPageIndex (const sal_Int32 nNewIndex)
bool PageDescriptor::UpdateMasterPage()
{
- const SdrPage* pMaster = NULL;
- if (mpPage!=NULL && mpPage->TRG_HasMasterPage())
+ const SdrPage* pMaster = nullptr;
+ if (mpPage!=nullptr && mpPage->TRG_HasMasterPage())
pMaster = &mpPage->TRG_GetMasterPage();
if (mpMasterPage != pMaster)
{
@@ -88,7 +88,7 @@ bool PageDescriptor::UpdateMasterPage()
bool PageDescriptor::UpdateTransitionFlag()
{
bool bHasSlideTransition (false);
- if (mpPage != NULL)
+ if (mpPage != nullptr)
bHasSlideTransition = mpPage->getTransitionType() > 0;
if (bHasSlideTransition != mbHasTransition)
{
@@ -122,7 +122,7 @@ bool PageDescriptor::HasState (const State eState) const
return mbIsCurrent;
case ST_Excluded:
- return mpPage!=NULL && mpPage->IsExcluded();
+ return mpPage!=nullptr && mpPage->IsExcluded();
default:
OSL_ASSERT(false);
@@ -174,7 +174,7 @@ bool PageDescriptor::SetState (const State eState, const bool bNewStateValue)
case ST_Excluded:
// This is a state of the page and has to be handled differently
// from the view-only states.
- if (mpPage != NULL)
+ if (mpPage != nullptr)
if (bNewStateValue != mpPage->IsExcluded())
{
mpPage->SetExcluded(bNewStateValue);
@@ -190,7 +190,7 @@ bool PageDescriptor::SetState (const State eState, const bool bNewStateValue)
bool PageDescriptor::GetCoreSelection()
{
- if (mpPage!=NULL && mpPage->IsSelected() != mbIsSelected)
+ if (mpPage!=nullptr && mpPage->IsSelected() != mbIsSelected)
return SetState(ST_Selected, !mbIsSelected);
else
return false;
@@ -198,14 +198,14 @@ bool PageDescriptor::GetCoreSelection()
void PageDescriptor::SetCoreSelection()
{
- if (mpPage != NULL)
+ if (mpPage != nullptr)
if (HasState(ST_Selected))
mpPage->SetSelected(true);
else
mpPage->SetSelected(false);
else
{
- OSL_ASSERT(mpPage!=NULL);
+ OSL_ASSERT(mpPage!=nullptr);
}
}
diff --git a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
index d996ee590a03..2a01da30910d 100644
--- a/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
+++ b/sd/source/ui/slidesorter/model/SlsPageEnumeration.cxx
@@ -203,7 +203,7 @@ void PageEnumerationImpl::AdvanceToNextValidElement()
SharedPageDescriptor pDescriptor (mrModel.GetPageDescriptor(mnIndex));
// Test for the predicate being fulfilled.
- if (pDescriptor.get()!=NULL && maPredicate(pDescriptor))
+ if (pDescriptor.get()!=nullptr && maPredicate(pDescriptor))
{
// This predicate is valid.
break;
diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
index 571980eb17e6..39bf90fbeda0 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx
@@ -149,7 +149,7 @@ SlideSorter::SlideSorter (
void SlideSorter::Init()
{
- if (mpViewShellBase != NULL)
+ if (mpViewShellBase != nullptr)
mxControllerWeak = mpViewShellBase->GetController();
// Reinitialize colors in Properties with window specific values.
@@ -174,7 +174,7 @@ void SlideSorter::Init()
if (pContentWindow)
{
vcl::Window* pParentWindow = pContentWindow->GetParent();
- if (pParentWindow != NULL)
+ if (pParentWindow != nullptr)
pParentWindow->SetBackground(Wallpaper());
pContentWindow->SetBackground(Wallpaper());
pContentWindow->SetViewOrigin (Point(0,0));
@@ -215,19 +215,19 @@ SlideSorter::~SlideSorter()
model::SlideSorterModel& SlideSorter::GetModel() const
{
- OSL_ASSERT(mpSlideSorterModel.get()!=NULL);
+ OSL_ASSERT(mpSlideSorterModel.get()!=nullptr);
return *mpSlideSorterModel;
}
view::SlideSorterView& SlideSorter::GetView() const
{
- OSL_ASSERT(mpSlideSorterView.get()!=NULL);
+ OSL_ASSERT(mpSlideSorterView.get()!=nullptr);
return *mpSlideSorterView;
}
controller::SlideSorterController& SlideSorter::GetController() const
{
- OSL_ASSERT(mpSlideSorterController.get()!=NULL);
+ OSL_ASSERT(mpSlideSorterController.get()!=nullptr);
return *mpSlideSorterController;
}
@@ -255,7 +255,7 @@ void SlideSorter::SetupListeners()
if (pWindow)
{
vcl::Window* pParentWindow = pWindow->GetParent();
- if (pParentWindow != NULL)
+ if (pParentWindow != nullptr)
pParentWindow->AddEventListener(
LINK(
mpSlideSorterController.get(),
@@ -289,7 +289,7 @@ void SlideSorter::ReleaseListeners()
WindowEventHandler));
vcl::Window* pParentWindow = pWindow->GetParent();
- if (pParentWindow != NULL)
+ if (pParentWindow != nullptr)
pParentWindow->RemoveEventListener(
LINK(mpSlideSorterController.get(),
controller::SlideSorterController,
@@ -304,15 +304,15 @@ void SlideSorter::ReleaseListeners()
void SlideSorter::CreateModelViewController()
{
mpSlideSorterModel.reset(CreateModel());
- DBG_ASSERT (mpSlideSorterModel.get()!=NULL,
+ DBG_ASSERT (mpSlideSorterModel.get()!=nullptr,
"Can not create model for slide browser");
mpSlideSorterView.reset(CreateView());
- DBG_ASSERT (mpSlideSorterView.get()!=NULL,
+ DBG_ASSERT (mpSlideSorterView.get()!=nullptr,
"Can not create view for slide browser");
mpSlideSorterController.reset(CreateController());
- DBG_ASSERT (mpSlideSorterController.get()!=NULL,
+ DBG_ASSERT (mpSlideSorterController.get()!=nullptr,
"Can not create controller for slide browser");
// Now that model, view, and controller are constructed, do the
@@ -325,14 +325,14 @@ model::SlideSorterModel* SlideSorter::CreateModel()
{
// Get pointers to the document.
ViewShellBase* pViewShellBase = GetViewShellBase();
- if (pViewShellBase != NULL)
+ if (pViewShellBase != nullptr)
{
- OSL_ASSERT (pViewShellBase->GetDocument() != NULL);
+ OSL_ASSERT (pViewShellBase->GetDocument() != nullptr);
return new model::SlideSorterModel(*this);
}
else
- return NULL;
+ return nullptr;
}
view::SlideSorterView* SlideSorter::CreateView()
@@ -378,14 +378,14 @@ bool SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
ReleaseListeners();
- vcl::Window *pNewWindow = NULL;
+ vcl::Window *pNewWindow = nullptr;
if (mpViewShell)
{
mpViewShell->ViewShell::RelocateToParentWindow(pParentWindow);
pNewWindow = mpViewShell->GetParentWindow();
}
else
- pNewWindow = NULL;
+ pNewWindow = nullptr;
SetupControls(pNewWindow);
SetupListeners();
@@ -395,7 +395,7 @@ bool SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
// view shell. (One is created earlier while the construtor of the base
// class is executed. But because at that time the correct
// accessibility object can not be constructed we do that now.)
- if (mpContentWindow.get() !=NULL)
+ if (mpContentWindow.get() !=nullptr)
{
mpContentWindow->Hide();
mpContentWindow->Show();
@@ -406,7 +406,7 @@ bool SlideSorter::RelocateToWindow (vcl::Window* pParentWindow)
void SlideSorter::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction)
{
- if (GetViewShell() != NULL)
+ if (GetViewShell() != nullptr)
{
GetViewShell()->SetCurrentFunction(rpFunction);
GetViewShell()->SetOldFunction(rpFunction);
@@ -414,7 +414,7 @@ void SlideSorter::SetCurrentFunction (const rtl::Reference<FuPoor>& rpFunction)
else
{
ContentWindow* pWindow = dynamic_cast<ContentWindow*>(GetContentWindow().get());
- if (pWindow != NULL)
+ if (pWindow != nullptr)
pWindow->SetCurrentFunction(rpFunction);
}
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index e79f8edb8530..ad5df983f605 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -94,11 +94,11 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
Reference<frame::XController> xController (rArguments[1], UNO_QUERY_THROW);
// Tunnel through the controller to obtain a ViewShellBase.
- ViewShellBase* pBase = NULL;
+ ViewShellBase* pBase = nullptr;
Reference<lang::XUnoTunnel> xTunnel (xController, UNO_QUERY_THROW);
::sd::DrawController* pController = reinterpret_cast<sd::DrawController*>(
xTunnel->getSomething(sd::DrawController::getUnoTunnelId()));
- if (pController != NULL)
+ if (pController != nullptr)
pBase = pController->GetViewShellBase();
// Get the parent window.
@@ -107,10 +107,10 @@ void SAL_CALL SlideSorterService::initialize (const Sequence<Any>& rArguments)
mxParentWindow->addWindowListener(this);
- if (pBase != NULL && pParentWindow!=NULL)
+ if (pBase != nullptr && pParentWindow!=nullptr)
mpSlideSorter = SlideSorter::CreateSlideSorter(
*pBase,
- NULL,
+ nullptr,
*pParentWindow);
Resize();
@@ -179,7 +179,7 @@ void SAL_CALL SlideSorterService::disposing (const lang::EventObject& rEvent)
throw (RuntimeException, std::exception)
{
if (rEvent.Source == mxParentWindow)
- mxParentWindow = NULL;
+ mxParentWindow = nullptr;
}
//----- XDrawView -------------------------------------------------------------
@@ -188,7 +188,7 @@ void SAL_CALL SlideSorterService::setCurrentPage(const Reference<drawing::XDrawP
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL)
+ if (mpSlideSorter.get() != nullptr)
mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
mpSlideSorter->GetModel().GetIndex(rxSlide));
}
@@ -197,10 +197,10 @@ Reference<drawing::XDrawPage> SAL_CALL SlideSorterService::getCurrentPage()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL)
+ if (mpSlideSorter.get() != nullptr)
return mpSlideSorter->GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage();
else
- return NULL;
+ return nullptr;
}
//----- attributes ------------------------------------------------------------
@@ -216,7 +216,7 @@ void SAL_CALL SlideSorterService::setDocumentSlides (
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetController().SetDocumentSlides(rxSlides);
}
@@ -224,7 +224,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsHighlightCurrentSlide()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return false;
else
return mpSlideSorter->GetProperties()->IsHighlightCurrentSlide();
@@ -234,7 +234,7 @@ void SAL_CALL SlideSorterService::setIsHighlightCurrentSlide (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
{
mpSlideSorter->GetProperties()->SetHighlightCurrentSlide(bValue);
controller::SlideSorterController::ModelChangeLock aLock (mpSlideSorter->GetController());
@@ -246,7 +246,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowSelection()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return false;
else
return mpSlideSorter->GetProperties()->IsShowSelection();
@@ -256,7 +256,7 @@ void SAL_CALL SlideSorterService::setIsShowSelection (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetShowSelection(bValue);
}
@@ -264,7 +264,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsShowFocus()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return false;
else
return mpSlideSorter->GetProperties()->IsShowFocus();
@@ -274,7 +274,7 @@ void SAL_CALL SlideSorterService::setIsShowFocus (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetShowFocus(bValue);
}
@@ -282,7 +282,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsCenterSelection()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return false;
else
return mpSlideSorter->GetProperties()->IsCenterSelection();
@@ -292,7 +292,7 @@ void SAL_CALL SlideSorterService::setIsCenterSelection (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetCenterSelection(bValue);
}
@@ -300,7 +300,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSuspendPreviewUpdatesDuringFullScreen
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return true;
else
return mpSlideSorter->GetProperties()
@@ -312,7 +312,7 @@ void SAL_CALL SlideSorterService::setIsSuspendPreviewUpdatesDuringFullScreenPres
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()
->SetSuspendPreviewUpdatesDuringFullScreenPresentation(bValue);
}
@@ -321,7 +321,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsOrientationVertical()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return true;
else
return mpSlideSorter->GetView().GetOrientation() != Layouter::HORIZONTAL;
@@ -331,7 +331,7 @@ void SAL_CALL SlideSorterService::setIsOrientationVertical (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetView().SetOrientation(bValue
? Layouter::GRID
: Layouter::HORIZONTAL);
@@ -341,7 +341,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsSmoothScrolling()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return false;
else
return mpSlideSorter->GetProperties()->IsSmoothSelectionScrolling();
@@ -351,7 +351,7 @@ void SAL_CALL SlideSorterService::setIsSmoothScrolling (sal_Bool bValue)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetSmoothSelectionScrolling(bValue);
}
@@ -359,7 +359,7 @@ util::Color SAL_CALL SlideSorterService::getBackgroundColor()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return util::Color();
else
return util::Color(
@@ -370,7 +370,7 @@ void SAL_CALL SlideSorterService::setBackgroundColor (util::Color aBackgroundCol
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetBackgroundColor(Color(aBackgroundColor));
}
@@ -378,7 +378,7 @@ util::Color SAL_CALL SlideSorterService::getTextColor()
throw (css::uno::RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return util::Color();
else
return util::Color(
@@ -389,7 +389,7 @@ void SAL_CALL SlideSorterService::setTextColor (util::Color aTextColor)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetTextColor(Color(aTextColor));
}
@@ -397,7 +397,7 @@ util::Color SAL_CALL SlideSorterService::getSelectionColor()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return util::Color();
else
return util::Color(
@@ -408,7 +408,7 @@ void SAL_CALL SlideSorterService::setSelectionColor (util::Color aSelectionColor
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetSelectionColor(Color(aSelectionColor));
}
@@ -416,7 +416,7 @@ util::Color SAL_CALL SlideSorterService::getHighlightColor()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return util::Color();
else
return util::Color(
@@ -427,7 +427,7 @@ void SAL_CALL SlideSorterService::setHighlightColor (util::Color aHighlightColor
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetHighlightColor(Color(aHighlightColor));
}
@@ -435,7 +435,7 @@ sal_Bool SAL_CALL SlideSorterService::getIsUIReadOnly()
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() == NULL || ! mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() == nullptr || ! mpSlideSorter->IsValid())
return true;
else
return mpSlideSorter->GetProperties()->IsUIReadOnly();
@@ -445,7 +445,7 @@ void SAL_CALL SlideSorterService::setIsUIReadOnly (sal_Bool bIsUIReadOnly)
throw (RuntimeException, std::exception)
{
ThrowIfDisposed();
- if (mpSlideSorter.get() != NULL && mpSlideSorter->IsValid())
+ if (mpSlideSorter.get() != nullptr && mpSlideSorter->IsValid())
mpSlideSorter->GetProperties()->SetUIReadOnly(bIsUIReadOnly);
}
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index 8cfe7a0304d6..32becf587f21 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -105,7 +105,7 @@ std::shared_ptr<SlideSorterViewShell> SlideSorterViewShell::Create (
pViewShell.reset(
new SlideSorterViewShell(pFrame,rViewShellBase,pParentWindow,pFrameViewArgument));
pViewShell->Initialize();
- if (pViewShell->mpSlideSorter.get() == NULL)
+ if (pViewShell->mpSlideSorter.get() == nullptr)
pViewShell.reset();
}
catch(Exception&)
@@ -126,7 +126,7 @@ SlideSorterViewShell::SlideSorterViewShell (
{
meShellType = ST_SLIDE_SORTER;
- if (pFrameViewArgument != NULL)
+ if (pFrameViewArgument != nullptr)
mpFrameView = pFrameViewArgument;
else
mpFrameView = new FrameView(GetDoc());
@@ -144,7 +144,7 @@ SlideSorterViewShell::~SlideSorterViewShell()
try
{
::sd::Window* pWindow = GetActiveWindow();
- if (pWindow!=NULL)
+ if (pWindow!=nullptr)
{
css::uno::Reference<css::lang::XComponent> xComponent (
pWindow->GetAccessible(false),
@@ -198,13 +198,13 @@ void SlideSorterViewShell::Init (bool bIsMainViewShell)
pActiveWindow->Show();
mpSlideSorter->GetModel().UpdatePageList();
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
mpContentWindow->SetViewShell(this);
}
SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter (ViewShellBase& rBase)
{
- SlideSorterViewShell* pViewShell = NULL;
+ SlideSorterViewShell* pViewShell = nullptr;
// Test the center and left pane for showing a slide sorter.
OUString aPaneURLs[] = {
@@ -217,7 +217,7 @@ SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter (ViewShellBase& rBase
{
std::shared_ptr<FrameworkHelper> pFrameworkHelper (FrameworkHelper::Instance(rBase));
if (pFrameworkHelper->IsValid())
- for (int i=0; pViewShell==NULL && !aPaneURLs[i].isEmpty(); ++i)
+ for (int i=0; pViewShell==nullptr && !aPaneURLs[i].isEmpty(); ++i)
{
pViewShell = dynamic_cast<SlideSorterViewShell*>(
pFrameworkHelper->GetViewShell(aPaneURLs[i]).get());
@@ -252,10 +252,10 @@ css::uno::Reference<css::accessibility::XAccessible>
{
// When the view is not set then the initialization is not yet complete
// and we can not yet provide an accessibility object.
- if (mpView == NULL || mpSlideSorter.get() == NULL)
- return NULL;
+ if (mpView == nullptr || mpSlideSorter.get() == nullptr)
+ return nullptr;
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
::accessibility::AccessibleSlideSorterView *pAccessibleView =
new ::accessibility::AccessibleSlideSorterView(
@@ -284,7 +284,7 @@ void SlideSorterViewShell::SwitchViewFireFocus(css::uno::Reference< css::accessi
SlideSorter& SlideSorterViewShell::GetSlideSorter() const
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
return *mpSlideSorter;
}
@@ -294,10 +294,10 @@ bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
if ( ! mpSlideSorter)
return false;
- if (pParentWindow == NULL)
+ if (pParentWindow == nullptr)
WriteFrameViewData();
const bool bSuccess (mpSlideSorter->RelocateToWindow(pParentWindow));
- if (pParentWindow != NULL)
+ if (pParentWindow != nullptr)
ReadFrameViewData(mpFrameView);
return bSuccess;
@@ -306,7 +306,7 @@ bool SlideSorterViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
::svl::IUndoManager* SlideSorterViewShell::ImpGetUndoManager() const
{
SfxShell* pObjectBar = GetViewShellBase().GetViewShellManager()->GetTopShell();
- if (pObjectBar != NULL)
+ if (pObjectBar != nullptr)
{
// When it exists then return the undo manager of the currently
// active object bar. The object bar is missing when the
@@ -331,26 +331,26 @@ SdPage* SlideSorterViewShell::getCurrentPage() const
SdPage* SlideSorterViewShell::GetActualPage()
{
- SdPage* pCurrentPage = NULL;
+ SdPage* pCurrentPage = nullptr;
// 1. Try to get the current page from the view shell in the center pane
// (if we are that not ourself).
if ( ! IsMainViewShell())
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
- if (pMainViewShell.get() != NULL)
+ if (pMainViewShell.get() != nullptr)
pCurrentPage = pMainViewShell->GetActualPage();
}
- if (pCurrentPage == NULL)
+ if (pCurrentPage == nullptr)
{
model::SharedPageDescriptor pDescriptor (
mpSlideSorter->GetController().GetCurrentSlideManager()->GetCurrentSlide());
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
pCurrentPage = pDescriptor->GetPage();
}
- if (pCurrentPage == NULL)
+ if (pCurrentPage == nullptr)
{
}
@@ -361,32 +361,32 @@ SdPage* SlideSorterViewShell::GetActualPage()
void SlideSorterViewShell::GetMenuState ( SfxItemSet& rSet)
{
ViewShell::GetMenuState(rSet);
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetSlotManager()->GetMenuState(rSet);
}
void SlideSorterViewShell::GetClipboardState ( SfxItemSet& rSet)
{
ViewShell::GetMenuState(rSet);
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetSlotManager()->GetClipboardState(rSet);
}
void SlideSorterViewShell::ExecCtrl (SfxRequest& rRequest)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().ExecCtrl(rRequest);
}
void SlideSorterViewShell::GetCtrlState (SfxItemSet& rSet)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetCtrlState(rSet);
}
void SlideSorterViewShell::FuSupport (SfxRequest& rRequest)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().FuSupport(rRequest);
}
@@ -395,13 +395,13 @@ void SlideSorterViewShell::FuSupport (SfxRequest& rRequest)
*/
void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
switch (rRequest.GetSlot())
{
case SID_MODIFYPAGE:
{
SdPage* pCurrentPage = GetActualPage();
- if (pCurrentPage != NULL)
+ if (pCurrentPage != nullptr)
mpImpl->ProcessModifyPageSlot (
rRequest,
pCurrentPage,
@@ -419,19 +419,19 @@ void SlideSorterViewShell::FuTemporary (SfxRequest& rRequest)
void SlideSorterViewShell::GetStatusBarState (SfxItemSet& rSet)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetStatusBarState(rSet);
}
void SlideSorterViewShell::FuPermanent (SfxRequest& rRequest)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().FuPermanent(rRequest);
}
void SlideSorterViewShell::GetAttrState (SfxItemSet& rSet)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetAttrState(rSet);
}
@@ -453,7 +453,7 @@ void SlideSorterViewShell::ArrangeGUIElements()
{
if (IsActive())
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->ArrangeGUIElements(maViewPos, maViewSize);
mbIsArrangeGUIElementsPending = false;
}
@@ -481,10 +481,10 @@ void SlideSorterViewShell::Activate (bool bIsMDIActivate)
case ViewShell::ST_NOTES:
case ViewShell::ST_DRAW:
eContext = EnumContext::Context_DrawPage;
- if( 0 != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
+ if( nullptr != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
eContext = EnumContext::GetContextEnum(pDrawViewShell->GetSidebarContextName());
}
break;
@@ -507,15 +507,15 @@ void SlideSorterViewShell::Command (
const CommandEvent& rEvent,
::sd::Window* pWindow)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
if ( ! mpSlideSorter->GetController().Command (rEvent, pWindow))
ViewShell::Command (rEvent, pWindow);
}
void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (pFrameView != NULL)
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
+ if (pFrameView != nullptr)
{
view::SlideSorterView& rView (mpSlideSorter->GetView());
@@ -542,7 +542,7 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
if ( ! IsMainViewShell())
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
- if (pMainViewShell.get() != NULL)
+ if (pMainViewShell.get() != nullptr)
mpSlideSorter->GetController().GetCurrentSlideManager()->NotifyCurrentSlideChange(
pMainViewShell->getCurrentPage());
}
@@ -550,8 +550,8 @@ void SlideSorterViewShell::ReadFrameViewData (FrameView* pFrameView)
void SlideSorterViewShell::WriteFrameViewData()
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
- if (mpFrameView != NULL)
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
+ if (mpFrameView != nullptr)
{
view::SlideSorterView& rView (mpSlideSorter->GetView());
mpFrameView->SetSlidesPerRow((sal_uInt16)rView.GetLayouter().GetColumnCount());
@@ -561,7 +561,7 @@ void SlideSorterViewShell::WriteFrameViewData()
mpFrameView->SetDrawMode( GetActiveWindow()->GetDrawMode() );
SdPage* pActualPage = GetActualPage();
- if (pActualPage != NULL)
+ if (pActualPage != nullptr)
{
if (IsMainViewShell())
mpFrameView->SetSelectedPage((pActualPage->GetPageNum()- 1) / 2);
@@ -588,7 +588,7 @@ void SlideSorterViewShell::SetZoom (long int )
void SlideSorterViewShell::SetZoomRect (const Rectangle& rZoomRect)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
Size aPageSize (mpSlideSorter->GetView().GetLayouter().GetPageObjectSize());
Rectangle aRect(rZoomRect);
@@ -636,7 +636,7 @@ void SlideSorterViewShell::StartDrag (
const Point& rDragPt,
vcl::Window* pWindow )
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetClipboard().StartDrag (
rDragPt,
pWindow);
@@ -649,7 +649,7 @@ sal_Int8 SlideSorterViewShell::AcceptDrop (
sal_uInt16 nPage,
sal_uInt16 nLayer)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
return mpSlideSorter->GetController().GetClipboard().AcceptDrop (
rEvt,
rTargetHelper,
@@ -665,7 +665,7 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop (
sal_uInt16 nPage,
sal_uInt16 nLayer)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
return mpSlideSorter->GetController().GetClipboard().ExecuteDrop (
rEvt,
rTargetHelper,
@@ -677,28 +677,28 @@ sal_Int8 SlideSorterViewShell::ExecuteDrop (
std::shared_ptr<SlideSorterViewShell::PageSelection>
SlideSorterViewShell::GetPageSelection() const
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
return mpSlideSorter->GetController().GetPageSelector().GetPageSelection();
}
void SlideSorterViewShell::SetPageSelection (
const std::shared_ptr<PageSelection>& rSelection)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetPageSelector().SetPageSelection(rSelection);
}
void SlideSorterViewShell::AddSelectionChangeListener (
const Link<LinkParamNone*,void>& rCallback)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetSelectionManager()->AddSelectionChangeListener(rCallback);
}
void SlideSorterViewShell::RemoveSelectionChangeListener (
const Link<LinkParamNone*,void>& rCallback)
{
- OSL_ASSERT(mpSlideSorter.get()!=NULL);
+ OSL_ASSERT(mpSlideSorter.get()!=nullptr);
mpSlideSorter->GetController().GetSelectionManager()->RemoveSelectionChangeListener(rCallback);
}
@@ -722,10 +722,10 @@ void SlideSorterViewShell::GetStateMovePageFirst (SfxItemSet& rSet)
if ( ! IsMainViewShell())
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
- if (pMainViewShell.get() != NULL && 0 != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
+ if (pMainViewShell.get() != nullptr && nullptr != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
- if (pDrawViewShell != NULL && pDrawViewShell->GetPageKind() == PK_HANDOUT)
+ if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PK_HANDOUT)
{
rSet.DisableItem( SID_MOVE_PAGE_FIRST );
rSet.DisableItem( SID_MOVE_PAGE_UP );
@@ -839,10 +839,10 @@ void SlideSorterViewShell::ExecMovePageLast (SfxRequest& /*rReq*/)
void SlideSorterViewShell::GetStateMovePageLast (SfxItemSet& rSet)
{
std::shared_ptr<ViewShell> pMainViewShell = GetViewShellBase().GetMainViewShell();
- if (pMainViewShell.get() != NULL && 0 != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
+ if (pMainViewShell.get() != nullptr && nullptr != dynamic_cast< const DrawViewShell *>( pMainViewShell.get() ))
{
DrawViewShell* pDrawViewShell = dynamic_cast<DrawViewShell*>(pMainViewShell.get());
- if (pDrawViewShell != NULL && pDrawViewShell->GetPageKind() == PK_HANDOUT)
+ if (pDrawViewShell != nullptr && pDrawViewShell->GetPageKind() == PK_HANDOUT)
{
rSet.DisableItem( SID_MOVE_PAGE_LAST );
rSet.DisableItem( SID_MOVE_PAGE_DOWN );
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index 70b625df6e22..1c791e990eff 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -347,14 +347,14 @@ void SlideSorterView::UpdateOrientation()
{
// Get access to the docking window.
vcl::Window* pWindow = mrSlideSorter.GetContentWindow();
- PaneDockingWindow* pDockingWindow = NULL;
- while (pWindow!=NULL && pDockingWindow==NULL)
+ PaneDockingWindow* pDockingWindow = nullptr;
+ while (pWindow!=nullptr && pDockingWindow==nullptr)
{
pDockingWindow = dynamic_cast<PaneDockingWindow*>(pWindow);
pWindow = pWindow->GetParent();
}
- if (pDockingWindow != NULL)
+ if (pDockingWindow != nullptr)
{
const long nScrollBarSize (
Application::GetSettings().GetStyleSettings().GetScrollBarSize());
@@ -471,7 +471,7 @@ void SlideSorterView::DeterminePageObjectVisibilities()
for (long nIndex=aUnion.Min(); nIndex<=aUnion.Max(); nIndex++)
{
pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
SetState(
pDescriptor,
PageDescriptor::ST_Visible,
@@ -492,7 +492,7 @@ void SlideSorterView::DeterminePageObjectVisibilities()
iLink!=iEnd;
++iLink)
{
- iLink->Call(NULL);
+ iLink->Call(nullptr);
}
}
@@ -514,7 +514,7 @@ void SlideSorterView::UpdatePreciousFlags()
for (int nIndex=0; nIndex<=nPageCount; ++nIndex)
{
pDescriptor = mrModel.GetPageDescriptor(nIndex);
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
pCache->SetPreciousFlag(
pDescriptor->GetPage(),
@@ -609,7 +609,7 @@ void SlideSorterView::CompleteRedraw (
mnLockRedrawSmph ? "locked" : "");
#endif
- if (pDevice == NULL || pDevice!=mrSlideSorter.GetContentWindow())
+ if (pDevice == nullptr || pDevice!=mrSlideSorter.GetContentWindow())
return;
// The parent implementation of CompleteRedraw is called only when
@@ -698,7 +698,7 @@ void SlideSorterView::ConfigurationChanged (
std::shared_ptr<cache::PageCache> SlideSorterView::GetPreviewCache()
{
sd::Window *pWindow (mrSlideSorter.GetContentWindow());
- if (pWindow && mpPreviewCache.get() == NULL)
+ if (pWindow && mpPreviewCache.get() == nullptr)
{
mpPreviewCache.reset(
new cache::PageCache(
@@ -753,7 +753,7 @@ void SlideSorterView::DragFinished (sal_Int8 nDropAction)
void SlideSorterView::Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint)
{
::sd::DrawDocShell* pDocShell = mrModel.GetDocument()->GetDocSh();
- if (pDocShell!=NULL && pDocShell->IsEnableSetModified())
+ if (pDocShell!=nullptr && pDocShell->IsEnableSetModified())
mbModelChangedWhileModifyEnabled = true;
::sd::View::Notify(rBroadcaster, rHint);
diff --git a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
index 3ac3e7da06dd..bf5736b7a9b2 100644
--- a/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFontProvider.cxx
@@ -29,15 +29,15 @@ using namespace ::sd::slidesorter;
namespace sd { namespace slidesorter { namespace view {
-FontProvider* FontProvider::mpInstance = NULL;
+FontProvider* FontProvider::mpInstance = nullptr;
FontProvider& FontProvider::Instance()
{
- if (mpInstance == NULL)
+ if (mpInstance == nullptr)
{
::osl::GetGlobalMutex aMutexFunctor;
::osl::MutexGuard aGuard (aMutexFunctor());
- if (mpInstance == NULL)
+ if (mpInstance == nullptr)
{
// Create an instance of the class and register it at the
// SdGlobalResourceContainer so that it is eventually released.
@@ -55,9 +55,9 @@ FontProvider& FontProvider::Instance()
// We throw an exception when for some strange reason no instance of
// this class exists.
- if (mpInstance == NULL)
+ if (mpInstance == nullptr)
throw css::uno::RuntimeException("com.sun.star.document.IndexedPropertyValues",
- NULL);
+ nullptr);
return *mpInstance;
}
diff --git a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
index 4abd3ccb07fe..2c8813c43e0e 100644
--- a/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsFramePainter.cxx
@@ -80,7 +80,7 @@ void FramePainter::AdaptColor (
if (maCenter.maBitmap.IsEmpty())
return;
BitmapReadAccess* pReadAccess = maCenter.maBitmap.GetBitmap().AcquireReadAccess();
- if (pReadAccess == NULL)
+ if (pReadAccess == nullptr)
return;
const Color aSourceColor = pReadAccess->GetColor(0,0);
Bitmap::ReleaseAccess(pReadAccess);
diff --git a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
index ba7805234ffa..7e06c12541c8 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertionIndicatorOverlay.cxx
@@ -82,7 +82,7 @@ InsertionIndicatorOverlay::~InsertionIndicatorOverlay()
void InsertionIndicatorOverlay::Create (const SdTransferable* pTransferable)
{
- if (pTransferable == NULL)
+ if (pTransferable == nullptr)
return;
std::shared_ptr<controller::TransferableData> pData (
@@ -95,10 +95,10 @@ void InsertionIndicatorOverlay::Create (const SdTransferable* pTransferable)
else
{
DrawDocShell* pDataDocShell = dynamic_cast<DrawDocShell*>(&pTransferable->GetDocShell());
- if (pDataDocShell != NULL)
+ if (pDataDocShell != nullptr)
{
SdDrawDocument* pDataDocument = pDataDocShell->GetDoc();
- if (pDataDocument != NULL)
+ if (pDataDocument != nullptr)
nSelectionCount = pDataDocument->GetSdPageCount(PK_STANDARD);
}
}
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
index 49fa50983d69..b2278dc815bf 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx
@@ -116,10 +116,10 @@ void PageObjectPainter::PaintBackground (
// Fill the interior of the preview area with the default background
// color of the page.
SdPage* pPage = rpDescriptor->GetPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
{
- rDevice.SetFillColor(pPage->GetPageBackgroundColor(NULL));
- rDevice.SetLineColor(pPage->GetPageBackgroundColor(NULL));
+ rDevice.SetFillColor(pPage->GetPageBackgroundColor(nullptr));
+ rDevice.SetLineColor(pPage->GetPageBackgroundColor(nullptr));
const Rectangle aPreviewBox (pPageObjectLayouter->GetBoundingBox(
rpDescriptor,
PageObjectLayouter::Preview,
@@ -138,7 +138,7 @@ void PageObjectPainter::PaintPreview (
PageObjectLayouter::Preview,
PageObjectLayouter::ModelCoordinateSystem));
- if (mpCache != 0)
+ if (mpCache != nullptr)
{
const SdrPage* pPage = rpDescriptor->GetPage();
mpCache->SetPreciousFlag(pPage, true);
@@ -161,7 +161,7 @@ Bitmap PageObjectPainter::CreateMarkedPreview (
const OutputDevice* pReferenceDevice)
{
ScopedVclPtr<VirtualDevice> pDevice;
- if (pReferenceDevice != NULL)
+ if (pReferenceDevice != nullptr)
pDevice.disposeAndReset(VclPtr<VirtualDevice>::Create(*pReferenceDevice));
else
pDevice.disposeAndReset(VclPtr<VirtualDevice>::Create());
@@ -259,7 +259,7 @@ void PageObjectPainter::PaintPageNumber (
}
// Paint the page number.
- OSL_ASSERT(rpDescriptor->GetPage()!=NULL);
+ OSL_ASSERT(rpDescriptor->GetPage()!=nullptr);
const sal_Int32 nPageNumber ((rpDescriptor->GetPage()->GetPageNum() - 1) / 2 + 1);
const OUString sPageNumber(OUString::number(nPageNumber));
rDevice.SetFont(*mpPageNumberFont);
@@ -273,7 +273,7 @@ void PageObjectPainter::PaintTransitionEffect (
const model::SharedPageDescriptor& rpDescriptor)
{
const SdPage* pPage = rpDescriptor->GetPage();
- if (pPage!=NULL && pPage->getTransitionType() > 0)
+ if (pPage!=nullptr && pPage->getTransitionType() > 0)
{
const Rectangle aBox (pPageObjectLayouter->GetBoundingBox(
rpDescriptor,
diff --git a/sd/source/ui/slidesorter/view/SlsToolTip.cxx b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
index 217888cff123..0ec92984bf75 100644
--- a/sd/source/ui/slidesorter/view/SlsToolTip.cxx
+++ b/sd/source/ui/slidesorter/view/SlsToolTip.cxx
@@ -69,11 +69,11 @@ void ToolTip::SetPage (const model::SharedPageDescriptor& rpDescriptor)
{
SdPage* pPage = mpDescriptor->GetPage();
OUString sHelpText;
- if (pPage != NULL)
+ if (pPage != nullptr)
sHelpText = pPage->GetName();
else
{
- OSL_ASSERT(mpDescriptor->GetPage() != NULL);
+ OSL_ASSERT(mpDescriptor->GetPage() != nullptr);
}
if (sHelpText.isEmpty())
{
@@ -125,7 +125,7 @@ void ToolTip::DoShow()
return;
vcl::Window* pParent (pWindow);
- while (pParent!=NULL && pParent->GetParent()!=NULL)
+ while (pParent!=nullptr && pParent->GetParent()!=nullptr)
pParent = pParent->GetParent();
const Point aOffset (pWindow->GetWindowExtentsRelative(pParent).TopLeft());
diff --git a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
index 55e1111b8743..6ff1d404165f 100644
--- a/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
+++ b/sd/source/ui/slidesorter/view/SlsViewCacheContext.cxx
@@ -50,7 +50,7 @@ void ViewCacheContext::NotifyPreviewCreation (
const Bitmap&)
{
const model::SharedPageDescriptor pDescriptor (GetDescriptor(aKey));
- if (pDescriptor.get() != NULL)
+ if (pDescriptor.get() != nullptr)
{
// Force a repaint that will trigger their re-creation.
mrSlideSorter.GetView().RequestRepaint(pDescriptor);
@@ -114,8 +114,8 @@ model::SharedPageDescriptor ViewCacheContext::GetDescriptor (cache::CacheKey aKe
css::uno::Reference<css::uno::XInterface> ViewCacheContext::GetModel()
{
- if (mrModel.GetDocument() == NULL)
- return NULL;
+ if (mrModel.GetDocument() == nullptr)
+ return nullptr;
else
return mrModel.GetDocument()->getUnoModel();
}
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index c03408ef3d34..2bd52b51a924 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -150,7 +150,7 @@ static SfxBindings* getBindings( ViewShellBase& rBase )
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return &rBase.GetMainViewShell()->GetViewFrame()->GetBindings();
else
- return 0;
+ return nullptr;
}
static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
@@ -158,7 +158,7 @@ static SfxDispatcher* getDispatcher( ViewShellBase& rBase )
if( rBase.GetMainViewShell().get() && rBase.GetMainViewShell()->GetViewFrame() )
return rBase.GetMainViewShell()->GetViewFrame()->GetDispatcher();
else
- return 0;
+ return nullptr;
}
IMPL_LINK_NOARG_TYPED(TableDesignWidget, implValueSetHdl, ValueSet*, void)
@@ -632,7 +632,7 @@ const Bitmap CreateDesignPreview( const Reference< XIndexAccess >& xTableStyle,
// bccccccccccb
// bbbbbbbbbbbb
- Bitmap aPreviewBmp( Size( nBitmapWidth, nBitmapHeight), 24, NULL );
+ Bitmap aPreviewBmp( Size( nBitmapWidth, nBitmapHeight), 24, nullptr );
BitmapWriteAccess* pAccess = aPreviewBmp.AcquireWriteAccess();
if( pAccess )
{
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 7ec28cbb21e2..0070bee8e0d3 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -127,7 +127,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
if( (nColumns == 0) || (nRows == 0) )
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( NULL ) : 0);
+ std::unique_ptr<SvxAbstractNewTableDialog> pDlg( pFact ? pFact->CreateSvxNewTableDialog( nullptr ) : nullptr);
if( !pDlg.get() || (pDlg->Execute() != RET_OK) )
break;
@@ -190,7 +190,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
rReq.Ignore();
SfxViewShell* pViewShell = GetViewShell();
- OSL_ASSERT (pViewShell!=NULL);
+ OSL_ASSERT (pViewShell!=nullptr);
SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
rBindings.Invalidate( SID_INSERT_TABLE, true );
break;
diff --git a/sd/source/ui/table/tableobjectbar.cxx b/sd/source/ui/table/tableobjectbar.cxx
index 3fe246a6ab63..8a5c70bef316 100644
--- a/sd/source/ui/table/tableobjectbar.cxx
+++ b/sd/source/ui/table/tableobjectbar.cxx
@@ -101,7 +101,7 @@ TableObjectBar::TableObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView )
TableObjectBar::~TableObjectBar()
{
- SetRepeatTarget( NULL );
+ SetRepeatTarget( nullptr );
}
void TableObjectBar::GetState( SfxItemSet& rSet )
@@ -140,7 +140,7 @@ void TableObjectBar::Execute( SfxRequest& rReq )
case SID_TABLE_INSERT_COL_DLG:
{
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
- std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : 0);
+ std::unique_ptr<SvxAbstractInsRowColDlg> pDlg( pFact ? pFact->CreateSvxInsRowColDlg( mpView->GetViewShell()->GetParentWindow(), nSlotId == SID_TABLE_INSERT_COL_DLG, SD_MOD()->GetSlotPool()->GetSlot(nSlotId)->GetCommand()) : nullptr);
if( pDlg.get() && (pDlg->Execute() == 1) )
{
diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx
index 2552f2b8d01c..4c501de7ff7a 100644
--- a/sd/source/ui/tools/EventMultiplexer.cxx
+++ b/sd/source/ui/tools/EventMultiplexer.cxx
@@ -143,7 +143,7 @@ private:
void CallListeners (
EventMultiplexerEvent::EventId eId,
- void* pUserData = NULL);
+ void* pUserData = nullptr);
/** This method throws a DisposedException when the object has already been
disposed.
@@ -210,10 +210,10 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase)
mrBase (rBase),
mbListeningToController (false),
mbListeningToFrame (false),
- mxControllerWeak(NULL),
- mxFrameWeak(NULL),
- mxSlideSorterSelectionWeak(NULL),
- mpDocument(NULL),
+ mxControllerWeak(nullptr),
+ mxFrameWeak(nullptr),
+ mxSlideSorterSelectionWeak(nullptr),
+ mpDocument(nullptr),
mxConfigurationControllerWeak()
{
// Connect to the frame to listen for controllers being exchanged.
@@ -235,7 +235,7 @@ EventMultiplexer::Implementation::Implementation (ViewShellBase& rBase)
// Listen for document changes.
mpDocument = mrBase.GetDocument();
- if (mpDocument != NULL)
+ if (mpDocument != nullptr)
StartListening (*mpDocument);
// Listen for configuration changes.
@@ -292,10 +292,10 @@ void EventMultiplexer::Implementation::ReleaseListeners()
DisconnectFromController ();
- if (mpDocument != NULL)
+ if (mpDocument != nullptr)
{
EndListening (*mpDocument);
- mpDocument = NULL;
+ mpDocument = nullptr;
}
// Stop listening for configuration changes.
@@ -575,7 +575,7 @@ void SAL_CALL EventMultiplexer::Implementation::notifyConfigurationChange (
= dynamic_cast<slidesorter::SlideSorterViewShell*>(
FrameworkHelper::GetViewShell(
Reference<XView>(rEvent.ResourceObject,UNO_QUERY)).get());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->AddSelectionChangeListener (
LINK(this,
EventMultiplexer::Implementation,
@@ -603,7 +603,7 @@ void SAL_CALL EventMultiplexer::Implementation::notifyConfigurationChange (
= dynamic_cast<slidesorter::SlideSorterViewShell*>(
FrameworkHelper::GetViewShell(
Reference<XView>(rEvent.ResourceObject, UNO_QUERY)).get());
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
pViewShell->RemoveSelectionChangeListener (
LINK(this,
EventMultiplexer::Implementation,
@@ -676,7 +676,7 @@ void EventMultiplexer::Implementation::Notify (
{
const SfxSimpleHint& rSimpleHint = static_cast<const SfxSimpleHint&>(rHint);
if (rSimpleHint.GetId() == SFX_HINT_DYING)
- mpDocument = NULL;
+ mpDocument = nullptr;
}
}
diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx
index 54563201282f..6c46806bd1b5 100644
--- a/sd/source/ui/tools/IconCache.cxx
+++ b/sd/source/ui/tools/IconCache.cxx
@@ -45,7 +45,7 @@ private:
Image GetIcon (sal_uInt16 nResourceId);
};
-IconCache* IconCache::Implementation::mpInstance = NULL;
+IconCache* IconCache::Implementation::mpInstance = nullptr;
Image IconCache::Implementation::GetIcon (sal_uInt16 nResourceId)
{
@@ -67,11 +67,11 @@ Image IconCache::Implementation::GetIcon (sal_uInt16 nResourceId)
//static
IconCache& IconCache::Instance()
{
- if (Implementation::mpInstance == NULL)
+ if (Implementation::mpInstance == nullptr)
{
::osl::GetGlobalMutex aMutexFunctor;
::osl::MutexGuard aGuard (aMutexFunctor());
- if (Implementation::mpInstance == NULL)
+ if (Implementation::mpInstance == nullptr)
{
IconCache* pCache = new IconCache ();
SdGlobalResourceContainer::Instance().AddResource (
@@ -85,7 +85,7 @@ IconCache& IconCache::Instance()
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
}
- DBG_ASSERT(Implementation::mpInstance!=NULL,
+ DBG_ASSERT(Implementation::mpInstance!=nullptr,
"IconCache::Instance(): instance is NULL");
return *Implementation::mpInstance;
}
diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx
index ed16b2f92a3a..e5e9dab48ba4 100644
--- a/sd/source/ui/tools/IdleDetection.cxx
+++ b/sd/source/ui/tools/IdleDetection.cxx
@@ -36,7 +36,7 @@ namespace sd { namespace tools {
sal_Int32 IdleDetection::GetIdleState (const vcl::Window* pWindow)
{
sal_Int32 nResult (CheckInputPending() | CheckSlideShowRunning());
- if (pWindow != NULL)
+ if (pWindow != nullptr)
nResult |= CheckWindowPainting(*pWindow);
return nResult;
}
@@ -57,7 +57,7 @@ sal_Int32 IdleDetection::CheckSlideShowRunning()
// Iterate over all view frames.
for (SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst();
- pViewFrame!=NULL && !bIsSlideShowShowing;
+ pViewFrame!=nullptr && !bIsSlideShowShowing;
pViewFrame = SfxViewFrame::GetNext(*pViewFrame))
{
// Ignore the current frame when it does not exist, is not valid, or
@@ -77,7 +77,7 @@ sal_Int32 IdleDetection::CheckSlideShowRunning()
// Get sd::ViewShell from active frame.
ViewShellBase* pBase = ViewShellBase::GetViewShellBase(pViewFrame);
- if (pBase != NULL)
+ if (pBase != nullptr)
{
rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( *pBase ) );
if( xSlideShow.is() && xSlideShow->isRunning() )
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index 67e3f5ac6eb5..a383b759668e 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -67,11 +67,11 @@ PreviewRenderer::PreviewRenderer (
OutputDevice* pTemplate,
const bool bHasFrame)
: mpPreviewDevice (VclPtr<VirtualDevice>::Create()),
- mpDocShellOfView(NULL),
+ mpDocShellOfView(nullptr),
maFrameColor (svtools::ColorConfig().GetColorValue(svtools::DOCBOUNDARIES).nColor),
mbHasFrame(bHasFrame)
{
- if (pTemplate != NULL)
+ if (pTemplate != nullptr)
{
mpPreviewDevice->SetDigitLanguage (pTemplate->GetDigitLanguage());
mpPreviewDevice->SetBackground(pTemplate->GetBackground());
@@ -85,7 +85,7 @@ PreviewRenderer::PreviewRenderer (
PreviewRenderer::~PreviewRenderer()
{
- if (mpDocShellOfView != NULL)
+ if (mpDocShellOfView != nullptr)
EndListening (*mpDocShellOfView);
}
@@ -96,7 +96,7 @@ Image PreviewRenderer::RenderPage (
const bool bObeyHighContrastMode,
const bool bDisplayPresentationObjects)
{
- if (pPage != NULL)
+ if (pPage != nullptr)
{
const Size aPageModelSize (pPage->GetSize());
const double nAspectRatio (
@@ -124,7 +124,7 @@ Image PreviewRenderer::RenderPage (
{
Image aPreview;
- if (pPage != NULL)
+ if (pPage != nullptr)
{
try
{
@@ -214,11 +214,11 @@ bool PreviewRenderer::Initialize (
const Size& rPixelSize,
const bool bObeyHighContrastMode)
{
- if (pPage == NULL)
+ if (pPage == nullptr)
return false;
SdrModel* pModel = pPage->GetModel();
- if (pModel == NULL)
+ if (pModel == nullptr)
return false;
SetupOutputSize(*pPage, rPixelSize);
@@ -229,7 +229,7 @@ bool PreviewRenderer::Initialize (
// Create view
ProvideView (pDocShell);
- if (mpView.get() == NULL)
+ if (mpView.get() == nullptr)
return false;
// Adjust contrast mode.
@@ -254,7 +254,7 @@ bool PreviewRenderer::Initialize (
// Make sure that a page view exists.
SdrPageView* pPageView = mpView->GetSdrPageView();
- if (pPageView == NULL)
+ if (pPageView == nullptr)
return false;
// #i121224# No need to set SetApplicationBackgroundColor (which is the color
@@ -298,9 +298,9 @@ void PreviewRenderer::PaintPage (
vcl::Region aRegion (aPaintRectangle);
// Turn off online spelling and redlining.
- SdrOutliner* pOutliner = NULL;
+ SdrOutliner* pOutliner = nullptr;
EEControlBits nSavedControlWord = EEControlBits::NONE;
- if (mpDocShellOfView!=NULL && mpDocShellOfView->GetDoc()!=NULL)
+ if (mpDocShellOfView!=nullptr && mpDocShellOfView->GetDoc()!=nullptr)
{
pOutliner = &mpDocShellOfView->GetDoc()->GetDrawOutliner();
nSavedControlWord = pOutliner->GetControlWord();
@@ -322,7 +322,7 @@ void PreviewRenderer::PaintPage (
}
// Restore the previous online spelling and redlining states.
- if (pOutliner != NULL)
+ if (pOutliner != nullptr)
pOutliner->SetControlWord(nSavedControlWord);
}
@@ -410,15 +410,15 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell)
// Switch our attention, i.e. listening for DYING events, to
// the new doc shell.
- if (mpDocShellOfView != NULL)
+ if (mpDocShellOfView != nullptr)
EndListening (*mpDocShellOfView);
mpDocShellOfView = pDocShell;
- if (mpDocShellOfView != NULL)
+ if (mpDocShellOfView != nullptr)
StartListening (*mpDocShellOfView);
}
- if (mpView.get() == NULL)
+ if (mpView.get() == nullptr)
{
- mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), NULL));
+ mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), nullptr));
}
mpView->SetPreviewRenderer(true);
#if 1
@@ -499,7 +499,7 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint)
// ProvideView will create a new one (for another
// doc shell, of course.)
mpView.reset();
- mpDocShellOfView = NULL;
+ mpDocShellOfView = nullptr;
}
}
@@ -521,7 +521,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
{
SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject();
- if (pObject==NULL || pObject->GetPage() == NULL)
+ if (pObject==nullptr || pObject->GetPage() == nullptr)
{
// not a SdrObject visualisation (maybe e.g. page) or no page
return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(
diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx
index 184a3f159237..4d1142abce6c 100644
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -44,7 +44,7 @@ void SAL_CALL PropertySet::disposing()
Reference<beans::XPropertySetInfo> SAL_CALL PropertySet::getPropertySetInfo()
throw(RuntimeException, std::exception)
{
- return NULL;
+ return nullptr;
}
void SAL_CALL PropertySet::setPropertyValue (
diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
index d6c0a02cf701..4eb35b221d73 100644
--- a/sd/source/ui/tools/SdGlobalResourceContainer.cxx
+++ b/sd/source/ui/tools/SdGlobalResourceContainer.cxx
@@ -53,14 +53,14 @@ private:
// static
SdGlobalResourceContainer& SdGlobalResourceContainer::Instance()
{
- DBG_ASSERT(Implementation::mpInstance!=NULL,
+ DBG_ASSERT(Implementation::mpInstance!=nullptr,
"SdGlobalResourceContainer::Instance(): instance has been deleted");
// Maybe we should throw an exception when the instance has been deleted.
return *Implementation::mpInstance;
}
SdGlobalResourceContainer*
- SdGlobalResourceContainer::Implementation::mpInstance = NULL;
+ SdGlobalResourceContainer::Implementation::mpInstance = nullptr;
//===== SdGlobalResourceContainer =============================================
@@ -170,14 +170,14 @@ SdGlobalResourceContainer::~SdGlobalResourceContainer()
++iXInterfaceResource)
{
Reference<lang::XComponent> xComponent (*iXInterfaceResource, UNO_QUERY);
- *iXInterfaceResource = NULL;
+ *iXInterfaceResource = nullptr;
if (xComponent.is())
xComponent->dispose();
}
DBG_ASSERT(Implementation::mpInstance == this,
"~SdGlobalResourceContainer(): more than one instance of singleton");
- Implementation::mpInstance = NULL;
+ Implementation::mpInstance = nullptr;
}
} // end of namespace sd
diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx
index c3fc2275fcff..e827ff4ec723 100644
--- a/sd/source/ui/tools/SlotStateListener.cxx
+++ b/sd/source/ui/tools/SlotStateListener.cxx
@@ -37,7 +37,7 @@ SlotStateListener::SlotStateListener (
const OUString& rSlotName)
: SlotStateListenerInterfaceBase(maMutex),
maCallback(),
- mxDispatchProviderWeak(NULL)
+ mxDispatchProviderWeak(nullptr)
{
SetCallback(rCallback);
ConnectToDispatchProvider(rxDispatchProvider);
@@ -89,7 +89,7 @@ void SlotStateListener::ObserveSlot (const OUString& rSlotName)
void SlotStateListener::disposing()
{
ReleaseListeners();
- mxDispatchProviderWeak = uno::WeakReference<frame::XDispatchProvider>(NULL);
+ mxDispatchProviderWeak = uno::WeakReference<frame::XDispatchProvider>(nullptr);
maCallback = Link<const OUString&,void>();
}
diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx
index 039606ea62a1..bafd904290a2 100644
--- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx
+++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx
@@ -102,13 +102,13 @@ TimerBasedTaskExecution::~TimerBasedTaskExecution()
void TimerBasedTaskExecution::SetSelf (
const std::shared_ptr<TimerBasedTaskExecution>& rpSelf)
{
- if (mpTask.get() != NULL)
+ if (mpTask.get() != nullptr)
mpSelf = rpSelf;
}
IMPL_LINK_NOARG_TYPED(TimerBasedTaskExecution, TimerCallback, Timer *, void)
{
- if (mpTask.get() != NULL)
+ if (mpTask.get() != nullptr)
{
if (mpTask->HasNextStep())
{
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 39a49921c3c9..5574ce080be7 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -70,7 +70,7 @@ DrawController::DrawController (ViewShellBase& rBase) throw()
cppu::UnoType<view::XSelectionChangeListener>::get()),
mpBase(&rBase),
maLastVisArea(),
- mpCurrentPage(NULL),
+ mpCurrentPage(nullptr),
mbMasterPageMode(false),
mbLayerMode(false),
mbDisposing(false),
@@ -145,15 +145,15 @@ void SAL_CALL DrawController::dispose()
{
pViewShell->DeactivateCurrentFunction();
DrawDocShell* pDocShell = pViewShell->GetDocSh();
- if ( pDocShell != NULL )
- pDocShell->SetDocShellFunction(0);
+ if ( pDocShell != nullptr )
+ pDocShell->SetDocShellFunction(nullptr);
}
pViewShell.reset();
// When the controller has not been detached from its view
// shell, i.e. mpViewShell is not NULL, then tell PaneManager
// and ViewShellManager to clear the shell stack.
- if (mxSubController.is() && mpBase!=NULL)
+ if (mxSubController.is() && mpBase!=nullptr)
{
mpBase->DisconnectAllClients();
mpBase->GetViewShellManager()->Shutdown();
@@ -303,7 +303,7 @@ void SAL_CALL
view::XSelectionChangeListener* pListener =
static_cast<view::XSelectionChangeListener*>(
aIterator.next());
- if (pListener != NULL)
+ if (pListener != nullptr)
pListener->selectionChanged (rEvent);
}
catch (const RuntimeException&)
@@ -385,7 +385,7 @@ void DrawController::FireSelectionChangeListener() throw()
{
view::XSelectionChangeListener * pL =
static_cast<view::XSelectionChangeListener*>(aIt.next());
- if (pL != NULL)
+ if (pL != nullptr)
pL->selectionChanged( aEvent );
}
catch (const RuntimeException&)
@@ -432,7 +432,7 @@ void DrawController::FireSwitchCurrentPage (SdPage* pNewCurrentPage) throw()
makeAny(Reference<drawing::XDrawPage>(pNewCurrentPage->getUnoPage(), UNO_QUERY)));
Any aOldValue;
- if (pCurrentPage != NULL)
+ if (pCurrentPage != nullptr)
{
Reference<drawing::XDrawPage> xOldPage (pCurrentPage->getUnoPage(), UNO_QUERY);
aOldValue <<= xOldPage;
@@ -552,7 +552,7 @@ void DrawController::BroadcastContextChange() const
void DrawController::ReleaseViewShellBase()
{
DisposeFrameworkControllers();
- mpBase = NULL;
+ mpBase = nullptr;
}
//===== XControllerManager ==============================================================
@@ -675,7 +675,7 @@ IPropertyArrayHelper & DrawController::getInfoHelper()
{
SolarMutexGuard aGuard;
- if (mpPropertyArrayHelper.get() == NULL)
+ if (mpPropertyArrayHelper.get() == nullptr)
{
::std::vector<beans::Property> aProperties;
FillPropertyTable (aProperties);
@@ -704,9 +704,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL DrawController::getFor
FmFormShell* pFormShell = mpBase->GetFormShellManager()->GetFormShell();
SdrView* pSdrView = mpBase->GetDrawView();
std::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
- ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : NULL;
+ ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : nullptr;
- uno::Reference< form::runtime::XFormController > xController( NULL );
+ uno::Reference< form::runtime::XFormController > xController( nullptr );
if ( pFormShell && pSdrView && pWindow )
xController = FmFormShell::GetFormController( Form, *pSdrView, *pWindow );
return xController;
@@ -741,9 +741,9 @@ uno::Reference< awt::XControl > SAL_CALL DrawController::getControl( const uno::
FmFormShell* pFormShell = mpBase->GetFormShellManager()->GetFormShell();
SdrView* pSdrView = mpBase->GetDrawView();
std::shared_ptr<ViewShell> pViewShell = mpBase->GetMainViewShell();
- ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : NULL;
+ ::sd::Window* pWindow = pViewShell ? pViewShell->GetActiveWindow() : nullptr;
- uno::Reference< awt::XControl > xControl( NULL );
+ uno::Reference< awt::XControl > xControl( nullptr );
if ( pFormShell && pSdrView && pWindow )
pFormShell->GetFormControl( xModel, *pSdrView, *pWindow, xControl );
return xControl;
@@ -838,8 +838,8 @@ void DrawController::ProvideFrameworkControllers()
}
catch (const RuntimeException&)
{
- mxConfigurationController = NULL;
- mxModuleController = NULL;
+ mxConfigurationController = nullptr;
+ mxModuleController = nullptr;
}
}
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 1caf0eccdec7..d2e6ea118d89 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -101,24 +101,24 @@ Reference<drawing::XLayer> SdUnoDrawView::getActiveLayer() throw ()
{
// Retrieve the layer manager from the model.
SdXImpressDocument* pModel = GetModel();
- if (pModel == NULL)
+ if (pModel == nullptr)
break;
SdDrawDocument* pSdModel = pModel->GetDoc();
- if (pSdModel == NULL)
+ if (pSdModel == nullptr)
break;
// From the model get the current SdrLayer object via the layer admin.
SdrLayerAdmin& rLayerAdmin = pSdModel->GetLayerAdmin ();
SdrLayer* pLayer = rLayerAdmin.GetLayer (mrView.GetActiveLayer(), true);
- if (pLayer == NULL)
+ if (pLayer == nullptr)
break;
// Get the corresponding XLayer object from the implementation
// object of the layer manager.
Reference<drawing::XLayerManager> xManager (pModel->getLayerManager(), uno::UNO_QUERY);
SdLayerManager* pManager = SdLayerManager::getImplementation (xManager);
- if (pManager != NULL)
+ if (pManager != nullptr)
xCurrentLayer = pManager->GetLayer (pLayer);
}
while (false);
@@ -134,11 +134,11 @@ void SdUnoDrawView::setActiveLayer (const Reference<drawing::XLayer>& rxLayer)
return;
SdLayer* pLayer = SdLayer::getImplementation (rxLayer);
- if (pLayer == NULL)
+ if (pLayer == nullptr)
return;
SdrLayer* pSdrLayer = pLayer->GetSdrLayer();
- if (pSdrLayer == NULL)
+ if (pSdrLayer == nullptr)
return;
// Set the new active layer and make the change visible.
@@ -157,7 +157,7 @@ sal_Bool SAL_CALL SdUnoDrawView::select( const Any& aSelection )
::std::vector<SdrObject*> aObjects;
- SdrPage* pSdrPage = NULL;
+ SdrPage* pSdrPage = nullptr;
Reference< drawing::XShape > xShape;
aSelection >>= xShape;
@@ -165,7 +165,7 @@ sal_Bool SAL_CALL SdUnoDrawView::select( const Any& aSelection )
if(xShape.is())
{
SvxShape* pShape = SvxShape::getImplementation( xShape );
- if( pShape && (pShape->GetSdrObject() != NULL) )
+ if( pShape && (pShape->GetSdrObject() != nullptr) )
{
SdrObject* pObj = pShape->GetSdrObject();
pSdrPage = pObj->GetPage();
@@ -189,7 +189,7 @@ sal_Bool SAL_CALL SdUnoDrawView::select( const Any& aSelection )
if( xShape.is() )
{
SvxShape* pShape = SvxShape::getImplementation(xShape);
- if( (pShape == NULL) || (pShape->GetSdrObject() == NULL) )
+ if( (pShape == nullptr) || (pShape->GetSdrObject() == nullptr) )
{
bOk = false;
break;
@@ -197,7 +197,7 @@ sal_Bool SAL_CALL SdUnoDrawView::select( const Any& aSelection )
SdrObject* pObj = pShape->GetSdrObject();
- if( pSdrPage == NULL )
+ if( pSdrPage == nullptr )
{
pSdrPage = pObj->GetPage();
}
@@ -265,11 +265,11 @@ Any SAL_CALL SdUnoDrawView::getSelection()
for( size_t nNum = 0; nNum < nCount; ++nNum)
{
SdrMark *pMark = rMarkList.GetMark(nNum);
- if(pMark==NULL)
+ if(pMark==nullptr)
continue;
SdrObject *pObj = pMark->GetMarkedSdrObj();
- if(pObj==NULL || pObj->GetPage() == NULL)
+ if(pObj==nullptr || pObj->GetPage() == nullptr)
continue;
Reference< drawing::XDrawPage > xPage( pObj->GetPage()->getUnoPage(), UNO_QUERY);
@@ -279,7 +279,7 @@ Any SAL_CALL SdUnoDrawView::getSelection()
SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage );
- if(pDrawPage==NULL)
+ if(pDrawPage==nullptr)
continue;
Reference< drawing::XShape > xShape( pObj->getUnoShape(), UNO_QUERY );
@@ -428,7 +428,7 @@ void SAL_CALL SdUnoDrawView::setCurrentPage (
throw (RuntimeException, std::exception)
{
SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage );
- SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : NULL;
+ SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : nullptr;
if(pSdrPage)
{
@@ -448,7 +448,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdUnoDrawView::getCurrentPage()
Reference< drawing::XDrawPage > xPage;
SdrPageView *pPV = mrView.GetSdrPageView();
- SdrPage* pPage = pPV ? pPV->GetPage() : NULL;
+ SdrPage* pPage = pPV ? pPV->GetPage() : nullptr;
if(pPage)
xPage.set( pPage->getUnoPage(), UNO_QUERY );
@@ -535,13 +535,13 @@ void SdUnoDrawView::SetZoomType ( sal_Int16 nType )
SdXImpressDocument* SdUnoDrawView::GetModel() const throw()
{
- if (mrView.GetDocSh()!=NULL)
+ if (mrView.GetDocSh()!=nullptr)
{
Reference<frame::XModel> xModel (mrView.GetDocSh()->GetModel());
return SdXImpressDocument::getImplementation(xModel);
}
else
- return NULL;
+ return nullptr;
}
Any SdUnoDrawView::getDrawViewMode() const
diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
index da661fa39983..a88385d07769 100644
--- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx
+++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
@@ -87,10 +87,10 @@ void SAL_CALL SdUnoOutlineView::setCurrentPage (
throw(RuntimeException, std::exception)
{
SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage );
- SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : NULL;
+ SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : nullptr;
SdPage *pSdPage = dynamic_cast<SdPage*>(pSdrPage);
- if (pSdPage != NULL)
+ if (pSdPage != nullptr)
mrOutlineViewShell.SetCurrentPage(pSdPage);
}
@@ -100,7 +100,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage()
Reference<drawing::XDrawPage> xPage;
SdPage* pPage = mrOutlineViewShell.getCurrentPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
xPage.set(pPage->getUnoPage(), UNO_QUERY);
return xPage;
@@ -143,7 +143,7 @@ Any SAL_CALL SdUnoOutlineView::getFastPropertyValue (
case DrawController::PROPERTY_CURRENTPAGE:
{
SdPage* pPage = const_cast<OutlineViewShell&>(mrOutlineViewShell).GetActualPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
aValue <<= pPage->getUnoPage();
}
break;
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index bb8aee82ecea..d3b506bde4fb 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -403,7 +403,7 @@ throw (UnknownPropertyException, PropertyVetoException,
SdDrawDocument* pDoc = mxModel->GetDoc();
::sd::DrawDocShell* pDocSh = mxModel->GetDocShell();
- if( NULL == pDoc || NULL == pDocSh )
+ if( nullptr == pDoc || nullptr == pDocSh )
{
throw RuntimeException("Document or Shell missing",
static_cast<OWeakObject *>(this));
@@ -417,7 +417,7 @@ throw (UnknownPropertyException, PropertyVetoException,
SfxPrinter* pPrinter = pDocSh->GetPrinter( false );
if( pPrinter )
{
- SdOptionsPrintItem const * pPrinterOptions = NULL;
+ SdOptionsPrintItem const * pPrinterOptions = nullptr;
if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, reinterpret_cast<const SfxPoolItem**>(&pPrinterOptions)) == SfxItemState::SET)
aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint();
}
@@ -771,7 +771,7 @@ throw (UnknownPropertyException, PropertyVetoException,
pDocSh->SetPrinter( pPrinter );
- pPrinter = NULL;
+ pPrinter = nullptr;
}
}
}
@@ -986,7 +986,7 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::
SdDrawDocument* pDoc = mxModel->GetDoc();
::sd::DrawDocShell* pDocSh = mxModel->GetDocShell();
- if( NULL == pDoc || NULL == pDocSh )
+ if( nullptr == pDoc || nullptr == pDocSh )
{
throw RuntimeException("Document or Shell missing",
static_cast<OWeakObject *>(this));
@@ -997,7 +997,7 @@ throw (UnknownPropertyException, WrappedTargetException, RuntimeException, std::
SfxPrinter* pPrinter = pDocSh->GetPrinter( false );
if( pPrinter )
{
- SdOptionsPrintItem const * pPrinterOptions = NULL;
+ SdOptionsPrintItem const * pPrinterOptions = nullptr;
if(pPrinter->GetOptions().GetItemState( ATTR_OPTIONS_PRINT, false, reinterpret_cast<const SfxPoolItem**>(&pPrinterOptions)) == SfxItemState::SET)
aOptionsPrintItem.GetOptionsPrint() = pPrinterOptions->GetOptionsPrint();
}
diff --git a/sd/source/ui/unoidl/facreg.cxx b/sd/source/ui/unoidl/facreg.cxx
index 8a7d894b60d0..2473fecffc69 100644
--- a/sd/source/ui/unoidl/facreg.cxx
+++ b/sd/source/ui/unoidl/facreg.cxx
@@ -49,7 +49,7 @@ namespace {
static std::shared_ptr<FactoryMap> spFactoryMap;
std::shared_ptr<FactoryMap> GetFactoryMap()
{
- if (spFactoryMap.get() == NULL)
+ if (spFactoryMap.get() == nullptr)
{
spFactoryMap.reset(new FactoryMap);
(*spFactoryMap)[SdDrawingDocument_getImplementationName()] = SdDrawingDocumentFactoryId;
@@ -67,7 +67,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
void * pServiceManager,
void * )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
@@ -115,7 +115,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
}
}
- if (pRet != NULL)
+ if (pRet != nullptr)
SdDLL::Init();
return pRet;
}
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index f800e85e7fa0..17450372efdd 100644
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -39,11 +39,11 @@ using namespace ::com::sun::star;
uno::Reference< uno::XInterface > createUnoCustomShow( SdCustomShow* pShow )
{
- return static_cast<cppu::OWeakObject*>(new SdXCustomPresentation( pShow, NULL ));
+ return static_cast<cppu::OWeakObject*>(new SdXCustomPresentation( pShow, nullptr ));
}
SdXCustomPresentation::SdXCustomPresentation() throw()
-: mpSdCustomShow(NULL), mpModel(NULL),
+: mpSdCustomShow(nullptr), mpModel(nullptr),
aDisposeListeners( aDisposeContainerMutex ),
bDisposing( false )
{
@@ -105,10 +105,10 @@ void SAL_CALL SdXCustomPresentation::insertByIndex( sal_Int32 Index, const uno::
if(pPage)
{
- if( NULL == mpModel )
+ if( nullptr == mpModel )
mpModel = pPage->GetModel();
- if( NULL != mpModel && NULL == mpSdCustomShow && mpModel->GetDoc() )
+ if( nullptr != mpModel && nullptr == mpSdCustomShow && mpModel->GetDoc() )
mpSdCustomShow = new SdCustomShow( mpModel->GetDoc() );
mpSdCustomShow->PagesVector().insert(mpSdCustomShow->PagesVector().begin() + Index,
@@ -254,7 +254,7 @@ void SAL_CALL SdXCustomPresentation::dispose() throw(uno::RuntimeException, std:
aEvt.Source = xSource;
aDisposeListeners.disposeAndClear(aEvt);
- mpSdCustomShow = NULL;
+ mpSdCustomShow = nullptr;
}
void SAL_CALL SdXCustomPresentation::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
@@ -328,34 +328,34 @@ void SAL_CALL SdXCustomPresentationAccess::insertByName( const OUString& aName,
SolarMutexGuard aGuard;
// get the documents custom show list
- SdCustomShowList* pList = 0;
+ SdCustomShowList* pList = nullptr;
if(mrModel.GetDoc())
pList = mrModel.GetDoc()->GetCustomShowList(true);
// no list, no cookies
- if( NULL == pList)
+ if( nullptr == pList)
throw uno::RuntimeException();
// do we have an container::XIndexContainer?
- SdXCustomPresentation* pXShow = NULL;
+ SdXCustomPresentation* pXShow = nullptr;
uno::Reference< container::XIndexContainer > xContainer;
if( (aElement >>= xContainer) && xContainer.is() )
pXShow = SdXCustomPresentation::getImplementation(xContainer);
- if( NULL == pXShow )
+ if( nullptr == pXShow )
throw lang::IllegalArgumentException();
// get the internal custom show from the api wrapper
SdCustomShow* pShow = pXShow->GetSdCustomShow();
- if( NULL == pShow )
+ if( nullptr == pShow )
{
pShow = new SdCustomShow( mrModel.GetDoc(), xContainer );
pXShow->SetSdCustomShow( pShow );
}
else
{
- if( NULL == pXShow->GetModel() || *pXShow->GetModel() != mrModel )
+ if( nullptr == pXShow->GetModel() || *pXShow->GetModel() != mrModel )
throw lang::IllegalArgumentException();
}
@@ -448,7 +448,7 @@ sal_Bool SAL_CALL SdXCustomPresentationAccess::hasByName( const OUString& aName
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return getSdCustomShow(aName) != NULL;
+ return getSdCustomShow(aName) != nullptr;
}
// XElementAccess
@@ -483,7 +483,7 @@ SdCustomShow * SdXCustomPresentationAccess::getSdCustomShow( const OUString& Nam
return pShow;
nIdx++;
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index fead6682b7f0..c00e382d5f0d 100644
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -145,7 +145,7 @@ inline SdCustomShowList* SdXCustomPresentationAccess::GetCustomShowList() const
if(mrModel.GetDoc())
return mrModel.GetDoc()->GetCustomShowList();
else
- return NULL;
+ return nullptr;
};
#endif
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 53b40c70be85..45d040baadd8 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -182,7 +182,7 @@ void SAL_CALL SdLayer::setPropertyValue( const OUString& aPropertyName, const un
{
SolarMutexGuard aGuard;
- if(pLayer == NULL || pLayerManager == NULL)
+ if(pLayer == nullptr || pLayerManager == nullptr)
throw lang::DisposedException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMapEntry(aPropertyName);
@@ -248,7 +248,7 @@ uno::Any SAL_CALL SdLayer::getPropertyValue( const OUString& PropertyName )
{
SolarMutexGuard aGuard;
- if(pLayer == NULL || pLayerManager == NULL)
+ if(pLayer == nullptr || pLayerManager == nullptr)
throw lang::DisposedException();
const SfxItemPropertySimpleEntry* pEntry = pPropSet->getPropertyMapEntry(PropertyName);
@@ -296,7 +296,7 @@ bool SdLayer::get( LayerAttribute what ) throw()
{
// Try 1. is an arbitrary page open?
::sd::View *pView = pLayerManager->GetView();
- SdrPageView* pSdrPageView = NULL;
+ SdrPageView* pSdrPageView = nullptr;
if(pView)
pSdrPageView = pView->GetSdrPageView();
@@ -333,7 +333,7 @@ void SdLayer::set( LayerAttribute what, bool flag ) throw()
{
// Try 1. is an arbitrary page open?
::sd::View *pView = pLayerManager->GetView();
- SdrPageView* pSdrPageView = NULL;
+ SdrPageView* pSdrPageView = nullptr;
if(pView)
pSdrPageView = pView->GetSdrPageView();
@@ -393,7 +393,7 @@ uno::Reference<uno::XInterface> SAL_CALL SdLayer::getParent()
{
SolarMutexGuard aGuard;
- if( pLayerManager == NULL )
+ if( pLayerManager == nullptr )
throw lang::DisposedException();
return uno::Reference<uno::XInterface> (mxLayerManager, uno::UNO_QUERY);
@@ -409,9 +409,9 @@ void SAL_CALL SdLayer::setParent (const uno::Reference<uno::XInterface >& )
// XComponent
void SAL_CALL SdLayer::dispose( ) throw (uno::RuntimeException, std::exception)
{
- pLayerManager = 0;
- mxLayerManager = 0;
- pLayer = 0;
+ pLayerManager = nullptr;
+ mxLayerManager = nullptr;
+ pLayer = nullptr;
}
void SAL_CALL SdLayer::addEventListener( const uno::Reference< lang::XEventListener >& ) throw (uno::RuntimeException, std::exception)
@@ -442,13 +442,13 @@ UNO3_GETIMPLEMENTATION_IMPL( SdLayerManager );
// XComponent
void SAL_CALL SdLayerManager::dispose( ) throw (uno::RuntimeException, std::exception)
{
- mpModel = 0;
+ mpModel = nullptr;
if( mpLayers )
{
mpLayers->dispose();
delete mpLayers;
- mpLayers = 0;
+ mpLayers = nullptr;
}
}
@@ -489,7 +489,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::insertNewByIndex( sal
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
uno::Reference< drawing::XLayer > xLayer;
@@ -523,7 +523,7 @@ void SAL_CALL SdLayerManager::remove( const uno::Reference< drawing::XLayer >& x
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
SdLayer* pSdLayer = SdLayer::getImplementation(xLayer);
@@ -544,16 +544,16 @@ void SAL_CALL SdLayerManager::attachShapeToLayer( const uno::Reference< drawing:
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
SdLayer* pSdLayer = SdLayer::getImplementation(xLayer);
- SdrLayer* pSdrLayer = pSdLayer?pSdLayer->GetSdrLayer():NULL;
- if(pSdrLayer==NULL)
+ SdrLayer* pSdrLayer = pSdLayer?pSdLayer->GetSdrLayer():nullptr;
+ if(pSdrLayer==nullptr)
return;
SvxShape* pShape = SvxShape::getImplementation( xShape );
- SdrObject* pSdrObject = pShape?pShape->GetSdrObject():NULL;
+ SdrObject* pSdrObject = pShape?pShape->GetSdrObject():nullptr;
if(pSdrObject && pSdrLayer )
pSdrObject->SetLayer(pSdrLayer->GetID());
@@ -565,7 +565,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::getLayerForShape( con
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
uno::Reference< drawing::XLayer > xLayer;
@@ -573,7 +573,7 @@ uno::Reference< drawing::XLayer > SAL_CALL SdLayerManager::getLayerForShape( con
if(mpModel->mpDoc)
{
SvxShape* pShape = SvxShape::getImplementation( xShape );
- SdrObject* pObj = pShape?pShape->GetSdrObject():NULL;
+ SdrObject* pObj = pShape?pShape->GetSdrObject():nullptr;
if(pObj)
{
SdrLayerID aId = pObj->GetLayer();
@@ -590,7 +590,7 @@ sal_Int32 SAL_CALL SdLayerManager::getCount()
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
if( mpModel->mpDoc )
@@ -607,7 +607,7 @@ uno::Any SAL_CALL SdLayerManager::getByIndex( sal_Int32 nLayer )
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
if( nLayer >= getCount() || nLayer < 0 )
@@ -630,12 +630,12 @@ uno::Any SAL_CALL SdLayerManager::getByName( const OUString& aName )
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpModel->mpDoc == 0 ) )
+ if( (mpModel == nullptr) || (mpModel->mpDoc == nullptr ) )
throw lang::DisposedException();
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
SdrLayer* pLayer = rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), false );
- if( pLayer == NULL )
+ if( pLayer == nullptr )
throw container::NoSuchElementException();
return uno::Any( GetLayer (pLayer) );
@@ -646,7 +646,7 @@ uno::Sequence< OUString > SAL_CALL SdLayerManager::getElementNames()
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
@@ -670,12 +670,12 @@ sal_Bool SAL_CALL SdLayerManager::hasByName( const OUString& aName ) throw(uno::
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
SdrLayerAdmin& rLayerAdmin = mpModel->mpDoc->GetLayerAdmin();
- return NULL != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), false );
+ return nullptr != rLayerAdmin.GetLayer( SdLayer::convertToInternalName( aName ), false );
}
// XElementAccess
@@ -721,7 +721,7 @@ void SdLayerManager::UpdateLayerView( bool modify ) const throw()
if(pViewSh)
return pViewSh->GetView();
}
- return NULL;
+ return nullptr;
}
namespace
@@ -742,7 +742,7 @@ bool compare_layers (uno::WeakReference<uno::XInterface> xRef, void* pSearchData
if (xLayer.is())
{
SdLayer* pSdLayer = SdLayer::getImplementation (xRef);
- if (pSdLayer != NULL)
+ if (pSdLayer != nullptr)
{
SdrLayer* pSdrLayer = pSdLayer->GetSdrLayer ();
if (pSdrLayer == static_cast<SdrLayer*>(pSearchData))
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index d1d352cbf855..896ba6c37e55 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -160,7 +160,7 @@ void SdUnoForbiddenCharsTable::Notify( SfxBroadcaster&, const SfxHint& rHint ) t
{
if( HINT_MODELCLEARED == pSdrHint->GetKind() )
{
- mpModel = NULL;
+ mpModel = nullptr;
}
}
}
@@ -209,7 +209,7 @@ const SvxItemPropertySet* ImplGetDrawModelPropertySet()
SdXImpressDocument::SdXImpressDocument (::sd::DrawDocShell* pShell, bool bClipBoard ) throw()
: SfxBaseModel( pShell ),
mpDocShell( pShell ),
- mpDoc( pShell ? pShell->GetDoc() : NULL ),
+ mpDoc( pShell ? pShell->GetDoc() : nullptr ),
mbDisposed(false),
mbImpressDoc( pShell && pShell->GetDoc() && pShell->GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ),
mbClipBoard( bClipBoard ),
@@ -226,8 +226,8 @@ SdXImpressDocument::SdXImpressDocument (::sd::DrawDocShell* pShell, bool bClipBo
}
SdXImpressDocument::SdXImpressDocument( SdDrawDocument* pDoc, bool bClipBoard ) throw()
-: SfxBaseModel( NULL ),
- mpDocShell( NULL ),
+: SfxBaseModel( nullptr ),
+ mpDocShell( nullptr ),
mpDoc( pDoc ),
mbDisposed(false),
mbImpressDoc( pDoc && pDoc->GetDocumentType() == DOCUMENT_TYPE_IMPRESS ),
@@ -336,7 +336,7 @@ SdXImpressDocument* SdXImpressDocument::getImplementation( const uno::Reference<
if( xUT.is() )
return reinterpret_cast<SdXImpressDocument*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( SdXImpressDocument::getUnoTunnelId() )));
else
- return NULL;
+ return nullptr;
}
sal_Int64 SAL_CALL SdXImpressDocument::getSomething( const css::uno::Sequence< sal_Int8 >& rIdentifier ) throw(css::uno::RuntimeException, std::exception)
@@ -421,8 +421,8 @@ void SdXImpressDocument::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
if( mpDoc )
EndListening( *mpDoc );
- mpDoc = NULL;
- mpDocShell = NULL;
+ mpDoc = nullptr;
+ mpDocShell = nullptr;
}
}
else
@@ -462,7 +462,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
sal_uInt8 aBckgrnd = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), false);
sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
- SdPage* pStandardPage = NULL;
+ SdPage* pStandardPage = nullptr;
if( 0 == nPageCount )
{
@@ -530,7 +530,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
/**************************************************************
* notes page
**************************************************************/
- SdPage* pNotesPage = NULL;
+ SdPage* pNotesPage = nullptr;
if( bDuplicate )
pNotesPage = static_cast<SdPage*>( pPreviousNotesPage->Clone() );
@@ -575,7 +575,7 @@ void SAL_CALL SdXImpressDocument ::lockControllers( )
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
mpDoc->setLock(true);
@@ -586,7 +586,7 @@ void SAL_CALL SdXImpressDocument::unlockControllers( )
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
if( mpDoc->isLocked() )
@@ -600,7 +600,7 @@ sal_Bool SAL_CALL SdXImpressDocument::hasControllersLocked( )
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
return mpDoc && mpDoc->isLocked();
@@ -612,7 +612,7 @@ uno::Reference < container::XIndexAccess > SAL_CALL SdXImpressDocument::getViewD
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference < container::XIndexAccess > xRet( SfxBaseModel::getViewData() );
@@ -648,7 +648,7 @@ void SAL_CALL SdXImpressDocument::setViewData( const uno::Reference < container:
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
SfxBaseModel::setViewData( xData );
@@ -685,7 +685,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::duplicate( con
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
// get pPage from xPage and determine the Id (nPos ) afterwards
@@ -713,7 +713,7 @@ uno::Reference< drawing::XDrawPages > SAL_CALL SdXImpressDocument::getDrawPages(
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< drawing::XDrawPages > xDrawPages( mxDrawPagesAccess );
@@ -733,7 +733,7 @@ uno::Reference< drawing::XDrawPages > SAL_CALL SdXImpressDocument::getMasterPage
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< drawing::XDrawPages > xMasterPages( mxMasterPagesAccess );
@@ -754,7 +754,7 @@ uno::Reference< container::XNameAccess > SAL_CALL SdXImpressDocument::getLayerMa
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< container::XNameAccess > xLayerManager( mxLayerManager );
@@ -771,7 +771,7 @@ uno::Reference< container::XNameContainer > SAL_CALL SdXImpressDocument::getCust
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< container::XNameContainer > xCustomPres( mxCustomPresentationAccess );
@@ -788,7 +788,7 @@ uno::Reference< presentation::XPresentation > SAL_CALL SdXImpressDocument::getPr
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
return uno::Reference< presentation::XPresentation >( mpDoc->getPresentation().get() );
@@ -800,7 +800,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdXImpressDocument::getHandoutMast
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< drawing::XDrawPage > xPage;
@@ -822,7 +822,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
if( aServiceSpecifier == "com.sun.star.drawing.DashTable" )
@@ -958,8 +958,8 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
if( aServiceSpecifier == "com.sun.star.document.ExportEmbeddedObjectResolver" )
{
- ::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : NULL;
- if( NULL == pPersist )
+ ::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : nullptr;
+ if( nullptr == pPersist )
throw lang::DisposedException();
return static_cast<cppu::OWeakObject *>(new SvXMLEmbeddedObjectHelper( *pPersist, EMBEDDEDOBJECTHELPER_MODE_WRITE ));
@@ -967,8 +967,8 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
if( aServiceSpecifier == "com.sun.star.document.ImportEmbeddedObjectResolver" )
{
- ::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : NULL;
- if( NULL == pPersist )
+ ::comphelper::IEmbeddedHelper *pPersist = mpDoc ? mpDoc->GetPersist() : nullptr;
+ if( nullptr == pPersist )
throw lang::DisposedException();
return static_cast<cppu::OWeakObject *>(new SvXMLEmbeddedObjectHelper( *pPersist, EMBEDDEDOBJECTHELPER_MODE_READ ));
@@ -979,7 +979,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
if( aServiceSpecifier.startsWith( "com.sun.star.presentation.") )
{
const OUString aType( aServiceSpecifier.copy(26) );
- SvxShape* pShape = NULL;
+ SvxShape* pShape = nullptr;
sal_uInt16 nType = OBJ_TEXT;
// create a shape wrapper
@@ -1079,7 +1079,7 @@ css::uno::Reference<css::uno::XInterface> SdXImpressDocument::create(
}
uno::Reference< drawing::XShape > xShape( xRet, uno::UNO_QUERY );
- SvxShape* pShape = xShape.is() ? SvxShape::getImplementation(xShape) : NULL;
+ SvxShape* pShape = xShape.is() ? SvxShape::getImplementation(xShape) : nullptr;
if (pShape)
{
xRet.clear();
@@ -1120,7 +1120,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
@@ -1231,7 +1231,7 @@ void SAL_CALL SdXImpressDocument::setPropertyValue( const OUString& aPropertyNam
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(aPropertyName);
@@ -1310,7 +1310,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
::SolarMutexGuard aGuard;
uno::Any aAny;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
const SfxItemPropertySimpleEntry* pEntry = mpPropSet->getPropertyMapEntry(PropertyName);
@@ -1393,7 +1393,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( const OUString& Property
for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
+ if( nullptr != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont = static_cast<const SvxFontItem *>(pItem);
@@ -1440,7 +1440,7 @@ uno::Reference< container::XNameAccess > SAL_CALL SdXImpressDocument::getLinks()
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< container::XNameAccess > xLinks( mxLinks );
@@ -1455,7 +1455,7 @@ uno::Reference< container::XNameAccess > SAL_CALL SdXImpressDocument::getStyleFa
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
uno::Reference< container::XNameAccess > xStyles( dynamic_cast< container::XNameAccess* >( mpDoc->GetStyleSheetPool()) );
@@ -1477,7 +1477,7 @@ sal_Int32 SAL_CALL SdXImpressDocument::getRendererCount( const uno::Any& rSelect
::SolarMutexGuard aGuard;
sal_Int32 nRet = 0;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
if( mpDocShell && mpDoc )
@@ -1507,7 +1507,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SdXImpressDocument::getRenderer(
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
bool bExportNotesPages = false;
@@ -1587,7 +1587,7 @@ sal_Int32 ImplPDFGetBookmarkPage( const OUString& rBookmark, SdDrawDocument& rDo
// is the bookmark a page ?
bool bIsMasterPage;
sal_uInt16 nPgNum = rDoc.GetPageByName( aBookmark, bIsMasterPage );
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
if ( nPgNum == SDRPAGE_NOTFOUND )
{
@@ -1880,7 +1880,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
{
::SolarMutexGuard aGuard;
- if( NULL == mpDoc )
+ if( nullptr == mpDoc )
throw lang::DisposedException();
if( mpDocShell && mpDoc )
@@ -1914,12 +1914,12 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
if ( !( (mpDoc->GetSdPage((sal_Int16) nPageNumber-1, PK_STANDARD))->IsExcluded() ) ||
(pPDFExtOutDevData && pPDFExtOutDevData->GetIsExportHiddenSlides()) )
{
- ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, NULL );
+ ::sd::ClientView* pView = new ::sd::ClientView( mpDocShell, pOut, nullptr );
Rectangle aVisArea = Rectangle( Point(), mpDoc->GetSdPage( (sal_uInt16)nPageNumber - 1, ePageKind )->GetSize() );
vcl::Region aRegion( aVisArea );
::sd::ViewShell* pOldViewSh = mpDocShell->GetViewShell();
- ::sd::View* pOldSdView = pOldViewSh ? pOldViewSh->GetView() : NULL;
+ ::sd::View* pOldSdView = pOldViewSh ? pOldViewSh->GetView() : nullptr;
if ( pOldSdView )
pOldSdView->SdrEndTextEdit();
@@ -1955,7 +1955,7 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
pPV, pPDFExtOutDevData );
// background color for outliner :o
- SdPage* pPage = pPV ? static_cast<SdPage*>(pPV->GetPage()) : NULL;
+ SdPage* pPage = pPV ? static_cast<SdPage*>(pPV->GetPage()) : nullptr;
if( pPage )
{
SdrOutliner& rOutl = mpDoc->GetDrawOutliner();
@@ -2193,10 +2193,10 @@ void SAL_CALL SdXImpressDocument::render( sal_Int32 nRenderer, const uno::Any& r
if( xShapes.is() && xShapes->getCount() )
{
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
ImplRenderPaintProc aImplRenderPaintProc( mpDoc->GetLayerAdmin(),
- pOldSdView ? pOldSdView->GetSdrPageView() : NULL, pPDFExtOutDevData );
+ pOldSdView ? pOldSdView->GetSdrPageView() : nullptr, pPDFExtOutDevData );
for( sal_uInt32 i = 0, nCount = xShapes->getCount(); i < nCount; i++ )
{
@@ -2240,7 +2240,7 @@ DrawViewShell* SdXImpressDocument::GetViewShell()
if (!pViewSh)
{
SAL_WARN("sd", "DrawViewShell not available!");
- return NULL;
+ return nullptr;
}
return pViewSh;
}
@@ -2593,7 +2593,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( mpDoc )
{
EndListening( *mpDoc );
- mpDoc = NULL;
+ mpDoc = nullptr;
}
// Call the base class dispose() before setting the mbDisposed flag
@@ -2612,7 +2612,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xStyles = 0;
+ xStyles = nullptr;
}
uno::Reference< presentation::XPresentation > xPresentation( mxPresentation );
@@ -2631,7 +2631,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xLinks = 0;
+ xLinks = nullptr;
}
uno::Reference< drawing::XDrawPages > xDrawPagesAccess( mxDrawPagesAccess );
@@ -2641,7 +2641,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xDrawPagesAccess = 0;
+ xDrawPagesAccess = nullptr;
}
uno::Reference< drawing::XDrawPages > xMasterPagesAccess( mxMasterPagesAccess );
@@ -2651,7 +2651,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xDrawPagesAccess = 0;
+ xDrawPagesAccess = nullptr;
}
uno::Reference< container::XNameAccess > xLayerManager( mxLayerManager );
@@ -2661,7 +2661,7 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xLayerManager = 0;
+ xLayerManager = nullptr;
}
uno::Reference< container::XNameContainer > xCustomPresentationAccess( mxCustomPresentationAccess );
@@ -2671,16 +2671,16 @@ void SAL_CALL SdXImpressDocument::dispose() throw (css::uno::RuntimeException, s
if( xComp.is() )
xComp->dispose();
- xCustomPresentationAccess = 0;
+ xCustomPresentationAccess = nullptr;
}
- mxDashTable = 0;
- mxGradientTable = 0;
- mxHatchTable = 0;
- mxBitmapTable = 0;
- mxTransGradientTable = 0;
- mxMarkerTable = 0;
- mxDrawingPool = 0;
+ mxDashTable = nullptr;
+ mxGradientTable = nullptr;
+ mxHatchTable = nullptr;
+ mxBitmapTable = nullptr;
+ mxTransGradientTable = nullptr;
+ mxMarkerTable = nullptr;
+ mxDrawingPool = nullptr;
}
}
}
@@ -2702,7 +2702,7 @@ sal_Int32 SAL_CALL SdDrawPagesAccess::getCount()
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
return mpModel->mpDoc->GetSdPageCount( PK_STANDARD );
@@ -2713,7 +2713,7 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByIndex( sal_Int32 Index )
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
uno::Any aAny;
@@ -2736,7 +2736,7 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByName( const OUString& aName ) throw(co
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
if( !aName.isEmpty() )
@@ -2746,7 +2746,7 @@ uno::Any SAL_CALL SdDrawPagesAccess::getByName( const OUString& aName ) throw(co
for( nPage = 0; nPage < nCount; nPage++ )
{
SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PK_STANDARD );
- if(NULL == pPage)
+ if(nullptr == pPage)
continue;
if( aName == SdDrawPage::getPageApiName( pPage ) )
@@ -2766,7 +2766,7 @@ uno::Sequence< OUString > SAL_CALL SdDrawPagesAccess::getElementNames() throw(un
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD );
@@ -2787,7 +2787,7 @@ sal_Bool SAL_CALL SdDrawPagesAccess::hasByName( const OUString& aName ) throw(un
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
const sal_uInt16 nCount = mpModel->mpDoc->GetSdPageCount( PK_STANDARD );
@@ -2795,7 +2795,7 @@ sal_Bool SAL_CALL SdDrawPagesAccess::hasByName( const OUString& aName ) throw(un
for( nPage = 0; nPage < nCount; nPage++ )
{
SdPage* pPage = mpModel->mpDoc->GetSdPage( nPage, PK_STANDARD );
- if(NULL == pPage)
+ if(nullptr == pPage)
continue;
if( aName == SdDrawPage::getPageApiName( pPage ) )
@@ -2829,7 +2829,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdDrawPagesAccess::insertNewByInde
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
if( mpModel->mpDoc )
@@ -2855,7 +2855,7 @@ void SAL_CALL SdDrawPagesAccess::remove( const uno::Reference< drawing::XDrawPag
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel || mpModel->mpDoc == NULL )
+ if( nullptr == mpModel || mpModel->mpDoc == nullptr )
throw lang::DisposedException();
SdDrawDocument& rDoc = *mpModel->mpDoc;
@@ -2926,7 +2926,7 @@ uno::Sequence< OUString > SAL_CALL SdDrawPagesAccess::getSupportedServiceNames(
// XComponent
void SAL_CALL SdDrawPagesAccess::dispose( ) throw (uno::RuntimeException, std::exception)
{
- mpModel = NULL;
+ mpModel = nullptr;
}
void SAL_CALL SdDrawPagesAccess::addEventListener( const uno::Reference< lang::XEventListener >& ) throw (uno::RuntimeException, std::exception)
@@ -2953,7 +2953,7 @@ SdMasterPagesAccess::~SdMasterPagesAccess() throw()
// XComponent
void SAL_CALL SdMasterPagesAccess::dispose( ) throw (uno::RuntimeException, std::exception)
{
- mpModel = NULL;
+ mpModel = nullptr;
}
void SAL_CALL SdMasterPagesAccess::addEventListener( const uno::Reference< lang::XEventListener >& ) throw (uno::RuntimeException, std::exception)
@@ -2972,7 +2972,7 @@ sal_Int32 SAL_CALL SdMasterPagesAccess::getCount()
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel->mpDoc )
+ if( nullptr == mpModel->mpDoc )
throw lang::DisposedException();
return mpModel->mpDoc->GetMasterSdPageCount(PK_STANDARD);
@@ -2987,7 +2987,7 @@ uno::Any SAL_CALL SdMasterPagesAccess::getByIndex( sal_Int32 Index )
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
uno::Any aAny;
@@ -3024,7 +3024,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
uno::Reference< drawing::XDrawPage > xDrawPage;
@@ -3120,13 +3120,13 @@ void SAL_CALL SdMasterPagesAccess::remove( const uno::Reference< drawing::XDrawP
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel || mpModel->mpDoc == NULL )
+ if( nullptr == mpModel || mpModel->mpDoc == nullptr )
throw lang::DisposedException();
SdDrawDocument& rDoc = *mpModel->mpDoc;
SdMasterPage* pSdPage = SdMasterPage::getImplementation( xPage );
- if(pSdPage == NULL)
+ if(pSdPage == nullptr)
return;
SdPage* pPage = dynamic_cast< SdPage* > (pSdPage->GetSdrPage());
@@ -3203,7 +3203,7 @@ SdDocLinkTargets::~SdDocLinkTargets() throw()
// XComponent
void SAL_CALL SdDocLinkTargets::dispose( ) throw (uno::RuntimeException, std::exception)
{
- mpModel = NULL;
+ mpModel = nullptr;
}
void SAL_CALL SdDocLinkTargets::addEventListener( const uno::Reference< lang::XEventListener >& ) throw (uno::RuntimeException, std::exception)
@@ -3222,12 +3222,12 @@ uno::Any SAL_CALL SdDocLinkTargets::getByName( const OUString& aName )
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
SdPage* pPage = FindPage( aName );
- if( pPage == NULL )
+ if( pPage == nullptr )
throw container::NoSuchElementException();
uno::Any aAny;
@@ -3244,11 +3244,11 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
SdDrawDocument* mpDoc = mpModel->GetDoc();
- if( mpDoc == NULL )
+ if( mpDoc == nullptr )
{
uno::Sequence< OUString > aSeq;
return aSeq;
@@ -3297,10 +3297,10 @@ sal_Bool SAL_CALL SdDocLinkTargets::hasByName( const OUString& aName )
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
- return FindPage( aName ) != NULL;
+ return FindPage( aName ) != nullptr;
}
// container::XElementAccess
@@ -3315,17 +3315,17 @@ sal_Bool SAL_CALL SdDocLinkTargets::hasElements()
{
::SolarMutexGuard aGuard;
- if( NULL == mpModel )
+ if( nullptr == mpModel )
throw lang::DisposedException();
- return mpModel->GetDoc() != NULL;
+ return mpModel->GetDoc() != nullptr;
}
SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exception)
{
SdDrawDocument* mpDoc = mpModel->GetDoc();
- if( mpDoc == NULL )
- return NULL;
+ if( mpDoc == nullptr )
+ return nullptr;
const sal_uInt16 nMaxPages = mpDoc->GetPageCount();
const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterPageCount();
@@ -3353,7 +3353,7 @@ SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exc
return pPage;
}
- return NULL;
+ return nullptr;
}
// XServiceInfo
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 2bbacf26786e..7ad4f504b999 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -187,7 +187,7 @@ using ::com::sun::star::drawing::XShape;
}
static const SfxItemPropertyMapEntry* lcl_ImplGetShapePropertyMap( bool bImpress, bool bGraphicObj )
{
- const SfxItemPropertyMapEntry* pRet = 0;
+ const SfxItemPropertyMapEntry* pRet = nullptr;
if( bImpress )
{
if( bGraphicObj )
@@ -207,7 +207,7 @@ using ::com::sun::star::drawing::XShape;
}
static const SvxItemPropertySet* lcl_ImplGetShapePropertySet( bool bImpress, bool bGraphicObj )
{
- const SvxItemPropertySet* pRet = 0;
+ const SvxItemPropertySet* pRet = nullptr;
if( bImpress )
{
if( bGraphicObj )
@@ -256,7 +256,7 @@ const SvEventDescription* ImplGetSupportedMacroItems()
{
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
return aMacroDescriptionsImpl;
@@ -293,7 +293,7 @@ SdXShape::~SdXShape() throw()
void SdXShape::dispose()
{
- mpShape->setMaster( NULL );
+ mpShape->setMaster( nullptr );
delete this;
}
@@ -370,7 +370,7 @@ beans::PropertyState SAL_CALL SdXShape::getPropertyState( const OUString& Proper
else
{
SdrObject* pObj = mpShape->GetSdrObject();
- if( pObj == NULL || ( pObj->GetPage()->IsMasterPage() && pObj->IsEmptyPresObj() ) )
+ if( pObj == nullptr || ( pObj->GetPage()->IsMasterPage() && pObj->IsEmptyPresObj() ) )
return beans::PropertyState_DEFAULT_VALUE;
return mpShape->_getPropertyState( PropertyName );
@@ -515,7 +515,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c
if(bIsAnimation)
{
SdrObjGroup* pGroup = dynamic_cast< SdrObjGroup* >(pObj);
- SdPage* pPage = pGroup ? dynamic_cast< SdPage* >(pGroup->GetPage()) : NULL;
+ SdPage* pPage = pGroup ? dynamic_cast< SdPage* >(pGroup->GetPage()) : nullptr;
if (pPage)
{
@@ -639,9 +639,9 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c
case WID_ANIMPATH:
{
uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY );
- SdrPathObj* pObj2 = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : NULL;
+ SdrPathObj* pObj2 = xShape.is() ? dynamic_cast< SdrPathObj* >( GetSdrObjectFromXShape( xShape ) ) : nullptr;
- if( pObj2 == NULL )
+ if( pObj2 == nullptr )
throw lang::IllegalArgumentException();
EffectMigration::SetAnimationPath( mpShape, pObj2 );
@@ -649,7 +649,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c
}
case WID_IMAGEMAP:
{
- SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;
+ SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():nullptr;
if( pDoc )
{
ImageMap aImageMap;
@@ -748,7 +748,7 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName
case WID_BOOKMARK:
{
OUString aString;
- SdDrawDocument* pDoc = mpModel ? mpModel->GetDoc() : NULL;
+ SdDrawDocument* pDoc = mpModel ? mpModel->GetDoc() : nullptr;
if (pInfo && pDoc)
{
// is the bookmark a page?
@@ -818,7 +818,7 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName
{
uno::Reference< uno::XInterface > xImageMap;
- SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;
+ SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():nullptr;
if( pDoc )
{
@@ -861,7 +861,7 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const OUString& PropertyName
SdAnimationInfo* SdXShape::GetAnimationInfo( bool bCreate ) const
throw (std::exception)
{
- SdAnimationInfo* pInfo = NULL;
+ SdAnimationInfo* pInfo = nullptr;
SdrObject* pObj = mpShape->GetSdrObject();
if(pObj)
@@ -914,11 +914,11 @@ bool SdXShape::IsPresObj() const
bool SdXShape::IsEmptyPresObj() const throw()
{
SdrObject* pObj = mpShape->GetSdrObject();
- if( (pObj != NULL) && pObj->IsEmptyPresObj() )
+ if( (pObj != nullptr) && pObj->IsEmptyPresObj() )
{
// check if the object is in edit, than its temporarily not empty
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
- if( pTextObj == 0 )
+ if( pTextObj == nullptr )
return true;
OutlinerParaObject* pParaObj = pTextObj->GetEditOutlinerParaObject();
@@ -942,12 +942,12 @@ OUString SdXShape::GetPlaceholderText() const
return OUString();
SdrObject* pObj = mpShape->GetSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
return OUString();
SdPage* pPage = dynamic_cast< SdPage* >(pObj->GetPage());
DBG_ASSERT( pPage, "no page?" );
- if( pPage == NULL )
+ if( pPage == nullptr )
return OUString();
return pPage->GetPresObjText( pPage->GetPresObjKind(pObj) );
@@ -963,7 +963,7 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
return;
SdrObject* pObj = mpShape->GetSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
return;
if( pObj->IsEmptyPresObj() != bEmpty )
@@ -974,7 +974,7 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
const bool bVertical = pOutlinerParaObject && pOutlinerParaObject->IsVertical();
// really delete SdrOutlinerObj at pObj
- pObj->NbcSetOutlinerParaObject(0L);
+ pObj->NbcSetOutlinerParaObject(nullptr);
if( bVertical && dynamic_cast<SdrTextObj*>( pObj ) )
static_cast<SdrTextObj*>(pObj)->SetVerticalWriting( true );
@@ -989,7 +989,7 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
SdrOle2Obj* pOleObj = dynamic_cast< SdrOle2Obj* >( pObj );
if( pOleObj )
{
- pOleObj->SetGraphic( NULL );
+ pOleObj->SetGraphic( nullptr );
}
}
}
@@ -1000,19 +1000,19 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
// first paragraph
do
{
- SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():NULL;
+ SdDrawDocument* pDoc = mpModel?mpModel->GetDoc():nullptr;
DBG_ASSERT( pDoc, "no document?" );
- if( pDoc == NULL)
+ if( pDoc == nullptr)
break;
::sd::Outliner* pOutliner = pDoc->GetInternalOutliner();
DBG_ASSERT( pOutliner, "no outliner?" );
- if( pOutliner == NULL )
+ if( pOutliner == nullptr )
break;
SdPage* pPage = dynamic_cast< SdPage* >(pObj->GetPage());
DBG_ASSERT( pPage, "no page?" );
- if( pPage == NULL )
+ if( pPage == nullptr )
break;
OutlinerParaObject* pOutlinerParaObject = pObj->GetOutlinerParaObject();
@@ -1037,7 +1037,7 @@ void SdXShape::SetEmptyPresObj(bool bEmpty)
bool SdXShape::IsMasterDepend() const throw()
{
SdrObject* pObj = mpShape->GetSdrObject();
- return pObj && pObj->GetUserCall() != NULL;
+ return pObj && pObj->GetUserCall() != nullptr;
}
void SdXShape::SetMasterDepend( bool bDepend ) throw()
@@ -1054,7 +1054,7 @@ void SdXShape::SetMasterDepend( bool bDepend ) throw()
}
else
{
- pObj->SetUserCall( NULL );
+ pObj->SetUserCall( nullptr );
}
}
}
@@ -1063,7 +1063,7 @@ void SdXShape::SetMasterDepend( bool bDepend ) throw()
void SdXShape::SetStyleSheet( const uno::Any& rAny ) throw( lang::IllegalArgumentException, beans::UnknownPropertyException, uno::RuntimeException )
{
SdrObject* pObj = mpShape->GetSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
throw beans::UnknownPropertyException();
uno::Reference< style::XStyle > xStyle( rAny, uno::UNO_QUERY );
@@ -1072,16 +1072,16 @@ void SdXShape::SetStyleSheet( const uno::Any& rAny ) throw( lang::IllegalArgumen
const SfxStyleSheet* pOldStyleSheet = pObj->GetStyleSheet();
if( pOldStyleSheet != pStyleSheet )
{
- if( pStyleSheet == 0 || (pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_MASTERPAGE) )
+ if( pStyleSheet == nullptr || (pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS && pStyleSheet->GetFamily() != SD_STYLE_FAMILY_MASTERPAGE) )
throw lang::IllegalArgumentException();
pObj->SetStyleSheet( pStyleSheet, false );
- SdDrawDocument* pDoc = mpModel? mpModel->GetDoc() : NULL;
+ SdDrawDocument* pDoc = mpModel? mpModel->GetDoc() : nullptr;
if( pDoc )
{
::sd::DrawDocShell* pDocSh = pDoc->GetDocSh();
- ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : NULL;
+ ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : nullptr;
if( pViewSh )
pViewSh->GetViewFrame()->GetBindings().Invalidate( SID_STYLE_FAMILY2 );
@@ -1092,13 +1092,13 @@ void SdXShape::SetStyleSheet( const uno::Any& rAny ) throw( lang::IllegalArgumen
uno::Any SdXShape::GetStyleSheet() const throw( beans::UnknownPropertyException )
{
SdrObject* pObj = mpShape->GetSdrObject();
- if( pObj == NULL )
+ if( pObj == nullptr )
throw beans::UnknownPropertyException();
SfxStyleSheet* pStyleSheet = pObj->GetStyleSheet();
// it is possible for shapes inside a draw to have a presentation style
// but we don't want this for the api
- if( (pStyleSheet == NULL) || ((pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS) && !mpModel->IsImpressDocument()) )
+ if( (pStyleSheet == nullptr) || ((pStyleSheet->GetFamily() != SD_STYLE_FAMILY_GRAPHICS) && !mpModel->IsImpressDocument()) )
return Any();
return Any( uno::Reference< style::XStyle >( dynamic_cast< SfxUnoStyleSheet* >( pStyleSheet ) ) );
@@ -1199,7 +1199,7 @@ static void clearEventsInAnimationInfo( SdAnimationInfo* pInfo )
void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno::Any& aElement )
throw(lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
- if( mpShape == NULL || aName != maStrOnClick )
+ if( mpShape == nullptr || aName != maStrOnClick )
throw container::NoSuchElementException();
uno::Sequence< beans::PropertyValue > aProperties;
@@ -1320,17 +1320,17 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
break;
SdAnimationInfo* pInfo = mpShape->GetAnimationInfo();
- if( presentation::ClickAction_NONE == eClickAction && NULL == pInfo )
+ if( presentation::ClickAction_NONE == eClickAction && nullptr == pInfo )
{
bOk = true;
break;
}
- if( NULL == pInfo )
+ if( nullptr == pInfo )
pInfo = mpShape->GetAnimationInfo( true );
DBG_ASSERT( pInfo, "shape animation info could not be created!" );
- if( NULL == pInfo )
+ if( nullptr == pInfo )
break;
clearEventsInAnimationInfo( pInfo );
@@ -1422,7 +1422,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
SdAnimationInfo* pInfo = mpShape->GetAnimationInfo( true );
DBG_ASSERT( pInfo, "shape animation info could not be created!" );
- if( NULL == pInfo )
+ if( nullptr == pInfo )
break;
clearEventsInAnimationInfo( pInfo );
@@ -1472,7 +1472,7 @@ void SAL_CALL SdUnoEventsAccess::replaceByName( const OUString& aName, const uno
uno::Any SAL_CALL SdUnoEventsAccess::getByName( const OUString& aName )
throw(container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
- if( mpShape == NULL || aName != maStrOnClick )
+ if( mpShape == nullptr || aName != maStrOnClick )
throw container::NoSuchElementException();
SdAnimationInfo* pInfo = mpShape->GetAnimationInfo();
@@ -1734,7 +1734,7 @@ void SdXShape::modelChanged( SdrModel* pNewModel )
}
else
{
- mpModel = 0;
+ mpModel = nullptr;
}
}
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 5010430b412a..35a42d7532f4 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -217,7 +217,7 @@ const SvxItemPropertySet* ImplGetDrawPagePropertySet( bool bImpress, PageKind eP
};
bool bWithoutBackground = ePageKind != PK_STANDARD && ePageKind != PK_HANDOUT;
- const SvxItemPropertySet* pRet = 0;
+ const SvxItemPropertySet* pRet = nullptr;
if( bImpress )
{
if( ePageKind == PK_STANDARD )
@@ -303,7 +303,7 @@ const SvxItemPropertySet* ImplGetMasterPagePropertySet( PageKind ePageKind )
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
- const SvxItemPropertySet* pRet = 0;
+ const SvxItemPropertySet* pRet = nullptr;
if( ePageKind == PK_HANDOUT )
{
static SvxItemPropertySet aHandoutMasterPagePropertySet_Impl( aHandoutMasterPagePropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() );
@@ -344,7 +344,7 @@ SdGenericDrawPage::SdGenericDrawPage( SdXImpressDocument* _pModel, SdPage* pInPa
: SvxFmDrawPage( static_cast<SdrPage*>(pInPage) ),
SdUnoSearchReplaceShape(this),
mpModel ( _pModel ),
- mpSdrModel(0),
+ mpSdrModel(nullptr),
mnTempPageNumber(0),
mpPropSet ( _pSet ),
mbIsImpressDocument(false)
@@ -361,7 +361,7 @@ SdGenericDrawPage::~SdGenericDrawPage() throw()
void SdGenericDrawPage::throwIfDisposed() const throw (css::uno::RuntimeException )
{
- if( (SvxFmDrawPage::mpModel == 0) || (mpModel == 0) || (SvxFmDrawPage::mpPage == 0) )
+ if( (SvxFmDrawPage::mpModel == nullptr) || (mpModel == nullptr) || (SvxFmDrawPage::mpPage == nullptr) )
throw lang::DisposedException();
}
@@ -379,7 +379,7 @@ SdXImpressDocument* SdGenericDrawPage::GetModel() const
}
else
{
- const_cast< SdGenericDrawPage* >(this)->mpModel = 0;
+ const_cast< SdGenericDrawPage* >(this)->mpModel = nullptr;
}
}
@@ -390,8 +390,8 @@ SdXImpressDocument* SdGenericDrawPage::GetModel() const
SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShape >& xShape )
throw (css::uno::RuntimeException, std::exception)
{
- if( NULL == SvxFmDrawPage::mpPage || !xShape.is() )
- return NULL;
+ if( nullptr == SvxFmDrawPage::mpPage || !xShape.is() )
+ return nullptr;
OUString aType( xShape->getShapeType() );
const OUString aPrefix( "com.sun.star.presentation." );
@@ -506,7 +506,7 @@ SdrObject * SdGenericDrawPage::_CreateSdrObject( const Reference< drawing::XShap
const awt::Size aSize( aRect.GetWidth(), aRect.GetHeight() );
xShape->setSize( aSize );
- SdrObject *pPresObj = 0;
+ SdrObject *pPresObj = nullptr;
if( (eObjKind == PRESOBJ_TABLE) || (eObjKind == PRESOBJ_MEDIA) )
{
pPresObj = SvxFmDrawPage::_CreateSdrObject( xShape );
@@ -1122,7 +1122,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
xMetaFile->SetPrefSize( aSize );
SvMemoryStream aDestStrm( 65535, 65535 );
- ConvertGDIMetaFileToWMF( *xMetaFile, aDestStrm, NULL, false );
+ ConvertGDIMetaFileToWMF( *xMetaFile, aDestStrm, nullptr, false );
Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aDestStrm.GetData()), aDestStrm.Tell() );
aAny <<= aSeq;
}
@@ -1386,7 +1386,7 @@ Reference< drawing::XShape > SdGenericDrawPage::_CreateShape(SdrObject *pObj) c
{
PresObjKind eKind = GetPage()->GetPresObjKind(pObj);
- SvxShape* pShape = NULL;
+ SvxShape* pShape = nullptr;
if(pObj->GetObjInventor() == SdrInventor)
{
@@ -1583,7 +1583,7 @@ Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::combine( const Referenc
DBG_ASSERT(mpView, "SdrView ist NULL! [CL]");
Reference< drawing::XShape > xShape;
- if(mpView==NULL||!xShapes.is()||GetPage()==NULL)
+ if(mpView==nullptr||!xShapes.is()||GetPage()==nullptr)
return xShape;
SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
@@ -1615,7 +1615,7 @@ void SAL_CALL SdGenericDrawPage::split( const Reference< drawing::XShape >& xGro
throwIfDisposed();
- if(mpView==NULL||!xGroup.is()||GetPage()==NULL)
+ if(mpView==nullptr||!xGroup.is()||GetPage()==nullptr)
return;
SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
@@ -1634,7 +1634,7 @@ Reference< drawing::XShape > SAL_CALL SdGenericDrawPage::bind( const Reference<
throwIfDisposed();
uno::Reference< drawing::XShape > xShape;
- if(mpView==NULL||!xShapes.is()||GetPage()==NULL)
+ if(mpView==nullptr||!xShapes.is()||GetPage()==nullptr)
return xShape;
SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
@@ -1666,7 +1666,7 @@ void SAL_CALL SdGenericDrawPage::unbind( const Reference< drawing::XShape >& xSh
throwIfDisposed();
- if(mpView==NULL||!xShape.is()||GetPage()==NULL)
+ if(mpView==nullptr||!xShape.is()||GetPage()==nullptr)
return;
SdrPageView* pPageView = mpView->ShowSdrPage( GetPage() );
@@ -1869,7 +1869,7 @@ void SdGenericDrawPage::release() throw()
// XComponent
void SdGenericDrawPage::disposing() throw()
{
- mpModel = 0;
+ mpModel = nullptr;
SvxFmDrawPage::disposing();
}
@@ -1909,7 +1909,7 @@ sal_Bool SAL_CALL SdPageLinkTargets::hasElements()
::SolarMutexGuard aGuard;
SdPage* pPage = mpUnoPage->GetPage();
- if( pPage != NULL )
+ if( pPage != nullptr )
{
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -1936,7 +1936,7 @@ Any SAL_CALL SdPageLinkTargets::getByName( const OUString& aName )
::SolarMutexGuard aGuard;
SdPage* pPage = mpUnoPage->GetPage();
- if( pPage != NULL )
+ if( pPage != nullptr )
{
SdrObject* pObj = FindObject( aName );
if( pObj )
@@ -1957,7 +1957,7 @@ Sequence< OUString > SAL_CALL SdPageLinkTargets::getElementNames()
sal_uInt32 nObjCount = 0;
SdPage* pPage = mpUnoPage->GetPage();
- if( pPage != NULL )
+ if( pPage != nullptr )
{
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
while( aIter.IsMore() )
@@ -1996,14 +1996,14 @@ sal_Bool SAL_CALL SdPageLinkTargets::hasByName( const OUString& aName )
{
::SolarMutexGuard aGuard;
- return FindObject( aName ) != NULL;
+ return FindObject( aName ) != nullptr;
}
SdrObject* SdPageLinkTargets::FindObject( const OUString& rName ) const throw()
{
SdPage* pPage = mpUnoPage->GetPage();
- if( pPage == NULL )
- return NULL;
+ if( pPage == nullptr )
+ return nullptr;
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -2017,7 +2017,7 @@ SdrObject* SdPageLinkTargets::FindObject( const OUString& rName ) const throw()
return pObj;
}
- return NULL;
+ return nullptr;
}
// XServiceInfo
@@ -2063,7 +2063,7 @@ Any SAL_CALL SdDrawPage::queryInterface( const uno::Type & rType )
&& rType == cppu::UnoType<presentation::XPresentationPage>::get() )
{
SdPage * p = dynamic_cast<SdPage *>(SvxDrawPage::mpPage);
- if( p == 0 || p->GetPageKind() != PK_HANDOUT )
+ if( p == nullptr || p->GetPageKind() != PK_HANDOUT )
{
return makeAny( Reference< presentation::XPresentationPage >( this ) );
}
@@ -2318,7 +2318,7 @@ void SAL_CALL SdDrawPage::setName( const OUString& rName )
// fake a mode change to repaint the page tab bar
::sd::DrawDocShell* pDocSh = GetModel()->GetDocShell();
- ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : NULL;
+ ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : nullptr;
if( pViewSh && dynamic_cast< const ::sd::DrawViewShell* >(pViewSh) != nullptr)
{
::sd::DrawViewShell* pDrawViewSh = static_cast<
@@ -2369,7 +2369,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getMasterPage( )
return xPage;
}
- return NULL;
+ return nullptr;
}
void SAL_CALL SdDrawPage::setMasterPage( const Reference< drawing::XDrawPage >& xMasterPage )
@@ -2427,7 +2427,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdDrawPage::getNotesPage()
return xPage;
}
}
- return NULL;
+ return nullptr;
}
// XIndexAccess
@@ -2477,7 +2477,7 @@ void SAL_CALL SdDrawPage::remove( const Reference< drawing::XShape >& xShape )
if( pObj )
{
GetPage()->RemovePresObj(pObj);
- pObj->SetUserCall(NULL);
+ pObj->SetUserCall(nullptr);
}
}
@@ -2815,7 +2815,7 @@ sal_Bool SAL_CALL SdMasterPage::hasElements() throw(uno::RuntimeException, std::
throwIfDisposed();
- if( SvxFmDrawPage::mpPage == NULL )
+ if( SvxFmDrawPage::mpPage == nullptr )
return sal_False;
return SvxFmDrawPage::mpPage->GetObjCount() > 0;
@@ -3036,7 +3036,7 @@ void SAL_CALL SdMasterPage::setName( const OUString& rName )
// fake a mode change to repaint the page tab bar
::sd::DrawDocShell* pDocSh = GetModel()->GetDocShell();
- ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : NULL;
+ ::sd::ViewShell* pViewSh = pDocSh ? pDocSh->GetViewShell() : nullptr;
if( pViewSh && dynamic_cast< const ::sd::DrawViewShell* >(pViewSh) != nullptr )
{
::sd::DrawViewShell* pDrawViewSh =
@@ -3089,7 +3089,7 @@ Reference< drawing::XDrawPage > SAL_CALL SdMasterPage::getNotesPage()
return xPage;
}
}
- return NULL;
+ return nullptr;
}
// XShapes
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 7e1e6bb337e0..e7eb5b75f51a 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -55,7 +55,7 @@ SdUnoPageBackground::SdUnoPageBackground(
SdDrawDocument* pDoc /* = NULL */,
const SfxItemSet* pSet /* = NULL */) throw()
: mpPropSet(ImplGetPageBackgroundPropertySet()),
- mpSet(NULL),
+ mpSet(nullptr),
mpDoc(pDoc)
{
if( pDoc )
@@ -89,8 +89,8 @@ void SdUnoPageBackground::Notify( SfxBroadcaster&, const SfxHint& rHint )
if( pSdrHint->GetKind() == HINT_MODELCLEARED )
{
delete mpSet;
- mpSet = NULL;
- mpDoc = NULL;
+ mpSet = nullptr;
+ mpDoc = nullptr;
}
}
@@ -100,7 +100,7 @@ void SdUnoPageBackground::fillItemSet( SdDrawDocument* pDoc, SfxItemSet& rSet )
{
rSet.ClearItem();
- if( mpSet == NULL )
+ if( mpSet == nullptr )
{
StartListening( *pDoc );
mpDoc = pDoc;
@@ -216,7 +216,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyValue( const OUString& aPropertyNa
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry( aPropertyName );
- if( pEntry == NULL )
+ if( pEntry == nullptr )
{
throw beans::UnknownPropertyException();
}
@@ -274,7 +274,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyValue( const OUString& Propert
uno::Any aAny;
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pEntry == NULL )
+ if( pEntry == nullptr )
{
throw beans::UnknownPropertyException();
}
@@ -332,7 +332,7 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pEntry == NULL )
+ if( pEntry == nullptr )
throw beans::UnknownPropertyException();
if( mpSet )
@@ -365,7 +365,7 @@ beans::PropertyState SAL_CALL SdUnoPageBackground::getPropertyState( const OUStr
}
else
{
- if( NULL == mpPropSet->GetUsrAnyForID(pEntry->nWID) )
+ if( nullptr == mpPropSet->GetUsrAnyForID(pEntry->nWID) )
return beans::PropertyState_DEFAULT_VALUE;
else
return beans::PropertyState_DIRECT_VALUE;
@@ -396,7 +396,7 @@ void SAL_CALL SdUnoPageBackground::setPropertyToDefault( const OUString& Propert
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(PropertyName);
- if( pEntry == NULL )
+ if( pEntry == nullptr )
throw beans::UnknownPropertyException();
if( mpSet )
@@ -419,7 +419,7 @@ uno::Any SAL_CALL SdUnoPageBackground::getPropertyDefault( const OUString& aProp
SolarMutexGuard aGuard;
const SfxItemPropertySimpleEntry* pEntry = getPropertyMapEntry(aPropertyName);
- if( pEntry == NULL || mpSet == NULL )
+ if( pEntry == nullptr || mpSet == nullptr )
throw beans::UnknownPropertyException();
uno::Any aAny;
diff --git a/sd/source/ui/unoidl/unopback.hxx b/sd/source/ui/unoidl/unopback.hxx
index d5b809bd6e3f..fbe41fe87a78 100644
--- a/sd/source/ui/unoidl/unopback.hxx
+++ b/sd/source/ui/unoidl/unopback.hxx
@@ -49,7 +49,7 @@ protected:
const SfxItemPropertySimpleEntry* getPropertyMapEntry( const OUString& rPropertyName ) const throw();
public:
- SdUnoPageBackground( SdDrawDocument* pDoc = NULL, const SfxItemSet* pSet = NULL) throw();
+ SdUnoPageBackground( SdDrawDocument* pDoc = nullptr, const SfxItemSet* pSet = nullptr) throw();
virtual ~SdUnoPageBackground() throw();
// internal
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 882eff87291f..dffab997c61a 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -57,7 +57,7 @@ class SearchContext_impl
SearchContext_impl* mpParent;
public:
- SearchContext_impl( uno::Reference< drawing::XShapes > xShapes, SearchContext_impl* pParent = NULL )
+ SearchContext_impl( uno::Reference< drawing::XShapes > xShapes, SearchContext_impl* pParent = nullptr )
: mxShapes( xShapes ), mnIndex( -1 ), mpParent( pParent ) {}
uno::Reference< drawing::XShape > firstShape()
@@ -86,7 +86,7 @@ public:
*/
SdUnoSearchReplaceShape::SdUnoSearchReplaceShape( drawing::XDrawPage* pPage ) throw()
- : mpShape(NULL)
+ : mpShape(nullptr)
, mpPage(pPage)
{
}
@@ -106,7 +106,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
throw( uno::RuntimeException, std::exception )
{
SdUnoSearchReplaceDescriptor* pDescr = SdUnoSearchReplaceDescriptor::getImplementation( xDesc );
- if( pDescr == NULL )
+ if( pDescr == nullptr )
return 0;
sal_Int32 nFound = 0;
@@ -114,7 +114,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
uno::Reference< drawing::XShapes > xShapes;
uno::Reference< drawing::XShape > xShape;
- SearchContext_impl* pContext = NULL;
+ SearchContext_impl* pContext = nullptr;
if(mpPage)
{
uno::Reference< drawing::XDrawPage > xPage( mpPage );
@@ -128,7 +128,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
}
else
{
- xShapes = NULL;
+ xShapes = nullptr;
}
}
else
@@ -167,7 +167,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
if( pContext )
xShape = pContext->nextShape();
else
- xShape = NULL;
+ xShape = nullptr;
}
// test parent contexts for next shape if none
@@ -184,8 +184,8 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut
else
{
delete pContext;
- pContext = NULL;
- xShape = NULL;
+ pContext = nullptr;
+ xShape = nullptr;
}
}
}
@@ -204,7 +204,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
throw(css::uno::RuntimeException, std::exception)
{
SdUnoSearchReplaceDescriptor* pDescr = SdUnoSearchReplaceDescriptor::getImplementation( xDesc );
- if( pDescr == NULL )
+ if( pDescr == nullptr )
return uno::Reference< container::XIndexAccess > ();
sal_Int32 nSequence = 32;
@@ -217,7 +217,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
uno::Reference< drawing::XShapes > xShapes;
uno::Reference< drawing::XShape > xShape;
- SearchContext_impl* pContext = NULL;
+ SearchContext_impl* pContext = nullptr;
if(mpPage)
{
uno::Reference< drawing::XDrawPage > xPage( mpPage );
@@ -230,7 +230,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
}
else
{
- xShapes = NULL;
+ xShapes = nullptr;
}
}
else
@@ -277,7 +277,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
if( pContext )
xShape = pContext->nextShape();
else
- xShape = NULL;
+ xShape = nullptr;
}
// test parent contexts for next shape if none
@@ -294,8 +294,8 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape:
else
{
delete pContext;
- pContext = NULL;
- xShape = NULL;
+ pContext = nullptr;
+ xShape = nullptr;
}
}
}
@@ -363,7 +363,7 @@ uno::Reference< css::uno::XInterface > SAL_CALL SdUnoSearchReplaceShape::findNex
if(!xFound.is())
{
// we need a new starting range now
- xRange = NULL;
+ xRange = nullptr;
if(mpPage)
{
@@ -379,11 +379,11 @@ uno::Reference< css::uno::XInterface > SAL_CALL SdUnoSearchReplaceShape::findNex
if( xFound2.is() && (xFound2.get() != xCurrentShape.get()) )
xCurrentShape = xFound2;
else
- xCurrentShape = NULL;
+ xCurrentShape = nullptr;
xRange.set( xCurrentShape, uno::UNO_QUERY );
if(!(xCurrentShape.is() && (xRange.is())))
- xRange = NULL;
+ xRange = nullptr;
}
}
else
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index fdd578d15971..fd2b69cca58d 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -76,7 +76,7 @@ namespace {
bool IsWarningOrientation() const
{
- return GetBoolValue(NULL, true);
+ return GetBoolValue(nullptr, true);
}
bool IsPrintPageName() const
@@ -298,11 +298,11 @@ namespace {
// Set the visible layers
SdrPageView* pPageView = rPrintView.GetSdrPageView();
- OSL_ASSERT(pPageView!=NULL);
+ OSL_ASSERT(pPageView!=nullptr);
pPageView->SetVisibleLayers(rVisibleLayers);
pPageView->SetPrintableLayers(rPrintableLayers);
- if (pView!=NULL && bPrintMarkedOnly)
+ if (pView!=nullptr && bPrintMarkedOnly)
pView->DrawMarkedObj(rPrinter);
else
rPrintView.CompleteRedraw(&rPrinter,
@@ -783,7 +783,7 @@ namespace {
{
(void)rViewShell;
SdPage* pPageToPrint = rDocument.GetSdPage(mnPageIndex, mePageKind);
- if (pPageToPrint==NULL)
+ if (pPageToPrint==nullptr)
return;
MapMode aMap (rPrinter.GetMapMode());
@@ -973,7 +973,7 @@ namespace {
int nHangoverCount = 0;
while (aPageObjIter != aHandoutPageObjects.end())
{
- (*aPageObjIter++)->SetReferencedPage(0L);
+ (*aPageObjIter++)->SetReferencedPage(nullptr);
nHangoverCount++;
}
@@ -1036,7 +1036,7 @@ namespace {
while (aShapeIter.IsMore())
{
SdrPathObj* pPathObj = dynamic_cast<SdrPathObj*>(aShapeIter.Next());
- if (pPathObj != NULL)
+ if (pPathObj != nullptr)
pPathObj->SetMergedItem(XLineStyleItem(drawing::LineStyle_SOLID));
}
}
@@ -1134,7 +1134,7 @@ public:
: mxObjectShell(rBase.GetDocShell())
, mrBase(rBase)
, mbIsDisposed(false)
- , mpPrinter(NULL)
+ , mpPrinter(nullptr)
, mpOptions()
, maPrinterPages()
, mpPrintView()
@@ -1155,7 +1155,7 @@ public:
virtual void Notify (SfxBroadcaster& rBroadcaster, const SfxHint& rHint) override
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != NULL
+ if (pSimpleHint != nullptr
&& pSimpleHint->GetId() == SFX_HINT_DYING
&& &rBroadcaster == &static_cast<SfxBroadcaster&>(mrBase))
{
@@ -1252,13 +1252,13 @@ public:
return;
SdDrawDocument* pDocument = pViewShell->GetDoc();
- OSL_ASSERT(pDocument!=NULL);
+ OSL_ASSERT(pDocument!=nullptr);
std::shared_ptr<DrawViewShell> pDrawViewShell(
std::dynamic_pointer_cast<DrawViewShell>(mrBase.GetMainViewShell()));
if (!mpPrintView)
- mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, NULL));
+ mpPrintView.reset(new DrawView(mrBase.GetDocShell(), &rPrinter, nullptr));
if (nIndex<0 || sal::static_int_cast<sal_uInt32>(nIndex)>=maPrinterPages.size())
return;
@@ -1304,7 +1304,7 @@ public:
rPrinter,
*pDocument,
*pViewShell,
- pDrawViewShell ? pDrawViewShell->GetView() : NULL,
+ pDrawViewShell ? pDrawViewShell->GetView() : nullptr,
*mpPrintView,
pViewShell->GetFrameView()->GetVisibleLayers(),
pViewShell->GetFrameView()->GetPrintableLayers());
@@ -1337,7 +1337,7 @@ private:
sal_Int32 GetCurrentPageIndex() const
{
const ViewShell *pShell = mrBase.GetMainViewShell().get();
- const SdPage *pCurrentPage = pShell ? pShell->getCurrentPage() : NULL;
+ const SdPage *pCurrentPage = pShell ? pShell->getCurrentPage() : nullptr;
return pCurrentPage ? (pCurrentPage->GetPageNum()-1)/2 : -1;
}
@@ -1405,7 +1405,7 @@ private:
PrintInfo aInfo (mpPrinter, mpOptions->IsPrintMarkedOnly());
- if (aInfo.mpPrinter!=nullptr && pShell!=NULL)
+ if (aInfo.mpPrinter!=nullptr && pShell!=nullptr)
{
MapMode aMap (aInfo.mpPrinter->GetMapMode());
@@ -1570,17 +1570,17 @@ private:
const sal_Int32 nPageIndex,
const PageKind ePageKind) const
{
- OSL_ASSERT(mrBase.GetDocument() != NULL);
+ OSL_ASSERT(mrBase.GetDocument() != nullptr);
OSL_ASSERT(nPageIndex>=0);
SdPage* pPage = mrBase.GetDocument()->GetSdPage(
sal::static_int_cast<sal_uInt16>(nPageIndex),
ePageKind);
- if (pPage == NULL)
- return NULL;
+ if (pPage == nullptr)
+ return nullptr;
if ( ! pPage->IsExcluded() || mpOptions->IsPrintExcluded())
return pPage;
else
- return NULL;
+ return nullptr;
}
/** Prepare the outline of the document for printing. There is no fixed
@@ -1631,19 +1631,19 @@ private:
pOutliner->Clear();
pOutliner->SetFirstPageNumber(aPages[nIndex]+1);
- Paragraph* pPara = NULL;
+ Paragraph* pPara = nullptr;
sal_Int32 nH (0);
while (nH < nPageH && nIndex<nCount)
{
SdPage* pPage = GetFilteredPage(aPages[nIndex], PK_STANDARD);
++nIndex;
- if (pPage == NULL)
+ if (pPage == nullptr)
continue;
- SdrTextObj* pTextObj = NULL;
+ SdrTextObj* pTextObj = nullptr;
size_t nObj (0);
- while (pTextObj==NULL && nObj < pPage->GetObjCount())
+ while (pTextObj==nullptr && nObj < pPage->GetObjCount())
{
SdrObject* pObj = pPage->GetObj(nObj++);
if (pObj->GetObjInventor() == SdrInventor
@@ -1655,7 +1655,7 @@ private:
pPara = pOutliner->GetParagraph(pOutliner->GetParagraphCount() - 1);
- if (pTextObj!=NULL
+ if (pTextObj!=nullptr
&& !pTextObj->IsEmptyPresObj()
&& pTextObj->GetOutlinerParaObject())
{
@@ -1664,10 +1664,10 @@ private:
else
pOutliner->Insert(OUString());
- pTextObj = NULL;
+ pTextObj = nullptr;
nObj = 0;
- while (pTextObj==NULL && nObj<pPage->GetObjCount())
+ while (pTextObj==nullptr && nObj<pPage->GetObjCount())
{
SdrObject* pObj = pPage->GetObj(nObj++);
if (pObj->GetObjInventor() == SdrInventor
@@ -1686,7 +1686,7 @@ private:
sal_Int32 nParaCount1 = pOutliner->GetParagraphCount();
- if (pTextObj!=NULL
+ if (pTextObj!=nullptr
&& !pTextObj->IsEmptyPresObj()
&& pTextObj->GetOutlinerParaObject())
{
@@ -1699,7 +1699,7 @@ private:
for (sal_Int32 nPara=nParaCount1; nPara<nParaCount2; ++nPara)
{
Paragraph* pP = pOutliner->GetParagraph(nPara);
- if (pP!=NULL && pOutliner->GetDepth(nPara) > 0)
+ if (pP!=nullptr && pOutliner->GetDepth(nPara) > 0)
pOutliner->SetDepth(pP, 0);
}
}
@@ -1709,7 +1709,7 @@ private:
// Remove the last paragraph when that does not fit completely on
// the current page.
- if (nH > nPageH && pPara!=NULL)
+ if (nH > nPageH && pPara!=nullptr)
{
sal_Int32 nCnt = pOutliner->GetAbsPos(
pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) );
@@ -1746,7 +1746,7 @@ private:
void PrepareHandout (PrintInfo& rInfo)
{
SdDrawDocument* pDocument = mrBase.GetDocument();
- OSL_ASSERT(pDocument != NULL);
+ OSL_ASSERT(pDocument != nullptr);
SdPage& rHandoutPage (*pDocument->GetSdPage(0, PK_HANDOUT));
const bool bScalePage (mpOptions->IsPageSize());
@@ -1903,7 +1903,7 @@ private:
++it)
{
SdPage* pPage = GetFilteredPage(*it, ePageKind);
- if (pPage == NULL)
+ if (pPage == nullptr)
continue;
MapMode aMap (rInfo.maMap);
@@ -2030,7 +2030,7 @@ private:
++it)
{
SdPage* pPage = GetFilteredPage(*it, ePageKind);
- if (pPage != NULL)
+ if (pPage != nullptr)
aPageVector.push_back(*it);
}
diff --git a/sd/source/ui/view/FormShellManager.cxx b/sd/source/ui/view/FormShellManager.cxx
index 37c2352ec6d8..d978012620e1 100644
--- a/sd/source/ui/view/FormShellManager.cxx
+++ b/sd/source/ui/view/FormShellManager.cxx
@@ -49,11 +49,11 @@ private:
FormShellManager::FormShellManager (ViewShellBase& rBase)
: mrBase(rBase),
- mpFormShell(NULL),
+ mpFormShell(nullptr),
mbFormShellAboveViewShell(false),
mpSubShellFactory(),
mbIsMainViewChangePending(false),
- mpMainViewShellWindow(NULL)
+ mpMainViewShellWindow(nullptr)
{
// Register at the EventMultiplexer to be informed about changes in the
// center pane.
@@ -69,17 +69,17 @@ FormShellManager::FormShellManager (ViewShellBase& rBase)
FormShellManager::~FormShellManager()
{
- SetFormShell(NULL);
+ SetFormShell(nullptr);
UnregisterAtCenterPane();
// Unregister from the EventMultiplexer.
Link<sd::tools::EventMultiplexerEvent&,void> aLink (LINK(this, FormShellManager, ConfigurationUpdateHandler));
mrBase.GetEventMultiplexer()->RemoveEventListener(aLink);
- if (mpSubShellFactory.get() != NULL)
+ if (mpSubShellFactory.get() != nullptr)
{
ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
mrBase.GetViewShellManager()->RemoveSubShellFactory(pShell,mpSubShellFactory);
}
}
@@ -89,17 +89,17 @@ void FormShellManager::SetFormShell (FmFormShell* pFormShell)
if (mpFormShell != pFormShell)
{
// Disconnect from the old form shell.
- if (mpFormShell != NULL)
+ if (mpFormShell != nullptr)
{
mpFormShell->SetControlActivationHandler(Link<LinkParamNone*,void>());
EndListening(*mpFormShell);
- mpFormShell->SetView(NULL);
+ mpFormShell->SetView(nullptr);
}
mpFormShell = pFormShell;
// Connect to the new form shell.
- if (mpFormShell != NULL)
+ if (mpFormShell != nullptr)
{
mpFormShell->SetControlActivationHandler(
LINK(
@@ -109,7 +109,7 @@ void FormShellManager::SetFormShell (FmFormShell* pFormShell)
StartListening(*mpFormShell);
ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
{
// Prevent setting the view twice at the FmFormShell.
FmFormView* pFormView = static_cast<FmFormView*>(pMainViewShell->GetView());
@@ -129,7 +129,7 @@ void FormShellManager::SetFormShell (FmFormShell* pFormShell)
void FormShellManager::RegisterAtCenterPane()
{
ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell == NULL)
+ if (pShell == nullptr)
return;
// No form shell for the slide sorter. Besides that it is not
@@ -150,7 +150,7 @@ void FormShellManager::RegisterAtCenterPane()
WindowEventHandler));
// Create a shell factory and with it activate the form shell.
- OSL_ASSERT(mpSubShellFactory.get()==NULL);
+ OSL_ASSERT(mpSubShellFactory.get()==nullptr);
mpSubShellFactory.reset(new FormShellManagerFactory(*pShell, *this));
mrBase.GetViewShellManager()->AddSubShellFactory(pShell,mpSubShellFactory);
mrBase.GetViewShellManager()->ActivateSubShell(*pShell, RID_FORMLAYER_TOOLBOX);
@@ -166,15 +166,15 @@ void FormShellManager::UnregisterAtCenterPane()
this,
FormShellManager,
WindowEventHandler));
- mpMainViewShellWindow = NULL;
+ mpMainViewShellWindow = nullptr;
}
// Unregister form at the form shell.
- SetFormShell(NULL);
+ SetFormShell(nullptr);
// Deactivate the form shell and destroy the shell factory.
ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
{
mrBase.GetViewShellManager()->DeactivateSubShell(*pShell, RID_FORMLAYER_TOOLBOX);
mrBase.GetViewShellManager()->RemoveSubShellFactory(pShell, mpSubShellFactory);
@@ -189,7 +189,7 @@ IMPL_LINK_NOARG_TYPED(FormShellManager, FormControlActivated, LinkParamNone*, vo
// slot calls the form shell is moved to the top of the object bar shell
// stack.
ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell!=NULL && !mbFormShellAboveViewShell)
+ if (pShell!=nullptr && !mbFormShellAboveViewShell)
{
mbFormShellAboveViewShell = true;
@@ -233,7 +233,7 @@ IMPL_LINK_TYPED(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, v
// the form shell is moved to the bottom of the object bar
// stack.
ViewShell* pShell = mrBase.GetMainViewShell().get();
- if (pShell!=NULL && mbFormShellAboveViewShell)
+ if (pShell!=nullptr && mbFormShellAboveViewShell)
{
mbFormShellAboveViewShell = false;
ViewShellManager::UpdateLock aLock (mrBase.GetViewShellManager());
@@ -254,7 +254,7 @@ IMPL_LINK_TYPED(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, v
break;
case VCLEVENT_OBJECT_DYING:
- mpMainViewShellWindow = NULL;
+ mpMainViewShellWindow = nullptr;
break;
}
}
@@ -262,18 +262,18 @@ IMPL_LINK_TYPED(FormShellManager, WindowEventHandler, VclWindowEvent&, rEvent, v
void FormShellManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint!=NULL && pSimpleHint->GetId()==SFX_HINT_DYING)
+ if (pSimpleHint!=nullptr && pSimpleHint->GetId()==SFX_HINT_DYING)
{
// If all goes well this listener is called after the
// FormShellManager was notified about the dying form shell by the
// FormShellManagerFactory.
- OSL_ASSERT(mpFormShell==NULL);
- if (mpFormShell != NULL)
+ OSL_ASSERT(mpFormShell==nullptr);
+ if (mpFormShell != nullptr)
{
- mpFormShell = NULL;
+ mpFormShell = nullptr;
mrBase.GetViewShellManager()->SetFormShell(
mrBase.GetMainViewShell().get(),
- NULL,
+ nullptr,
false);
}
}
@@ -296,7 +296,7 @@ FmFormShell* FormShellManagerFactory::CreateShell (
vcl::Window*,
::sd::FrameView*)
{
- FmFormShell* pShell = NULL;
+ FmFormShell* pShell = nullptr;
::sd::View* pView = mrViewShell.GetView();
if (nId == RID_FORMLAYER_TOOLBOX)
@@ -310,9 +310,9 @@ FmFormShell* FormShellManagerFactory::CreateShell (
void FormShellManagerFactory::ReleaseShell (SfxShell* pShell)
{
- if (pShell != NULL)
+ if (pShell != nullptr)
{
- mrFormShellManager.SetFormShell(NULL);
+ mrFormShellManager.SetFormShell(nullptr);
delete pShell;
}
}
diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx
index 15f037d582b0..6e20c21a04be 100644
--- a/sd/source/ui/view/GraphicObjectBar.cxx
+++ b/sd/source/ui/view/GraphicObjectBar.cxx
@@ -81,7 +81,7 @@ GraphicObjectBar::GraphicObjectBar (
GraphicObjectBar::~GraphicObjectBar()
{
- SetRepeatTarget( NULL );
+ SetRepeatTarget( nullptr );
}
void GraphicObjectBar::GetAttrState( SfxItemSet& rSet )
diff --git a/sd/source/ui/view/MediaObjectBar.cxx b/sd/source/ui/view/MediaObjectBar.cxx
index a0df58bfecd3..3e028c9c6797 100644
--- a/sd/source/ui/view/MediaObjectBar.cxx
+++ b/sd/source/ui/view/MediaObjectBar.cxx
@@ -74,7 +74,7 @@ MediaObjectBar::MediaObjectBar( ViewShell* pSdViewShell, ::sd::View* pSdView ) :
MediaObjectBar::~MediaObjectBar()
{
- SetRepeatTarget( NULL );
+ SetRepeatTarget( nullptr );
}
void MediaObjectBar::GetState( SfxItemSet& rSet )
@@ -119,7 +119,7 @@ void MediaObjectBar::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
if( !pArgs || ( SfxItemState::SET != pArgs->GetItemState( SID_AVMEDIA_TOOLBOX, false, &pItem ) ) )
- pItem = NULL;
+ pItem = nullptr;
if( pItem )
{
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 8ae295065634..04b80c290f2b 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -138,9 +138,9 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
: SdrOutliner( &pDoc->GetItemPool(), nMode ),
mpImpl(new Implementation()),
meMode(SEARCH),
- mpView(NULL),
+ mpView(nullptr),
mpWeakViewShell(),
- mpWindow(NULL),
+ mpWindow(nullptr),
mpDrawDocument(pDoc),
mnConversionLanguage(LANGUAGE_NONE),
mnIgnoreCurrentPageChangesLevel(0),
@@ -155,17 +155,17 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode )
mbRestrictSearchToSelection(false),
maMarkListCopy(),
mbProcessCurrentViewOnly(false),
- mpObj(NULL),
- mpFirstObj(NULL),
- mpTextObj(NULL),
+ mpObj(nullptr),
+ mpFirstObj(nullptr),
+ mpTextObj(nullptr),
mnText(0),
- mpParaObj(NULL),
+ mpParaObj(nullptr),
meStartViewMode(PK_STANDARD),
meStartEditMode(EM_PAGE),
mnStartPageIndex((sal_uInt16)-1),
- mpStartEditedObject(NULL),
+ mpStartEditedObject(nullptr),
maStartSelection(),
- mpSearchItem(NULL),
+ mpSearchItem(nullptr),
maObjectIterator(),
maCurrentPosition(),
maSearchStartPosition(),
@@ -260,7 +260,7 @@ void Outliner::PrepareSpelling()
mbPrepareSpellingPending = false;
ViewShellBase* pBase = dynamic_cast< ViewShellBase *>( SfxViewShell::Current() );
- if (pBase != NULL)
+ if (pBase != nullptr)
SetViewShell (pBase->GetMainViewShell());
SetRefDevice( SD_MOD()->GetRefDevice( *mpDrawDocument->GetDocSh() ) );
@@ -290,7 +290,7 @@ void Outliner::StartSpelling()
{
meMode = SPELL;
mbDirectionIsForward = true;
- mpSearchItem = NULL;
+ mpSearchItem = nullptr;
}
/** Free all resources acquired during the search/spell check. After a
@@ -303,7 +303,7 @@ void Outliner::EndSpelling()
std::shared_ptr<ViewShell> pOldViewShell (pViewShell);
ViewShellBase* pBase = dynamic_cast< ViewShellBase *>( SfxViewShell::Current() );
- if (pBase != NULL)
+ if (pBase != nullptr)
pViewShell = pBase->GetMainViewShell();
else
pViewShell.reset();
@@ -311,7 +311,7 @@ void Outliner::EndSpelling()
// When in <member>PrepareSpelling()</member> a new outline view has
// been created then delete it here.
- bool bViewIsDrawViewShell(pViewShell && 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() ));
+ bool bViewIsDrawViewShell(pViewShell && nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ));
if (bViewIsDrawViewShell)
{
SetStatusEventHdl(Link<EditStatus&,void>());
@@ -326,7 +326,7 @@ void Outliner::EndSpelling()
// Remove and, if previously created by us, delete the outline
// view.
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
{
RemoveView(pOutlinerView);
mpImpl->ReleaseOutlinerView();
@@ -354,15 +354,15 @@ void Outliner::EndSpelling()
RestoreStartPosition ();
mpWeakViewShell.reset();
- mpView = NULL;
- mpWindow = NULL;
+ mpView = nullptr;
+ mpWindow = nullptr;
mnStartPageIndex = (sal_uInt16) -1;
}
bool Outliner::SpellNextDocument()
{
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
// When doing a spell check in the outline view then there is
// only one document.
@@ -379,7 +379,7 @@ bool Outliner::SpellNextDocument()
mpWindow = pViewShell->GetActiveWindow();
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetWindow(mpWindow);
ProvideNextTextObject ();
@@ -409,7 +409,7 @@ svx::SpellPortions Outliner::GetNextSpellSentence()
while ( ! bFoundNextSentence)
{
OutlinerView* pOutlinerView = GetView(0);
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
{
ESelection aCurrentSelection (pOutlinerView->GetSelection());
if ( ! mbMatchMayExist
@@ -451,11 +451,11 @@ bool Outliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem)
// Determine whether we have to abort the search. This is necessary
// when the main view shell does not support searching.
bool bAbort = false;
- if (pBase != NULL)
+ if (pBase != nullptr)
{
std::shared_ptr<ViewShell> pShell (pBase->GetMainViewShell());
SetViewShell(pShell);
- if (pShell.get() == NULL)
+ if (pShell.get() == nullptr)
bAbort = true;
else
switch (pShell->GetShellType())
@@ -545,7 +545,7 @@ void Outliner::Initialize (bool bDirectionIsForward)
// In case we are searching in an outline view then first remove the
// current selection and place cursor at its start or end.
- if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
ESelection aSelection = mpImpl->GetOutlinerView()->GetSelection ();
if (mbDirectionIsForward)
@@ -606,7 +606,7 @@ bool Outliner::SearchAndReplaceAll()
}
std::vector<SearchSelection> aSelections;
- if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
// Put the cursor to the beginning/end of the outliner.
mpImpl->GetOutlinerView()->SetSelection (GetSearchStartPosition ());
@@ -614,7 +614,7 @@ bool Outliner::SearchAndReplaceAll()
// The outliner does all the work for us when we are in this mode.
SearchAndReplaceOnce();
}
- else if( 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
+ else if( nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
{
// Go to beginning/end of document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
@@ -698,20 +698,20 @@ bool Outliner::SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections)
DetectChange ();
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- DBG_ASSERT(pOutlinerView!=NULL && GetEditEngine().HasView( &pOutlinerView->GetEditView() ),
+ DBG_ASSERT(pOutlinerView!=nullptr && GetEditEngine().HasView( &pOutlinerView->GetEditView() ),
"SearchAndReplace without valid view!" );
- if( NULL == pOutlinerView || !GetEditEngine().HasView( &pOutlinerView->GetEditView() ) )
+ if( nullptr == pOutlinerView || !GetEditEngine().HasView( &pOutlinerView->GetEditView() ) )
return true;
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell != 0)
+ if (pViewShell != nullptr)
{
mpView = pViewShell->GetView();
mpWindow = pViewShell->GetActiveWindow();
pOutlinerView->SetWindow(mpWindow);
- if( 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
{
// When replacing we first check if there is a selection
// indicating a match. If there is then replace it. The
@@ -756,7 +756,7 @@ bool Outliner::SearchAndReplaceOnce(std::vector<SearchSelection>* pSelections)
}
}
}
- else if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ else if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
mpDrawDocument->GetDocSh()->SetWaitCursor(false);
// The following loop is executed more than once only when a
@@ -833,7 +833,7 @@ void Outliner::DetectChange()
std::dynamic_pointer_cast<DrawViewShell>(pViewShell));
// Detect whether the view has been switched from the outside.
- if (pDrawViewShell.get() != NULL
+ if (pDrawViewShell.get() != nullptr
&& (aPosition.meEditMode != pDrawViewShell->GetEditMode()
|| aPosition.mePageKind != pDrawViewShell->GetPageKind()))
{
@@ -841,12 +841,12 @@ void Outliner::DetectChange()
SetStatusEventHdl(Link<EditStatus&,void>());
SdrPageView* pPageView = mpView->GetSdrPageView();
- if (pPageView != NULL)
+ if (pPageView != nullptr)
mpView->UnmarkAllObj (pPageView);
mpView->SdrEndTextEdit();
SetUpdateMode(false);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
if (meMode == SPELL)
SetPaperSize( Size(1, 1) );
@@ -890,7 +890,7 @@ bool Outliner::DetectSelectionChange()
// If mpObj is NULL then we have not yet found our first match.
// Detecting a change makes no sense.
- if (mpObj != NULL)
+ if (mpObj != nullptr)
{
const size_t nMarkCount = mpView ? mpView->GetMarkedObjectList().GetMarkCount() : 0;
switch (nMarkCount)
@@ -903,10 +903,10 @@ bool Outliner::DetectSelectionChange()
case 1:
// Check if the only selected object is not the one that we
// had selected.
- if (mpView != NULL)
+ if (mpView != nullptr)
{
SdrMark* pMark = mpView->GetMarkedObjectList().GetMark(0);
- if (pMark != NULL)
+ if (pMark != nullptr)
bSelectionHasChanged = (mpObj != pMark->GetMarkedSdrObj ());
}
break;
@@ -932,27 +932,27 @@ void Outliner::RememberStartPosition()
if ( mnStartPageIndex != (sal_uInt16) -1 )
return;
- if( 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
{
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(pViewShell));
- if (pDrawViewShell.get() != NULL)
+ if (pDrawViewShell.get() != nullptr)
{
meStartViewMode = pDrawViewShell->GetPageKind();
meStartEditMode = pDrawViewShell->GetEditMode();
mnStartPageIndex = pDrawViewShell->GetCurPageId() - 1;
}
- if (mpView != NULL)
+ if (mpView != nullptr)
{
mpStartEditedObject = mpView->GetTextEditObject();
- if (mpStartEditedObject != NULL)
+ if (mpStartEditedObject != nullptr)
{
// Try to retrieve current caret position only when there is an
// edited object.
::Outliner* pOutliner =
static_cast<DrawView*>(mpView)->GetTextEditOutliner();
- if (pOutliner!=NULL && pOutliner->GetViewCount()>0)
+ if (pOutliner!=nullptr && pOutliner->GetViewCount()>0)
{
OutlinerView* pOutlinerView = pOutliner->GetView(0);
maStartSelection = pOutlinerView->GetSelection();
@@ -960,11 +960,11 @@ void Outliner::RememberStartPosition()
}
}
}
- else if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ else if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
// Remember the current cursor position.
OutlinerView* pView = GetView(0);
- if (pView != NULL)
+ if (pView != nullptr)
pView->GetSelection();
}
else
@@ -982,17 +982,17 @@ void Outliner::RestoreStartPosition()
bRestore = false;
// Dont't restore when the view shell is not valid.
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell == 0)
+ if (pViewShell == nullptr)
bRestore = false;
if (bRestore)
{
- if( 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() ))
{
std::shared_ptr<DrawViewShell> pDrawViewShell (
std::dynamic_pointer_cast<DrawViewShell>(pViewShell));
SetViewMode (meStartViewMode);
- if (pDrawViewShell.get() != NULL)
+ if (pDrawViewShell.get() != nullptr)
{
SetPage (meStartEditMode, mnStartPageIndex);
mpObj = mpStartEditedObject;
@@ -1005,11 +1005,11 @@ void Outliner::RestoreStartPosition()
}
}
}
- else if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ else if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
// Set cursor to its old position.
OutlinerView* pView = GetView(0);
- if (pView != NULL)
+ if (pView != nullptr)
pView->SetSelection (maStartSelection);
}
}
@@ -1038,19 +1038,19 @@ void Outliner::ProvideNextTextObject()
}
SetUpdateMode(false);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetOutputArea( Rectangle( Point(), Size(1, 1) ) );
if (meMode == SPELL)
SetPaperSize( Size(1, 1) );
SetText(OUString(), GetParagraph(0));
- mpTextObj = NULL;
+ mpTextObj = nullptr;
// Iterate until a valid text object has been found or the search ends.
do
{
- mpObj = NULL;
- mpParaObj = NULL;
+ mpObj = nullptr;
+ mpParaObj = nullptr;
if (maObjectIterator != ::sd::outliner::OutlinerContainer(this).end())
{
@@ -1066,12 +1066,12 @@ void Outliner::ProvideNextTextObject()
}
++maObjectIterator;
- if (mpObj != NULL)
+ if (mpObj != nullptr)
{
PutTextIntoOutliner ();
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell != 0)
+ if (pViewShell != nullptr)
switch (meMode)
{
case SEARCH:
@@ -1111,7 +1111,7 @@ void Outliner::EndOfSearch()
// Before we display a dialog we first jump to where the last valid text
// object was found. All page and view mode switching since then was
// temporary and should not be visible to the user.
- if( 0 == dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ if( nullptr == dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
SetObject (maLastValidPosition);
if (mbRestrictSearchToSelection)
@@ -1131,11 +1131,11 @@ void Outliner::EndOfSearch()
mbMatchMayExist = false;
// Everything back to beginning (or end?) of the document.
maObjectIterator = ::sd::outliner::OutlinerContainer(this).begin();
- if( 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
+ if( nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ))
{
// Set cursor to first character of the document.
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetSelection (GetSearchStartPosition ());
}
@@ -1223,7 +1223,7 @@ bool Outliner::ShowWrapArroundDialog()
bool Outliner::IsValidTextObject (const ::sd::outliner::IteratorPosition& rPosition)
{
SdrTextObj* pObject = dynamic_cast< SdrTextObj* >( rPosition.mxObject.get() );
- return (pObject != NULL) && pObject->HasText() && ! pObject->IsEmptyPresObj();
+ return (pObject != nullptr) && pObject->HasText() && ! pObject->IsEmptyPresObj();
}
void Outliner::PutTextIntoOutliner()
@@ -1232,9 +1232,9 @@ void Outliner::PutTextIntoOutliner()
if ( mpTextObj && mpTextObj->HasText() && !mpTextObj->IsEmptyPresObj() )
{
SdrText* pText = mpTextObj->getText( mnText );
- mpParaObj = pText ? pText->GetOutlinerParaObject() : NULL;
+ mpParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
- if (mpParaObj != NULL)
+ if (mpParaObj != nullptr)
{
SetText(*mpParaObj);
@@ -1243,7 +1243,7 @@ void Outliner::PutTextIntoOutliner()
}
else
{
- mpTextObj = NULL;
+ mpTextObj = nullptr;
}
}
@@ -1296,7 +1296,7 @@ void Outliner::PrepareSearchAndReplace()
// Start search at the right end of the current object's text
// depending on the search direction.
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetSelection (GetSearchStartPosition ());
}
}
@@ -1306,7 +1306,7 @@ void Outliner::SetViewMode (PageKind ePageKind)
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
std::shared_ptr<DrawViewShell> pDrawViewShell(
std::dynamic_pointer_cast<DrawViewShell>(pViewShell));
- if (pDrawViewShell.get()!=NULL && ePageKind != pDrawViewShell->GetPageKind())
+ if (pDrawViewShell.get()!=nullptr && ePageKind != pDrawViewShell->GetPageKind())
{
// Restore old edit mode.
pDrawViewShell->ChangeEditMode(mpImpl->meOriginalEditMode, false);
@@ -1359,8 +1359,8 @@ void Outliner::SetViewMode (PageKind ePageKind)
// Save edit mode so that it can be restored when switching the view
// shell again.
pDrawViewShell = std::dynamic_pointer_cast<DrawViewShell>(pViewShell);
- OSL_ASSERT(pDrawViewShell.get()!=NULL);
- if (pDrawViewShell.get() != NULL)
+ OSL_ASSERT(pDrawViewShell.get()!=nullptr);
+ if (pDrawViewShell.get() != nullptr)
mpImpl->meOriginalEditMode = pDrawViewShell->GetEditMode();
}
}
@@ -1372,8 +1372,8 @@ void Outliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
std::shared_ptr<DrawViewShell> pDrawViewShell(
std::dynamic_pointer_cast<DrawViewShell>(pViewShell));
- OSL_ASSERT(pDrawViewShell.get()!=NULL);
- if (pDrawViewShell.get() != NULL)
+ OSL_ASSERT(pDrawViewShell.get()!=nullptr);
+ if (pDrawViewShell.get() != nullptr)
{
pDrawViewShell->ChangeEditMode(eEditMode, false);
pDrawViewShell->SwitchPage(nPageIndex);
@@ -1445,7 +1445,7 @@ bool Outliner::HasNoPreviousMatch()
{
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- DBG_ASSERT (pOutlinerView!=NULL, "outline view in Outliner::HasNoPreviousMatch is NULL");
+ DBG_ASSERT (pOutlinerView!=nullptr, "outline view in Outliner::HasNoPreviousMatch is NULL");
// Detect whether the cursor stands at the beginning
// resp. at the end of the text.
@@ -1457,7 +1457,7 @@ bool Outliner::HandleFailedSearch()
bool bContinueSearch = false;
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL && mpSearchItem != NULL)
+ if (pOutlinerView != nullptr && mpSearchItem != nullptr)
{
// Detect whether there is/may be a prior match. If there is then
// ask the user whether to wrap around. Otherwise tell the user
@@ -1506,13 +1506,13 @@ void Outliner::SetViewShell (const std::shared_ptr<ViewShell>& rpViewShell)
mpImpl->ProvideOutlinerView(*this, rpViewShell, mpWindow);
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
pOutlinerView->SetWindow(mpWindow);
}
else
{
- mpView = NULL;
- mpWindow = NULL;
+ mpView = nullptr;
+ mpWindow = nullptr;
}
}
}
@@ -1543,17 +1543,17 @@ void Outliner::StartConversion( sal_Int16 nSourceLanguage, sal_Int16 nTargetLan
const vcl::Font *pTargetFont, sal_Int32 nOptions, bool bIsInteractive )
{
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- bool bMultiDoc = 0 != dynamic_cast< const DrawViewShell *>( pViewShell.get() );
+ bool bMultiDoc = nullptr != dynamic_cast< const DrawViewShell *>( pViewShell.get() );
meMode = TEXT_CONVERSION;
mbDirectionIsForward = true;
- mpSearchItem = NULL;
+ mpSearchItem = nullptr;
mnConversionLanguage = nSourceLanguage;
BeginConversion();
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
{
pOutlinerView->StartTextConversion(
nSourceLanguage,
@@ -1596,7 +1596,7 @@ void Outliner::BeginConversion()
SetRefDevice( SD_MOD()->GetRefDevice( *mpDrawDocument->GetDocSh() ) );
ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() );
- if (pBase != NULL)
+ if (pBase != nullptr)
SetViewShell (pBase->GetMainViewShell());
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
@@ -1628,7 +1628,7 @@ void Outliner::EndConversion()
bool Outliner::ConvertNextDocument()
{
std::shared_ptr<ViewShell> pViewShell (mpWeakViewShell.lock());
- if (pViewShell && 0 != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ) )
+ if (pViewShell && nullptr != dynamic_cast< const OutlineViewShell *>( pViewShell.get() ) )
return false;
mpDrawDocument->GetDocSh()->SetWaitCursor( true );
@@ -1636,7 +1636,7 @@ bool Outliner::ConvertNextDocument()
Initialize ( true );
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
- if (pOutlinerView != NULL)
+ if (pOutlinerView != nullptr)
{
mpWindow = pViewShell->GetActiveWindow();
pOutlinerView->SetWindow(mpWindow);
@@ -1669,8 +1669,8 @@ sal_uInt16 Outliner::ShowModalMessageBox (Dialog& rMessageBox)
// while the message box is being shown. We also have to take into
// account that we are called during a spell check and the search dialog
// is not available.
- vcl::Window* pSearchDialog = NULL;
- SfxChildWindow* pChildWindow = NULL;
+ vcl::Window* pSearchDialog = nullptr;
+ SfxChildWindow* pChildWindow = nullptr;
switch (meMode)
{
case SEARCH:
@@ -1689,15 +1689,15 @@ sal_uInt16 Outliner::ShowModalMessageBox (Dialog& rMessageBox)
break;
}
- if (pChildWindow != NULL)
+ if (pChildWindow != nullptr)
pSearchDialog = pChildWindow->GetWindow();
- if (pSearchDialog != NULL)
+ if (pSearchDialog != nullptr)
pSearchDialog->EnableInput(false);
sal_uInt16 nResult = rMessageBox.Execute();
// Unlock the search dialog.
- if (pSearchDialog != NULL)
+ if (pSearchDialog != nullptr)
pSearchDialog->EnableInput();
return nResult;
@@ -1708,17 +1708,17 @@ sal_uInt16 Outliner::ShowModalMessageBox (Dialog& rMessageBox)
Outliner::Implementation::Implementation()
: meOriginalEditMode(EM_PAGE),
mbOwnOutlineView(false),
- mpOutlineView(NULL)
+ mpOutlineView(nullptr)
{
}
Outliner::Implementation::~Implementation()
{
- if (mbOwnOutlineView && mpOutlineView!=NULL)
+ if (mbOwnOutlineView && mpOutlineView!=nullptr)
{
- mpOutlineView->SetWindow(NULL);
+ mpOutlineView->SetWindow(nullptr);
delete mpOutlineView;
- mpOutlineView = NULL;
+ mpOutlineView = nullptr;
}
}
@@ -1732,7 +1732,7 @@ void Outliner::Implementation::ProvideOutlinerView (
const std::shared_ptr<ViewShell>& rpViewShell,
vcl::Window* pWindow)
{
- if (rpViewShell.get() != NULL)
+ if (rpViewShell.get() != nullptr)
{
switch (rpViewShell->GetShellType())
{
@@ -1743,9 +1743,9 @@ void Outliner::Implementation::ProvideOutlinerView (
{
// Create a new outline view to do the search on.
bool bInsert = false;
- if (mpOutlineView!=NULL && !mbOwnOutlineView)
- mpOutlineView = NULL;
- if (mpOutlineView == NULL)
+ if (mpOutlineView!=nullptr && !mbOwnOutlineView)
+ mpOutlineView = nullptr;
+ if (mpOutlineView == nullptr)
{
mpOutlineView = new OutlinerView(&rOutliner, pWindow);
mbOwnOutlineView = true;
@@ -1770,7 +1770,7 @@ void Outliner::Implementation::ProvideOutlinerView (
case ViewShell::ST_OUTLINE:
{
- if (mpOutlineView!=NULL && mbOwnOutlineView)
+ if (mpOutlineView!=nullptr && mbOwnOutlineView)
delete mpOutlineView;
mpOutlineView = rOutliner.GetView(0);
mbOwnOutlineView = false;
@@ -1791,17 +1791,17 @@ void Outliner::Implementation::ReleaseOutlinerView()
if (mbOwnOutlineView)
{
OutlinerView* pView = mpOutlineView;
- mpOutlineView = NULL;
+ mpOutlineView = nullptr;
mbOwnOutlineView = false;
- if (pView != NULL)
+ if (pView != nullptr)
{
- pView->SetWindow(NULL);
+ pView->SetWindow(nullptr);
delete pView;
}
}
else
{
- mpOutlineView = NULL;
+ mpOutlineView = nullptr;
}
}
diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx
index 1186b60527c7..61f8ddd802bc 100644
--- a/sd/source/ui/view/OutlinerIterator.cxx
+++ b/sd/source/ui/view/OutlinerIterator.cxx
@@ -80,12 +80,12 @@ bool IteratorPosition::operator== (const IteratorPosition& aPosition) const
Iterator::Iterator()
{
- mpIterator = NULL;
+ mpIterator = nullptr;
}
Iterator::Iterator (const Iterator& rIterator)
{
- mpIterator = rIterator.mpIterator ? rIterator.mpIterator->Clone() : NULL;
+ mpIterator = rIterator.mpIterator ? rIterator.mpIterator->Clone() : nullptr;
}
Iterator::Iterator (IteratorImplBase* pObject)
@@ -103,23 +103,23 @@ Iterator& Iterator::operator= (const Iterator& rIterator)
if (this != &rIterator)
{
delete mpIterator;
- if (rIterator.mpIterator != NULL)
+ if (rIterator.mpIterator != nullptr)
mpIterator = rIterator.mpIterator->Clone();
else
- mpIterator = NULL;
+ mpIterator = nullptr;
}
return *this;
}
const IteratorPosition& Iterator::operator* () const
{
- DBG_ASSERT (mpIterator!=NULL, "::sd::outliner::Iterator::operator* : missing implementation object");
+ DBG_ASSERT (mpIterator!=nullptr, "::sd::outliner::Iterator::operator* : missing implementation object");
return mpIterator->GetPosition();
}
Iterator& Iterator::operator++ ()
{
- if (mpIterator!=NULL)
+ if (mpIterator!=nullptr)
mpIterator->GotoNextText();
return *this;
}
@@ -127,14 +127,14 @@ Iterator& Iterator::operator++ ()
Iterator Iterator::operator++ (int)
{
Iterator aTmp (*this);
- if (mpIterator!=NULL)
+ if (mpIterator!=nullptr)
mpIterator->GotoNextText();
return aTmp;
}
bool Iterator::operator== (const Iterator& rIterator)
{
- if (mpIterator == NULL || rIterator.mpIterator==NULL)
+ if (mpIterator == nullptr || rIterator.mpIterator==nullptr)
return mpIterator == rIterator.mpIterator;
else
return *mpIterator == *rIterator.mpIterator;
@@ -147,7 +147,7 @@ bool Iterator::operator!= (const Iterator& rIterator)
void Iterator::Reverse()
{
- if (mpIterator != NULL)
+ if (mpIterator != nullptr)
mpIterator->Reverse();
}
@@ -334,7 +334,7 @@ sal_Int32 OutlinerContainer::GetPageIndex (
else
{
const SdPage* pPage = rpViewShell->GetActualPage();
- if (pPage != NULL)
+ if (pPage != nullptr)
nPageIndex = (pPage->GetPageNum()-1)/2;
else
nPageIndex = 0;
@@ -421,7 +421,7 @@ const IteratorPosition& IteratorImplBase::GetPosition()
IteratorImplBase* IteratorImplBase::Clone (IteratorImplBase* pObject) const
{
- if (pObject != NULL)
+ if (pObject != nullptr)
{
pObject->maPosition = maPosition;
pObject->mpDocument = mpDocument;
@@ -456,7 +456,7 @@ SelectionIteratorImpl::~SelectionIteratorImpl()
IteratorImplBase* SelectionIteratorImpl::Clone (IteratorImplBase* pObject) const
{
SelectionIteratorImpl* pIterator = static_cast<SelectionIteratorImpl*>(pObject);
- if (pIterator == NULL)
+ if (pIterator == nullptr)
pIterator = new SelectionIteratorImpl (
mrObjectList, mnObjectIndex, mpDocument, mpViewShellWeak, mbDirectionIsForward);
return pIterator;
@@ -546,8 +546,8 @@ ViewIteratorImpl::ViewIteratorImpl (
bool bDirectionIsForward)
: IteratorImplBase (pDocument, rpViewShellWeak, bDirectionIsForward),
mbPageChangeOccurred(false),
- mpPage(NULL),
- mpObjectIterator(NULL)
+ mpPage(nullptr),
+ mpObjectIterator(nullptr)
{
SetPage (nPageIndex);
}
@@ -561,8 +561,8 @@ ViewIteratorImpl::ViewIteratorImpl (
EditMode eEditMode)
: IteratorImplBase (pDocument, rpViewShellWeak, bDirectionIsForward, ePageKind, eEditMode),
mbPageChangeOccurred(false),
- mpPage(NULL),
- mpObjectIterator(NULL)
+ mpPage(nullptr),
+ mpObjectIterator(nullptr)
{
SetPage (nPageIndex);
}
@@ -575,23 +575,23 @@ IteratorImplBase* ViewIteratorImpl::Clone (IteratorImplBase* pObject) const
{
ViewIteratorImpl* pIterator = static_cast<ViewIteratorImpl*>(pObject);
- if (pIterator == NULL)
+ if (pIterator == nullptr)
pIterator = new ViewIteratorImpl (
maPosition.mnPageIndex, mpDocument, mpViewShellWeak, mbDirectionIsForward);
IteratorImplBase::Clone (pObject);
- if (mpObjectIterator != NULL)
+ if (mpObjectIterator != nullptr)
{
pIterator->mpObjectIterator = new SdrObjListIter(*mpPage, IM_DEEPNOGROUPS, !mbDirectionIsForward);
// No direct way to set the object iterator to the current object.
- pIterator->maPosition.mxObject.reset(NULL);
+ pIterator->maPosition.mxObject.reset(nullptr);
while (pIterator->mpObjectIterator->IsMore() && pIterator->maPosition.mxObject!=maPosition.mxObject)
pIterator->maPosition.mxObject.reset(pIterator->mpObjectIterator->Next());
}
else
- pIterator->mpObjectIterator = NULL;
+ pIterator->mpObjectIterator = nullptr;
return pIterator;
}
@@ -615,10 +615,10 @@ void ViewIteratorImpl::GotoNextText()
}
}
- if (mpObjectIterator != NULL && mpObjectIterator->IsMore())
+ if (mpObjectIterator != nullptr && mpObjectIterator->IsMore())
maPosition.mxObject.reset(mpObjectIterator->Next());
else
- maPosition.mxObject.reset(NULL);
+ maPosition.mxObject.reset(nullptr);
if (!maPosition.mxObject.is() )
{
@@ -627,12 +627,12 @@ void ViewIteratorImpl::GotoNextText()
else
SetPage (maPosition.mnPageIndex-1);
- if (mpPage != NULL)
+ if (mpPage != nullptr)
mpObjectIterator = new SdrObjListIter(*mpPage, IM_DEEPNOGROUPS, !mbDirectionIsForward);
- if (mpObjectIterator!=NULL && mpObjectIterator->IsMore())
+ if (mpObjectIterator!=nullptr && mpObjectIterator->IsMore())
maPosition.mxObject.reset(mpObjectIterator->Next());
else
- maPosition.mxObject.reset(NULL);
+ maPosition.mxObject.reset(nullptr);
}
maPosition.mnText = 0;
@@ -675,20 +675,20 @@ void ViewIteratorImpl::SetPage (sal_Int32 nPageIndex)
maPosition.mePageKind);
}
else
- mpPage = NULL;
+ mpPage = nullptr;
}
// Set up object list iterator.
- if (mpPage != NULL)
+ if (mpPage != nullptr)
mpObjectIterator = new SdrObjListIter(*mpPage, IM_DEEPNOGROUPS, ! mbDirectionIsForward);
else
- mpObjectIterator = NULL;
+ mpObjectIterator = nullptr;
// Get object pointer.
- if (mpObjectIterator!=NULL && mpObjectIterator->IsMore())
+ if (mpObjectIterator!=nullptr && mpObjectIterator->IsMore())
maPosition.mxObject.reset( mpObjectIterator->Next() );
else
- maPosition.mxObject.reset( NULL );
+ maPosition.mxObject.reset( nullptr );
maPosition.mnText = 0;
if( !mbDirectionIsForward && maPosition.mxObject.is() )
@@ -705,16 +705,16 @@ void ViewIteratorImpl::Reverse()
IteratorImplBase::Reverse ();
// Create reversed object list iterator.
- if (mpObjectIterator != NULL)
+ if (mpObjectIterator != nullptr)
delete mpObjectIterator;
- if (mpPage != NULL)
+ if (mpPage != nullptr)
mpObjectIterator = new SdrObjListIter(*mpPage, IM_DEEPNOGROUPS, ! mbDirectionIsForward);
else
- mpObjectIterator = NULL;
+ mpObjectIterator = nullptr;
// Move iterator to the current object.
SdrObjectWeakRef xObject = maPosition.mxObject;
- maPosition.mxObject.reset(NULL);
+ maPosition.mxObject.reset(nullptr);
if (!mpObjectIterator)
return;
@@ -746,7 +746,7 @@ DocumentIteratorImpl::~DocumentIteratorImpl()
IteratorImplBase* DocumentIteratorImpl::Clone (IteratorImplBase* pObject) const
{
DocumentIteratorImpl* pIterator = static_cast<DocumentIteratorImpl*>(pObject);
- if (pIterator == NULL)
+ if (pIterator == nullptr)
pIterator = new DocumentIteratorImpl (
maPosition.mnPageIndex, maPosition.mePageKind, maPosition.meEditMode,
mpDocument, mpViewShellWeak, mbDirectionIsForward);
diff --git a/sd/source/ui/view/ToolBarManager.cxx b/sd/source/ui/view/ToolBarManager.cxx
index 8058cff1de90..93b9340a7200 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -368,13 +368,13 @@ ToolBarManager::~ToolBarManager()
void ToolBarManager::Shutdown()
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
mpImpl.reset();
}
void ToolBarManager::ResetToolBars (ToolBarGroup eGroup)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->ResetToolBars(eGroup);
@@ -383,7 +383,7 @@ void ToolBarManager::ResetToolBars (ToolBarGroup eGroup)
void ToolBarManager::ResetAllToolBars()
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->ResetAllToolBars();
@@ -394,7 +394,7 @@ void ToolBarManager::AddToolBar (
ToolBarGroup eGroup,
const OUString& rsToolBarName)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->AddToolBar(eGroup,rsToolBarName);
@@ -405,7 +405,7 @@ void ToolBarManager::AddToolBarShell (
ToolBarGroup eGroup,
ShellId nToolBarId)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->AddToolBarShell(eGroup,nToolBarId);
@@ -416,7 +416,7 @@ void ToolBarManager::RemoveToolBar (
ToolBarGroup eGroup,
const OUString& rsToolBarName)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->RemoveToolBar(eGroup,rsToolBarName);
@@ -427,7 +427,7 @@ void ToolBarManager::SetToolBar (
ToolBarGroup eGroup,
const OUString& rsToolBarName)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->ResetToolBars(eGroup);
@@ -439,7 +439,7 @@ void ToolBarManager::SetToolBarShell (
ToolBarGroup eGroup,
ShellId nToolBarId)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
UpdateLock aLock (shared_from_this());
mpImpl->ResetToolBars(eGroup);
@@ -449,37 +449,37 @@ void ToolBarManager::SetToolBarShell (
void ToolBarManager::PreUpdate()
{
- if (mpImpl.get()!=NULL)
+ if (mpImpl.get()!=nullptr)
mpImpl->PreUpdate();
}
void ToolBarManager::RequestUpdate()
{
- if (mpImpl.get()!=NULL)
+ if (mpImpl.get()!=nullptr)
mpImpl->RequestUpdate();
}
void ToolBarManager::LockViewShellManager()
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
mpImpl->LockViewShellManager();
}
void ToolBarManager::LockUpdate()
{
- if (mpImpl.get()!=NULL)
+ if (mpImpl.get()!=nullptr)
mpImpl->LockUpdate();
}
void ToolBarManager::UnlockUpdate()
{
- if (mpImpl.get()!=NULL)
+ if (mpImpl.get()!=nullptr)
mpImpl->UnlockUpdate();
}
void ToolBarManager::MainViewShellChanged (ViewShell::ShellType nShellType)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
mpImpl->ReleaseAllToolBarShells();
mpImpl->GetToolBarRules().MainViewShellChanged(nShellType);
@@ -488,7 +488,7 @@ void ToolBarManager::MainViewShellChanged (ViewShell::ShellType nShellType)
void ToolBarManager::MainViewShellChanged (const ViewShell& rMainViewShell)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
{
mpImpl->ReleaseAllToolBarShells();
mpImpl->GetToolBarRules().MainViewShellChanged(rMainViewShell);
@@ -499,13 +499,13 @@ void ToolBarManager::SelectionHasChanged (
const ViewShell& rViewShell,
const SdrView& rView)
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
mpImpl->GetToolBarRules().SelectionHasChanged(rViewShell,rView);
}
void ToolBarManager::ToolBarsDestroyed()
{
- if (mpImpl.get() != NULL)
+ if (mpImpl.get() != nullptr)
mpImpl->ToolBarsDestroyed();
}
@@ -524,15 +524,15 @@ ToolBarManager::Implementation::Implementation (
mbIsValid(false),
maToolBarList(),
maToolBarShellList(),
- mxLayouter(NULL),
+ mxLayouter(nullptr),
mnLockCount(0),
mbPreUpdatePending(false),
mbPostUpdatePending(false),
mpSynchronousLayouterLock(),
mpAsynchronousLayouterLock(),
mpViewShellManagerLock(),
- mnPendingUpdateCall(0),
- mnPendingSetValidCall(0),
+ mnPendingUpdateCall(nullptr),
+ mnPendingSetValidCall(nullptr),
maToolBarRules(rpToolBarManager,rpViewShellManager)
{
Link<tools::EventMultiplexerEvent&,void> aLink (LINK(this,ToolBarManager::Implementation,EventMultiplexerCallback));
@@ -554,9 +554,9 @@ ToolBarManager::Implementation::~Implementation()
mpEventMultiplexer->RemoveEventListener(aLink);
// Abort pending user calls.
- if (mnPendingUpdateCall != 0)
+ if (mnPendingUpdateCall != nullptr)
Application::RemoveUserEvent(mnPendingUpdateCall);
- if (mnPendingSetValidCall != 0)
+ if (mnPendingSetValidCall != nullptr)
Application::RemoveUserEvent(mnPendingSetValidCall);
}
@@ -577,7 +577,7 @@ void ToolBarManager::Implementation::SetValid (bool bValid)
if (mbIsValid)
{
Reference<frame::XFrame> xFrame;
- if (mrBase.GetViewFrame() != NULL)
+ if (mrBase.GetViewFrame() != nullptr)
xFrame = mrBase.GetViewFrame()->GetFrame().GetFrameInterface();
try
{
@@ -594,7 +594,7 @@ void ToolBarManager::Implementation::SetValid (bool bValid)
else
{
ResetAllToolBars();
- mxLayouter = NULL;
+ mxLayouter = nullptr;
}
}
}
@@ -651,7 +651,7 @@ void ToolBarManager::Implementation::AddToolBarShell (
ShellId nToolBarId)
{
ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
{
maToolBarShellList.AddShellId(eGroup,nToolBarId);
GetToolBarRules().SubShellAdded(eGroup, nToolBarId);
@@ -666,7 +666,7 @@ void ToolBarManager::Implementation::ReleaseAllToolBarShells()
void ToolBarManager::Implementation::RequestUpdate()
{
- if (mnPendingUpdateCall == 0)
+ if (mnPendingUpdateCall == nullptr)
{
mnPendingUpdateCall = Application::PostUserEvent(
LINK(this,ToolBarManager::Implementation,UpdateCallback));
@@ -738,7 +738,7 @@ void ToolBarManager::Implementation::PostUpdate()
void ToolBarManager::Implementation::LockViewShellManager()
{
- if (mpViewShellManagerLock.get() == NULL)
+ if (mpViewShellManagerLock.get() == nullptr)
mpViewShellManagerLock.reset(
new ViewShellManager::UpdateLock(mrBase.GetViewShellManager()));
}
@@ -751,7 +751,7 @@ void ToolBarManager::Implementation::LockUpdate()
DBG_ASSERT(mnLockCount<100, "ToolBarManager lock count unusually high");
if (mnLockCount == 0)
{
- OSL_ASSERT(mpSynchronousLayouterLock.get()==NULL);
+ OSL_ASSERT(mpSynchronousLayouterLock.get()==nullptr);
mpSynchronousLayouterLock.reset(new LayouterLock(mxLayouter));
}
@@ -784,10 +784,10 @@ void ToolBarManager::Implementation::Update (
// initialization (by initializing the mxLayouter member.) We do
// this here so that we do not have to wait for the next Update()
// call to show the tool bars.
- if (mnPendingSetValidCall != 0)
+ if (mnPendingSetValidCall != nullptr)
{
Application::RemoveUserEvent(mnPendingSetValidCall);
- mnPendingSetValidCall = 0;
+ mnPendingSetValidCall = nullptr;
SetValid(true);
}
@@ -803,7 +803,7 @@ void ToolBarManager::Implementation::Update (
// functionality. Those that are not used anymore are
// deactivated now. Those that are missing are activated in the
// next step together with the view shells.
- if (mpViewShellManagerLock.get() == NULL)
+ if (mpViewShellManagerLock.get() == nullptr)
mpViewShellManagerLock.reset(
new ViewShellManager::UpdateLock(mrBase.GetViewShellManager()));
maToolBarShellList.UpdateShells(
@@ -828,7 +828,7 @@ void ToolBarManager::Implementation::Update (
// Note that the lock count may have been increased since
// entering this method. In that case one of the next
// UnlockUpdate() calls will post the UpdateCallback.
- if (mnPendingUpdateCall==0 && mnLockCount==0)
+ if (mnPendingUpdateCall==nullptr && mnLockCount==0)
{
mpAsynchronousLayouterLock = std::move(pLocalLayouterLock);
mnPendingUpdateCall = Application::PostUserEvent(
@@ -849,7 +849,7 @@ void ToolBarManager::Implementation::Update (
IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, UpdateCallback, void*, void)
{
- mnPendingUpdateCall = 0;
+ mnPendingUpdateCall = nullptr;
if (mnLockCount == 0)
{
if (mbPreUpdatePending)
@@ -867,7 +867,7 @@ IMPL_LINK_TYPED(ToolBarManager::Implementation,EventMultiplexerCallback,
switch (rEvent.meEventId)
{
case tools::EventMultiplexerEvent::EID_CONTROLLER_ATTACHED:
- if (mnPendingSetValidCall == 0)
+ if (mnPendingSetValidCall == nullptr)
mnPendingSetValidCall
= Application::PostUserEvent(LINK(this,Implementation,SetValidCallback));
break;
@@ -884,7 +884,7 @@ IMPL_LINK_TYPED(ToolBarManager::Implementation,EventMultiplexerCallback,
IMPL_LINK_NOARG_TYPED(ToolBarManager::Implementation, SetValidCallback, void*, void)
{
- mnPendingSetValidCall = 0;
+ mnPendingSetValidCall = nullptr;
SetValid(true);
}
@@ -905,15 +905,15 @@ bool ToolBarManager::Implementation::CheckPlugInMode (const OUString& rsName) co
do
{
SfxObjectShell* pObjectShell = mrBase.GetObjectShell();
- if (pObjectShell == NULL)
+ if (pObjectShell == nullptr)
break;
SfxMedium* pMedium = pObjectShell->GetMedium();
- if (pMedium == NULL)
+ if (pMedium == nullptr)
break;
const SfxBoolItem* pViewOnlyItem = SfxItemSet::GetItem<SfxBoolItem>(pMedium->GetItemSet(), SID_VIEWONLY, false);
- if (pViewOnlyItem == NULL)
+ if (pViewOnlyItem == nullptr)
break;
bIsPlugInMode = pViewOnlyItem->GetValue();
@@ -964,7 +964,7 @@ ToolBarRules::ToolBarRules (
void ToolBarRules::Update (ViewShellBase& rBase)
{
ViewShell* pMainViewShell = rBase.GetMainViewShell().get();
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
{
MainViewShellChanged(pMainViewShell->GetShellType());
if (pMainViewShell->GetView())
@@ -1054,7 +1054,7 @@ void ToolBarRules::MainViewShellChanged (const ViewShell& rMainViewShell)
{
const DrawViewShell* pDrawViewShell
= dynamic_cast<const DrawViewShell*>(&rMainViewShell);
- if (pDrawViewShell != NULL)
+ if (pDrawViewShell != nullptr)
{
if (pDrawViewShell->GetEditMode() == EM_MASTERPAGE)
mpToolBarManager->AddToolBar(
@@ -1400,7 +1400,7 @@ void ToolBarShellList::UpdateShells (
const std::shared_ptr<ViewShell>& rpMainViewShell,
const std::shared_ptr<ViewShellManager>& rpManager)
{
- if (rpMainViewShell.get() != NULL)
+ if (rpMainViewShell.get() != nullptr)
{
GroupedShellList aList;
diff --git a/sd/source/ui/view/ViewClipboard.cxx b/sd/source/ui/view/ViewClipboard.cxx
index 063dfaf69ff0..d6fd07e9cb16 100644
--- a/sd/source/ui/view/ViewClipboard.cxx
+++ b/sd/source/ui/view/ViewClipboard.cxx
@@ -50,7 +50,7 @@ void ViewClipboard::HandlePageDrop (const SdTransferable& rTransferable)
// Determine whether to insert the given set of slides or to assign a
// given master page.
SdPage* pMasterPage = GetFirstMasterPage (rTransferable);
- if (pMasterPage != NULL)
+ if (pMasterPage != nullptr)
AssignMasterPage (rTransferable, pMasterPage);
else
InsertSlides (rTransferable, DetermineInsertPosition (rTransferable));
@@ -58,7 +58,7 @@ void ViewClipboard::HandlePageDrop (const SdTransferable& rTransferable)
SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable)
{
- SdPage* pFirstMasterPage = NULL;
+ SdPage* pFirstMasterPage = nullptr;
if (rTransferable.HasPageBookmarks())
{
@@ -70,11 +70,11 @@ SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable)
break;
DrawDocShell* pDocShell = rTransferable.GetPageDocShell();
- if (pDocShell == NULL)
+ if (pDocShell == nullptr)
break;
SdDrawDocument* pDocument = pDocShell->GetDoc();
- if (pDocument == NULL)
+ if (pDocument == nullptr)
break;
std::vector<OUString>::const_iterator pIter;
@@ -92,10 +92,10 @@ SdPage* ViewClipboard::GetFirstMasterPage (const SdTransferable& rTransferable)
{
// At least one regular slide: return NULL to indicate
// that not all bookmarks point to master pages.
- pFirstMasterPage = NULL;
+ pFirstMasterPage = nullptr;
break;
}
- else if (pFirstMasterPage == NULL)
+ else if (pFirstMasterPage == nullptr)
{
// Remember the first master page for later.
if (nBMPage != SDRPAGE_NOTFOUND)
@@ -114,16 +114,16 @@ void ViewClipboard::AssignMasterPage (
const SdTransferable& rTransferable,
SdPage* pMasterPage)
{
- if (pMasterPage == NULL)
+ if (pMasterPage == nullptr)
return;
// Get the target page to which the master page is assigned.
SdrPageView* pPageView = mrView.GetSdrPageView();
- if (pPageView == NULL)
+ if (pPageView == nullptr)
return;
SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
- if (pPage == NULL)
+ if (pPage == nullptr)
return;
SdDrawDocument& rDocument = mrView.GetDoc();
@@ -132,11 +132,11 @@ void ViewClipboard::AssignMasterPage (
return;
DrawDocShell* pDataDocShell = rTransferable.GetPageDocShell();
- if (pDataDocShell == NULL)
+ if (pDataDocShell == nullptr)
return;
SdDrawDocument* pSourceDocument = pDataDocShell->GetDoc();
- if (pSourceDocument == NULL)
+ if (pSourceDocument == nullptr)
return;
// We have to remove the layout suffix from the layout name which is
@@ -186,7 +186,7 @@ sal_uInt16 ViewClipboard::InsertSlides (
bool bMergeMasterPages = !rTransferable.HasSourceDoc( &rDoc );
// Prepare the insertion.
- const std::vector<OUString> *pBookmarkList = NULL;
+ const std::vector<OUString> *pBookmarkList = nullptr;
DrawDocShell* pDataDocSh;
if (rTransferable.HasPageBookmarks())
{
@@ -204,7 +204,7 @@ sal_uInt16 ViewClipboard::InsertSlides (
pDataDocSh = static_cast<DrawDocShell*>(pShell);
SdDrawDocument* pDataDoc = pDataDocSh->GetDoc();
- if (pDataDoc!=NULL && pDataDoc->GetSdPageCount(PK_STANDARD))
+ if (pDataDoc!=nullptr && pDataDoc->GetSdPageCount(PK_STANDARD))
nInsertPgCnt = pDataDoc->GetSdPageCount(PK_STANDARD);
}
if (nInsertPgCnt > 0)
@@ -218,7 +218,7 @@ sal_uInt16 ViewClipboard::InsertSlides (
rDoc.InsertBookmarkAsPage(
pBookmarkList ? *pBookmarkList : std::vector<OUString>(),
- NULL,
+ nullptr,
false,
false,
nInsertPosition,
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 58d75681656e..6cc54d5746b1 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -235,8 +235,8 @@ ViewShellBase::ViewShellBase (
| SfxViewShellFlags::HAS_PRINTOPTIONS),
maMutex(),
mpImpl(),
- mpDocShell (NULL),
- mpDocument (NULL)
+ mpDocShell (nullptr),
+ mpDocument (nullptr)
{
mpImpl.reset(new Implementation(*this));
mpImpl->mpViewWindow = VclPtr<FocusForwardingWindow>::Create(_pFrame->GetWindow(),*this);
@@ -245,10 +245,10 @@ ViewShellBase::ViewShellBase (
_pFrame->GetWindow().SetBackground(Application::GetSettings().GetStyleSettings().GetLightColor());
// Set up the members in the correct order.
- if (0 != dynamic_cast< DrawDocShell *>( GetViewFrame()->GetObjectShell() ))
+ if (nullptr != dynamic_cast< DrawDocShell *>( GetViewFrame()->GetObjectShell() ))
mpDocShell = static_cast<DrawDocShell*>(
GetViewFrame()->GetObjectShell());
- if (mpDocShell != NULL)
+ if (mpDocShell != nullptr)
mpDocument = mpDocShell->GetDoc();
mpImpl->mpViewShellManager.reset(new ViewShellManager(*this));
@@ -270,15 +270,15 @@ ViewShellBase::~ViewShellBase()
xSlideShow.clear();
// Tell the controller that the ViewShellBase is not available anymore.
- if (mpImpl->mpController.get() != NULL)
+ if (mpImpl->mpController.get() != nullptr)
mpImpl->mpController->ReleaseViewShellBase();
// We have to hide the main window to prevent SFX complaining after a
// reload about it being already visible.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell!=NULL
- && pShell->GetActiveWindow()!=NULL
- && pShell->GetActiveWindow()->GetParent()!=NULL)
+ if (pShell!=nullptr
+ && pShell->GetActiveWindow()!=nullptr
+ && pShell->GetActiveWindow()->GetParent()!=nullptr)
{
pShell->GetActiveWindow()->GetParent()->Hide();
}
@@ -289,7 +289,7 @@ ViewShellBase::~ViewShellBase()
EndListening(*GetViewFrame());
EndListening(*GetDocShell());
- SetWindow(NULL);
+ SetWindow(nullptr);
mpImpl->mpFormShellManager.reset();
}
@@ -337,7 +337,7 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView)
// has been created.
sd::framework::ConfigurationController* pConfigurationController
= dynamic_cast<sd::framework::ConfigurationController*>(xConfigurationController.get());
- if (pConfigurationController != NULL)
+ if (pConfigurationController != nullptr)
{
while (
! pConfigurationController->getResource(xCenterViewId).is()
@@ -359,10 +359,10 @@ void ViewShellBase::LateInit (const OUString& rsDefaultView)
// Remember the type of the current main view shell in the frame view.
ViewShell* pViewShell = GetMainViewShell().get();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
pFrameView->SetViewShellTypeOnLoad(pViewShell->GetShellType());
}
}
@@ -377,7 +377,7 @@ std::shared_ptr<ViewShell> ViewShellBase::GetMainViewShell() const
std::shared_ptr<ViewShell> pMainViewShell (
framework::FrameworkHelper::Instance(*const_cast<ViewShellBase*>(this))
->GetViewShell(framework::FrameworkHelper::msCenterPaneURL));
- if (pMainViewShell.get() == NULL)
+ if (pMainViewShell.get() == nullptr)
pMainViewShell = framework::FrameworkHelper::Instance(*const_cast<ViewShellBase*>(this))
->GetViewShell(framework::FrameworkHelper::msFullScreenPaneURL);
return pMainViewShell;
@@ -385,14 +385,14 @@ std::shared_ptr<ViewShell> ViewShellBase::GetMainViewShell() const
ViewShellBase* ViewShellBase::GetViewShellBase (SfxViewFrame* pViewFrame)
{
- ViewShellBase* pBase = NULL;
+ ViewShellBase* pBase = nullptr;
- if (pViewFrame != NULL)
+ if (pViewFrame != nullptr)
{
// Get the view shell for the frame and cast it to
// sd::ViewShellBase.
SfxViewShell* pSfxViewShell = pViewFrame->GetViewShell();
- if (pSfxViewShell!=NULL && dynamic_cast< ::sd::ViewShellBase *>( pSfxViewShell ) != nullptr)
+ if (pSfxViewShell!=nullptr && dynamic_cast< ::sd::ViewShellBase *>( pSfxViewShell ) != nullptr)
pBase = static_cast<ViewShellBase*>(pSfxViewShell);
}
@@ -474,13 +474,13 @@ void ViewShellBase::OuterResizePixel (const Point& rOrigin, const Size &rSize)
void ViewShellBase::Rearrange()
{
- OSL_ASSERT(GetViewFrame()!=NULL);
+ OSL_ASSERT(GetViewFrame()!=nullptr);
// There is a bug in the communication between embedded objects and the
// framework::LayoutManager that leads to missing resize updates. The
// following workaround enforces such an update by cycling the border to
// zero and back to the current value.
- if (GetWindow() != NULL)
+ if (GetWindow() != nullptr)
{
SetBorderPixel(SvBorder());
UpdateBorder(true);
@@ -498,7 +498,7 @@ ErrCode ViewShellBase::DoVerb (long nVerb)
ErrCode aResult = ERRCODE_NONE;
::sd::ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
aResult = pShell->DoVerb (nVerb);
return aResult;
@@ -513,7 +513,7 @@ Reference<view::XRenderable> ViewShellBase::GetRenderable()
SfxPrinter* ViewShellBase::GetPrinter (bool bCreate)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
return GetDocShell()->GetPrinter (bCreate);
}
@@ -523,7 +523,7 @@ sal_uInt16 ViewShellBase::SetPrinter (
SfxPrinterChangeFlags nDiffFlags,
bool bIsAPI)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
GetDocShell()->SetPrinter(pNewPrinter);
@@ -660,7 +660,7 @@ void ViewShellBase::GetState (SfxItemSet& rSet)
{
mpImpl->GetSlotState(rSet);
- FuBullet::GetSlotState( rSet, 0, GetViewFrame() );
+ FuBullet::GetSlotState( rSet, nullptr, GetViewFrame() );
}
void ViewShellBase::WriteUserDataSequence (
@@ -669,7 +669,7 @@ void ViewShellBase::WriteUserDataSequence (
{
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
pShell->WriteUserDataSequence (rSequence, bBrowse);
}
@@ -679,7 +679,7 @@ void ViewShellBase::ReadUserDataSequence (
{
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
{
pShell->ReadUserDataSequence (rSequence, bBrowse);
@@ -746,7 +746,7 @@ void ViewShellBase::SetZoomFactor (
SfxViewShell::SetZoomFactor (rZoomX, rZoomY);
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
pShell->SetZoomFactor (rZoomX, rZoomY);
}
@@ -760,7 +760,7 @@ bool ViewShellBase::PrepareClose (bool bUI)
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
bResult = pShell->PrepareClose (bUI);
}
@@ -773,7 +773,7 @@ void ViewShellBase::WriteUserData (OUString& rString, bool bBrowse)
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
pShell->WriteUserData (rString);
}
@@ -783,7 +783,7 @@ void ViewShellBase::ReadUserData (const OUString& rString, bool bBrowse)
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
pShell->ReadUserData (rString);
}
@@ -791,7 +791,7 @@ SdrView* ViewShellBase::GetDrawView() const
{
// Forward call to main sub shell.
ViewShell* pShell = GetMainViewShell().get();
- if (pShell != NULL)
+ if (pShell != nullptr)
return pShell->GetDrawView ();
else
return SfxViewShell::GetDrawView();
@@ -804,7 +804,7 @@ void ViewShellBase::AdjustPosSizePixel (const Point &rOfs, const Size &rSize)
void ViewShellBase::SetBusyState (bool bBusy)
{
- if (GetDocShell() != NULL)
+ if (GetDocShell() != nullptr)
GetDocShell()->SetWaitCursor (bBusy);
}
@@ -817,7 +817,7 @@ void ViewShellBase::UpdateBorder ( bool bForce /* = false */ )
// We have to check the existence of the window, too.
// The SfxViewFrame accesses the window without checking it.
ViewShell* pMainViewShell = GetMainViewShell().get();
- if (pMainViewShell != NULL && GetWindow()!=NULL)
+ if (pMainViewShell != nullptr && GetWindow()!=nullptr)
{
SvBorder aCurrentBorder (GetBorderPixel());
bool bOuterResize ( ! GetDocShell()->IsInPlaceActive());
@@ -838,7 +838,7 @@ void ViewShellBase::ShowUIControls (bool bVisible)
mpImpl->mpViewTabBar->GetTabControl()->Show(bVisible);
ViewShell* pMainViewShell = GetMainViewShell().get();
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
pMainViewShell->ShowUIControls (bVisible);
UpdateBorder();
@@ -911,8 +911,8 @@ OUString ViewShellBase::GetInitialViewShellType()
std::shared_ptr<tools::EventMultiplexer> ViewShellBase::GetEventMultiplexer()
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
+ OSL_ASSERT(mpImpl->mpEventMultiplexer.get()!=nullptr);
return mpImpl->mpEventMultiplexer;
}
@@ -924,37 +924,37 @@ const Rectangle& ViewShellBase::getClientRectangle() const
std::shared_ptr<ToolBarManager> ViewShellBase::GetToolBarManager() const
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpToolBarManager.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
+ OSL_ASSERT(mpImpl->mpToolBarManager.get()!=nullptr);
return mpImpl->mpToolBarManager;
}
std::shared_ptr<FormShellManager> ViewShellBase::GetFormShellManager() const
{
- OSL_ASSERT(mpImpl.get()!=NULL);
- OSL_ASSERT(mpImpl->mpFormShellManager.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
+ OSL_ASSERT(mpImpl->mpFormShellManager.get()!=nullptr);
return mpImpl->mpFormShellManager;
}
DrawController& ViewShellBase::GetDrawController() const
{
- OSL_ASSERT(mpImpl.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
return *mpImpl->mpController;
}
void ViewShellBase::SetViewTabBar (const ::rtl::Reference<ViewTabBar>& rViewTabBar)
{
- OSL_ASSERT(mpImpl.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
mpImpl->mpViewTabBar = rViewTabBar;
}
vcl::Window* ViewShellBase::GetViewWindow()
{
- OSL_ASSERT(mpImpl.get()!=NULL);
+ OSL_ASSERT(mpImpl.get()!=nullptr);
return mpImpl->mpViewWindow.get();
}
@@ -1022,8 +1022,8 @@ ViewShellBase::Implementation::Implementation (ViewShellBase& rBase)
ViewShellBase::Implementation::~Implementation()
{
- mpController = NULL;
- mpViewTabBar = NULL;
+ mpController = nullptr;
+ mpViewTabBar = nullptr;
mpViewWindow.disposeAndClear();
mpToolBarManager.reset();
}
@@ -1036,10 +1036,10 @@ void ViewShellBase::Implementation::LateInit()
void ViewShellBase::Implementation::ProcessRestoreEditingViewSlot()
{
ViewShell* pViewShell = mrBase.GetMainViewShell().get();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
FrameView* pFrameView = pViewShell->GetFrameView();
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
{
// Set view shell, edit mode, and page kind.
pFrameView->SetViewShEditMode(
@@ -1086,7 +1086,7 @@ void ViewShellBase::Implementation::ResizePixel (
// Calculate and set the border before the controls are placed.
SvBorder aBorder;
- if (pMainViewShell != NULL)
+ if (pMainViewShell != nullptr)
aBorder = pMainViewShell->GetBorder(bOuterResize);
aBorder += mrBase.GetBorder(bOuterResize);
if (mrBase.GetBorderPixel() != aBorder)
@@ -1134,7 +1134,7 @@ void ViewShellBase::Implementation::SetPaneVisibility (
const SfxItemSet* pArguments = rRequest.GetArgs();
bool bShowChildWindow;
sal_uInt16 nSlotId = rRequest.GetSlot();
- if (pArguments != NULL)
+ if (pArguments != nullptr)
bShowChildWindow = static_cast<const SfxBoolItem&>(
pArguments->Get(nSlotId)).GetValue();
else
@@ -1318,14 +1318,14 @@ CurrentPageSetter::CurrentPageSetter (ViewShellBase& rBase)
void CurrentPageSetter::operator() (bool)
{
- FrameView* pFrameView = NULL;
+ FrameView* pFrameView = nullptr;
- if (mrBase.GetMainViewShell() != 0)
+ if (mrBase.GetMainViewShell() != nullptr)
{
pFrameView = mrBase.GetMainViewShell()->GetFrameView();
}
- if (pFrameView!=NULL)
+ if (pFrameView!=nullptr)
{
try
{
@@ -1395,10 +1395,10 @@ void FocusForwardingWindow::dispose()
void FocusForwardingWindow::KeyInput (const KeyEvent& rKEvt)
{
std::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell();
- if (pViewShell.get() != NULL)
+ if (pViewShell.get() != nullptr)
{
vcl::Window* pWindow = pViewShell->GetActiveWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
// Forward the focus so that the window is called directly the
// next time.
@@ -1412,10 +1412,10 @@ void FocusForwardingWindow::KeyInput (const KeyEvent& rKEvt)
void FocusForwardingWindow::Command (const CommandEvent& rEvent)
{
std::shared_ptr<ViewShell> pViewShell = mrBase.GetMainViewShell();
- if (pViewShell.get() != NULL)
+ if (pViewShell.get() != nullptr)
{
vcl::Window* pWindow = pViewShell->GetActiveWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
pWindow->Command(rEvent);
}
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 4df152a283d1..b523e03d5345 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -78,7 +78,7 @@ ViewShell::Implementation::~Implementation()
if ( ! mpUpdateLockForMouse.expired())
{
std::shared_ptr<ToolBarManagerLock> pLock(mpUpdateLockForMouse);
- if (pLock.get() != NULL)
+ if (pLock.get() != nullptr)
{
// Force the ToolBarManagerLock to be released even when the
// IsUICaptured() returns <TRUE/>.
@@ -98,7 +98,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
sal_uInt8 aBckgrndObj = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), false);
SetOfByte aVisibleLayers;
bool bHandoutMode = false;
- SdPage* pHandoutMPage = NULL;
+ SdPage* pHandoutMPage = nullptr;
OUString aNewName;
AutoLayout aNewAutoLayout;
@@ -107,14 +107,14 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
bool bBObjsVisible;
const SfxItemSet* pArgs = rRequest.GetArgs();
- if (pCurrentPage != NULL && pCurrentPage->TRG_HasMasterPage())
+ if (pCurrentPage != nullptr && pCurrentPage->TRG_HasMasterPage())
aVisibleLayers = pCurrentPage->TRG_GetMasterPageVisibleLayers();
else
aVisibleLayers.SetAll();
do
{
- if (pCurrentPage == NULL)
+ if (pCurrentPage == nullptr)
break;
if (!pArgs || pArgs->Count() == 1 || pArgs->Count() == 2 )
@@ -192,7 +192,7 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
{
sal_uInt16 nPage = (pCurrentPage->GetPageNum()-1) / 2;
SdPage* pNotesPage = pDocument->GetSdPage(nPage, PK_NOTES);
- if (pNotesPage != NULL)
+ if (pNotesPage != nullptr)
pNotesPage->SetName(aNewName);
}
}
@@ -241,13 +241,13 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP
if( !pDocument )
return;
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
if( pWhatPage )
{
pPage = pDocument->GetSdPage(static_cast<sal_uInt16>(pWhatPage->GetValue()), ePageKind);
}
- if( pPage == 0 )
+ if( pPage == nullptr )
pPage = mrViewShell.getCurrentPage();
if( pPage )
@@ -314,10 +314,10 @@ sal_uInt16 ViewShell::Implementation::GetViewId()
SvxIMapDlg* ViewShell::Implementation::GetImageMapDialog()
{
- SvxIMapDlg* pDialog = NULL;
+ SvxIMapDlg* pDialog = nullptr;
SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow(
SvxIMapDlgChildWindow::GetChildWindowId());
- if (pChildWindow != NULL)
+ if (pChildWindow != nullptr)
pDialog = dynamic_cast<SvxIMapDlg*>(pChildWindow->GetWindow());
return pDialog;
}
diff --git a/sd/source/ui/view/ViewShellManager.cxx b/sd/source/ui/view/ViewShellManager.cxx
index 3def66fa7213..ded5aa5d3349 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -265,7 +265,7 @@ void ViewShellManager::ActivateViewShell (ViewShell* pViewShell)
void ViewShellManager::DeactivateViewShell (const ViewShell* pShell)
{
- if (mbValid && pShell!=NULL)
+ if (mbValid && pShell!=nullptr)
mpImpl->DeactivateViewShell(*pShell);
}
@@ -298,13 +298,13 @@ void ViewShellManager::InvalidateAllSubShells (ViewShell* pViewShell)
void ViewShellManager::ActivateShell (SfxShell* pShell)
{
- if (mbValid && pShell!=NULL)
+ if (mbValid && pShell!=nullptr)
mpImpl->ActivateShell(*pShell);
}
void ViewShellManager::DeactivateShell (const SfxShell* pShell)
{
- if (mbValid && pShell!=NULL)
+ if (mbValid && pShell!=nullptr)
mpImpl->DeactivateShell(*pShell);
}
@@ -319,7 +319,7 @@ SfxShell* ViewShellManager::GetShell (ShellId nId) const
if (mbValid)
return mpImpl->GetShell(nId);
else
- return NULL;
+ return nullptr;
}
SfxShell* ViewShellManager::GetTopShell() const
@@ -327,7 +327,7 @@ SfxShell* ViewShellManager::GetTopShell() const
if (mbValid)
return mpImpl->GetTopShell();
else
- return NULL;
+ return nullptr;
}
SfxShell* ViewShellManager::GetTopViewShell() const
@@ -335,7 +335,7 @@ SfxShell* ViewShellManager::GetTopViewShell() const
if (mbValid)
return mpImpl->GetTopViewShell();
else
- return NULL;
+ return nullptr;
}
void ViewShellManager::Shutdown()
@@ -369,11 +369,11 @@ ViewShellManager::Implementation::Implementation (
mnUpdateLockCount(0),
mbKeepMainViewShellOnTop(false),
mbShellStackIsUpToDate(true),
- mpFormShell(NULL),
- mpFormShellParent(NULL),
+ mpFormShell(nullptr),
+ mpFormShellParent(nullptr),
mbFormShellAboveParent(true),
- mpTopShell(NULL),
- mpTopViewShell(NULL)
+ mpTopShell(nullptr),
+ mpTopViewShell(nullptr)
{
(void)rManager;
}
@@ -427,10 +427,10 @@ void ViewShellManager::Implementation::ActivateViewShell (ViewShell* pViewShell)
// Register as window listener so that the shells of the current
// window can be moved to the top of the shell stack.
- if (aResult.mpShell != NULL)
+ if (aResult.mpShell != nullptr)
{
vcl::Window* pWindow = aResult.GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
pWindow->AddEventListener(
LINK(this, ViewShellManager::Implementation, WindowEventHandler));
@@ -491,7 +491,7 @@ void ViewShellManager::Implementation::ActivateShell (SfxShell& rShell)
void ViewShellManager::Implementation::ActivateShell (const ShellDescriptor& rDescriptor)
{
// Put shell on top of the active view shells.
- if (rDescriptor.mpShell != NULL)
+ if (rDescriptor.mpShell != nullptr)
{
// Determine where to put the view shell on the stack. By default
// it is put on top of the stack. When the view shell of the center
@@ -571,7 +571,7 @@ void ViewShellManager::Implementation::ActivateSubShell (
// Add just the id of the sub shell. The actual shell is created
// later in CreateShells().
UpdateLock aLock (*this);
- rList.push_back(ShellDescriptor(NULL, nId));
+ rList.push_back(ShellDescriptor(nullptr, nId));
}
void ViewShellManager::Implementation::DeactivateSubShell (
@@ -592,7 +592,7 @@ void ViewShellManager::Implementation::DeactivateSubShell (
if (iShell == rList.end())
return;
SfxShell* pShell = iShell->mpShell;
- if (pShell == NULL)
+ if (pShell == nullptr)
return;
UpdateLock aLock (*this);
@@ -615,7 +615,7 @@ void ViewShellManager::Implementation::MoveToTop (const SfxShell& rShell)
// initialized. Without dispatcher we can not rebuild the shell stack
// to move the requested shell to the top. So return right away instead
// of making a mess without being able to clean up afterwards.
- if (mrBase.GetDispatcher() == NULL)
+ if (mrBase.GetDispatcher() == nullptr)
return;
ActiveShellList::iterator iShell (::std::find_if (
@@ -682,7 +682,7 @@ SfxShell* ViewShellManager::Implementation::GetShell (ShellId nId) const
{
::osl::MutexGuard aGuard (maMutex);
- SfxShell* pShell = NULL;
+ SfxShell* pShell = nullptr;
// First search the active view shells.
ActiveShellList::const_iterator iShell (
@@ -759,16 +759,16 @@ void ViewShellManager::Implementation::UpdateShellStack()
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=nullptr)
? pTopMostShell->GetUndoManager()
- : NULL;
+ : nullptr;
// 1. Create the missing shells.
CreateShells();
// Update the pointer to the top-most active view shell.
mpTopViewShell = (maActiveViewShells.empty())
- ? 0 : maActiveViewShells.begin()->mpShell;
+ ? nullptr : maActiveViewShells.begin()->mpShell;
// 2. Create the internal target stack.
@@ -778,7 +778,7 @@ void ViewShellManager::Implementation::UpdateShellStack()
// 3. Get SFX shell stack.
ShellStack aSfxShellStack;
sal_uInt16 nIndex (0);
- while (mrBase.GetSubShell(nIndex)!=NULL)
+ while (mrBase.GetSubShell(nIndex)!=nullptr)
++nIndex;
aSfxShellStack.reserve(nIndex);
while (nIndex-- > 0)
@@ -827,13 +827,13 @@ void ViewShellManager::Implementation::UpdateShellStack()
if (mbShellStackIsUpToDate)
break;
}
- if (mrBase.GetDispatcher() != NULL)
+ if (mrBase.GetDispatcher() != nullptr)
mrBase.GetDispatcher()->Flush();
// Update the pointer to the top-most shell and set its undo manager
// to the one of the previous top-most shell.
mpTopShell = mrBase.GetSubShell(0);
- if (mpTopShell!=NULL && pUndoManager!=NULL && mpTopShell->GetUndoManager()==NULL)
+ if (mpTopShell!=nullptr && pUndoManager!=nullptr && mpTopShell->GetUndoManager()==nullptr)
mpTopShell->SetUndoManager(pUndoManager);
// Finally tell an invocation of this method on a higher level that it can (has
@@ -852,9 +852,9 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
// Remember the undo manager from the top-most shell on the stack.
SfxShell* pTopMostShell = mrBase.GetSubShell(0);
- ::svl::IUndoManager* pUndoManager = (pTopMostShell!=NULL)
+ ::svl::IUndoManager* pUndoManager = (pTopMostShell!=nullptr)
? pTopMostShell->GetUndoManager()
- : NULL;
+ : nullptr;
#if OSL_DEBUG_LEVEL >= 2
SAL_INFO("sd.view", OSL_THIS_FUNC << "TakeShellsFromStack( " << pShell << ")");
@@ -866,18 +866,18 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
for (sal_uInt16 nIndex=0; true; nIndex++)
{
SfxShell* pShellOnStack = mrBase.GetSubShell(nIndex);
- if (pShellOnStack == NULL)
+ if (pShellOnStack == nullptr)
{
// Set pShell to NULL to indicate the following code that the
// shell is not on the stack.
- pShell = NULL;
+ pShell = nullptr;
break;
}
else if (pShellOnStack == pShell)
break;
}
- if (pShell != NULL)
+ if (pShell != nullptr)
{
// 1. Deactivate our shells on the stack before they are removed so
// that during the Deactivation() calls the stack is still intact.
@@ -900,13 +900,13 @@ void ViewShellManager::Implementation::TakeShellsFromStack (const SfxShell* pShe
}
// 3. Update the stack.
- if (mrBase.GetDispatcher() != NULL)
+ if (mrBase.GetDispatcher() != nullptr)
mrBase.GetDispatcher()->Flush();
// Update the pointer to the top-most shell and set its undo manager
// to the one of the previous top-most shell.
mpTopShell = mrBase.GetSubShell(0);
- if (mpTopShell!=NULL && pUndoManager!=NULL && mpTopShell->GetUndoManager()==NULL)
+ if (mpTopShell!=nullptr && pUndoManager!=nullptr && mpTopShell->GetUndoManager()==nullptr)
mpTopShell->SetUndoManager(pUndoManager);
}
@@ -934,9 +934,9 @@ void ViewShellManager::Implementation::CreateShells()
SubShellSubList::iterator iSubShell;
for (iSubShell=rList.begin(); iSubShell!=rList.end(); ++iSubShell)
{
- if (iSubShell->mpShell == NULL)
+ if (iSubShell->mpShell == nullptr)
{
- *iSubShell = CreateSubShell(iShell->mpShell,iSubShell->mnId,NULL,NULL);
+ *iSubShell = CreateSubShell(iShell->mpShell,iSubShell->mnId,nullptr,nullptr);
}
}
}
@@ -954,7 +954,7 @@ void ViewShellManager::Implementation::CreateTargetStack (ShellStack& rStack) co
{
// Possibly place the form shell below the current view shell.
if ( ! mbFormShellAboveParent
- && mpFormShell!=NULL
+ && mpFormShell!=nullptr
&& iViewShell->mpShell==mpFormShellParent)
{
rStack.push_back(mpFormShell);
@@ -965,7 +965,7 @@ void ViewShellManager::Implementation::CreateTargetStack (ShellStack& rStack) co
// Possibly place the form shell above the current view shell.
if (mbFormShellAboveParent
- && mpFormShell!=NULL
+ && mpFormShell!=nullptr
&& iViewShell->mpShell==mpFormShellParent)
{
rStack.push_back(mpFormShell);
@@ -1044,11 +1044,11 @@ ShellDescriptor ViewShellManager::Implementation::CreateSubShell (
for (FactoryList::const_iterator iFactory=aRange.first; iFactory!=aRange.second; ++iFactory)
{
SharedShellFactory pFactory = iFactory->second;
- if (pFactory != 0)
+ if (pFactory != nullptr)
aResult.mpShell = pFactory->CreateShell(nShellId, pParentWindow, pFrameView);
// Exit the loop when the shell has been successfully created.
- if (aResult.mpShell != NULL)
+ if (aResult.mpShell != nullptr)
{
aResult.mpFactory = pFactory;
aResult.mnId = nShellId;
@@ -1062,13 +1062,13 @@ ShellDescriptor ViewShellManager::Implementation::CreateSubShell (
void ViewShellManager::Implementation::DestroyViewShell (
ShellDescriptor& rDescriptor)
{
- OSL_ASSERT(rDescriptor.mpShell != NULL);
+ OSL_ASSERT(rDescriptor.mpShell != nullptr);
if (rDescriptor.mbIsListenerAddedToWindow)
{
rDescriptor.mbIsListenerAddedToWindow = false;
vcl::Window* pWindow = rDescriptor.GetWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
pWindow->RemoveEventListener(
LINK(this, ViewShellManager::Implementation, WindowEventHandler));
@@ -1082,7 +1082,7 @@ void ViewShellManager::Implementation::DestroyViewShell (
maShellFactories.erase(aRange.first, aRange.second);
// Release the shell.
- if (rDescriptor.mpFactory.get() != NULL)
+ if (rDescriptor.mpFactory.get() != nullptr)
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
@@ -1091,7 +1091,7 @@ void ViewShellManager::Implementation::DestroySubShell (
const ShellDescriptor& rDescriptor)
{
(void)rParentShell;
- OSL_ASSERT(rDescriptor.mpFactory.get() != NULL);
+ OSL_ASSERT(rDescriptor.mpFactory.get() != nullptr);
rDescriptor.mpFactory->ReleaseShell(rDescriptor.mpShell);
}
@@ -1105,7 +1105,7 @@ void ViewShellManager::Implementation::InvalidateAllSubShells (const SfxShell* p
SubShellSubList& rList (iList->second);
SubShellSubList::iterator iShell;
for (iShell=rList.begin(); iShell!=rList.end(); ++iShell)
- if (iShell->mpShell != NULL)
+ if (iShell->mpShell != nullptr)
iShell->mpShell->Invalidate();
}
}
@@ -1122,10 +1122,10 @@ void ViewShellManager::Implementation::Shutdown()
while ( ! maActiveViewShells.empty())
{
SfxShell* pShell = maActiveViewShells.front().mpShell;
- if (pShell != NULL)
+ if (pShell != nullptr)
{
ViewShell* pViewShell = dynamic_cast<ViewShell*>(pShell);
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
DeactivateViewShell(*pViewShell);
else
DeactivateShell(*pShell);
@@ -1171,15 +1171,15 @@ void ViewShellManager::Implementation::DumpSfxShellStack()
void ViewShellManager::Implementation::Deactivate (SfxShell* pShell)
{
- OSL_ASSERT(pShell!=NULL);
+ OSL_ASSERT(pShell!=nullptr);
// We have to end a text edit for view shells that are to be taken from
// the shell stack.
ViewShell* pViewShell = dynamic_cast<ViewShell*>(pShell);
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
sd::View* pView = pViewShell->GetView();
- if (pView!=NULL && pView->IsTextEdit())
+ if (pView!=nullptr && pView->IsTextEdit())
{
pView->SdrEndTextEdit();
pView->UnmarkAll();
@@ -1208,7 +1208,7 @@ void ViewShellManager::Implementation::SetFormShell (
namespace {
ShellDescriptor::ShellDescriptor()
- : mpShell(NULL),
+ : mpShell(nullptr),
mnId(0),
mpFactory(),
mbIsListenerAddedToWindow(false)
@@ -1248,7 +1248,7 @@ ShellDescriptor& ShellDescriptor::operator= (const ShellDescriptor& rDescriptor)
bool ShellDescriptor::IsMainViewShell() const
{
ViewShell* pViewShell = dynamic_cast<ViewShell*>(mpShell);
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
return pViewShell->IsMainViewShell();
else
return false;
@@ -1257,10 +1257,10 @@ bool ShellDescriptor::IsMainViewShell() const
vcl::Window* ShellDescriptor::GetWindow() const
{
ViewShell* pViewShell = dynamic_cast<ViewShell*>(mpShell);
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
return pViewShell->GetActiveWindow();
else
- return NULL;
+ return nullptr;
}
} // end of anonymous namespace
diff --git a/sd/source/ui/view/ViewTabBar.cxx b/sd/source/ui/view/ViewTabBar.cxx
index a7b3372558e3..8591d2d9f967 100644
--- a/sd/source/ui/view/ViewTabBar.cxx
+++ b/sd/source/ui/view/ViewTabBar.cxx
@@ -82,9 +82,9 @@ ViewTabBar::ViewTabBar (
mpTabControl(VclPtr<TabBarControl>::Create(GetAnchorWindow(rxViewTabBarId,rxController), this)),
mxController(rxController),
maTabBarButtons(),
- mpTabPage(NULL),
+ mpTabPage(nullptr),
mxViewTabBarId(rxViewTabBarId),
- mpViewShellBase(NULL)
+ mpViewShellBase(nullptr)
{
// Set one new tab page for all tab entries. We need it only to
// determine the height of the tab bar.
@@ -123,7 +123,7 @@ ViewTabBar::ViewTabBar (
mpTabControl->Show();
- if (mpViewShellBase != NULL
+ if (mpViewShellBase != nullptr
&& rxViewTabBarId->isBoundToURL(
FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT))
{
@@ -137,11 +137,11 @@ ViewTabBar::~ViewTabBar()
void ViewTabBar::disposing()
{
- if (mpViewShellBase != NULL
+ if (mpViewShellBase != nullptr
&& mxViewTabBarId->isBoundToURL(
FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT))
{
- mpViewShellBase->SetViewTabBar(NULL);
+ mpViewShellBase->SetViewTabBar(nullptr);
}
if (mxConfigurationController.is())
@@ -156,27 +156,27 @@ void ViewTabBar::disposing()
// Receiving a disposed exception is the normal case. Is there
// a way to avoid it?
}
- mxConfigurationController = NULL;
+ mxConfigurationController = nullptr;
}
{
const SolarMutexGuard aSolarGuard;
// Set all references to the one tab page to NULL and delete the page.
for (sal_uInt16 nIndex=0; nIndex<mpTabControl->GetPageCount(); ++nIndex)
- mpTabControl->SetTabPage(nIndex, NULL);
+ mpTabControl->SetTabPage(nIndex, nullptr);
mpTabPage.disposeAndClear();
mpTabControl.disposeAndClear();
}
- mxController = NULL;
+ mxController = nullptr;
}
vcl::Window* ViewTabBar::GetAnchorWindow(
const Reference<XResourceId>& rxViewTabBarId,
const Reference<frame::XController>& rxController)
{
- vcl::Window* pWindow = NULL;
- ViewShellBase* pBase = NULL;
+ vcl::Window* pWindow = nullptr;
+ ViewShellBase* pBase = nullptr;
// Tunnel through the controller and use the ViewShellBase to obtain the
// view frame.
@@ -196,12 +196,12 @@ vcl::Window* ViewTabBar::GetAnchorWindow(
&& rxViewTabBarId->isBoundToURL(
FrameworkHelper::msCenterPaneURL, AnchorBindingMode_DIRECT))
{
- if (pBase != NULL && pBase->GetViewFrame() != NULL)
+ if (pBase != nullptr && pBase->GetViewFrame() != nullptr)
pWindow = &pBase->GetViewFrame()->GetWindow();
}
// The rest is (at the moment) just for the emergency case.
- if (pWindow == NULL)
+ if (pWindow == nullptr)
{
Reference<XPane> xPane;
try
@@ -222,7 +222,7 @@ vcl::Window* ViewTabBar::GetAnchorWindow(
Reference<lang::XUnoTunnel> xTunnel (xPane, UNO_QUERY_THROW);
framework::Pane* pPane = reinterpret_cast<framework::Pane*>(
xTunnel->getSomething(framework::Pane::getUnoTunnelId()));
- if (pPane != NULL)
+ if (pPane != nullptr)
pWindow = pPane->GetWindow()->GetParent();
}
catch (const RuntimeException&)
@@ -255,8 +255,8 @@ void SAL_CALL ViewTabBar::disposing(
{
if (rEvent.Source == mxConfigurationController)
{
- mxConfigurationController = NULL;
- mxController = NULL;
+ mxConfigurationController = nullptr;
+ mxController = nullptr;
}
}
@@ -361,10 +361,10 @@ bool ViewTabBar::ActivatePage()
{
}
- Client* pIPClient = NULL;
- if (mpViewShellBase != NULL)
+ Client* pIPClient = nullptr;
+ if (mpViewShellBase != nullptr)
pIPClient = dynamic_cast<Client*>(mpViewShellBase->GetIPClient());
- if (pIPClient==NULL || ! pIPClient->IsObjectInPlaceActive())
+ if (pIPClient==nullptr || ! pIPClient->IsObjectInPlaceActive())
{
sal_uInt16 nIndex (mpTabControl->GetCurPageId() - 1);
if (nIndex < maTabBarButtons.size())
@@ -400,7 +400,7 @@ int ViewTabBar::GetHeight()
{
TabPage* pActivePage (mpTabControl->GetTabPage(
mpTabControl->GetCurPageId()));
- if (pActivePage!=NULL && mpTabControl->IsReallyVisible())
+ if (pActivePage!=nullptr && mpTabControl->IsReallyVisible())
nHeight = pActivePage->GetPosPixel().Y();
if (nHeight <= 0)
@@ -511,7 +511,7 @@ css::uno::Sequence<css::drawing::framework::TabBarButton>
void ViewTabBar::UpdateActiveButton()
{
Reference<XView> xView;
- if (mpViewShellBase != NULL)
+ if (mpViewShellBase != nullptr)
xView = FrameworkHelper::Instance(*mpViewShellBase)->GetView(
mxViewTabBarId->getAnchor());
if (xView.is())
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index 4a2e0aa0f6aa..3dac87aabae2 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -33,8 +33,8 @@
namespace sd {
WindowUpdater::WindowUpdater()
- : mpViewShell (NULL),
- mpDocument (NULL)
+ : mpViewShell (nullptr),
+ mpDocument (nullptr)
{
maCTLOptions.AddListener(this);
}
@@ -46,7 +46,7 @@ WindowUpdater::~WindowUpdater() throw ()
void WindowUpdater::RegisterWindow (vcl::Window* pWindow)
{
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
tWindowList::iterator aWindowIterator (
::std::find (
@@ -85,17 +85,17 @@ void WindowUpdater::Update (
OutputDevice* pDevice,
SdDrawDocument* pDocument) const
{
- if (pDevice != NULL)
+ if (pDevice != nullptr)
{
UpdateWindow (pDevice);
- if (pDocument != NULL)
+ if (pDocument != nullptr)
pDocument->ReformatAllTextObjects();
}
}
void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const
{
- if (pDevice != NULL)
+ if (pDevice != nullptr)
{
SvtCTLOptions::TextNumerals aNumeralMode (maCTLOptions.GetCTLTextNumerals());
@@ -132,7 +132,7 @@ void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uI
Update (*aWindowIterator++);
// Reformat the document for the modified state to take effect.
- if (mpDocument != NULL)
+ if (mpDocument != nullptr)
mpDocument->ReformatAllTextObjects();
// Invalidate the windows to make the modified state visible.
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index c2d914e94460..8fc4277bf7e9 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -83,7 +83,7 @@ DrawView::DrawView( DrawDocShell* pDocSh, OutputDevice* pOutDev, DrawViewShell*
: ::sd::View(*pDocSh->GetDoc(), pOutDev, pShell)
, mpDocShell(pDocSh)
, mpDrawViewShell(pShell)
-, mpVDev(NULL)
+, mpVDev(nullptr)
, mnPOCHSmph(0)
{
SetCurrentObj(OBJ_RECT);
@@ -188,7 +188,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
pOV->CreateSelectionList(aSelList);
std::vector<Paragraph*>::reverse_iterator iter = aSelList.rbegin();
- Paragraph* pPara = iter != aSelList.rend() ? *iter : NULL;
+ Paragraph* pPara = iter != aSelList.rend() ? *iter : nullptr;
while (pPara)
{
@@ -234,7 +234,7 @@ bool DrawView::SetAttributes(const SfxItemSet& rSet,
}
++iter;
- pPara = iter != aSelList.rend() ? *iter : NULL;
+ pPara = iter != aSelList.rend() ? *iter : nullptr;
bool bJumpToLevel1 = false;
if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SfxItemState::SET )
@@ -549,7 +549,7 @@ void DrawView::DeleteMarked()
pUndoManager->EnterListAction(aUndo, aUndo);
}
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
bool bResetLayout = false;
const size_t nMarkCount = GetMarkedObjectList().GetMarkCount();
@@ -583,7 +583,7 @@ void DrawView::DeleteMarked()
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
bool bVertical = pTextObj && pTextObj->IsVerticalWriting();
Rectangle aRect( pObj->GetLogicRect() );
- SdrObject* pNewObj = pPage->InsertAutoLayoutShape( 0, ePresObjKind, bVertical, aRect, true );
+ SdrObject* pNewObj = pPage->InsertAutoLayoutShape( nullptr, ePresObjKind, bVertical, aRect, true );
// pUndoManager should not be NULL (see assert above)
// but since we have defensive code
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 24c141789627..543a674a7870 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -79,7 +79,7 @@ BezierObjectBar::BezierObjectBar(
BezierObjectBar::~BezierObjectBar()
{
- SetRepeatTarget(NULL);
+ SetRepeatTarget(nullptr);
}
/**
@@ -96,12 +96,12 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
if(xFunc.is())
{
- if( 0 != dynamic_cast< const FuSelection *>( xFunc.get() ))
+ if( nullptr != dynamic_cast< const FuSelection *>( xFunc.get() ))
{
sal_uInt16 nEditMode = static_cast<FuSelection*>(xFunc.get())->GetEditMode();
rSet.Put(SfxBoolItem(nEditMode, true));
}
- else if( 0 != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
+ else if( nullptr != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
{
sal_uInt16 nEditMode = static_cast<FuConstructBezierPolygon*>(xFunc.get())->GetEditMode();
rSet.Put(SfxBoolItem(nEditMode, true));
@@ -128,7 +128,7 @@ void BezierObjectBar::GetAttrState(SfxItemSet& rSet)
}
else
{
- IPolyPolygonEditorController* pIPPEC = 0;
+ IPolyPolygonEditorController* pIPPEC = nullptr;
if( mpView->GetMarkedObjectList().GetMarkCount() )
pIPPEC = mpView;
else
@@ -217,7 +217,7 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
{
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
- IPolyPolygonEditorController* pIPPEC = 0;
+ IPolyPolygonEditorController* pIPPEC = nullptr;
if( rMarkList.GetMarkCount() )
pIPPEC = mpView;
else
@@ -302,11 +302,11 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
if(xFunc.is())
{
- if( 0 != dynamic_cast< const FuSelection *>( xFunc.get() ))
+ if( nullptr != dynamic_cast< const FuSelection *>( xFunc.get() ))
{
static_cast<FuSelection*>(xFunc.get())->SetEditMode(rReq.GetSlot());
}
- else if( 0 != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
+ else if( nullptr != dynamic_cast< const FuConstructBezierPolygon *>( xFunc.get() ))
{
static_cast<FuConstructBezierPolygon*>(xFunc.get())->SetEditMode(rReq.GetSlot());
}
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 4472d54187d6..29c1ef3d21bd 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -121,7 +121,7 @@ TextObjectBar::TextObjectBar (
TextObjectBar::~TextObjectBar()
{
- SetRepeatTarget(NULL);
+ SetRepeatTarget(nullptr);
}
void TextObjectBar::GetCharState( SfxItemSet& rSet )
@@ -277,7 +277,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
std::vector<Paragraph*> aSelList;
pOLV->CreateSelectionList(aSelList);
- Paragraph* pPara = aSelList.empty() ? NULL : *(aSelList.begin());
+ Paragraph* pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
// find out if we are a OutlineView
bool bIsOutlineView(OUTLINERMODE_OUTLINEVIEW == pOLV->GetOutliner()->GetMode());
@@ -331,7 +331,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
}
// disable when first para and 2nd is not a title
- pPara = aSelList.empty() ? NULL : *(aSelList.begin());
+ pPara = aSelList.empty() ? nullptr : *(aSelList.begin());
if(!bDisableDown && bIsOutlineView
&& pPara
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index a163d36fefd2..d18703f7cd07 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -83,7 +83,7 @@ namespace sd {
void TextObjectBar::Execute( SfxRequest &rReq )
{
const SfxItemSet* pArgs = rReq.GetArgs();
- const SfxPoolItem* pPoolItem = NULL;
+ const SfxPoolItem* pPoolItem = nullptr;
sal_uInt16 nSlot = rReq.GetSlot();
OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
@@ -145,10 +145,10 @@ void TextObjectBar::Execute( SfxRequest &rReq )
}
for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
- SfxStyleSheet* pStyleSheet = NULL;
- if (pOLV->GetOutliner() != NULL)
+ SfxStyleSheet* pStyleSheet = nullptr;
+ if (pOLV->GetOutliner() != nullptr)
pStyleSheet = pOLV->GetOutliner()->GetStyleSheet(nPara);
- if (pStyleSheet != NULL)
+ if (pStyleSheet != nullptr)
{
SfxItemSet aAttr( pStyleSheet->GetItemSet() );
SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( nPara ) );
@@ -344,7 +344,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
::Outliner* pOL = pOLV->GetOutliner();
if (pOL)
{
- const SvxNumBulletItem *pItem = NULL;
+ const SvxNumBulletItem *pItem = nullptr;
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1");
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find(sStyleName, SD_STYLE_FAMILY_PSEUDO);
@@ -391,7 +391,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
case SID_SHRINK_FONT_SIZE:
{
const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(mpViewShell->GetDocSh()->GetItem( SID_ATTR_CHAR_FONTLIST ));
- const FontList* pFontList = pFonts ? pFonts->GetFontList(): 0;
+ const FontList* pFontList = pFonts ? pFonts->GetFontList(): nullptr;
if( pFontList )
{
FuText::ChangeFontSize( nSlot == SID_GROW_FONT_SIZE, pOLV, pFontList, mpView );
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index e7b2bed58960..3c510e5fc313 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -106,7 +106,7 @@ void DrawViewShell::UIActivating( SfxInPlaceClient* pCli )
// Disable own controls
maTabControl->Disable();
- if (GetLayerTabControl() != NULL)
+ if (GetLayerTabControl() != nullptr)
GetLayerTabControl()->Disable();
}
@@ -114,7 +114,7 @@ void DrawViewShell::UIDeactivated( SfxInPlaceClient* pCli )
{
// Enable own controls
maTabControl->Enable();
- if (GetLayerTabControl() != NULL)
+ if (GetLayerTabControl() != nullptr)
GetLayerTabControl()->Enable();
ViewShell::UIDeactivated(pCli);
@@ -165,7 +165,7 @@ void DrawViewShell::SelectionHasChanged()
GetViewFrame()->GetDispatcher()->Execute(
SID_3D_STATE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD, &aItem, 0L );
- SdrOle2Obj* pOleObj = NULL;
+ SdrOle2Obj* pOleObj = nullptr;
if ( mpDrawView->AreObjectsMarked() )
{
@@ -338,7 +338,7 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
}
LayerTabBar* pLayerBar = GetLayerTabControl();
- if (pLayerBar != NULL)
+ if (pLayerBar != nullptr)
pLayerBar->EndEditMode();
maTabControl->EndEditMode();
@@ -578,7 +578,7 @@ void DrawViewShell::UpdateHRuler()
Invalidate( SID_RULER_OBJECT );
Invalidate( SID_RULER_TEXT_RIGHT_TO_LEFT );
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->ForceUpdate();
}
@@ -592,7 +592,7 @@ void DrawViewShell::UpdateVRuler()
Invalidate( SID_RULER_PAGE_POS );
Invalidate( SID_RULER_OBJECT );
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->ForceUpdate();
}
@@ -675,7 +675,7 @@ void DrawViewShell::ResetActualPage()
// Update for TabControl
maTabControl->Clear();
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
@@ -759,10 +759,10 @@ bool DrawViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
bActivated = ViewShell::ActivateObject(pObj, nVerb);
- OSL_ASSERT(GetViewShell()!=NULL);
+ OSL_ASSERT(GetViewShell()!=nullptr);
Client* pClient = static_cast<Client*>(GetViewShell()->GetIPClient());
if (pClient)
- pClient->SetSdrGrafObj(NULL);
+ pClient->SetSdrGrafObj(nullptr);
}
return bActivated;
@@ -828,7 +828,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
if (mpActualPage)
{
- SdPage* pNewPage = NULL;
+ SdPage* pNewPage = nullptr;
if (meEditMode == EM_MASTERPAGE)
{
@@ -853,7 +853,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
}
else
{
- OSL_ASSERT(mpFrameView!=NULL);
+ OSL_ASSERT(mpFrameView!=nullptr);
mpFrameView->SetSelectedPage(nSelectedPage);
if (GetDoc()->GetSdPageCount(mePageKind) > nSelectedPage)
@@ -863,7 +863,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
SdrPageView* pPV = mpDrawView->GetSdrPageView();
- SdPage* pCurrentPage = pPV ? dynamic_cast<SdPage*>(pPV->GetPage()) : NULL;
+ SdPage* pCurrentPage = pPV ? dynamic_cast<SdPage*>(pPV->GetPage()) : nullptr;
if (pCurrentPage
&& pNewPage == pCurrentPage
&& maTabControl->GetPageText(nSelectedPage+1).equals(pNewPage->GetName()))
@@ -877,7 +877,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
mpDrawView->SdrEndTextEdit();
- mpActualPage = NULL;
+ mpActualPage = nullptr;
if (meEditMode == EM_PAGE)
{
@@ -935,7 +935,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
// tighten VisArea, to possibly deactivate objects
// !!! only if we are not in presentation mode (#96279) !!!
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
GetViewShell()->DisconnectAllClients();
VisAreaChanged(Rectangle(Point(), Size(1, 1)));
}
@@ -1079,7 +1079,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
// set pages for all available handout presentation objects
sd::ShapeList& rShapeList = pMaster->GetPresentationShapeList();
- SdrObject* pObj = 0;
+ SdrObject* pObj = nullptr;
rShapeList.seekShape(0);
while( (pObj = rShapeList.getNextShape()) )
@@ -1088,7 +1088,7 @@ bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage)
{
// #i105146# We want no content to be displayed for PK_HANDOUT,
// so just never set a page as content
- static_cast<SdrPageObj*>(pObj)->SetReferencedPage(0);
+ static_cast<SdrPageObj*>(pObj)->SetReferencedPage(nullptr);
}
}
}
@@ -1124,7 +1124,7 @@ bool DrawViewShell::IsSwitchPageAllowed() const
bool bOK = true;
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL && !pFormShell->PrepareClose(false))
+ if (pFormShell != nullptr && !pFormShell->PrepareClose(false))
bOK = false;
return bOK;
@@ -1137,7 +1137,7 @@ bool DrawViewShell::IsSwitchPageAllowed() const
void DrawViewShell::ResetActualLayer()
{
LayerTabBar* pLayerBar = GetLayerTabControl();
- if (pLayerBar != NULL)
+ if (pLayerBar != nullptr)
{
// remember old layer cound and current layer id
// this is needed when one layer is renamed to
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 5006e6ff9161..cebb95bc1d91 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -328,7 +328,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
Cancel();
if(HasCurrentFunction(SID_BEZIER_EDIT) )
GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
- if (pNewPage != NULL)
+ if (pNewPage != nullptr)
SwitchPage((pNewPage->GetPageNum()-1)/2);
rReq.Done ();
}
@@ -838,7 +838,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
for ( size_t i = 0; i < nCount; ++i )
{
- SfxStyleSheet* pSheet = NULL;
+ SfxStyleSheet* pSheet = nullptr;
SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
if (pObj->GetObjIdentifier() == OBJ_TITLETEXT)
@@ -1392,7 +1392,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aNewAttr.Put( SdAttrLayerThisPage() );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : 0);
+ std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(nullptr, aNewAttr, true, SD_RESSTR(STR_INSERTLAYER)) : nullptr);
if( pDlg )
{
pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_INSERTLAYER )->GetCommand() );
@@ -1560,7 +1560,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
aNewAttr.Put( SdAttrLayerThisPage() );
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(NULL, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : 0);
+ std::unique_ptr<AbstractSdInsertLayerDlg> pDlg(pFact ? pFact->CreateSdInsertLayerDlg(nullptr, aNewAttr, bDelete, SD_RESSTR(STR_MODIFYLAYER)) : nullptr);
if( pDlg )
{
pDlg->SetHelpId( SD_MOD()->GetSlotPool()->GetSlot( SID_MODIFYLAYER )->GetCommand() );
@@ -1740,12 +1740,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pHLItem->GetInsertMode() == HLINK_FIELD)
{
InsertURLField(pHLItem->GetURL(), pHLItem->GetName(),
- pHLItem->GetTargetFrame(), NULL);
+ pHLItem->GetTargetFrame(), nullptr);
}
else if (pHLItem->GetInsertMode() == HLINK_BUTTON)
{
InsertURLButton(pHLItem->GetURL(), pHLItem->GetName(),
- pHLItem->GetTargetFrame(), NULL);
+ pHLItem->GetTargetFrame(), nullptr);
}
else if (pHLItem->GetInsertMode() == HLINK_DEFAULT)
{
@@ -1754,12 +1754,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (pOlView)
{
InsertURLField(pHLItem->GetURL(), pHLItem->GetName(),
- pHLItem->GetTargetFrame(), NULL);
+ pHLItem->GetTargetFrame(), nullptr);
}
else
{
InsertURLButton(pHLItem->GetURL(), pHLItem->GetName(),
- pHLItem->GetTargetFrame(), NULL);
+ pHLItem->GetTargetFrame(), nullptr);
}
}
}
@@ -1898,13 +1898,13 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
const SvxFieldItem* pOldFldItem = pOLV->GetFieldAtSelection();
- if( pOldFldItem && ( 0 != dynamic_cast< const SvxURLField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxDateField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxTimeField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxPageField *>( pOldFldItem->GetField() ) ) )
+ if( pOldFldItem && ( nullptr != dynamic_cast< const SvxURLField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxDateField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxTimeField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxPageField *>( pOldFldItem->GetField() ) ) )
{
// select field, then it will be deleted when inserting
ESelection aSel = pOLV->GetSelection();
@@ -1921,7 +1921,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
Outliner* pOutl = GetDoc()->GetInternalOutliner();
pOutl->Init( OUTLINERMODE_TEXTOBJECT );
sal_uInt16 nOutlMode = pOutl->GetMode();
- pOutl->SetStyleSheet( 0, NULL );
+ pOutl->SetStyleSheet( 0, nullptr );
pOutl->QuickInsertField( *pFieldItem, ESelection() );
OutlinerParaObject* pOutlParaObject = pOutl->CreateParaObject();
@@ -1963,14 +1963,14 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection();
- if( pFldItem && (0 != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) )
+ if( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) )
{
// Dialog...
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : 0);
+ std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOLV->GetAttribs() ) : nullptr);
if( pDlg && pDlg->Execute() == RET_OK )
{
// To make a correct SetAttribs() call at the utlinerView
@@ -2079,7 +2079,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(NULL, aName));
+ std::unique_ptr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(nullptr, aName));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl));
@@ -2112,7 +2112,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "Dialog creation failed!");
- std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(NULL, aTitle, aDescription));
+ std::unique_ptr<AbstractSvxObjectTitleDescDialog> pDlg(pFact->CreateSvxObjectTitleDescDialog(nullptr, aTitle, aDescription));
OSL_ENSURE(pDlg, "Dialog creation failed!");
if(RET_OK == pDlg->Execute())
@@ -2500,7 +2500,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
case SID_SELECTALL: // BASIC
{
- if( (dynamic_cast<FuSelection*>( GetOldFunction().get() ) != 0) &&
+ if( (dynamic_cast<FuSelection*>( GetOldFunction().get() ) != nullptr) &&
!GetView()->IsFrameDragSingles() && GetView()->HasMarkablePoints())
{
if ( !mpDrawView->IsAction() )
@@ -2531,7 +2531,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( pStyleSheet && pStyleSheet->GetFamily() == SD_STYLE_FAMILY_MASTERPAGE)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
- if( (pStyleSheet == NULL) && GetView()->IsTextEdit() )
+ if( (pStyleSheet == nullptr) && GetView()->IsTextEdit() )
{
GetView()->SdrEndTextEdit();
@@ -2540,7 +2540,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
pStyleSheet = static_cast<SdStyleSheet*>(pStyleSheet)->GetPseudoStyleSheet();
}
- if( pStyleSheet == NULL )
+ if( pStyleSheet == nullptr )
{
rReq.Ignore();
break;
@@ -2578,7 +2578,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
GetViewFrame()->GetBindings().Invalidate( SID_IMAP );
if ( GetViewFrame()->HasChildWindow( nId )
- && ( ( ViewShell::Implementation::GetImageMapDialog() ) != NULL ) )
+ && ( ( ViewShell::Implementation::GetImageMapDialog() ) != nullptr ) )
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
@@ -2788,7 +2788,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
{
#ifdef ENABLE_SDREMOTE
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : 0;
+ VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : nullptr;
if (pDlg)
pDlg->Execute();
#endif
@@ -2853,8 +2853,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
// Determine current page and toggle visibility of layers
// associated with master page background or master page shapes.
SdPage* pPage = GetActualPage();
- if (pPage != NULL
- && GetDoc() != NULL)
+ if (pPage != nullptr
+ && GetDoc() != nullptr)
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
@@ -2876,7 +2876,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
GetActiveWindow(),
- GetDoc()) : 0);
+ GetDoc()) : nullptr);
if (pDlg)
{
@@ -3058,10 +3058,10 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
case SID_GROW_FONT_SIZE:
{
const SvxFontListItem* pFonts = dynamic_cast<const SvxFontListItem*>(GetDocSh()->GetItem( SID_ATTR_CHAR_FONTLIST ) );
- const FontList* pFontList = pFonts ? pFonts->GetFontList() : NULL;
+ const FontList* pFontList = pFonts ? pFonts->GetFontList() : nullptr;
if( pFontList )
{
- FuText::ChangeFontSize( nSId == SID_GROW_FONT_SIZE, NULL, pFontList, mpView );
+ FuText::ChangeFontSize( nSId == SID_GROW_FONT_SIZE, nullptr, pFontList, mpView );
GetViewFrame()->GetBindings().Invalidate( SID_ATTR_CHAR_FONTHEIGHT );
}
}
@@ -3085,7 +3085,7 @@ SdPage* DrawViewShell::CreateOrDuplicatePage (
SdPage* pPage,
const sal_Int32 nInsertPosition)
{
- SdPage* pNewPage = NULL;
+ SdPage* pNewPage = nullptr;
if (ePageKind == PK_STANDARD && meEditMode != EM_MASTERPAGE)
{
if ( mpDrawView->IsTextEdit() )
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index c9f3aa4d7d73..bfe2c56465a7 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -293,7 +293,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_INSERT_DATE_TIME:
{
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : 0);
+ std::unique_ptr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : nullptr);
if( pDlg )
{
pDlg->Execute();
@@ -317,7 +317,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
pPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage());
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : 0);
+ std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateMasterLayoutDialog( GetActiveWindow(), GetDoc(), pPage ) : nullptr);
if( pDlg )
{
pDlg->Execute();
@@ -330,7 +330,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_OBJECTRESIZE:
{
// The server likes to change the client size
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient();
if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
@@ -454,7 +454,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
case SID_ATTR_YEAR2000:
{
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL)
+ if (pFormShell != nullptr)
{
const SfxPoolItem* pItem;
if (rReq.GetArgs()->GetItemState(
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 9a162934414c..a252176c8bbe 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -133,7 +133,7 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
// this should be used for cursor travelling.
SdPage* pActualPage = GetActualPage();
const SdrMarkList& rMarkList = GetView()->GetMarkedObjectList();
- SdrTextObj* pCandidate = 0L;
+ SdrTextObj* pCandidate = nullptr;
if(pActualPage && 1 == rMarkList.GetMarkCount())
{
@@ -291,7 +291,7 @@ void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,
if (mbPipette)
{
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId());
- SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
+ SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
if (pBmpMask)
pBmpMask->PipetteClicked();
}
@@ -310,7 +310,7 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
{
bool bInsideOtherWindow = false;
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
aOutputArea = Rectangle(Point(0,0),
mpContentWindow->GetOutputSizePixel());
@@ -374,11 +374,11 @@ void DrawViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
ShowMousePosInfo(aRect, pWin);
- SvxBmpMask* pBmpMask = NULL;
+ SvxBmpMask* pBmpMask = nullptr;
if (mbPipette && GetViewFrame()->HasChildWindow(SvxBmpMaskChildWindow::GetChildWindowId()))
{
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId());
- pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
+ pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
}
if (pBmpMask)
@@ -498,13 +498,13 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
{
- InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", NULL );
+ InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", nullptr );
}
}
}
}
else if( rCEvt.GetCommand() == CommandEventId::ContextMenu && !bNativeShow &&
- pWin != NULL && !mpDrawView->IsAction() && !SD_MOD()->GetWaterCan() )
+ pWin != nullptr && !mpDrawView->IsAction() && !SD_MOD()->GetWaterCan() )
{
sal_uInt16 nSdResId = 0; // ResourceID for popup menu
bool bGraphicShell = dynamic_cast< const GraphicViewShell *>( this ) != nullptr;
@@ -516,11 +516,11 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
Size(FuPoor::HITPIX, 0 ) ).Width();
sal_uInt16 nHelpLine;
// for glue points
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
sal_uInt16 nPickId = 0;
// for field command
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
- const SvxFieldItem* pFldItem = NULL;
+ const SvxFieldItem* pFldItem = nullptr;
if( pOLV )
pFldItem = pOLV->GetFieldAtSelection();
@@ -538,10 +538,10 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
nSdResId = RID_DRAW_GLUEPOINT_POPUP;
}
// field command?
- else if( pFldItem && (0 != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ) )
+ else if( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ) )
{
LanguageType eLanguage( LANGUAGE_SYSTEM );
@@ -592,7 +592,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
mpDrawView->GetMarkedObjectList().GetMarkCount() == 1 )
{
pObj = mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
- if( HasCurrentFunction(SID_BEZIER_EDIT) && (dynamic_cast< SdrPathObj * >( pObj ) != 0 ) )
+ if( HasCurrentFunction(SID_BEZIER_EDIT) && (dynamic_cast< SdrPathObj * >( pObj ) != nullptr ) )
{
nSdResId = RID_BEZIER_POPUP;
}
@@ -780,7 +780,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
if( mpDrawView->AreObjectsMarked() && mpDrawView->GetMarkedObjectList().GetMarkCount() >= 1 )
{
Rectangle aMarkRect;
- mpDrawView->GetMarkedObjectList().TakeBoundRect(NULL,aMarkRect);
+ mpDrawView->GetMarkedObjectList().TakeBoundRect(nullptr,aMarkRect);
aMenuPos = GetActiveWindow()->LogicToPixel( aMarkRect.Center() );
//move the point into the visible window area
@@ -818,19 +818,19 @@ void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect,
long nVOffs = 0L;
sal_uInt16 nCnt;
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetLines();
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetLines();
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
{
nHOffs = mpHorizontalRuler->GetNullOffset() +
mpHorizontalRuler->GetPageOffset();
}
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
{
nVOffs = mpVerticalRuler->GetNullOffset() +
mpVerticalRuler->GetPageOffset();
@@ -851,14 +851,14 @@ void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect,
nCnt++;
}
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetLines(nCnt, pHLines);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetLines(nCnt, pVLines);
}
// display with coordinates in StatusBar
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
if ( !GetViewShell()->GetUIActiveClient() )
{
SfxItemSet aSet(GetPool(), SID_CONTEXT, SID_CONTEXT,
@@ -930,7 +930,7 @@ void DrawViewShell::ShowSnapLineContextMenu (
case SID_SET_SNAPITEM:
{
SfxUInt32Item aHelpLineItem (ID_VAL_INDEX, nSnapLineIndex);
- const SfxPoolItem* aArguments[] = {&aHelpLineItem, NULL};
+ const SfxPoolItem* aArguments[] = {&aHelpLineItem, nullptr};
GetViewFrame()->GetDispatcher()->Execute(
SID_SET_SNAPITEM,
SfxCallMode::SLOT,
diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx
index a789e8e751ef..88963c856f08 100644
--- a/sd/source/ui/view/drviews5.cxx
+++ b/sd/source/ui/view/drviews5.cxx
@@ -116,7 +116,7 @@ void DrawViewShell::ArrangeGUIElements()
maTabControl->Hide();
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
Client* pIPClient = static_cast<Client*>(GetViewShell()->GetIPClient());
bool bClientActive = false;
if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
@@ -436,7 +436,7 @@ void DrawViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction& rZoomY
void DrawViewShell::HidePage()
{
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL)
+ if (pFormShell != nullptr)
pFormShell->PrepareClose(false);
}
@@ -538,7 +538,7 @@ void DrawViewShell::VisAreaChanged(const Rectangle& rRect)
css::uno::Reference<css::accessibility::XAccessible>
DrawViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow)
{
- if (GetViewShellBase().GetController() != NULL)
+ if (GetViewShellBase().GetController() != nullptr)
{
accessibility::AccessibleDrawDocumentView* pDocumentView =
new accessibility::AccessibleDrawDocumentView (
@@ -560,7 +560,7 @@ int DrawViewShell::GetActiveTabLayerIndex() const
{
const LayerTabBar* pBar
= const_cast<DrawViewShell*>(this)->GetLayerTabControl ();
- if (pBar != NULL)
+ if (pBar != nullptr)
return pBar->GetPagePos (pBar->GetCurPageId());
else
return -1;
@@ -569,7 +569,7 @@ int DrawViewShell::GetActiveTabLayerIndex() const
void DrawViewShell::SetActiveTabLayerIndex (int nIndex)
{
LayerTabBar* pBar = GetLayerTabControl ();
- if (pBar != NULL)
+ if (pBar != nullptr)
{
// Ignore invalid indices silently.
if (nIndex>=0 && nIndex<pBar->GetPageCount())
@@ -595,7 +595,7 @@ int DrawViewShell::GetTabLayerCount() const
{
const LayerTabBar* pBar
= const_cast<DrawViewShell*>(this)->GetLayerTabControl ();
- if (pBar != NULL)
+ if (pBar != nullptr)
return pBar->GetPageCount();
else
return 0;
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index d6565591acbb..548039718438 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -86,15 +86,15 @@ void DrawViewShell::ExecFormText(SfxRequest& rReq)
void DrawViewShell::GetFormTextState(SfxItemSet& rSet)
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
- SvxFontWorkDialog* pDlg = NULL;
+ const SdrObject* pObj = nullptr;
+ SvxFontWorkDialog* pDlg = nullptr;
sal_uInt16 nId = SvxFontWorkChildWindow::GetChildWindowId();
if (GetViewFrame()->HasChildWindow(nId))
{
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId);
- pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : NULL;
+ pDlg = pWnd ? static_cast<SvxFontWorkDialog*>(pWnd->GetWindow()) : nullptr;
}
if ( rMarkList.GetMarkCount() == 1 )
@@ -155,7 +155,7 @@ void DrawViewShell::ExecAnimationWin( SfxRequest& rReq )
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId);
- pAnimWin = pWnd ? static_cast<AnimationWindow*>(pWnd->GetWindow()) : NULL;
+ pAnimWin = pWnd ? static_cast<AnimationWindow*>(pWnd->GetWindow()) : nullptr;
if ( pAnimWin )
{
@@ -282,7 +282,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
case ( SID_BMPMASK_EXEC ) :
{
- SdrGrafObj* pObj = 0;
+ SdrGrafObj* pObj = nullptr;
if( mpDrawView && mpDrawView->GetMarkedObjectList().GetMarkCount() )
pObj = dynamic_cast< SdrGrafObj* >( mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj() );
@@ -306,7 +306,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(
SvxBmpMaskChildWindow::GetChildWindowId());
- SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
+ SvxBmpMask* pBmpMask = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
assert(pBmpMask);
if (bCont && pBmpMask)
{
@@ -340,14 +340,14 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet )
{
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
- const SdrObject* pObj = NULL;
+ const SdrObject* pObj = nullptr;
sal_uInt16 nId = SvxBmpMaskChildWindow::GetChildWindowId();
bool bEnable = false;
if ( GetViewFrame()->HasChildWindow( nId ) )
{
SfxChildWindow* pWnd = GetViewFrame()->GetChildWindow(nId);
- SvxBmpMask* pDlg = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : NULL;
+ SvxBmpMask* pDlg = pWnd ? static_cast<SvxBmpMask*>(pWnd->GetWindow()) : nullptr;
if (pDlg && pDlg->NeedsColorList())
pDlg->SetColorList(GetDoc()->GetColorList());
}
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index f165ddbb5fc9..63108ae9df26 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -194,7 +194,7 @@ IMPL_LINK_TYPED( DrawViewShell, ClipboardChanged, TransferableDataHelper*, pData
TransferableDataHelper aDataHelper (
TransferableDataHelper::CreateFromSystemClipboard(GetActiveWindow()));
::std::unique_ptr<SvxClipboardFormatItem> pFormats (GetSupportedClipboardFormats(aDataHelper));
- if (mpDrawView == NULL)
+ if (mpDrawView == nullptr)
return;
mpCurrentClipboardFormats = std::move(pFormats);
@@ -214,29 +214,29 @@ void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
::Outliner* DrawViewShell::GetOutlinerForMasterPageOutlineTextObj(ESelection &rSel)
{
if( !mpDrawView )
- return NULL;
+ return nullptr;
//when there is one object selected
if (!mpDrawView->AreObjectsMarked() || (mpDrawView->GetMarkedObjectList().GetMarkCount() != 1))
- return NULL;
+ return nullptr;
//and we are editing the outline object
if (!mpDrawView->IsTextEdit())
- return NULL;
+ return nullptr;
SdrPageView* pPageView = mpDrawView->GetSdrPageView();
if (!pPageView)
- return NULL;
+ return nullptr;
SdPage* pPage = static_cast<SdPage*>(pPageView->GetPage());
//only show these in a normal master page
if (!pPage || (pPage->GetPageKind() != PK_STANDARD) || !pPage->IsMasterPage())
- return NULL;
+ return nullptr;
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
- ::Outliner* pOL = pOLV ? pOLV->GetOutliner() : NULL;
+ ::Outliner* pOL = pOLV ? pOLV->GetOutliner() : nullptr;
if (!pOL)
- return NULL;
+ return nullptr;
rSel = pOLV->GetSelection();
return pOL;
@@ -244,10 +244,10 @@ void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
- if (mpDrawView == NULL)
+ if (mpDrawView == nullptr)
{
// This assertion and return are here to prevent crashes.
- DBG_ASSERT(mpDrawView!=NULL, "Please report this assertion to the Impress team.");
+ DBG_ASSERT(mpDrawView!=nullptr, "Please report this assertion to the Impress team.");
return;
}
@@ -314,7 +314,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if (pObj!=NULL )
+ if (pObj!=nullptr )
{
if( !pObj->IsEmptyPresObj() )
{
@@ -633,7 +633,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
else if( SfxItemState::DEFAULT == rSet.GetItemState( SID_CLIPBOARD_FORMAT_ITEMS ) )
{
- if (mpCurrentClipboardFormats.get() != NULL)
+ if (mpCurrentClipboardFormats.get() != nullptr)
rSet.Put(*mpCurrentClipboardFormats);
}
}
@@ -643,14 +643,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_CHANGEBEZIER);
}
- if (mpDrawView == NULL)
+ if (mpDrawView == nullptr)
{
// The mpDrawView was not NULL but is now.
// The reason for this may be that the DrawViewShell has been
// destroyed in the mean time.
// We can only return immediately and hope that the deleted
// DrawViewShell is not called again.
- DBG_ASSERT(mpDrawView!=NULL, "Please report this assertion to the Impress team.");
+ DBG_ASSERT(mpDrawView!=nullptr, "Please report this assertion to the Impress team.");
return;
}
@@ -1030,7 +1030,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
// EditText active
- if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != NULL)
+ if (GetViewShellBase().GetViewShellManager()->GetShell(RID_DRAW_TEXT_TOOLBOX) != nullptr)
{
sal_uInt16 nCurrentSId = SID_ATTR_CHAR;
@@ -1597,7 +1597,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
|| rSet.GetItemState(SID_DISPLAY_MASTER_OBJECTS) == SfxItemState::DEFAULT)
{
SdPage* pPage = GetActualPage();
- if (pPage != NULL && GetDoc() != NULL)
+ if (pPage != nullptr && GetDoc() != nullptr)
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
@@ -1622,7 +1622,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
bool bDisableSaveBackground = true;
SdPage* pPage = GetActualPage();
- if (pPage != NULL && GetDoc() != NULL)
+ if (pPage != nullptr && GetDoc() != nullptr)
{
SfxItemSet aMergedAttr(GetDoc()->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0);
SdStyleSheet* pStyleSheet = pPage->getPresentationStyle(HID_PSEUDOSHEET_BACKGROUND);
@@ -1752,7 +1752,7 @@ void DrawViewShell::Execute (SfxRequest& rReq)
case SID_SPELL_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
- if (rReq.GetArgs() != NULL)
+ if (rReq.GetArgs() != nullptr)
pViewFrame->SetChildWindow (SID_SPELL_DIALOG,
static_cast<const SfxBoolItem&>(rReq.GetArgs()->
Get(SID_SPELL_DIALOG)).GetValue());
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 75c1a1c40baf..4ef3dce4e7f1 100644
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
@@ -98,7 +98,7 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& )
Point aPnt ( ( aPageSize.Width() - aBmpSize.Width() ) >> 1, ( aPageSize.Height() - aBmpSize.Height() ) >> 1 );
aPnt += Point( pPage->GetLftBorder(), pPage->GetUppBorder() );
Rectangle aRect( aPnt, aBmpSize );
- SdrGrafObj* pGrafObj = NULL;
+ SdrGrafObj* pGrafObj = nullptr;
bool bInsertNewObject = true;
if( GetView()->AreObjectsMarked() )
@@ -118,7 +118,7 @@ void DrawViewShell::ScannerEvent( const css::lang::EventObject& )
{
bInsertNewObject = false;
pGrafObj->SetEmptyPresObj(false);
- pGrafObj->SetOutlinerParaObject(NULL);
+ pGrafObj->SetOutlinerParaObject(nullptr);
pGrafObj->SetGraphic( Graphic( aScanBmp ) );
}
}
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 77af9534bf18..46abdffd0bfc 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -127,7 +127,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
aPnt += Point(pPage->GetLftBorder(), pPage->GetUppBorder());
Rectangle aRect (aPnt, aSize);
- SdrGrafObj* pGrafObj = NULL;
+ SdrGrafObj* pGrafObj = nullptr;
bool bInsertNewObject = true;
@@ -152,7 +152,7 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
SdrGrafObj* pNewGrafObj = pGrafObj->Clone();
pNewGrafObj->SetEmptyPresObj(false);
- pNewGrafObj->SetOutlinerParaObject(NULL);
+ pNewGrafObj->SetOutlinerParaObject(nullptr);
pNewGrafObj->SetGraphic(aGraphic);
OUString aStr(mpDrawView->GetDescriptionOfMarkedObjects());
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 444e8bd5bb52..c79450a88a0f 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -95,7 +95,7 @@ public:
// XEventListener
virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) throw (uno::RuntimeException, std::exception) override;
- void ParentDestroyed() { mpParent = NULL; }
+ void ParentDestroyed() { mpParent = nullptr; }
};
ScannerEventListener::~ScannerEventListener()
@@ -118,7 +118,7 @@ DrawViewShell::DrawViewShell( SfxViewFrame* pFrame, ViewShellBase& rViewShellBas
uno::Reference<frame::XController>(&rViewShellBase.GetDrawController()),
sfx2::sidebar::EnumContext::Context_Default))
{
- if (pFrameViewArgument != NULL)
+ if (pFrameViewArgument != nullptr)
mpFrameView = pFrameViewArgument;
else
mpFrameView = new FrameView(GetDoc());
@@ -138,7 +138,7 @@ DrawViewShell::~DrawViewShell()
mpAnnotationManager.reset();
mpViewOverlayManager.reset();
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
if( mxScannerListener.is() )
static_cast< ScannerEventListener* >( mxScannerListener.get() )->ParentDestroyed();
@@ -146,7 +146,7 @@ DrawViewShell::~DrawViewShell()
// Remove references to items within Svx3DWin
// (maybe do a listening sometime in Svx3DWin)
sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
- SfxChildWindow* pWindow = GetViewFrame() ? GetViewFrame()->GetChildWindow(nId) : NULL;
+ SfxChildWindow* pWindow = GetViewFrame() ? GetViewFrame()->GetChildWindow(nId) : nullptr;
if(pWindow)
{
Svx3DWin* p3DWin = static_cast< Svx3DWin* > (pWindow->GetWindow());
@@ -188,7 +188,7 @@ DrawViewShell::~DrawViewShell()
delete mpDrawView;
// Set mpView to NULL so that the destructor of the ViewShell base class
// does not access it.
- mpView = mpDrawView = NULL;
+ mpView = mpDrawView = nullptr;
mpFrameView->Disconnect();
maTabControl.disposeAndClear();
@@ -199,10 +199,10 @@ DrawViewShell::~DrawViewShell()
*/
void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
{
- mpActualPage = 0;
+ mpActualPage = nullptr;
mbMousePosFreezed = false;
mbReadOnly = GetDocSh()->IsReadOnly();
- mpClipEvtLstnr = 0;
+ mpClipEvtLstnr = nullptr;
mbPastePossible = false;
mbIsLayerModeActive = false;
@@ -211,7 +211,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
mpFrameView->Connect();
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
SetPool( &GetDoc()->GetPool() );
@@ -682,7 +682,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
{
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
SdrLayerID nLayer = 0, nOldLayer = 0;
- SdrObject* pObj = NULL;
+ SdrObject* pObj = nullptr;
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount();
bool bOneLayer = true;
@@ -733,7 +733,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
void DrawViewShell::Notify (SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* pSimple = dynamic_cast< const SfxSimpleHint* >(&rHint);
- if (pSimple!=NULL && pSimple->GetId()==SFX_HINT_MODECHANGED)
+ if (pSimple!=nullptr && pSimple->GetId()==SFX_HINT_MODECHANGED)
{
// Change to selection when turning on read-only mode.
if(GetDocSh()->IsReadOnly() && dynamic_cast< FuSelection* >( GetCurrentFunction().get() ) )
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 7694df7e187e..3d01d685ffe9 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -71,7 +71,7 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName )
if( GetDoc()->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
return false;
- SdPage* pPageToRename = NULL;
+ SdPage* pPageToRename = nullptr;
PageKind ePageKind = GetPageKind();
if( GetEditMode() == EM_PAGE )
@@ -128,7 +128,7 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName )
// accessibility.)
slidesorter::SlideSorterViewShell* pSlideSorterViewShell
= slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
- if (pSlideSorterViewShell != NULL)
+ if (pSlideSorterViewShell != nullptr)
{
pSlideSorterViewShell->GetSlideSorter().GetController().PageNameHasChanged(
nPageId-1, rName);
@@ -205,7 +205,7 @@ void DrawViewShell::ModifyLayer (
// Call Invalidate at the form shell.
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL)
+ if (pFormShell != nullptr)
pFormShell->Invalidate();
}
}
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 68266fc0591f..320992494893 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -57,8 +57,8 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
GetViewFrame()->HasChildWindow( SvxIMapDlgChildWindow::GetChildWindowId() ) )
{
Graphic aGraphic;
- ImageMap* pIMap = NULL;
- TargetList* pTargetList = NULL;
+ ImageMap* pIMap = nullptr;
+ TargetList* pTargetList = nullptr;
SdIMapInfo* pIMapInfo = GetDoc()->GetIMapInfo( pObj );
// get graphic from shape
diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx
index fb08363d4021..bfc7d1db0666 100644
--- a/sd/source/ui/view/drviewsd.cxx
+++ b/sd/source/ui/view/drviewsd.cxx
@@ -178,7 +178,7 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
bEndless = xSlideshow->isEndless();
// Get the page for the current page number.
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
if( nCurrentPage < GetDoc()->GetSdPageCount( PK_STANDARD ) )
pPage = GetDoc()->GetSdPage (nCurrentPage, PK_STANDARD);
@@ -189,7 +189,7 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
{
nState |= NAVBTN_PEN_DISABLED | NAVTLB_UPDATE;
- if (mpActualPage != NULL)
+ if (mpActualPage != nullptr)
{
nCurrentPage = ( mpActualPage->GetPageNum() - 1 ) / 2;
aPageName = mpActualPage->GetName();
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 6133fe3bb1cf..be76784245a0 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -191,7 +191,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
if(GetOldFunction() == GetCurrentFunction())
{
- SetOldFunction(0);
+ SetOldFunction(nullptr);
}
}
@@ -219,7 +219,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
GetCurrentFunction()->Deactivate();
}
- SetCurrentFunction(0);
+ SetCurrentFunction(nullptr);
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate(nOldSId);
@@ -267,7 +267,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
{
// get the form view
FmFormView* pFormView = dynamic_cast<FmFormView*>( mpDrawView );
- SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : NULL;
+ SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : nullptr;
if(pPageView)
{
@@ -348,7 +348,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
while (i < nMarkCnt && !b3DObjMarked)
{
- if (0 != dynamic_cast< E3dObject *>( rMarkList.GetMark(i)->GetMarkedSdrObj() ))
+ if (nullptr != dynamic_cast< E3dObject *>( rMarkList.GetMark(i)->GetMarkedSdrObj() ))
{
b3DObjMarked = true;
}
@@ -548,7 +548,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
sal_uInt16 nSlotId = GetOldFunction()->GetSlotID();
GetOldFunction()->Deactivate();
- SetOldFunction(0);
+ SetOldFunction(nullptr);
SfxBindings& rBind = GetViewFrame()->GetBindings();
rBind.Invalidate( nSlotId );
@@ -933,7 +933,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
{
- InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", NULL );
+ InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", nullptr );
}
}
}
@@ -952,7 +952,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
KeyEvent aKEvt( 0, aKCode);
//pOLV->PostKeyEvent(aKEvt);
// We use SdrObjEditView to handle DEL for underflow handling
- mpDrawView->KeyInput(aKEvt, NULL);
+ mpDrawView->KeyInput(aKEvt, nullptr);
}
}
@@ -1709,9 +1709,9 @@ void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
SfxInPlaceClient* pIpClient = GetViewShell()->GetIPClient();
- if (pIpClient!=NULL && pIpClient->IsObjectInPlaceActive())
+ if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())
{
nOptions |= SdrInsertFlags::DONTMARK;
}
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index e6641739f981..d3e8276e70ef 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -78,7 +78,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if (rSet.GetItemState(SID_RELOAD) != SfxItemState::UNKNOWN)
{
// let "last version" of SFx en/disable
- GetViewFrame()->GetSlotState (SID_RELOAD, NULL, &rSet);
+ GetViewFrame()->GetSlotState (SID_RELOAD, nullptr, &rSet);
}
if (SfxItemState::DEFAULT == rSet.GetItemState(SID_HYPERLINK_GETLINK))
@@ -207,7 +207,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if ( SfxItemState::DEFAULT == rSet.GetItemState(SID_ATTR_YEAR2000) )
{
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL)
+ if (pFormShell != nullptr)
{
sal_uInt16 nState = 0;
if (pFormShell->GetY2KState(nState))
@@ -488,7 +488,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_STYLE_WATERCAN:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
@@ -504,7 +504,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_STYLE_NEW:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
@@ -517,7 +517,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
case SID_STYLE_DRAGHIERARCHIE:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
@@ -531,7 +531,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
// It is not possible to create PseudoStyleSheets 'by Example';
// normal style sheets need a selected object for that
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem)
@@ -579,7 +579,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
aNewAttr.Put( aEditAttr, false );
std::unique_ptr<SvxNumRule> pNumRule;
- const SfxPoolItem* pTmpItem=NULL;
+ const SfxPoolItem* pTmpItem=nullptr;
sal_uInt16 nNumItemId = SID_ATTR_NUMBERING_RULE;
sal_uInt16 nActNumLvl = mpDrawView->GetSelectionLevel();
pTmpItem=GetNumBulletItem(aNewAttr, nNumItemId);
diff --git a/sd/source/ui/view/drviewsg.cxx b/sd/source/ui/view/drviewsg.cxx
index ab5a8d3f214d..81fe3a7aba62 100644
--- a/sd/source/ui/view/drviewsg.cxx
+++ b/sd/source/ui/view/drviewsg.cxx
@@ -86,7 +86,7 @@ void DrawViewShell::GetIMapState( SfxItemSet& rSet )
SvxIMapDlg* pImageMapDialog = ViewShell::Implementation::GetImageMapDialog();
if ( ( dynamic_cast< const SdrGrafObj *>( pObj ) != nullptr /*|| pObj->ISA( SdrOle2Obj )*/ )
- && pImageMapDialog!=NULL
+ && pImageMapDialog!=nullptr
&& ( pImageMapDialog->GetEditingObject() == static_cast<void const *>(pObj) ) )
{
bDisable = false;
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index b8a19814ea0b..26bb10613a80 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -268,10 +268,10 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
{
const SvxFieldItem* pFldItem = pOLV->GetFieldAtSelection();
- if( !( pFldItem && (0 != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) ) )
+ if( !( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) ) )
{
rSet.DisableItem( SID_MODIFY_FIELD );
}
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 46f460d101bc..2b34d6b51eca 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -69,7 +69,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
SetFrameDragSingles();
SetSlidesPerRow(4);
- if( NULL == pFrameView )
+ if( nullptr == pFrameView )
{
DrawDocShell* pDocShell = pDrawDoc->GetDocSh();
@@ -86,7 +86,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
SfxViewShell* pSfxViewSh = pSfxViewFrame->GetViewShell();
ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( pSfxViewSh );
- if (pBase != NULL)
+ if (pBase != nullptr)
{
nSdViewShellCount++;
diff --git a/sd/source/ui/view/grviewsh.cxx b/sd/source/ui/view/grviewsh.cxx
index 9f17bae6e0a1..7e635aef641b 100644
--- a/sd/source/ui/view/grviewsh.cxx
+++ b/sd/source/ui/view/grviewsh.cxx
@@ -71,7 +71,7 @@ void GraphicViewShell::ChangeEditMode (
void GraphicViewShell::ArrangeGUIElements()
{
- if (mpLayerTabBar.get()!=NULL && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
{
Size aSize = mpLayerTabBar->GetSizePixel();
const Size aFrameSize (GetViewFrame()->GetWindow().GetOutputSizePixel());
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index e4286e20b1f7..7e3f6d77f0a5 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -295,7 +295,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
{
#ifdef ENABLE_SDREMOTE
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : 0;
+ VclAbstractDialog* pDlg = pFact ? pFact->CreateRemoteDialog(GetActiveWindow()) : nullptr;
if (pDlg)
pDlg->Execute();
#endif
@@ -314,7 +314,7 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
std::unique_ptr<VclAbstractDialog> pDlg(pFact ? pFact->CreateSdPhotoAlbumDialog(
GetActiveWindow(),
- GetDoc()) : 0);
+ GetDoc()) : nullptr);
if (pDlg)
{
@@ -546,14 +546,14 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
const SvxFieldItem* pOldFldItem = pOutlinerView->GetFieldAtSelection();
- if( pOldFldItem && ( 0 != dynamic_cast< const SvxURLField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxDateField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxTimeField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxPageField *>( pOldFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxPagesField *>( pOldFldItem->GetField() )) )
+ if( pOldFldItem && ( nullptr != dynamic_cast< const SvxURLField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxDateField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxTimeField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxPageField *>( pOldFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxPagesField *>( pOldFldItem->GetField() )) )
{
// select field, so it gets deleted on Insert
ESelection aSel = pOutlinerView->GetSelection();
@@ -576,14 +576,14 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
{
const SvxFieldItem* pFldItem = pOutlinerView->GetFieldAtSelection();
- if( pFldItem && (0 != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) )
+ if( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) )
{
// Dialog...
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
- std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOutlinerView->GetAttribs() ) : 0);
+ std::unique_ptr<AbstractSdModifyFieldDlg> pDlg(pFact ? pFact->CreateSdModifyFieldDlg(GetActiveWindow(), pFldItem->GetField(), pOutlinerView->GetAttribs() ) : nullptr);
if( pDlg && (pDlg->Execute() == RET_OK) )
{
std::unique_ptr<SvxFieldData> pField(pDlg->GetField());
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 63c45d014a47..000bef80181a 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -190,14 +190,14 @@ OutlineViewShell::OutlineViewShell (
vcl::Window* pParentWindow,
FrameView* pFrameViewArgument)
: ViewShell(pFrame, pParentWindow, rViewShellBase),
- pOlView(NULL),
- pLastPage( NULL ),
- pClipEvtLstnr(NULL),
+ pOlView(nullptr),
+ pLastPage( nullptr ),
+ pClipEvtLstnr(nullptr),
bPastePossible(false),
mbInitialized(false)
{
- if (pFrameViewArgument != NULL)
+ if (pFrameViewArgument != nullptr)
mpFrameView = pFrameViewArgument;
else
mpFrameView = new FrameView(GetDoc());
@@ -260,7 +260,7 @@ void OutlineViewShell::ArrangeGUIElements ()
ViewShell::ArrangeGUIElements ();
::sd::Window* pWindow = mpContentWindow.get();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
{
pWindow->SetMinZoomAutoCalc(false);
@@ -592,7 +592,7 @@ void OutlineViewShell::FuSupport(SfxRequest &rReq)
case SID_TRANSLITERATE_HIRAGANA:
case SID_TRANSLITERATE_KATAGANA:
{
- OutlinerView* pOLV = pOlView ? pOlView->GetViewByWindow( GetActiveWindow() ) : 0;
+ OutlinerView* pOLV = pOlView ? pOlView->GetViewByWindow( GetActiveWindow() ) : nullptr;
if( pOLV )
{
using namespace ::com::sun::star::i18n;
@@ -694,7 +694,7 @@ void OutlineViewShell::FuPermanent(SfxRequest &rReq)
if(HasOldFunction())
{
GetOldFunction()->Deactivate();
- SetOldFunction(0);
+ SetOldFunction(nullptr);
}
if(HasCurrentFunction())
@@ -939,10 +939,10 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{
const SvxFieldItem* pFldItem = pOutlinerView->GetFieldAtSelection();
- if( !( pFldItem && (0 != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
- 0 != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) ) )
+ if( !( pFldItem && (nullptr != dynamic_cast< const SvxDateField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxAuthorField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtFileField *>( pFldItem->GetField() ) ||
+ nullptr != dynamic_cast< const SvxExtTimeField *>( pFldItem->GetField() ) ) ) )
{
rSet.DisableItem( SID_MODIFY_FIELD );
}
@@ -963,7 +963,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
{
SdrObject* pObj = pPage->GetPresObj(PRESOBJ_OUTLINE);
- if (pObj!=NULL )
+ if (pObj!=nullptr )
{
if( !pObj->IsEmptyPresObj() )
{
@@ -1122,7 +1122,7 @@ bool OutlineViewShell::PrepareClose( bool bUI )
if( !ViewShell::PrepareClose(bUI) )
return false;
- return pOlView == NULL || pOlView->PrepareClose(bUI);
+ return pOlView == nullptr || pOlView->PrepareClose(bUI);
}
/**
@@ -1192,7 +1192,7 @@ void OutlineViewShell::Execute(SfxRequest& rReq)
case SID_SPELL_DIALOG:
{
SfxViewFrame* pViewFrame = GetViewFrame();
- if (rReq.GetArgs() != NULL)
+ if (rReq.GetArgs() != nullptr)
pViewFrame->SetChildWindow (SID_SPELL_DIALOG,
static_cast<const SfxBoolItem&>(rReq.GetArgs()->
Get(SID_SPELL_DIALOG)).GetValue());
@@ -1308,8 +1308,8 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
std::vector<Paragraph*> aSelList;
pActiveView->CreateSelectionList(aSelList);
- Paragraph *pFirstPara = NULL;
- Paragraph *pLastPara = NULL;
+ Paragraph *pFirstPara = nullptr;
+ Paragraph *pLastPara = nullptr;
if (!aSelList.empty())
{
@@ -1396,7 +1396,7 @@ bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
bool bReturn = false;
OutlineViewPageChangesGuard aGuard(pOlView);
- if (pWin == NULL && HasCurrentFunction())
+ if (pWin == nullptr && HasCurrentFunction())
{
bReturn = GetCurrentFunction()->KeyInput(rKEvt);
}
@@ -1478,7 +1478,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
case SID_STYLE_EDIT:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO)
@@ -1601,7 +1601,7 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
}
// if we have a title object and a text, set the text
- OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : NULL;
+ OutlinerParaObject* pOPO = pTO ? rOutliner.CreateParaObject(rOutliner.GetAbsPos(pPara), 1) : nullptr;
if (pOPO)
{
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
@@ -1664,8 +1664,8 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
return false;
::Outliner& rOutliner = pOlView->GetOutliner();
- OutlinerParaObject* pOPO = NULL;
- SdrTextObj* pTO = NULL;
+ OutlinerParaObject* pOPO = nullptr;
+ SdrTextObj* pTO = nullptr;
bool bNewObject = false;
@@ -1849,8 +1849,8 @@ void OutlineViewShell::VisAreaChanged(const Rectangle& rRect)
css::uno::Reference<css::accessibility::XAccessible>
OutlineViewShell::CreateAccessibleDocumentView (::sd::Window* pWindow)
{
- OSL_ASSERT (GetViewShell()!=NULL);
- if (GetViewShell()->GetController() != NULL)
+ OSL_ASSERT (GetViewShell()!=nullptr);
+ if (GetViewShell()->GetController() != nullptr)
{
::accessibility::AccessibleOutlineView* pDocumentView =
new ::accessibility::AccessibleOutlineView (
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 5fdbfd98edd5..5e923c944665 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -94,7 +94,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
, mnPagesToProcess(0)
, mnPagesProcessed(0)
, mbFirstPaint(true)
-, mpProgress(NULL)
+, mpProgress(nullptr)
, maDocColor( COL_WHITE )
, maLRSpaceItem( 0, 0, 2000, 0, EE_PARA_OUTLLRSPACE )
{
@@ -114,7 +114,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
// insert View into Outliner
for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
- mpOutlinerView[nView] = NULL;
+ mpOutlinerView[nView] = nullptr;
}
mpOutlinerView[0] = new OutlinerView(&mrOutliner, pWindow);
@@ -160,7 +160,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
// Tell undo manager of the document about the undo manager of the
// outliner, so that the former can synchronize with the later.
sd::UndoManager* pDocUndoMgr = dynamic_cast<sd::UndoManager*>(mpDocSh->GetUndoManager());
- if (pDocUndoMgr != NULL)
+ if (pDocUndoMgr != nullptr)
pDocUndoMgr->SetLinkedUndoManager(&mrOutliner.GetUndoManager());
}
@@ -169,7 +169,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
*/
OutlineView::~OutlineView()
{
- DBG_ASSERT(maDragAndDropModelGuard.get() == 0, "sd::OutlineView::~OutlineView(), prior drag operation not finished correctly!" );
+ DBG_ASSERT(maDragAndDropModelGuard.get() == nullptr, "sd::OutlineView::~OutlineView(), prior drag operation not finished correctly!" );
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,OutlineView,EventMultiplexerListener) );
mrOutlineViewShell.GetViewShellBase().GetEventMultiplexer()->RemoveEventListener( aLink );
@@ -180,11 +180,11 @@ OutlineView::~OutlineView()
// unregister OutlinerViews and destroy them
for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
- if (mpOutlinerView[nView] != NULL)
+ if (mpOutlinerView[nView] != nullptr)
{
mrOutliner.RemoveView( mpOutlinerView[nView] );
delete mpOutlinerView[nView];
- mpOutlinerView[nView] = NULL;
+ mpOutlinerView[nView] = nullptr;
}
}
@@ -245,7 +245,7 @@ void OutlineView::AddWindowToPaintView(OutputDevice* pWin, vcl::Window* pWindow)
while (nView < MAX_OUTLINERVIEWS && !bAdded)
{
- if (mpOutlinerView[nView] == NULL)
+ if (mpOutlinerView[nView] == nullptr)
{
mpOutlinerView[nView] = new OutlinerView(&mrOutliner, dynamic_cast< ::sd::Window* >(pWin));
mpOutlinerView[nView]->SetBackgroundColor( aWhiteColor );
@@ -280,7 +280,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
while (nView < MAX_OUTLINERVIEWS && !bRemoved)
{
- if (mpOutlinerView[nView] != NULL)
+ if (mpOutlinerView[nView] != nullptr)
{
pWindow = mpOutlinerView[nView]->GetWindow();
@@ -288,7 +288,7 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
{
mrOutliner.RemoveView( mpOutlinerView[nView] );
delete mpOutlinerView[nView];
- mpOutlinerView[nView] = NULL;
+ mpOutlinerView[nView] = nullptr;
bRemoved = true;
}
}
@@ -304,10 +304,10 @@ void OutlineView::DeleteWindowFromPaintView(OutputDevice* pWin)
*/
OutlinerView* OutlineView::GetViewByWindow (vcl::Window* pWin) const
{
- OutlinerView* pOlView = NULL;
+ OutlinerView* pOlView = nullptr;
for (sal_uInt16 nView = 0; nView < MAX_OUTLINERVIEWS; nView++)
{
- if (mpOutlinerView[nView] != NULL)
+ if (mpOutlinerView[nView] != nullptr)
{
if ( pWin == mpOutlinerView[nView]->GetWindow() )
{
@@ -337,7 +337,7 @@ Paragraph* OutlineView::GetPrevTitle(const Paragraph* pPara)
}
}
- return NULL;
+ return nullptr;
}
/**
@@ -357,7 +357,7 @@ Paragraph* OutlineView::GetNextTitle(const Paragraph* pPara)
}
while( pResult );
- return NULL;
+ return nullptr;
}
/**
@@ -367,7 +367,7 @@ IMPL_LINK_TYPED( OutlineView, ParagraphInsertedHdl, ::Outliner *, pOutliner, voi
{
// we get calls to this handler during binary insert of drag and drop contents but
// we ignore it here and handle it later in OnEndPasteOrDrop()
- if( maDragAndDropModelGuard.get() == 0 )
+ if( maDragAndDropModelGuard.get() == nullptr )
{
OutlineViewPageChangesGuard aGuard(this);
@@ -546,7 +546,7 @@ IMPL_LINK_TYPED( OutlineView, ParagraphRemovingHdl, ::Outliner *, pOutliner, voi
if(mpProgress)
{
delete mpProgress;
- mpProgress = NULL;
+ mpProgress = nullptr;
}
mnPagesToProcess = 0;
mnPagesProcessed = 0;
@@ -583,7 +583,7 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
std::vector<Paragraph*> aSelList;
pOlView->CreateSelectionList(aSelList);
- Paragraph *pParagraph = NULL;
+ Paragraph *pParagraph = nullptr;
for (std::vector<Paragraph*>::const_iterator iter = aSelList.begin(); iter != aSelList.end(); ++iter)
{
pParagraph = *iter;
@@ -625,7 +625,7 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if (mnPagesToProcess > PROCESS_WITH_PROGRESS_THRESHOLD && mpProgress)
{
delete mpProgress;
- mpProgress = NULL;
+ mpProgress = nullptr;
}
else
mpDocSh->SetWaitCursor( false );
@@ -678,7 +678,7 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if(mpProgress)
{
delete mpProgress;
- mpProgress = NULL;
+ mpProgress = nullptr;
}
mnPagesToProcess = 0;
mnPagesProcessed = 0;
@@ -725,10 +725,10 @@ IMPL_LINK_TYPED( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner, void )
if( pPage )
{
- SfxStyleSheet* pStyleSheet = NULL;
+ SfxStyleSheet* pStyleSheet = nullptr;
sal_Int32 nPara = pOutliner->GetAbsPos( pPara );
sal_Int16 nDepth = pOutliner->GetDepth( nPara );
- bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != NULL;
+ bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != nullptr;
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) )
{
@@ -798,14 +798,14 @@ IMPL_LINK_NOARG_TYPED(OutlineView, StatusEventHdl, EditStatus&, void)
IMPL_LINK_NOARG_TYPED(OutlineView, BeginDropHdl, EditView*, void)
{
- DBG_ASSERT(maDragAndDropModelGuard.get() == 0, "sd::OutlineView::BeginDropHdl(), prior drag operation not finished correctly!" );
+ DBG_ASSERT(maDragAndDropModelGuard.get() == nullptr, "sd::OutlineView::BeginDropHdl(), prior drag operation not finished correctly!" );
maDragAndDropModelGuard.reset( new OutlineViewModelChangeGuard( *this ) );
}
IMPL_LINK_NOARG_TYPED(OutlineView, EndDropHdl, EditView*, void)
{
- maDragAndDropModelGuard.reset(0);
+ maDragAndDropModelGuard.reset(nullptr);
}
/**
@@ -859,13 +859,13 @@ IMPL_LINK_TYPED( OutlineView, EndMovingHdl, ::Outliner *, pOutliner, void )
DBG_ASSERT( isRecordingUndo(), "sd::OutlineView::EndMovingHdl(), model change without undo?!" );
// look for insertion position via the first paragraph
- Paragraph* pSearchIt = maSelectedParas.empty() ? NULL : *(maSelectedParas.begin());
+ Paragraph* pSearchIt = maSelectedParas.empty() ? nullptr : *(maSelectedParas.begin());
// look for the first of the selected paragraphs in the new ordering
sal_uInt16 nPosNewOrder = 0;
sal_Int32 nParaPos = 0;
Paragraph* pPara = pOutliner->GetParagraph( 0 );
- Paragraph* pPrev = NULL;
+ Paragraph* pPrev = nullptr;
while (pPara && pPara != pSearchIt)
{
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) )
@@ -920,7 +920,7 @@ IMPL_LINK_TYPED( OutlineView, EndMovingHdl, ::Outliner *, pOutliner, void )
SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage)
{
const size_t nObjectCount = pPage->GetObjCount();
- SdrTextObj* pResult = NULL;
+ SdrTextObj* pResult = nullptr;
for (size_t nObject = 0; nObject < nObjectCount; ++nObject)
{
@@ -941,7 +941,7 @@ SdrTextObj* OutlineView::GetTitleTextObject(SdrPage* pPage)
SdrTextObj* OutlineView::GetOutlineTextObject(SdrPage* pPage)
{
const size_t nObjectCount = pPage->GetObjCount();
- SdrTextObj* pResult = NULL;
+ SdrTextObj* pResult = nullptr;
for (size_t nObject = 0; nObject < nObjectCount; ++nObject)
{
@@ -958,7 +958,7 @@ SdrTextObj* OutlineView::GetOutlineTextObject(SdrPage* pPage)
SdrTextObj* OutlineView::CreateTitleTextObject(SdPage* pPage)
{
- DBG_ASSERT( GetTitleTextObject(pPage) == 0, "sd::OutlineView::CreateTitleTextObject(), there is already a title text object!" );
+ DBG_ASSERT( GetTitleTextObject(pPage) == nullptr, "sd::OutlineView::CreateTitleTextObject(), there is already a title text object!" );
if( pPage->GetAutoLayout() == AUTOLAYOUT_NONE )
{
@@ -969,7 +969,7 @@ SdrTextObj* OutlineView::CreateTitleTextObject(SdPage* pPage)
{
// we already have a layout with a title but the title
// object was deleted, create a new one
- pPage->InsertAutoLayoutShape( 0, PRESOBJ_TITLE, false, pPage->GetTitleRect(), true );
+ pPage->InsertAutoLayoutShape( nullptr, PRESOBJ_TITLE, false, pPage->GetTitleRect(), true );
}
return GetTitleTextObject(pPage);
@@ -977,7 +977,7 @@ SdrTextObj* OutlineView::CreateTitleTextObject(SdPage* pPage)
SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
{
- DBG_ASSERT( GetOutlineTextObject(pPage) == 0, "sd::OutlineView::CreateOutlineTextObject(), there is already a layout text object!" );
+ DBG_ASSERT( GetOutlineTextObject(pPage) == nullptr, "sd::OutlineView::CreateOutlineTextObject(), there is already a layout text object!" );
AutoLayout eNewLayout = pPage->GetAutoLayout();
switch( eNewLayout )
@@ -1003,7 +1003,7 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
{
// we already have a layout with a text but the text
// object was deleted, create a new one
- pPage->InsertAutoLayoutShape( 0,
+ pPage->InsertAutoLayoutShape( nullptr,
PRESOBJ_OUTLINE,
false, pPage->GetLayoutRect(), true );
}
@@ -1015,8 +1015,8 @@ SdrTextObj* OutlineView::CreateOutlineTextObject(SdPage* pPage)
bool OutlineView::PrepareClose(bool)
{
::sd::UndoManager* pDocUndoMgr = dynamic_cast<sd::UndoManager*>(mpDocSh->GetUndoManager());
- if (pDocUndoMgr != NULL)
- pDocUndoMgr->SetLinkedUndoManager(NULL);
+ if (pDocUndoMgr != nullptr)
+ pDocUndoMgr->SetLinkedUndoManager(nullptr);
mrOutliner.GetUndoManager().Clear();
@@ -1068,14 +1068,14 @@ void OutlineView::FillOutliner()
ResetLinks();
mrOutliner.SetUpdateMode(false);
- Paragraph* pTitleToSelect = NULL;
+ Paragraph* pTitleToSelect = nullptr;
sal_uInt16 nPageCount = mrDoc.GetSdPageCount(PK_STANDARD);
// fill outliner with paragraphs from slides title & (outlines|subtitles)
for (sal_uInt16 nPage = 0; nPage < nPageCount; nPage++)
{
SdPage* pPage = mrDoc.GetSdPage(nPage, PK_STANDARD);
- Paragraph * pPara = NULL;
+ Paragraph * pPara = nullptr;
// take text from title shape
SdrTextObj* pTO = GetTitleTextObject(pPage);
@@ -1092,7 +1092,7 @@ void OutlineView::FillOutliner()
}
}
- if( pPara == 0 ) // no title, insert an empty paragraph
+ if( pPara == nullptr ) // no title, insert an empty paragraph
{
pPara = mrOutliner.Insert(OUString());
mrOutliner.SetDepth(pPara, -1);
@@ -1116,7 +1116,7 @@ void OutlineView::FillOutliner()
// take text from subtitle or outline
pTO = static_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT));
- const bool bSubTitle = pTO != 0;
+ const bool bSubTitle = pTO != nullptr;
if (!pTO) // if no subtile found, try outline
pTO = GetOutlineTextObject(pPage);
@@ -1205,7 +1205,7 @@ SdPage* OutlineView::GetActualPage()
std::vector<Paragraph*> aSelList;
pActiveView->CreateSelectionList(aSelList);
- Paragraph *pPar = aSelList.empty() ? NULL : *(aSelList.begin());
+ Paragraph *pPar = aSelList.empty() ? nullptr : *(aSelList.begin());
SdPage* pCurrent = GetPageForParagraph(pPar);
DBG_ASSERT( pCurrent ||
@@ -1235,7 +1235,7 @@ SdPage* OutlineView::GetPageForParagraph( Paragraph* pPara )
if( nPageToSelect < (sal_uInt32)mrDoc.GetSdPageCount( PK_STANDARD ) )
return static_cast< SdPage* >( mrDoc.GetSdPage( (sal_uInt16)nPageToSelect, PK_STANDARD) );
- return 0;
+ return nullptr;
}
Paragraph* OutlineView::GetParagraphForPage( ::Outliner& rOutl, SdPage* pPage )
@@ -1317,7 +1317,7 @@ void OutlineView::SetSelectedPages()
if( ::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) // one page
{
SdPage* pPage = mrDoc.GetSdPage(nPos, PK_STANDARD);
- DBG_ASSERT(pPage!=NULL,
+ DBG_ASSERT(pPage!=nullptr,
"Trying to select non-existing page OutlineView::SetSelectedPages()");
if (pPage)
@@ -1406,7 +1406,7 @@ void OutlineView::onUpdateStyleSettings( bool bForceUpdate /* = false */ )
sal_uInt16 nView;
for( nView = 0; nView < MAX_OUTLINERVIEWS; nView++ )
{
- if (mpOutlinerView[nView] != NULL)
+ if (mpOutlinerView[nView] != nullptr)
{
mpOutlinerView[nView]->SetBackgroundColor( aDocColor );
@@ -1445,7 +1445,7 @@ IMPL_LINK_TYPED(OutlineView, EventMultiplexerListener, ::sd::tools::EventMultipl
mrOutliner.Clear();
FillOutliner();
::sd::Window* pWindow = mrOutlineViewShell.GetActiveWindow();
- if (pWindow != NULL)
+ if (pWindow != nullptr)
pWindow->Invalidate();
}
}
@@ -1512,7 +1512,7 @@ void OutlineView::UpdateDocument()
pPara = GetNextTitle(pPara);
}
- DBG_ASSERT( pPara == 0, "sd::OutlineView::UpdateDocument(), slides are out of sync, creating missing ones" );
+ DBG_ASSERT( pPara == nullptr, "sd::OutlineView::UpdateDocument(), slides are out of sync, creating missing ones" );
while( pPara )
{
SdPage* pPage = InsertSlideForParagraph( pPara );
@@ -1538,7 +1538,7 @@ void OutlineView::TryToMergeUndoActions()
{
// find the top EditUndo action in the top undo action list
size_t nAction = pListAction->aUndoActions.size();
- EditUndo* pEditUndo = 0;
+ EditUndo* pEditUndo = nullptr;
while( !pEditUndo && nAction )
{
pEditUndo = dynamic_cast< EditUndo* >(pListAction->aUndoActions.GetUndoAction(--nAction));
@@ -1550,7 +1550,7 @@ void OutlineView::TryToMergeUndoActions()
while( pEditUndo && nAction )
{
if( dynamic_cast< EditUndo* >(pListAction->aUndoActions.GetUndoAction(--nAction)) )
- pEditUndo = 0;
+ pEditUndo = nullptr;
}
// do we have one and only one EditUndo action in the top undo list?
@@ -1559,7 +1559,7 @@ void OutlineView::TryToMergeUndoActions()
// yes, see if we can merge it with the prev undo list
nAction = pPrevListAction->aUndoActions.size();
- EditUndo* pPrevEditUndo = 0;
+ EditUndo* pPrevEditUndo = nullptr;
while( !pPrevEditUndo && nAction )
pPrevEditUndo = dynamic_cast< EditUndo* >(pPrevListAction->aUndoActions.GetUndoAction(--nAction));
@@ -1579,7 +1579,7 @@ void OutlineView::TryToMergeUndoActions()
if( pDocUndoManager && ( pListAction->aUndoActions.size() == 1 ))
{
SfxLinkUndoAction* pLinkAction = dynamic_cast< SfxLinkUndoAction* >( pListAction->aUndoActions.GetUndoAction(0) );
- SfxLinkUndoAction* pPrevLinkAction = 0;
+ SfxLinkUndoAction* pPrevLinkAction = nullptr;
if( pLinkAction )
{
@@ -1742,7 +1742,7 @@ void OutlineView::OnBeginPasteOrDrop( PasteOrDropInfos* /*pInfos*/ )
get the correct style sheet and new slides are inserted. */
void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
{
- SdPage* pPage = 0;
+ SdPage* pPage = nullptr;
SfxStyleSheetBasePool* pStylePool = GetDoc().GetStyleSheetPool();
for( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
diff --git a/sd/source/ui/view/presvish.cxx b/sd/source/ui/view/presvish.cxx
index 7182979fb944..05cb11dcb176 100644
--- a/sd/source/ui/view/presvish.cxx
+++ b/sd/source/ui/view/presvish.cxx
@@ -96,7 +96,7 @@ void PresentationViewShell::FinishInitialization( FrameView* pFrameView )
// Use the frame view that comes form the view shell that initiated our
// creation.
- if (pFrameView != NULL)
+ if (pFrameView != nullptr)
{
GetFrameView()->Disconnect();
SetFrameView (pFrameView);
@@ -110,12 +110,12 @@ void PresentationViewShell::FinishInitialization( FrameView* pFrameView )
SvxRuler* PresentationViewShell::CreateHRuler(::sd::Window*, bool)
{
- return NULL;
+ return nullptr;
}
SvxRuler* PresentationViewShell::CreateVRuler(::sd::Window*)
{
- return NULL;
+ return nullptr;
}
void PresentationViewShell::Activate( bool bIsMDIActivate )
diff --git a/sd/source/ui/view/sdruler.cxx b/sd/source/ui/view/sdruler.cxx
index a1fa423e86ba..c6297eeef0ac 100644
--- a/sd/source/ui/view/sdruler.cxx
+++ b/sd/source/ui/view/sdruler.cxx
@@ -70,7 +70,7 @@ void RulerCtrlItem::StateChanged( sal_uInt16 nSId, SfxItemState, const SfxPoolIt
Ruler::Ruler( DrawViewShell& rViewSh, vcl::Window* pParent, ::sd::Window* pWin, SvxRulerSupportFlags nRulerFlags, SfxBindings& rBindings, WinBits nWinStyle)
: SvxRuler(pParent, pWin, nRulerFlags, rBindings, nWinStyle)
- , pSdView(NULL)
+ , pSdView(nullptr)
, pSdWin(pWin)
, pDrViewShell(&rViewSh)
{
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 789e405c780f..463a90c7d16f 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -109,9 +109,9 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
mrDoc(rDrawDoc),
mpDocSh(rDrawDoc.GetDocSh()),
mpViewSh(pViewShell),
- mpDragSrcMarkList(NULL),
- mpDropMarkerObj(NULL),
- mpDropMarker(NULL),
+ mpDragSrcMarkList(nullptr),
+ mpDropMarkerObj(nullptr),
+ mpDropMarker(nullptr),
mnDragSrcPgNum(SDRPAGE_NOTFOUND),
mnAction(DND_ACTION_NONE),
mnLockRedrawSmph(0),
@@ -149,7 +149,7 @@ void View::ImplClearDrawDropMarker()
if(mpDropMarker)
{
delete mpDropMarker;
- mpDropMarker = 0L;
+ mpDropMarker = nullptr;
}
}
@@ -653,7 +653,7 @@ void OutlinerMasterViewFilter::End()
{
OutlinerView* pOutlView = m_pOutl->GetView(0);
pOutlView->SetReadOnly(m_bReadOnly);
- m_pOutl = NULL;
+ m_pOutl = nullptr;
}
}
@@ -663,13 +663,13 @@ bool View::SdrBeginTextEdit(
SdrOutliner* pOutl, OutlinerView* pGivenOutlinerView,
bool bDontDeleteOutliner, bool bOnlyOneView, bool bGrabFocus )
{
- SdrPage* pPage = pObj ? pObj->GetPage() : NULL;
+ SdrPage* pPage = pObj ? pObj->GetPage() : nullptr;
bool bMasterPage = pPage && pPage->IsMasterPage();
GetViewShell()->GetViewShellBase().GetEventMultiplexer()->MultiplexEvent(
sd::tools::EventMultiplexerEvent::EID_BEGIN_TEXT_EDIT, static_cast<void*>(pObj) );
- if( pOutl==NULL && pObj )
+ if( pOutl==nullptr && pObj )
pOutl = SdrMakeOutliner(OUTLINERMODE_TEXTOBJECT, *pObj->GetModel());
// make draw&impress specific initialisations
@@ -726,11 +726,11 @@ bool View::SdrBeginTextEdit(
{
aBackground = pObj->GetPage()->GetPageBackgroundColor(pPV);
}
- if (pOL != NULL)
+ if (pOL != nullptr)
pOL->SetBackgroundColor( aBackground );
}
- if (pOL != NULL)
+ if (pOL != nullptr)
{
pOL->SetParaInsertedHdl(LINK(this, View, OnParagraphInsertedHdl));
pOL->SetParaRemovingHdl(LINK(this, View, OnParagraphRemovingHdl));
@@ -740,7 +740,7 @@ bool View::SdrBeginTextEdit(
if (bMasterPage && bReturn && pOutl)
{
const SdrTextObj* pTextObj = pOutl->GetTextObj();
- const SdPage* pSdPage = pTextObj ? static_cast<const SdPage*>(pTextObj->GetPage()) : NULL;
+ const SdPage* pSdPage = pTextObj ? static_cast<const SdPage*>(pTextObj->GetPage()) : nullptr;
const PresObjKind eKind = pSdPage ? pSdPage->GetPresObjKind(const_cast<SdrTextObj*>(pTextObj)) : PRESOBJ_NONE;
switch (eKind)
{
@@ -1211,7 +1211,7 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
{
SdPage* pPage = static_cast< SdPage* >( pTextObj->GetPage() );
- SfxStyleSheet* pStyleSheet = 0;
+ SfxStyleSheet* pStyleSheet = nullptr;
const PresObjKind eKind = pPage->GetPresObjKind(pTextObj);
if( eKind != PRESOBJ_NONE )
@@ -1229,7 +1229,7 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
{
sal_Int16 nDepth = pOutliner->GetDepth( nPara );
- SfxStyleSheet* pStyle = 0;
+ SfxStyleSheet* pStyle = nullptr;
if( nDepth > 0 )
{
OUString aStyleSheetName( pStyleSheet->GetName() );
@@ -1333,7 +1333,7 @@ void View::ChangeMarkedObjectsBulletsNumbering(
return;
const bool bUndoEnabled = pSdrModel->IsUndoEnabled();
- SdrUndoGroup* pUndoGroup = bUndoEnabled ? new SdrUndoGroup(*pSdrModel) : 0;
+ SdrUndoGroup* pUndoGroup = bUndoEnabled ? new SdrUndoGroup(*pSdrModel) : nullptr;
const bool bToggleOn = ShouldToggleOn( bToggle, bHandleBullets );
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 917e2ae2d336..aef02b9b7ad6 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -98,22 +98,22 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateClipboardDat
{
// since SdTransferable::CopyToClipboard is called, this
// dynamically created object ist destroyed automatically
- SdTransferable* pTransferable = new SdTransferable( &mrDoc, NULL, false );
+ SdTransferable* pTransferable = new SdTransferable( &mrDoc, nullptr, false );
css::uno::Reference< css::datatransfer::XTransferable > xRet( pTransferable );
SD_MOD()->pTransferClip = pTransferable;
mrDoc.CreatingDataObj( pTransferable );
pTransferable->SetWorkDocument( static_cast<SdDrawDocument*>(GetMarkedObjModel()) );
- mrDoc.CreatingDataObj( NULL );
+ mrDoc.CreatingDataObj( nullptr );
// #112978# need to use GetAllMarkedBoundRect instead of GetAllMarkedRect to get
// fat lines correctly
const Rectangle aMarkRect( GetAllMarkedBoundRect() );
TransferableObjectDescriptor aObjDesc;
- SdrOle2Obj* pSdrOleObj = NULL;
+ SdrOle2Obj* pSdrOleObj = nullptr;
SdrPageView* pPgView = GetSdrPageView();
- SdPage* pOldPage = pPgView ? static_cast<SdPage*>( pPgView->GetPage() ) : NULL;
+ SdPage* pOldPage = pPgView ? static_cast<SdPage*>( pPgView->GetPage() ) : nullptr;
SdPage* pNewPage = const_cast<SdPage*>(static_cast<const SdPage*>( pTransferable->GetWorkDocument()->GetPage( 0 ) ));
if( pOldPage )
@@ -166,7 +166,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateDragDataObje
TransferableObjectDescriptor aObjDesc;
OUString aDisplayName;
- SdrOle2Obj* pSdrOleObj = NULL;
+ SdrOle2Obj* pSdrOleObj = nullptr;
if( GetMarkedObjectCount() == 1 )
{
@@ -240,7 +240,7 @@ void View::UpdateSelectionClipboard( bool bForceDeselect )
else if( SD_MOD()->pTransferSelection && ( SD_MOD()->pTransferSelection->GetView() == this ) )
{
TransferableHelper::ClearSelection( mpViewSh->GetActiveWindow() );
- SD_MOD()->pTransferSelection = NULL;
+ SD_MOD()->pTransferSelection = nullptr;
}
}
}
@@ -288,7 +288,7 @@ void View::DoPaste (vcl::Window* pWindow)
const_cast< OutlinerView* >(pOLV)->PasteSpecial();
SdrObject* pObj = GetTextEditObject();
- SdPage* pPage = static_cast<SdPage*>( pObj ? pObj->GetPage() : NULL );
+ SdPage* pPage = static_cast<SdPage*>( pObj ? pObj->GetPage() : nullptr );
::Outliner* pOutliner = pOLV->GetOutliner();
if( pOutliner)
@@ -334,7 +334,7 @@ void View::DoPaste (vcl::Window* pWindow)
DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>( mpDocSh->GetViewShell() );
- if (pDrViewSh != NULL)
+ if (pDrViewSh != nullptr)
{
if( !InsertData( aDataHelper, aPos, nDnDAction, false ) )
{
@@ -347,7 +347,7 @@ void View::DoPaste (vcl::Window* pWindow)
( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
{
- pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", NULL );
+ pDrViewSh->InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "", nullptr );
}
}
}
@@ -363,13 +363,13 @@ void View::StartDrag( const Point& rStartPos, vcl::Window* pWindow )
if( IsTextEdit() )
SdrEndTextEdit();
- DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpDocSh ? mpDocSh->GetViewShell() : 0 );
+ DrawViewShell* pDrawViewShell = dynamic_cast< DrawViewShell* >( mpDocSh ? mpDocSh->GetViewShell() : nullptr );
if( pDrawViewShell )
{
rtl::Reference<FuPoor> xFunction( pDrawViewShell->GetCurrentFunction() );
- if( xFunction.is() && 0 != dynamic_cast< const FuDraw *>( xFunction.get() ) )
+ if( xFunction.is() && nullptr != dynamic_cast< const FuDraw *>( xFunction.get() ) )
static_cast<FuDraw*>(xFunction.get())->ForcePointer();
}
@@ -392,7 +392,7 @@ void View::DragFinished( sal_Int8 nDropAction )
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
if( pDragTransferable )
- pDragTransferable->SetView( NULL );
+ pDragTransferable->SetView( nullptr );
if( ( nDropAction & DND_ACTION_MOVE ) &&
pDragTransferable && !pDragTransferable->IsInternalMove() &&
@@ -441,7 +441,7 @@ void View::DragFinished( sal_Int8 nDropAction )
EndUndo();
mnDragSrcPgNum = SDRPAGE_NOTFOUND;
delete mpDragSrcMarkList;
- mpDragSrcMarkList = NULL;
+ mpDragSrcMarkList = nullptr;
}
sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
@@ -487,7 +487,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if(pDragTransferable && (nDropAction & DND_ACTION_LINK))
{
// suppress own data when it's intention is to use it as fill information
- pDragTransferable = 0;
+ pDragTransferable = nullptr;
}
if( pDragTransferable )
@@ -543,8 +543,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
// check object insert
if( !nRet && ( bXFillExchange || ( ( bDrawing || bGraphic || bMtf || bBitmap || bBookmark ) && ( nDropAction & DND_ACTION_LINK ) ) ) )
{
- SdrObject* pPickObj = NULL;
- SdrPageView* pPageView = NULL;
+ SdrObject* pPickObj = nullptr;
+ SdrPageView* pPageView = nullptr;
::sd::Window* pWindow = mpViewSh->GetActiveWindow();
Point aPos( pWindow->PixelToLogic( rEvt.maPosPixel ) );
const bool bHasPickObj = PickObj( aPos, getHitTolLog(), pPickObj, pPageView );
@@ -591,7 +591,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( mpDropMarker )
{
ImplClearDrawDropMarker();
- mpDropMarkerObj = NULL;
+ mpDropMarkerObj = nullptr;
}
if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE ) && mpViewSh && SlideShow::IsRunning(mpViewSh->GetViewShellBase()) )
@@ -617,7 +617,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge
if( rEvt.mbLeaving && mpDropMarker )
{
ImplClearDrawDropMarker();
- mpDropMarkerObj = NULL;
+ mpDropMarkerObj = nullptr;
}
return nRet;
@@ -635,7 +635,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
if( mpDropMarker )
{
ImplClearDrawDropMarker();
- mpDropMarkerObj = NULL;
+ mpDropMarkerObj = nullptr;
}
if( !pPV->IsLayerLocked( aActiveLayer ) )
@@ -727,8 +727,8 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
}
else
{
- SdrObject* pPickObj = NULL;
- SdrPageView* pPageView = NULL;
+ SdrObject* pPickObj = nullptr;
+ SdrPageView* pPageView = nullptr;
if( PickObj( aPos, getHitTolLog(), pPickObj, pPageView ) )
{
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 4e32d934ca00..2dc792a7b644 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -110,7 +110,7 @@ SdrObject* ImpGetClone(std::vector<ImpRememberOrigAndClone*>& aConnectorContaine
if(pConnObj == aConnectorContainer[a]->pOrig)
return aConnectorContainer[a]->pClone;
}
- return 0L;
+ return nullptr;
}
// restrict movement to WorkArea
@@ -251,7 +251,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo
aGraphic.SetPrefMapMode( aMtf.GetPrefMapMode() );
aGraphic.SetPrefSize( aMtf.GetPrefSize() );
- InsertGraphic( aGraphic, mnAction, aInsertPos, NULL, pImageMap );
+ InsertGraphic( aGraphic, mnAction, aInsertPos, nullptr, pImageMap );
return true;
}
@@ -265,39 +265,39 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
mbIsDropAllowed = false;
TransferableDataHelper aDataHelper( rDataHelper );
- SdrObject* pPickObj = NULL;
- SdPage* pPage = NULL;
+ SdrObject* pPickObj = nullptr;
+ SdPage* pPage = nullptr;
std::unique_ptr<ImageMap> pImageMap;
bool bReturn = false;
bool bLink = ( ( mnAction & DND_ACTION_LINK ) != 0 );
bool bCopy = ( ( ( mnAction & DND_ACTION_COPY ) != 0 ) || bLink );
SdrInsertFlags nPasteOptions = SdrInsertFlags::SETDEFLAYER;
- if (mpViewSh != NULL)
+ if (mpViewSh != nullptr)
{
- OSL_ASSERT (mpViewSh->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr);
SfxInPlaceClient* pIpClient = mpViewSh->GetViewShell()->GetIPClient();
if( dynamic_cast< ::sd::slidesorter::SlideSorterViewShell *>( mpViewSh ) != nullptr
- || (pIpClient!=NULL && pIpClient->IsObjectInPlaceActive()))
+ || (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive()))
nPasteOptions |= SdrInsertFlags::DONTMARK;
}
if( bDrag )
{
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
PickObj( rPos, getHitTolLog(), pPickObj, pPV );
}
if( nPage != SDRPAGE_NOTFOUND )
pPage = static_cast<SdPage*>( mrDoc.GetPage( nPage ) );
- SdTransferable* pOwnData = NULL;
+ SdTransferable* pOwnData = nullptr;
SdTransferable* pImplementation = SdTransferable::getImplementation( aDataHelper.GetTransferable() );
if(pImplementation && (rDnDAction & DND_ACTION_LINK))
{
// suppress own data when it's intention is to use it as fill information
- pImplementation = 0;
+ pImplementation = nullptr;
}
// try to get own transfer data
@@ -615,7 +615,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
if (nPos != -1)
aLayout = aLayout.copy(0, nPos);
pPage->SetPresentationLayout( aLayout, false, false );
- pSourceDoc->CreatingDataObj( NULL );
+ pSourceDoc->CreatingDataObj( nullptr );
}
else
{
@@ -691,8 +691,8 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
// only one object
SdrObject* pObj = pModel->GetSdPage( 0, PK_STANDARD )->GetObj( 0 );
- SdrObject* pPickObj2 = NULL;
- SdrPageView* pPV = NULL;
+ SdrObject* pPickObj2 = nullptr;
+ SdrPageView* pPV = nullptr;
PickObj( rPos, getHitTolLog(), pPickObj2, pPV );
if( ( mnAction & DND_ACTION_MOVE ) && pPickObj2 && pObj )
@@ -983,12 +983,12 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
SdrPageView* pPV = GetSdrPageView();
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
- if (mpViewSh!=NULL)
+ if (mpViewSh!=nullptr)
{
- OSL_ASSERT (mpViewSh->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr);
SfxInPlaceClient* pIpClient
= mpViewSh->GetViewShell()->GetIPClient();
- if (pIpClient!=NULL && pIpClient->IsObjectInPlaceActive())
+ if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())
nOptions |= SdrInsertFlags::DONTMARK;
}
@@ -1153,12 +1153,12 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
SdrPageView* pPV = GetSdrPageView();
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
- if (mpViewSh!=NULL)
+ if (mpViewSh!=nullptr)
{
- OSL_ASSERT (mpViewSh->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr);
SfxInPlaceClient* pIpClient
= mpViewSh->GetViewShell()->GetIPClient();
- if (pIpClient!=NULL && pIpClient->IsObjectInPlaceActive())
+ if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())
nOptions |= SdrInsertFlags::DONTMARK;
}
@@ -1215,7 +1215,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
- InsertGraphic( aGraphic, mnAction, aInsertPos, NULL, pImageMap.get() );
+ InsertGraphic( aGraphic, mnAction, aInsertPos, nullptr, pImageMap.get() );
bReturn = true;
}
}
@@ -1294,7 +1294,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
Size aImageMapSize(aBmpEx.GetPrefSize());
ImpCheckInsertPos(aInsertPos, aImageMapSize, GetWorkArea());
- InsertGraphic( aBmpEx, mnAction, aInsertPos, NULL, pImageMap.get() );
+ InsertGraphic( aBmpEx, mnAction, aInsertPos, nullptr, pImageMap.get() );
bReturn = true;
}
}
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 2e9004664458..f9e75e33b069 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -81,7 +81,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
mnAction = rAction;
// Is there a object at the position rPos?
- SdrGrafObj* pNewGrafObj = NULL;
+ SdrGrafObj* pNewGrafObj = nullptr;
SdrPageView* pPV = GetSdrPageView();
SdrObject* pPickObj = pObj;
const bool bOnMaster = pPV && pPV->GetPage() && pPV->GetPage()->IsMasterPage();
@@ -89,7 +89,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if(pPV && dynamic_cast< const ::sd::slidesorter::view::SlideSorterView* >(this) != nullptr)
{
if(!pPV->GetPageRect().IsInside(rPos))
- pPV = 0L;
+ pPV = nullptr;
}
if( !pPickObj && pPV )
@@ -127,7 +127,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
{
Rectangle aRect( pNewGrafObj->GetLogicRect() );
pNewGrafObj->AdjustToMaxRect( aRect );
- pNewGrafObj->SetOutlinerParaObject(NULL);
+ pNewGrafObj->SetOutlinerParaObject(nullptr);
pNewGrafObj->SetEmptyPresObj(false);
}
@@ -175,7 +175,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if ( rGraphic.GetPrefMapMode().GetMapUnit() == MAP_PIXEL )
{
- ::OutputDevice* pOutDev = 0;
+ ::OutputDevice* pOutDev = nullptr;
if( mpViewSh )
pOutDev = mpViewSh->GetActiveWindow();
@@ -203,7 +203,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
bool bIsPresTarget = false;
if ((mpViewSh
- && mpViewSh->GetViewShell()!=NULL
+ && mpViewSh->GetViewShell()!=nullptr
&& mpViewSh->GetViewShell()->GetIPClient()
&& mpViewSh->GetViewShell()->GetIPClient()->IsObjectInPlaceActive())
|| dynamic_cast<const ::sd::slidesorter::view::SlideSorterView* >(this))
@@ -287,7 +287,7 @@ SdrMediaObj* View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
uno::Reference<frame::XModel> const xModel(
GetDoc().GetObjectShell()->GetModel());
bool const bRet = ::avmedia::EmbedMedia(xModel, rMediaURL, realURL);
- if (!bRet) { return 0; }
+ if (!bRet) { return nullptr; }
}
return InsertMediaObj( realURL, "application/vnd.sun.star.media", rAction, rPos, rSize );
@@ -309,7 +309,7 @@ SdrMediaObj* View::Insert3DModelURL(
uno::Reference<frame::XModel> const xModel(
GetDoc().GetObjectShell()->GetModel());
bool const bRet = ::avmedia::Embed3DModel(xModel, rModelURL, sRealURL);
- if (!bRet) { return 0; }
+ if (!bRet) { return nullptr; }
}
SdrMediaObj* pRetObject = InsertMediaObj( sRealURL, "model/vnd.gltf+json", rAction, rPos, rSize );
@@ -326,14 +326,14 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM
SdrEndTextEdit();
mnAction = rAction;
- SdrMediaObj* pNewMediaObj = NULL;
+ SdrMediaObj* pNewMediaObj = nullptr;
SdrPageView* pPV = GetSdrPageView();
SdrObject* pPickObj = GetEmptyPresentationObject( PRESOBJ_MEDIA );
if(pPV && dynamic_cast<const ::sd::slidesorter::view::SlideSorterView* >(this) )
{
if(!pPV->GetPageRect().IsInside(rPos))
- pPV = 0L;
+ pPV = nullptr;
}
if( !pPickObj && pPV )
@@ -377,7 +377,7 @@ SdrMediaObj* View::InsertMediaObj( const OUString& rMediaURL, const OUString& rM
OUString referer;
DrawDocShell * sh = GetDocSh();
- if (sh != 0 && sh->HasName()) {
+ if (sh != nullptr && sh->HasName()) {
referer = sh->GetMedium()->GetName();
}
pNewMediaObj->setURL( rMediaURL, referer, rMimeType );
@@ -433,7 +433,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void)
{
sal_Int8 nTempAction = ( aIter == maDropFileVector.begin() ) ? mnAction : 0;
const bool bLink = ( ( nTempAction & DND_ACTION_LINK ) != 0 );
- SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL );
+ SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, nullptr, nullptr );
if(pGrafObj && bLink)
{
pGrafObj->SetGraphicLink( aCurrentDropFile, ""/*TODO?*/, OUString() );
@@ -447,7 +447,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void)
}
if( !bOK )
{
- const SfxFilter* pFoundFilter = NULL;
+ const SfxFilter* pFoundFilter = nullptr;
SfxMedium aSfxMedium( aCurrentDropFile, StreamMode::READ | StreamMode::SHARE_DENYNONE );
ErrCode nErr = SfxGetpApp()->GetFilterMatcher().GuessFilter( aSfxMedium, &pFoundFilter );
@@ -554,12 +554,12 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void)
SdrOle2Obj* pOleObj = new SdrOle2Obj( svt::EmbeddedObjectRef( xObj, nAspect ), aName, aRect );
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
- if (mpViewSh != NULL)
+ if (mpViewSh != nullptr)
{
- OSL_ASSERT (mpViewSh->GetViewShell()!=NULL);
+ OSL_ASSERT (mpViewSh->GetViewShell()!=nullptr);
SfxInPlaceClient* pIpClient =
mpViewSh->GetViewShell()->GetIPClient();
- if (pIpClient!=NULL && pIpClient->IsObjectInPlaceActive())
+ if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())
nOptions |= SdrInsertFlags::DONTMARK;
}
@@ -591,7 +591,7 @@ IMPL_LINK_NOARG_TYPED(View, DropInsertFileHdl, Idle *, void)
*/
IMPL_LINK_NOARG_TYPED(View, DropErrorHdl, Idle *, void)
{
- ScopedVclPtr<InfoBox>::Create( mpViewSh ? mpViewSh->GetActiveWindow() : 0, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute();
+ ScopedVclPtr<InfoBox>::Create( mpViewSh ? mpViewSh->GetActiveWindow() : nullptr, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) )->Execute();
}
/**
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index 0554de617761..d05f64ccd423 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -43,7 +43,7 @@ static bool implIsMultiPresObj( PresObjKind eKind )
SdPage* View::GetPage()
{
- SdPage* pPage = NULL;
+ SdPage* pPage = nullptr;
SdrPageView* pPV = GetSdrPageView();
if( pPV )
{
@@ -56,7 +56,7 @@ SdPage* View::GetPage()
// returns selected object in case there's just one object in the selection
SdrObject* View::GetSelectedSingleObject(SdPage* pPage)
{
- SdrObject* pRet = NULL;
+ SdrObject* pRet = nullptr;
if( pPage )
{
// first try selected shape
@@ -78,7 +78,7 @@ SdrObject* View::GetSelectedSingleObject(SdPage* pPage)
SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
{
SdPage* pPage = GetPage();
- SdrObject* pEmptyObj = NULL;
+ SdrObject* pEmptyObj = nullptr;
if ( pPage && !pPage->IsMasterPage() ) {
SdrObject* pObj = GetSelectedSingleObject( pPage );
@@ -94,7 +94,7 @@ SdrObject* View::GetEmptyPresentationObject( PresObjKind eKind )
{
pEmptyObj = pPage->GetPresObj(eKind, nIndex++ );
}
- while( (pEmptyObj != 0) && (!pEmptyObj->IsEmptyPresObj()) );
+ while( (pEmptyObj != nullptr) && (!pEmptyObj->IsEmptyPresObj()) );
}
// last try to find empty pres obj of multiple type
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index fe98667f2d39..4d9566c3fa29 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -54,7 +54,7 @@ namespace sd {
Window::Window(vcl::Window* pParent)
: vcl::Window(pParent, WinBits(WB_CLIPCHILDREN | WB_DIALOGCONTROL)),
DropTargetHelper( this ),
- mpShareWin(NULL),
+ mpShareWin(nullptr),
maWinPos(0, 0), // precautionary; but the values should be set
maViewOrigin(0, 0), // again from the owner of the window
maViewSize(1000, 1000),
@@ -66,7 +66,7 @@ Window::Window(vcl::Window* pParent)
mbCenterAllowed(true),
mnTicks (0),
mbDraggedFrom(false),
- mpViewShell(NULL),
+ mpViewShell(nullptr),
mbUseDropScroll (true)
{
SetDialogControlFlags( DialogControlFlags::Return | DialogControlFlags::WantFocus );
@@ -99,10 +99,10 @@ Window::~Window()
void Window::dispose()
{
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
{
WindowUpdater* pWindowUpdater = mpViewShell->GetWindowUpdater();
- if (pWindowUpdater != NULL)
+ if (pWindowUpdater != nullptr)
pWindowUpdater->UnregisterWindow (this);
}
mpShareWin.clear();
@@ -111,22 +111,22 @@ void Window::dispose()
void Window::SetViewShell (ViewShell* pViewSh)
{
- WindowUpdater* pWindowUpdater = NULL;
+ WindowUpdater* pWindowUpdater = nullptr;
// Unregister at device updater of old view shell.
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
{
pWindowUpdater = mpViewShell->GetWindowUpdater();
- if (pWindowUpdater != NULL)
+ if (pWindowUpdater != nullptr)
pWindowUpdater->UnregisterWindow (this);
}
mpViewShell = pViewSh;
// Register at device updater of new view shell
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
{
pWindowUpdater = mpViewShell->GetWindowUpdater();
- if (pWindowUpdater != NULL)
+ if (pWindowUpdater != nullptr)
pWindowUpdater->RegisterWindow (this);
}
}
@@ -223,7 +223,7 @@ void Window::KeyInput(const KeyEvent& rKEvt)
{
if (getenv("SD_DEBUG") && rKEvt.GetKeyCode().GetCode() == KEY_F12 && mpViewShell)
{
- mpViewShell->GetDoc()->dumpAsXml(0);
+ mpViewShell->GetDoc()->dumpAsXml(nullptr);
return;
}
@@ -961,7 +961,7 @@ css::uno::Reference<css::accessibility::XAccessible>
{
return xAcc;
}
- if (mpViewShell != NULL)
+ if (mpViewShell != nullptr)
{
xAcc = mpViewShell->CreateAccessibleDocumentView (this);
SetAccessible(xAcc);
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 22c5ac1db45b..b5f1e57e40a3 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -191,7 +191,7 @@ sal_Int8 TabControl::AcceptDrop( const AcceptDropEvent& rEvt )
if( ( nPageId >= 0 ) && pDoc->GetPage( (sal_uInt16)nPageId ) )
{
- nRet = pDrViewSh->AcceptDrop( rEvt, *this, NULL, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
+ nRet = pDrViewSh->AcceptDrop( rEvt, *this, nullptr, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
SwitchPage( aPos );
}
}
@@ -266,7 +266,7 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt )
if( ( nPageId >= 0 ) && pDoc->GetPage( (sal_uInt16)nPageId ) )
{
- nRet = pDrViewSh->ExecuteDrop( rEvt, *this, NULL, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
+ nRet = pDrViewSh->ExecuteDrop( rEvt, *this, nullptr, (sal_uInt16)nPageId, SDRLAYER_NOTFOUND );
}
}
diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx
index 41fb110043a6..b97a7d7f6541 100644
--- a/sd/source/ui/view/viewoverlaymanager.cxx
+++ b/sd/source/ui/view/viewoverlaymanager.cxx
@@ -75,8 +75,8 @@ static BitmapEx loadImageResource( sal_uInt16 nId )
static BitmapEx* getButtonImage( int index, bool large )
{
- static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START] = { 0, 0, 0, 0, 0, 0, 0, 0 };
- static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ static vcl::DeleteOnDeinit< BitmapEx > gSmallButtonImages[BMP_PLACEHOLDER_SMALL_END - BMP_PLACEHOLDER_SMALL_START] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
+ static vcl::DeleteOnDeinit< BitmapEx > gLargeButtonImages[BMP_PLACEHOLDER_LARGE_END - BMP_PLACEHOLDER_LARGE_START] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
if( !gSmallButtonImages[0].get() )
{
@@ -179,7 +179,7 @@ void ImageButtonHdl::onMouseEnter(const MouseEvent& rMEvt)
{
int nHighlightId = 0;
OutputDevice* pDev = pHdlList->GetView()->GetFirstOutputDevice();
- if( pDev == 0 )
+ if( pDev == nullptr )
pDev = Application::GetDefaultDevice();
Point aMDPos( rMEvt.GetPosPixel() );
@@ -246,7 +246,7 @@ void ImageButtonHdl::CreateB2dIAObject()
rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
if(rPaintWindow.OutputToWindow() && xManager.is() )
{
- sdr::overlay::OverlayObject* pOverlayObject = 0;
+ sdr::overlay::OverlayObject* pOverlayObject = nullptr;
pOverlayObject = new sdr::overlay::OverlayBitmapEx( aPosition, aBitmapEx, 0, 0 );
xManager->add(*pOverlayObject);
@@ -336,7 +336,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight )
const Rectangle& rSnapRect = pPlaceholder->GetSnapRect();
OutputDevice* pDev = mrView.GetFirstOutputDevice();
- if( pDev == 0 )
+ if( pDev == nullptr )
pDev = Application::GetDefaultDevice();
Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
@@ -351,7 +351,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight )
const Rectangle aRectSrc( Point( 0, 0 ), aSize );
aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge));
- aRet.Expand( aSize.Width(), aSize.Height(), NULL, true );
+ aRet.Expand( aSize.Width(), aSize.Height(), nullptr, true );
aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) );
aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) );
@@ -371,7 +371,7 @@ void ChangePlaceholderTag::addCustomHandles( SdrHdlList& rHandlerList )
const Point aPoint;
OutputDevice* pDev = mrView.GetFirstOutputDevice();
- if( pDev == 0 )
+ if( pDev == nullptr )
pDev = Application::GetDefaultDevice();
Size aShapeSizePix = pDev->LogicToPixel(rSnapRect.GetSize());
@@ -420,7 +420,7 @@ void ChangePlaceholderTag::deselect()
ViewOverlayManager::ViewOverlayManager( ViewShellBase& rViewShellBase )
: mrBase( rViewShellBase )
-, mnUpdateTagsEvent( 0 )
+, mnUpdateTagsEvent( nullptr )
{
Link<tools::EventMultiplexerEvent&,void> aLink( LINK(this,ViewOverlayManager,EventMultiplexerListener) );
mrBase.GetEventMultiplexer()->AddEventListener(aLink, tools::EventMultiplexerEvent::EID_CURRENT_PAGE
@@ -440,7 +440,7 @@ ViewOverlayManager::~ViewOverlayManager()
if( mnUpdateTagsEvent )
{
Application::RemoveUserEvent( mnUpdateTagsEvent );
- mnUpdateTagsEvent = 0;
+ mnUpdateTagsEvent = nullptr;
}
DisposeTags();
@@ -449,7 +449,7 @@ ViewOverlayManager::~ViewOverlayManager()
void ViewOverlayManager::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint != NULL)
+ if (pSimpleHint != nullptr)
{
if (pSimpleHint->GetId() == SFX_HINT_DOCCHANGED)
{
@@ -476,7 +476,7 @@ IMPL_LINK_NOARG_TYPED(ViewOverlayManager, UpdateTagsHdl, void*, void)
{
OSL_TRACE("ViewOverlayManager::UpdateTagsHdl");
- mnUpdateTagsEvent = 0;
+ mnUpdateTagsEvent = nullptr;
bool bChanges = DisposeTags();
bChanges |= CreateTags();
@@ -490,7 +490,7 @@ bool ViewOverlayManager::CreateTags()
std::shared_ptr<ViewShell> aMainShell = mrBase.GetMainViewShell();
- SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : NULL;
+ SdPage* pPage = aMainShell.get() ? aMainShell->getCurrentPage() : nullptr;
if( pPage && !pPage->IsMasterPage() && (pPage->GetPageKind() == PK_STANDARD) )
{
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 62f55be8f0a3..517e79fff166 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -80,7 +80,7 @@ namespace sd {
*/
void ViewShell::UpdateScrollBars()
{
- if (mpHorizontalScrollBar.get() != NULL)
+ if (mpHorizontalScrollBar.get() != nullptr)
{
long nW = (long)(mpContentWindow->GetVisibleWidth() * 32000);
long nX = (long)(mpContentWindow->GetVisibleX() * 32000);
@@ -93,7 +93,7 @@ void ViewShell::UpdateScrollBars()
mpHorizontalScrollBar->SetPageSize(nPage);
}
- if (mpVerticalScrollBar.get() != NULL)
+ if (mpVerticalScrollBar.get() != nullptr)
{
long nH = (long)(mpContentWindow->GetVisibleHeight() * 32000);
long nY = (long)(mpContentWindow->GetVisibleY() * 32000);
@@ -150,7 +150,7 @@ long ViewShell::VirtHScrollHdl(ScrollBar* pHScroll)
// scroll all windows of the column
::sd::View* pView = GetView();
- OutlinerView* pOLV = NULL;
+ OutlinerView* pOLV = nullptr;
if (pView)
pOLV = pView->GetTextEditOutlinerView();
@@ -211,7 +211,7 @@ long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
double fY = (double) pVScroll->GetThumbPos() / pVScroll->GetRange().Len();
::sd::View* pView = GetView();
- OutlinerView* pOLV = NULL;
+ OutlinerView* pOLV = nullptr;
if (pView)
pOLV = pView->GetTextEditOutlinerView();
@@ -248,12 +248,12 @@ long ViewShell::VirtVScrollHdl(ScrollBar* pVScroll)
SvxRuler* ViewShell::CreateHRuler(::sd::Window* , bool )
{
- return NULL;
+ return nullptr;
}
SvxRuler* ViewShell::CreateVRuler(::sd::Window* )
{
- return NULL;
+ return nullptr;
}
void ViewShell::UpdateHRuler()
@@ -331,13 +331,13 @@ void ViewShell::SetZoom(long nZoom)
Fraction aUIScale(nZoom, 100);
aUIScale *= GetDoc()->GetUIScale();
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
mpContentWindow->SetZoomIntegral(nZoom);
@@ -373,13 +373,13 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect)
Point aPos = GetActiveWindow()->GetWinViewPos();
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetZoom(aUIScale);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetZoom(aUIScale);
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
Point aNewPos = mpContentWindow->GetWinViewPos();
aNewPos.X() = aPos.X();
@@ -413,7 +413,7 @@ void ViewShell::SetZoomRect(const Rectangle& rZoomRect)
void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
const Point& rWinPos, bool bUpdate)
{
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
mpContentWindow->SetViewOrigin(rViewOrigin);
mpContentWindow->SetViewSize(rViewSize);
@@ -442,7 +442,7 @@ void ViewShell::InitWindows(const Point& rViewOrigin, const Size& rViewSize,
*/
void ViewShell::InvalidateWindows()
{
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
mpContentWindow->Invalidate();
}
@@ -451,7 +451,7 @@ void ViewShell::InvalidateWindows()
*/
void ViewShell::DrawMarkRect(const Rectangle& rRect) const
{
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
mpContentWindow->InvertTracking(rRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW);
}
@@ -463,13 +463,13 @@ void ViewShell::SetPageSizeAndBorder(PageKind ePageKind, const Size& rNewSize,
Orientation eOrientation, sal_uInt16 nPaperBin,
bool bBackgroundFullSize)
{
- SdPage* pPage = 0;
- SdUndoGroup* pUndoGroup = NULL;
+ SdPage* pPage = nullptr;
+ SdUndoGroup* pUndoGroup = nullptr;
pUndoGroup = new SdUndoGroup(GetDoc());
OUString aString(SdResId(STR_UNDO_CHANGE_PAGEFORMAT));
pUndoGroup->SetComment(aString);
SfxViewShell* pViewShell = GetViewShell();
- OSL_ASSERT (pViewShell!=NULL);
+ OSL_ASSERT (pViewShell!=nullptr);
sal_uInt16 i, nPageCnt = GetDoc()->GetMasterSdPageCount(ePageKind);
@@ -631,7 +631,7 @@ void ViewShell::SetZoomFactor(const Fraction& rZoomX, const Fraction&)
void ViewShell::SetActiveWindow (::sd::Window* pWin)
{
SfxViewShell* pViewShell = GetViewShell();
- OSL_ASSERT (pViewShell!=NULL);
+ OSL_ASSERT (pViewShell!=nullptr);
if (pViewShell->GetWindow() != pWin)
{
@@ -714,7 +714,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
bool bAbort = false;
GetDocSh()->SetWaitCursor( true );
SfxViewShell* pViewShell = GetViewShell();
- OSL_ASSERT (pViewShell!=NULL);
+ OSL_ASSERT (pViewShell!=nullptr);
bool bChangeDefaultsForChart = false;
OUString aName;
@@ -770,8 +770,8 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
{
// OLE object is no longer empty
pObj->SetEmptyPresObj(false);
- pObj->SetOutlinerParaObject(NULL);
- pObj->SetGraphic(NULL);
+ pObj->SetOutlinerParaObject(nullptr);
+ pObj->SetGraphic(nullptr);
// the empty OLE object gets a new IPObj
if (!aName.isEmpty())
@@ -902,7 +902,7 @@ void ViewShell::SetRuler(bool bRuler)
{
mbHasRulers = ( bRuler && !GetDocSh()->IsPreview() ); // no rulers on preview mode
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
{
if (mbHasRulers)
{
@@ -914,7 +914,7 @@ void ViewShell::SetRuler(bool bRuler)
}
}
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
{
if (mbHasRulers)
{
@@ -926,7 +926,7 @@ void ViewShell::SetRuler(bool bRuler)
}
}
- OSL_ASSERT(GetViewShell()!=NULL);
+ OSL_ASSERT(GetViewShell()!=nullptr);
if (IsMainViewShell())
GetViewShell()->InvalidateBorder();
}
@@ -958,12 +958,12 @@ void ViewShell::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert
const sal_Int32 nIndex = rSequence.getLength();
rSequence.realloc( nIndex + 1 );
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
// Get the view id from the view shell in the center pane. This will
// usually be the called view shell, but to be on the safe side we call
// the main view shell explicitly.
sal_uInt16 nViewID (IMPRESS_FACTORY_ID);
- if (GetViewShellBase().GetMainViewShell().get() != NULL)
+ if (GetViewShellBase().GetMainViewShell().get() != nullptr)
nViewID = GetViewShellBase().GetMainViewShell()->mpImpl->GetViewId();
rSequence[nIndex].Name = sUNO_View_ViewId;
OUStringBuffer sBuffer( "view" );
@@ -980,13 +980,13 @@ void ViewShell::ReadUserDataSequence ( const css::uno::Sequence < css::beans::Pr
void ViewShell::VisAreaChanged(const Rectangle& rRect)
{
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
GetViewShell()->VisAreaChanged(rRect);
}
void ViewShell::SetWinViewPos(const Point& rWinPos, bool bUpdate)
{
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
{
mpContentWindow->SetWinViewPos(rWinPos);
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 06892405f074..a10aae8cf344 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -199,9 +199,9 @@ SdPage* ViewShell::CreateOrDuplicatePage (
// size, master page, to the new page. This is usually the given page.
// When the given page is NULL then use the first page of the document.
SdPage* pTemplatePage = pPage;
- if (pTemplatePage == NULL)
+ if (pTemplatePage == nullptr)
pTemplatePage = pDocument->GetSdPage(0, ePageKind);
- if (pTemplatePage != NULL && pTemplatePage->TRG_HasMasterPage())
+ if (pTemplatePage != nullptr && pTemplatePage->TRG_HasMasterPage())
aVisibleLayers = pTemplatePage->TRG_GetMasterPageVisibleLayers();
else
aVisibleLayers.SetAll();
@@ -221,14 +221,14 @@ SdPage* ViewShell::CreateOrDuplicatePage (
pDocument->StopWorkStartupDelay();
// Use the layouts of the previous page and notes page as template.
- if (pTemplatePage != NULL)
+ if (pTemplatePage != nullptr)
{
eStandardLayout = pTemplatePage->GetAutoLayout();
if( eStandardLayout == AUTOLAYOUT_TITLE )
eStandardLayout = AUTOLAYOUT_ENUM;
SdPage* pNotesTemplatePage = static_cast<SdPage*>(pDocument->GetPage(pTemplatePage->GetPageNum()+1));
- if (pNotesTemplatePage != NULL)
+ if (pNotesTemplatePage != nullptr)
eNotesLayout = pNotesTemplatePage->GetAutoLayout();
}
}
@@ -284,7 +284,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
StarBASIC::FatalError (ERRCODE_BASIC_BAD_PROP_VALUE);
#endif
rRequest.Ignore ();
- return NULL;
+ return nullptr;
}
}
else
@@ -297,7 +297,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
StarBASIC::FatalError (ERRCODE_BASIC_WRONG_ARGS);
#endif
rRequest.Ignore ();
- return NULL;
+ return nullptr;
}
// 2. Create a new page or duplicate an existing one.
@@ -319,8 +319,8 @@ SdPage* ViewShell::CreateOrDuplicatePage (
// then to the head of the document. c) pPage is NULL and the
// document is empty: We use CreateFirstPages to create the
// first page of the document.
- if (pPage == NULL)
- if (pTemplatePage == NULL)
+ if (pPage == nullptr)
+ if (pTemplatePage == nullptr)
{
pDocument->CreateFirstPages();
nNewPageIndex = 0;
@@ -367,7 +367,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
case SID_DUPLICATE_PAGE:
// Duplication makes no sense when pPage is NULL.
- if (pPage != NULL)
+ if (pPage != nullptr)
nNewPageIndex = pDocument->DuplicatePage (
pPage,
ePageKind,
@@ -382,7 +382,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
SAL_INFO("sd", "wrong slot id given to CreateOrDuplicatePage");
// Try to handle another slot id gracefully.
}
- SdPage* pNewPage = 0;
+ SdPage* pNewPage = nullptr;
if(nNewPageIndex != 0xffff)
pNewPage = pDocument->GetSdPage(nNewPageIndex, PK_STANDARD);
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index f293c001881b..2ca39fcd8a3a 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -114,21 +114,21 @@ namespace sd {
bool ViewShell::IsPageFlipMode() const
{
- return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow.get() != NULL &&
+ return dynamic_cast< const DrawViewShell *>( this ) != nullptr && mpContentWindow.get() != nullptr &&
mpContentWindow->GetVisibleHeight() >= 1.0;
}
SfxViewFrame* ViewShell::GetViewFrame() const
{
const SfxViewShell* pViewShell = GetViewShell();
- if (pViewShell != NULL)
+ if (pViewShell != nullptr)
{
return pViewShell->GetViewFrame();
}
else
{
- OSL_ASSERT (GetViewShell()!=NULL);
- return NULL;
+ OSL_ASSERT (GetViewShell()!=nullptr);
+ return nullptr;
}
}
@@ -148,13 +148,13 @@ ViewShell::~ViewShell()
// Keep the content window from accessing in its destructor the
// WindowUpdater.
if (mpContentWindow)
- mpContentWindow->SetViewShell(NULL);
+ mpContentWindow->SetViewShell(nullptr);
delete mpZoomList;
mpLayerTabBar.disposeAndClear();
- if (mpImpl->mpSubShellFactory.get() != NULL)
+ if (mpImpl->mpSubShellFactory.get() != nullptr)
GetViewShellBase().GetViewShellManager()->RemoveSubShellFactory(
this,mpImpl->mpSubShellFactory);
@@ -180,10 +180,10 @@ ViewShell::~ViewShell()
void ViewShell::construct()
{
mbHasRulers = false;
- mpActiveWindow = 0;
- mpView = 0;
- mpFrameView = 0;
- mpZoomList = 0;
+ mpActiveWindow = nullptr;
+ mpView = nullptr;
+ mpFrameView = nullptr;
+ mpZoomList = nullptr;
mbStartShowWithDialog = false;
mnPrintedHandoutPageNum = 1;
mnPrintedHandoutPageCount = 0;
@@ -191,7 +191,7 @@ void ViewShell::construct()
mpImpl.reset(new Implementation(*this));
meShellType = ST_NONE;
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
if (IsMainViewShell())
GetDocSh()->Connect (this);
@@ -236,7 +236,7 @@ void ViewShell::construct()
static_cast< ::sd::SpellDialogChildWindow*> (
GetViewFrame()->GetChildWindow (
::sd::SpellDialogChildWindow::GetChildWindowId()));
- if (pSpellDialog != NULL)
+ if (pSpellDialog != nullptr)
pSpellDialog->InvalidateSpellDialog();
// Register the sub shell factory.
@@ -280,7 +280,7 @@ void ViewShell::Init (bool bIsMainViewShell)
void ViewShell::Exit()
{
sd::View* pView = GetView();
- if (pView!=NULL && pView->IsTextEdit())
+ if (pView!=nullptr && pView->IsTextEdit())
{
pView->SdrEndTextEdit();
pView->UnmarkAll();
@@ -306,16 +306,16 @@ void ViewShell::Activate(bool bIsMDIActivate)
is sent sometimes asynchronous, it can happen, that the wrong window
gets the focus. */
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetActive();
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetActive();
if (bIsMDIActivate)
{
// thus, the Navigator will also get a current status
SfxBoolItem aItem( SID_NAVIGATOR_INIT, true );
- if (GetDispatcher() != NULL)
+ if (GetDispatcher() != nullptr)
GetDispatcher()->Execute(
SID_NAVIGATOR_INIT,
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
@@ -323,7 +323,7 @@ void ViewShell::Activate(bool bIsMDIActivate)
0L);
SfxViewShell* pViewShell = GetViewShell();
- OSL_ASSERT (pViewShell!=NULL);
+ OSL_ASSERT (pViewShell!=nullptr);
SfxBindings& rBindings = pViewShell->GetViewFrame()->GetBindings();
rBindings.Invalidate( SID_3D_STATE, true );
@@ -346,13 +346,13 @@ void ViewShell::Activate(bool bIsMDIActivate)
void ViewShell::UIActivating( SfxInPlaceClient* )
{
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
GetViewShellBase().GetToolBarManager()->ToolBarsDestroyed();
}
void ViewShell::UIDeactivated( SfxInPlaceClient* )
{
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
GetViewShellBase().GetToolBarManager()->ToolBarsDestroyed();
if ( GetDrawView() )
GetViewShellBase().GetToolBarManager()->SelectionHasChanged(*this, *GetDrawView());
@@ -367,9 +367,9 @@ void ViewShell::Deactivate(bool bIsMDIActivate)
GetDocSh()->Disconnect(this);
if( pDragTransferable )
- pDragTransferable->SetView( NULL );
+ pDragTransferable->SetView( nullptr );
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
// remember view attributes of FrameView
WriteFrameViewData();
@@ -384,9 +384,9 @@ void ViewShell::Deactivate(bool bIsMDIActivate)
GetCurrentFunction()->Deactivate();
}
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetActive(false);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetActive(false);
SfxShell::Deactivate(bIsMDIActivate);
@@ -408,7 +408,7 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
{
// give key input first to SfxViewShell to give CTRL+Key
// (e.g. CTRL+SHIFT+'+', to front) priority.
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
bReturn = GetViewShell()->KeyInput(rKEvt);
}
@@ -480,7 +480,7 @@ void ViewShell::MouseButtonDown(const MouseEvent& rMEvt, ::sd::Window* pWin)
}
// insert MouseEvent into E3dView
- if (GetView() != NULL)
+ if (GetView() != nullptr)
GetView()->SetMouseEvent(rMEvt);
bool bConsumed = false;
@@ -637,7 +637,7 @@ void ViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
{
std::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock(
mpImpl->mpUpdateLockForMouse);
- if (pLock.get() != NULL)
+ if (pLock.get() != nullptr)
pLock->Release();
}
}
@@ -648,7 +648,7 @@ void ViewShell::MouseMove(const MouseEvent& rMEvt, ::sd::Window* pWin)
}
// insert MouseEvent into E3dView
- if (GetView() != NULL)
+ if (GetView() != nullptr)
GetView()->SetMouseEvent(rMEvt);
if(HasCurrentFunction())
@@ -668,7 +668,7 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
SetActiveWindow(pWin);
// insert MouseEvent into E3dView
- if (GetView() != NULL)
+ if (GetView() != nullptr)
GetView()->SetMouseEvent(rMEvt);
if( HasCurrentFunction())
@@ -685,7 +685,7 @@ void ViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin)
{
std::shared_ptr<ViewShell::Implementation::ToolBarManagerLock> pLock(
mpImpl->mpUpdateLockForMouse);
- if (pLock.get() != NULL)
+ if (pLock.get() != nullptr)
pLock->Release();
}
}
@@ -778,7 +778,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
{
const CommandWheelData* pData = rCEvt.GetWheelData();
- if (pData != NULL)
+ if (pData != nullptr)
{
if (pData->IsMod1())
{
@@ -833,24 +833,24 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
void ViewShell::SetupRulers()
{
- if(mbHasRulers && (mpContentWindow.get() != NULL) && !SlideShow::IsRunning(GetViewShellBase()))
+ if(mbHasRulers && (mpContentWindow.get() != nullptr) && !SlideShow::IsRunning(GetViewShellBase()))
{
long nHRulerOfs = 0;
- if ( mpVerticalRuler.get() == NULL )
+ if ( mpVerticalRuler.get() == nullptr )
{
mpVerticalRuler.reset(CreateVRuler(GetActiveWindow()));
- if ( mpVerticalRuler.get() != NULL )
+ if ( mpVerticalRuler.get() != nullptr )
{
nHRulerOfs = mpVerticalRuler->GetSizePixel().Width();
mpVerticalRuler->SetActive();
mpVerticalRuler->Show();
}
}
- if ( mpHorizontalRuler.get() == NULL )
+ if ( mpHorizontalRuler.get() == nullptr )
{
mpHorizontalRuler.reset(CreateHRuler(GetActiveWindow(), true));
- if ( mpHorizontalRuler.get() != NULL )
+ if ( mpHorizontalRuler.get() != nullptr )
{
mpHorizontalRuler->SetWinPos(nHRulerOfs);
mpHorizontalRuler->SetActive();
@@ -862,7 +862,7 @@ void ViewShell::SetupRulers()
const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16& nNumItemId)
{
- const SfxPoolItem* pTmpItem = NULL;
+ const SfxPoolItem* pTmpItem = nullptr;
if(aNewAttr.GetItemState(nNumItemId, false, &pTmpItem) == SfxItemState::SET)
{
@@ -902,7 +902,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
}
}
- const SvxNumBulletItem *pItem = NULL;
+ const SvxNumBulletItem *pItem = nullptr;
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
@@ -912,7 +912,7 @@ const SfxPoolItem* ViewShell::GetNumBulletItem(SfxItemSet& aNewAttr, sal_uInt16&
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, false, reinterpret_cast<const SfxPoolItem**>(&pItem));
}
- if( pItem == NULL )
+ if( pItem == nullptr )
pItem = static_cast<const SvxNumBulletItem*>( aNewAttr.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
aNewAttr.Put(*pItem, EE_PARA_NUMBULLET);
@@ -971,26 +971,26 @@ SvBorder ViewShell::GetBorder (bool )
SvBorder aBorder;
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=NULL
+ if (mpHorizontalScrollBar.get()!=nullptr
&& mpHorizontalScrollBar->IsVisible())
{
aBorder.Bottom() = maScrBarWH.Height();
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=NULL
+ if (mpVerticalScrollBar.get()!=nullptr
&& mpVerticalScrollBar->IsVisible())
{
aBorder.Right() = maScrBarWH.Width();
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != NULL)
+ if (mbHasRulers && mpContentWindow.get() != nullptr)
{
SetupRulers();
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
aBorder.Top() = mpHorizontalRuler->GetSizePixel().Height();
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
aBorder.Left() = mpVerticalRuler->GetSizePixel().Width();
}
@@ -1010,11 +1010,11 @@ void ViewShell::ArrangeGUIElements()
long nBottom = maViewPos.Y() + maViewSize.Height();
// Horizontal scrollbar.
- if (mpHorizontalScrollBar.get()!=NULL
+ if (mpHorizontalScrollBar.get()!=nullptr
&& mpHorizontalScrollBar->IsVisible())
{
nBottom -= maScrBarWH.Height();
- if (mpLayerTabBar.get()!=NULL && mpLayerTabBar->IsVisible())
+ if (mpLayerTabBar.get()!=nullptr && mpLayerTabBar->IsVisible())
nBottom -= mpLayerTabBar->GetSizePixel().Height();
mpHorizontalScrollBar->SetPosSizePixel (
Point(nLeft, nBottom),
@@ -1022,7 +1022,7 @@ void ViewShell::ArrangeGUIElements()
}
// Vertical scrollbar.
- if (mpVerticalScrollBar.get()!=NULL
+ if (mpVerticalScrollBar.get()!=nullptr
&& mpVerticalScrollBar->IsVisible())
{
nRight -= maScrBarWH.Width();
@@ -1032,11 +1032,11 @@ void ViewShell::ArrangeGUIElements()
}
// Filler in the lower right corner.
- if (mpScrollBarBox.get() != NULL)
+ if (mpScrollBarBox.get() != nullptr)
{
- if (mpHorizontalScrollBar.get()!=NULL
+ if (mpHorizontalScrollBar.get()!=nullptr
&& mpHorizontalScrollBar->IsVisible()
- && mpVerticalScrollBar.get()!=NULL
+ && mpVerticalScrollBar.get()!=nullptr
&& mpVerticalScrollBar->IsVisible())
{
mpScrollBarBox->Show();
@@ -1047,20 +1047,20 @@ void ViewShell::ArrangeGUIElements()
}
// Place horizontal ruler below tab bar.
- if (mbHasRulers && mpContentWindow.get() != NULL)
+ if (mbHasRulers && mpContentWindow.get() != nullptr)
{
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
{
Size aRulerSize = mpHorizontalRuler->GetSizePixel();
aRulerSize.Width() = nRight - nLeft;
mpHorizontalRuler->SetPosSizePixel (
Point(nLeft,nTop), aRulerSize);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpHorizontalRuler->SetBorderPos(
mpVerticalRuler->GetSizePixel().Width()-1);
nTop += aRulerSize.Height();
}
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
{
Size aRulerSize = mpVerticalRuler->GetSizePixel();
aRulerSize.Height() = nBottom - nTop;
@@ -1077,7 +1077,7 @@ void ViewShell::ArrangeGUIElements()
bool bSlideShowActive = (xSlideShow.is() && xSlideShow->isRunning()) && !xSlideShow->isFullScreen() && xSlideShow->getAnimationMode() == ANIMATIONMODE_SHOW;
if ( !bSlideShowActive)
{
- OSL_ASSERT (GetViewShell()!=NULL);
+ OSL_ASSERT (GetViewShell()!=nullptr);
if (mpContentWindow)
mpContentWindow->SetPosSizePixel(
@@ -1091,7 +1091,7 @@ void ViewShell::ArrangeGUIElements()
Size(maViewSize.Width()-maScrBarWH.Width(),
maViewSize.Height()-maScrBarWH.Height()));
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
mpContentWindow->UpdateMapOrigin();
UpdateScrollBars();
@@ -1102,10 +1102,10 @@ void ViewShell::ArrangeGUIElements()
void ViewShell::SetUIUnit(FieldUnit eUnit)
{
// Set unit at horizontal and vertical rulers.
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetUnit(eUnit);
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->SetUnit(eUnit);
}
@@ -1114,7 +1114,7 @@ void ViewShell::SetUIUnit(FieldUnit eUnit)
*/
void ViewShell::SetDefTabHRuler( sal_uInt16 nDefTab )
{
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->SetDefTabDist( nDefTab );
}
@@ -1126,7 +1126,7 @@ bool ViewShell::PrepareClose (bool bUI)
bool bResult = true;
FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
- if (pFormShell != NULL)
+ if (pFormShell != nullptr)
bResult = pFormShell->PrepareClose (bUI);
return bResult;
@@ -1143,7 +1143,7 @@ void ViewShell::UpdatePreview (SdPage*, bool )
{
const ViewShell* pMainViewShell = GetViewShellBase().GetMainViewShell().get();
- if( pMainViewShell == 0 )
+ if( pMainViewShell == nullptr )
pMainViewShell = this;
::sd::View* pView = pMainViewShell->GetView();
@@ -1171,7 +1171,7 @@ void ViewShell::UpdatePreview (SdPage*, bool )
if( GetDocSh() )
return GetDocSh()->GetUndoManager();
- return NULL;
+ return nullptr;
}
void ViewShell::ImpGetUndoStrings(SfxItemSet &rSet) const
@@ -1500,23 +1500,23 @@ void ViewShell::ShowUIControls (bool bVisible)
if (mbHasRulers)
{
- if (mpHorizontalRuler.get() != NULL)
+ if (mpHorizontalRuler.get() != nullptr)
mpHorizontalRuler->Show( bVisible );
- if (mpVerticalRuler.get() != NULL)
+ if (mpVerticalRuler.get() != nullptr)
mpVerticalRuler->Show( bVisible );
}
- if (mpVerticalScrollBar.get() != NULL)
+ if (mpVerticalScrollBar.get() != nullptr)
mpVerticalScrollBar->Show( bVisible );
- if (mpHorizontalScrollBar.get() != NULL)
+ if (mpHorizontalScrollBar.get() != nullptr)
mpHorizontalScrollBar->Show( bVisible );
- if (mpScrollBarBox.get() != NULL)
+ if (mpScrollBarBox.get() != nullptr)
mpScrollBarBox->Show(bVisible);
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
mpContentWindow->Show( bVisible );
}
@@ -1527,14 +1527,14 @@ bool ViewShell::RelocateToParentWindow (vcl::Window* pParentWindow)
if (mpParentWindow)
mpParentWindow->SetBackground (Wallpaper());
- if (mpContentWindow.get() != NULL)
+ if (mpContentWindow.get() != nullptr)
mpContentWindow->SetParent(pParentWindow);
- if (mpHorizontalScrollBar.get() != NULL)
+ if (mpHorizontalScrollBar.get() != nullptr)
mpHorizontalScrollBar->SetParent(mpParentWindow);
- if (mpVerticalScrollBar.get() != NULL)
+ if (mpVerticalScrollBar.get() != nullptr)
mpVerticalScrollBar->SetParent(mpParentWindow);
- if (mpScrollBarBox.get() != NULL)
+ if (mpScrollBarBox.get() != nullptr)
mpScrollBarBox->SetParent(mpParentWindow);
return true;
@@ -1593,10 +1593,10 @@ SfxShell* ViewShellObjectBarFactory::CreateShell (
vcl::Window*,
::sd::FrameView* )
{
- SfxShell* pShell = NULL;
+ SfxShell* pShell = nullptr;
ShellCache::iterator aI (maShellCache.find(nId));
- if (aI == maShellCache.end() || aI->second==NULL)
+ if (aI == maShellCache.end() || aI->second==nullptr)
{
::sd::View* pView = mrViewShell.GetView();
switch (nId)
@@ -1633,7 +1633,7 @@ SfxShell* ViewShellObjectBarFactory::CreateShell (
break;
default:
- pShell = NULL;
+ pShell = nullptr;
break;
}
}
@@ -1645,7 +1645,7 @@ SfxShell* ViewShellObjectBarFactory::CreateShell (
void ViewShellObjectBarFactory::ReleaseShell (SfxShell* pShell)
{
- if (pShell != NULL)
+ if (pShell != nullptr)
delete pShell;
}