summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/alpha.hxx2
-rw-r--r--include/vcl/animate.hxx6
-rw-r--r--include/vcl/bitmap.hxx22
-rw-r--r--include/vcl/bitmapex.hxx10
-rw-r--r--include/vcl/bmpacc.hxx4
-rw-r--r--include/vcl/builder.hxx2
-rw-r--r--include/vcl/button.hxx2
-rw-r--r--include/vcl/cmdevt.hxx22
-rw-r--r--include/vcl/dialog.hxx2
-rw-r--r--include/vcl/edit.hxx6
-rw-r--r--include/vcl/event.hxx14
-rw-r--r--include/vcl/field.hxx10
-rw-r--r--include/vcl/gdimtf.hxx4
-rw-r--r--include/vcl/gfxlink.hxx4
-rw-r--r--include/vcl/graph.hxx6
-rw-r--r--include/vcl/graphicfilter.hxx24
-rw-r--r--include/vcl/idle.hxx2
-rw-r--r--include/vcl/image.hxx6
-rw-r--r--include/vcl/impdel.hxx4
-rw-r--r--include/vcl/jobdata.hxx2
-rw-r--r--include/vcl/keycod.hxx2
-rw-r--r--include/vcl/layout.hxx2
-rw-r--r--include/vcl/lazydelete.hxx6
-rw-r--r--include/vcl/menu.hxx8
-rw-r--r--include/vcl/metaact.hxx2
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx22
-rw-r--r--include/vcl/outdev.hxx42
-rw-r--r--include/vcl/pdfwriter.hxx4
-rw-r--r--include/vcl/pngwrite.hxx2
-rw-r--r--include/vcl/ppdparser.hxx4
-rw-r--r--include/vcl/print.hxx6
-rw-r--r--include/vcl/salbtype.hxx12
-rw-r--r--include/vcl/scheduler.hxx2
-rw-r--r--include/vcl/seleng.hxx2
-rw-r--r--include/vcl/sound.hxx2
-rw-r--r--include/vcl/split.hxx2
-rw-r--r--include/vcl/svapp.hxx4
-rw-r--r--include/vcl/sysdata.hxx20
-rw-r--r--include/vcl/texteng.hxx20
-rw-r--r--include/vcl/textview.hxx4
-rw-r--r--include/vcl/threadex.hxx2
-rw-r--r--include/vcl/timer.hxx2
-rw-r--r--include/vcl/toolbox.hxx8
-rw-r--r--include/vcl/vclevent.hxx2
-rw-r--r--include/vcl/vclmedit.hxx2
-rw-r--r--include/vcl/virdev.hxx2
-rw-r--r--include/vcl/window.hxx14
-rw-r--r--include/vcl/wmf.hxx6
-rw-r--r--include/vcl/wrkwin.hxx2
-rw-r--r--vcl/generic/app/gendisp.cxx12
-rw-r--r--vcl/generic/app/geninst.cxx2
-rw-r--r--vcl/generic/fontmanager/fontcache.cxx14
-rw-r--r--vcl/generic/fontmanager/fontconfig.cxx56
-rw-r--r--vcl/generic/fontmanager/fontmanager.cxx48
-rw-r--r--vcl/generic/fontmanager/helper.cxx2
-rw-r--r--vcl/generic/fontmanager/parseAFM.cxx162
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.cxx72
-rw-r--r--vcl/generic/glyphs/gcach_ftyp.hxx2
-rw-r--r--vcl/generic/glyphs/gcach_layout.cxx40
-rw-r--r--vcl/generic/glyphs/glyphcache.cxx26
-rw-r--r--vcl/generic/glyphs/graphite_serverfont.cxx4
-rw-r--r--vcl/generic/print/bitmap_gfx.cxx14
-rw-r--r--vcl/generic/print/common_gfx.cxx20
-rw-r--r--vcl/generic/print/genprnpsp.cxx60
-rw-r--r--vcl/generic/print/genpspgraphics.cxx50
-rw-r--r--vcl/generic/print/glyphset.cxx8
-rw-r--r--vcl/generic/print/glyphset.hxx2
-rw-r--r--vcl/generic/print/printerjob.cxx40
-rw-r--r--vcl/generic/print/prtsetup.cxx20
-rw-r--r--vcl/generic/print/prtsetup.hxx2
-rw-r--r--vcl/generic/print/psputil.cxx2
-rw-r--r--vcl/generic/print/text_gfx.cxx4
-rw-r--r--vcl/headless/svpbmp.cxx2
-rw-r--r--vcl/headless/svpframe.cxx24
-rw-r--r--vcl/headless/svpgdi.cxx2
-rw-r--r--vcl/headless/svpinst.cxx16
-rw-r--r--vcl/headless/svpprn.cxx16
-rw-r--r--vcl/headless/svptextrender.cxx20
-rw-r--r--vcl/inc/accmgr.hxx4
-rw-r--r--vcl/inc/brdwin.hxx2
-rw-r--r--vcl/inc/controldata.hxx4
-rw-r--r--vcl/inc/fontmanager.hxx4
-rw-r--r--vcl/inc/fontsubset.hxx8
-rw-r--r--vcl/inc/generic/gendata.hxx2
-rw-r--r--vcl/inc/generic/glyphcache.hxx2
-rw-r--r--vcl/inc/generic/printergfx.hxx6
-rw-r--r--vcl/inc/generic/printerjob.hxx2
-rw-r--r--vcl/inc/graphite_layout.hxx10
-rw-r--r--vcl/inc/graphite_serverfont.hxx4
-rw-r--r--vcl/inc/headless/svpframe.hxx2
-rw-r--r--vcl/inc/headless/svpgdi.hxx2
-rw-r--r--vcl/inc/headless/svpinst.hxx2
-rw-r--r--vcl/inc/helpwin.hxx2
-rw-r--r--vcl/inc/ilstbox.hxx8
-rw-r--r--vcl/inc/impfont.hxx6
-rw-r--r--vcl/inc/impgraph.hxx4
-rw-r--r--vcl/inc/impoct.hxx2
-rw-r--r--vcl/inc/salgdi.hxx4
-rw-r--r--vcl/inc/salgdiimpl.hxx2
-rw-r--r--vcl/inc/salinst.hxx2
-rw-r--r--vcl/inc/sallayout.hxx12
-rw-r--r--vcl/inc/salobj.hxx2
-rw-r--r--vcl/inc/salsession.hxx4
-rw-r--r--vcl/inc/saltimer.hxx2
-rw-r--r--vcl/inc/salwtype.hxx2
-rw-r--r--vcl/inc/svdata.hxx2
-rw-r--r--vcl/inc/textlayout.hxx2
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx8
-rw-r--r--vcl/inc/unx/saldisp.hxx2
-rw-r--r--vcl/inc/unx/salframe.h2
-rw-r--r--vcl/inc/unx/wmadaptor.hxx2
-rw-r--r--vcl/opengl/framebuffer.cxx4
-rw-r--r--vcl/opengl/gdiimpl.cxx20
-rw-r--r--vcl/opengl/salbmp.cxx24
-rw-r--r--vcl/opengl/scale.cxx8
-rw-r--r--vcl/opengl/texture.cxx12
-rw-r--r--vcl/opengl/x11/X11DeviceInfo.cxx8
-rw-r--r--vcl/opengl/x11/gdiimpl.cxx12
-rw-r--r--vcl/opengl/x11/salvd.cxx6
-rw-r--r--vcl/qa/cppunit/BitmapTest.cxx2
-rw-r--r--vcl/qa/cppunit/fontcharmap.cxx2
-rw-r--r--vcl/qa/cppunit/lifecycle.cxx14
-rw-r--r--vcl/source/app/brand.cxx2
-rw-r--r--vcl/source/app/dbggui.cxx2
-rw-r--r--vcl/source/app/dndhelp.cxx2
-rw-r--r--vcl/source/app/help.cxx10
-rw-r--r--vcl/source/app/i18nhelp.cxx12
-rw-r--r--vcl/source/app/salvtables.cxx12
-rw-r--r--vcl/source/app/scheduler.cxx24
-rw-r--r--vcl/source/app/settings.cxx24
-rw-r--r--vcl/source/app/svapp.cxx76
-rw-r--r--vcl/source/app/svdata.cxx6
-rw-r--r--vcl/source/app/svmain.cxx72
-rw-r--r--vcl/source/app/unohelp2.cxx2
-rw-r--r--vcl/source/components/factory.cxx2
-rw-r--r--vcl/source/control/button.cxx36
-rw-r--r--vcl/source/control/ctrl.cxx12
-rw-r--r--vcl/source/control/edit.cxx34
-rw-r--r--vcl/source/control/field.cxx14
-rw-r--r--vcl/source/control/field2.cxx18
-rw-r--r--vcl/source/control/fixed.cxx24
-rw-r--r--vcl/source/control/group.cxx6
-rw-r--r--vcl/source/control/ilstbox.cxx26
-rw-r--r--vcl/source/control/lstbox.cxx10
-rw-r--r--vcl/source/control/menubtn.cxx6
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/control/quickselectionengine.cxx2
-rw-r--r--vcl/source/control/scrbar.cxx14
-rw-r--r--vcl/source/control/slider.cxx2
-rw-r--r--vcl/source/control/spinbtn.cxx8
-rw-r--r--vcl/source/control/spinfld.cxx6
-rw-r--r--vcl/source/control/tabctrl.cxx44
-rw-r--r--vcl/source/edit/textdata.cxx8
-rw-r--r--vcl/source/edit/textdoc.cxx14
-rw-r--r--vcl/source/edit/textdoc.hxx2
-rw-r--r--vcl/source/edit/texteng.cxx54
-rw-r--r--vcl/source/edit/textundo.cxx2
-rw-r--r--vcl/source/edit/textview.cxx24
-rw-r--r--vcl/source/edit/vclmedit.cxx16
-rw-r--r--vcl/source/filter/FilterConfigCache.cxx8
-rw-r--r--vcl/source/filter/FilterConfigItem.cxx2
-rw-r--r--vcl/source/filter/graphicfilter.cxx56
-rw-r--r--vcl/source/filter/graphicfilter2.cxx2
-rw-r--r--vcl/source/filter/igif/decode.cxx4
-rw-r--r--vcl/source/filter/igif/gifread.cxx22
-rw-r--r--vcl/source/filter/ixbm/xbmread.cxx6
-rw-r--r--vcl/source/filter/ixbm/xbmread.hxx2
-rw-r--r--vcl/source/filter/ixpm/rgbtable.hxx2
-rw-r--r--vcl/source/filter/ixpm/xpmread.cxx36
-rw-r--r--vcl/source/filter/jpeg/Exif.cxx2
-rw-r--r--vcl/source/filter/jpeg/JpegReader.cxx28
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.cxx12
-rw-r--r--vcl/source/filter/jpeg/JpegWriter.hxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.cxx2
-rw-r--r--vcl/source/filter/jpeg/jpeg.hxx2
-rw-r--r--vcl/source/filter/jpeg/jpegc.cxx4
-rw-r--r--vcl/source/filter/sgvmain.cxx4
-rw-r--r--vcl/source/filter/sgvtext.cxx24
-rw-r--r--vcl/source/filter/wmf/emfwr.cxx6
-rw-r--r--vcl/source/filter/wmf/emfwr.hxx2
-rw-r--r--vcl/source/filter/wmf/enhwmf.cxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx12
-rw-r--r--vcl/source/filter/wmf/winmtf.hxx20
-rw-r--r--vcl/source/filter/wmf/winwmf.cxx12
-rw-r--r--vcl/source/filter/wmf/wmf.cxx4
-rw-r--r--vcl/source/filter/wmf/wmfwr.cxx18
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx42
-rw-r--r--vcl/source/font/PhysicalFontFace.cxx2
-rw-r--r--vcl/source/font/PhysicalFontFamily.cxx12
-rw-r--r--vcl/source/fontsubset/cff.cxx82
-rw-r--r--vcl/source/fontsubset/fontsubset.cxx20
-rw-r--r--vcl/source/fontsubset/gsub.cxx2
-rw-r--r--vcl/source/fontsubset/list.cxx50
-rw-r--r--vcl/source/fontsubset/sft.cxx178
-rw-r--r--vcl/source/fontsubset/ttcr.cxx112
-rw-r--r--vcl/source/fontsubset/xlat.cxx4
-rw-r--r--vcl/source/gdi/animate.cxx10
-rw-r--r--vcl/source/gdi/bitmap.cxx18
-rw-r--r--vcl/source/gdi/bitmap3.cxx20
-rw-r--r--vcl/source/gdi/bitmap4.cxx2
-rw-r--r--vcl/source/gdi/bitmapex.cxx2
-rw-r--r--vcl/source/gdi/bmpacc.cxx26
-rw-r--r--vcl/source/gdi/bmpacc3.cxx2
-rw-r--r--vcl/source/gdi/bmpfast.cxx2
-rw-r--r--vcl/source/gdi/cvtsvm.cxx6
-rw-r--r--vcl/source/gdi/dibtools.cxx26
-rw-r--r--vcl/source/gdi/embeddedfontshelper.cxx8
-rw-r--r--vcl/source/gdi/font.cxx2
-rw-r--r--vcl/source/gdi/gdimtf.cxx76
-rw-r--r--vcl/source/gdi/gfxlink.cxx26
-rw-r--r--vcl/source/gdi/graph.cxx10
-rw-r--r--vcl/source/gdi/image.cxx22
-rw-r--r--vcl/source/gdi/impanmvw.cxx4
-rw-r--r--vcl/source/gdi/impanmvw.hxx4
-rw-r--r--vcl/source/gdi/impfont.cxx22
-rw-r--r--vcl/source/gdi/impgraph.cxx72
-rw-r--r--vcl/source/gdi/impimage.cxx6
-rw-r--r--vcl/source/gdi/impvect.cxx4
-rw-r--r--vcl/source/gdi/jobset.cxx6
-rw-r--r--vcl/source/gdi/metaact.cxx22
-rw-r--r--vcl/source/gdi/octree.cxx8
-rw-r--r--vcl/source/gdi/oldprintadaptor.cxx2
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx204
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx18
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx26
-rw-r--r--vcl/source/gdi/pngread.cxx30
-rw-r--r--vcl/source/gdi/pngwrite.cxx22
-rw-r--r--vcl/source/gdi/print.cxx112
-rw-r--r--vcl/source/gdi/print2.cxx2
-rw-r--r--vcl/source/gdi/print3.cxx14
-rw-r--r--vcl/source/gdi/regband.cxx68
-rw-r--r--vcl/source/gdi/region.cxx48
-rw-r--r--vcl/source/gdi/regionband.cxx44
-rw-r--r--vcl/source/gdi/salgdilayout.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx6
-rw-r--r--vcl/source/gdi/salmisc.cxx20
-rw-r--r--vcl/source/gdi/textlayout.cxx4
-rw-r--r--vcl/source/gdi/virdev.cxx24
-rw-r--r--vcl/source/gdi/wall.cxx40
-rw-r--r--vcl/source/glyphs/graphite_features.cxx6
-rw-r--r--vcl/source/glyphs/graphite_layout.cxx14
-rw-r--r--vcl/source/helper/canvasbitmap.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx6
-rw-r--r--vcl/source/helper/evntpost.cxx4
-rw-r--r--vcl/source/helper/lazydelete.cxx8
-rw-r--r--vcl/source/helper/strhelper.cxx4
-rw-r--r--vcl/source/helper/threadex.cxx2
-rw-r--r--vcl/source/helper/xconnection.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx74
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx30
-rw-r--r--vcl/source/outdev/bitmap.cxx6
-rw-r--r--vcl/source/outdev/clipping.cxx4
-rw-r--r--vcl/source/outdev/font.cxx50
-rw-r--r--vcl/source/outdev/gradient.cxx4
-rw-r--r--vcl/source/outdev/hatch.cxx2
-rw-r--r--vcl/source/outdev/line.cxx2
-rw-r--r--vcl/source/outdev/map.cxx6
-rw-r--r--vcl/source/outdev/nativecontrols.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx62
-rw-r--r--vcl/source/outdev/outdevstate.cxx28
-rw-r--r--vcl/source/outdev/polygon.cxx2
-rw-r--r--vcl/source/outdev/text.cxx36
-rw-r--r--vcl/source/outdev/transparent.cxx6
-rw-r--r--vcl/source/outdev/wallpaper.cxx4
-rw-r--r--vcl/source/window/abstdlg.cxx4
-rw-r--r--vcl/source/window/accel.cxx18
-rw-r--r--vcl/source/window/accessibility.cxx22
-rw-r--r--vcl/source/window/accmgr.cxx10
-rw-r--r--vcl/source/window/brdwin.cxx16
-rw-r--r--vcl/source/window/btndlg.cxx6
-rw-r--r--vcl/source/window/builder.cxx32
-rw-r--r--vcl/source/window/cairo_cairo.cxx2
-rw-r--r--vcl/source/window/clipping.cxx10
-rw-r--r--vcl/source/window/cmdevt.cxx4
-rw-r--r--vcl/source/window/cursor.cxx12
-rw-r--r--vcl/source/window/debug.cxx2
-rw-r--r--vcl/source/window/debugevent.cxx16
-rw-r--r--vcl/source/window/decoview.cxx6
-rw-r--r--vcl/source/window/dialog.cxx36
-rw-r--r--vcl/source/window/dlgctrl.cxx62
-rw-r--r--vcl/source/window/dndevdis.cxx12
-rw-r--r--vcl/source/window/dockingarea.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx28
-rw-r--r--vcl/source/window/dockwin.cxx24
-rw-r--r--vcl/source/window/event.cxx12
-rw-r--r--vcl/source/window/floatwin.cxx38
-rw-r--r--vcl/source/window/introwin.cxx2
-rw-r--r--vcl/source/window/layout.cxx54
-rw-r--r--vcl/source/window/legacyaccessibility.cxx14
-rw-r--r--vcl/source/window/menu.cxx96
-rw-r--r--vcl/source/window/menubarwindow.cxx14
-rw-r--r--vcl/source/window/menufloatingwindow.cxx34
-rw-r--r--vcl/source/window/menufloatingwindow.hxx4
-rw-r--r--vcl/source/window/menuitemlist.cxx18
-rw-r--r--vcl/source/window/menuitemlist.hxx18
-rw-r--r--vcl/source/window/menuwindow.cxx4
-rw-r--r--vcl/source/window/mnemonicengine.cxx2
-rw-r--r--vcl/source/window/mouse.cxx8
-rw-r--r--vcl/source/window/msgbox.cxx6
-rw-r--r--vcl/source/window/openglwin.cxx4
-rw-r--r--vcl/source/window/paint.cxx30
-rw-r--r--vcl/source/window/printdlg.cxx6
-rw-r--r--vcl/source/window/scrwnd.cxx4
-rw-r--r--vcl/source/window/split.cxx8
-rw-r--r--vcl/source/window/splitwin.cxx38
-rw-r--r--vcl/source/window/stacking.cxx60
-rw-r--r--vcl/source/window/status.cxx10
-rw-r--r--vcl/source/window/syschild.cxx14
-rw-r--r--vcl/source/window/syswin.cxx22
-rw-r--r--vcl/source/window/tabdlg.cxx6
-rw-r--r--vcl/source/window/tabpage.cxx2
-rw-r--r--vcl/source/window/taskpanelist.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx74
-rw-r--r--vcl/source/window/toolbox2.cxx18
-rw-r--r--vcl/source/window/window.cxx190
-rw-r--r--vcl/source/window/window2.cxx34
-rw-r--r--vcl/source/window/winproc.cxx66
-rw-r--r--vcl/source/window/wrkwin.cxx6
-rw-r--r--vcl/unx/generic/app/i18n_cb.cxx24
-rw-r--r--vcl/unx/generic/app/i18n_ic.cxx90
-rw-r--r--vcl/unx/generic/app/i18n_im.cxx28
-rw-r--r--vcl/unx/generic/app/i18n_keysym.cxx4
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx26
-rw-r--r--vcl/unx/generic/app/i18n_xkb.cxx4
-rw-r--r--vcl/unx/generic/app/randrwrapper.cxx12
-rw-r--r--vcl/unx/generic/app/saldata.cxx48
-rw-r--r--vcl/unx/generic/app/saldisp.cxx50
-rw-r--r--vcl/unx/generic/app/salinst.cxx6
-rw-r--r--vcl/unx/generic/app/saltimer.cxx2
-rw-r--r--vcl/unx/generic/app/sm.cxx62
-rw-r--r--vcl/unx/generic/app/wmadaptor.cxx88
-rw-r--r--vcl/unx/generic/desktopdetect/desktopdetector.cxx18
-rw-r--r--vcl/unx/generic/dtrans/X11_droptarget.cxx2
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.cxx84
-rw-r--r--vcl/unx/generic/dtrans/X11_selection.hxx6
-rw-r--r--vcl/unx/generic/dtrans/bmp.cxx14
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.cxx8
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx20
-rw-r--r--vcl/unx/generic/gdi/gcach_xpeer.cxx4
-rw-r--r--vcl/unx/generic/gdi/gdiimpl.cxx38
-rw-r--r--vcl/unx/generic/gdi/openglx11cairotextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/salbmp.cxx52
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx26
-rw-r--r--vcl/unx/generic/gdi/salvd.cxx10
-rw-r--r--vcl/unx/generic/gdi/x11cairotextrender.cxx4
-rw-r--r--vcl/unx/generic/gdi/x11windowprovider.cxx6
-rw-r--r--vcl/unx/generic/gdi/xrender_peer.cxx2
-rw-r--r--vcl/unx/generic/plugadapt/salplug.cxx26
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx38
-rw-r--r--vcl/unx/generic/printer/jobdata.cxx6
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx94
-rw-r--r--vcl/unx/generic/printer/printerinfomanager.cxx26
-rw-r--r--vcl/unx/generic/window/salframe.cxx100
-rw-r--r--vcl/unx/generic/window/salobj.cxx30
-rw-r--r--vcl/unx/generic/window/screensaverinhibitor.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkaction.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkcomponent.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkeditabletext.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx16
-rw-r--r--vcl/unx/gtk/a11y/atkhypertext.cxx28
-rw-r--r--vcl/unx/gtk/a11y/atkimage.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atklistener.cxx10
-rw-r--r--vcl/unx/gtk/a11y/atkregistry.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkselection.cxx4
-rw-r--r--vcl/unx/gtk/a11y/atktable.cxx22
-rw-r--r--vcl/unx/gtk/a11y/atktext.cxx24
-rw-r--r--vcl/unx/gtk/a11y/atktextattributes.cxx54
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx8
-rw-r--r--vcl/unx/gtk/a11y/atkvalue.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx12
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.cxx58
-rw-r--r--vcl/unx/gtk/a11y/atkwrapper.hxx2
-rw-r--r--vcl/unx/gtk/app/gtkdata.cxx42
-rw-r--r--vcl/unx/gtk/app/gtkinst.cxx16
-rw-r--r--vcl/unx/gtk/app/gtksys.cxx10
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx94
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx2
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx14
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkPicker.cxx16
-rw-r--r--vcl/unx/gtk/gdi/gtkprintwrapper.cxx38
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx180
-rw-r--r--vcl/unx/gtk/gdi/salprn-gtk.cxx48
-rw-r--r--vcl/unx/gtk/window/gloactiongroup.cxx56
-rw-r--r--vcl/unx/gtk/window/glomenu.cxx82
-rw-r--r--vcl/unx/gtk/window/gtkobject.cxx16
-rw-r--r--vcl/unx/gtk/window/gtksalframe.cxx204
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx96
-rw-r--r--vcl/unx/gtk/window/hudawareness.cxx8
-rw-r--r--vcl/unx/gtk3/app/gtk3gtkinst.cxx2
-rw-r--r--vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx4
-rw-r--r--vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx96
-rw-r--r--vcl/unx/kde4/KDE4FilePicker.cxx4
-rw-r--r--vcl/unx/kde4/KDESalDisplay.cxx10
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx2
-rw-r--r--vcl/unx/kde4/KDESalGraphics.cxx2
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx18
-rw-r--r--vcl/unx/kde4/main.cxx2
-rw-r--r--vcl/workben/fftester.cxx58
-rw-r--r--vcl/workben/icontest.cxx4
-rw-r--r--vcl/workben/mtfdemo.cxx6
-rw-r--r--vcl/workben/vcldemo.cxx10
402 files changed, 3976 insertions, 3976 deletions
diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx
index e9439069e1c0..9b7e6b44a6a3 100644
--- a/include/vcl/alpha.hxx
+++ b/include/vcl/alpha.hxx
@@ -34,7 +34,7 @@ public:
AlphaMask();
AlphaMask( const Bitmap& rBitmap );
AlphaMask( const AlphaMask& rAlphaMask );
- AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency = NULL );
+ AlphaMask( const Size& rSizePixel, sal_uInt8* pEraseTransparency = nullptr );
virtual ~AlphaMask();
AlphaMask& operator=( const Bitmap& rBitmap );
diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx
index 3aa12f50f725..b690bea60c13 100644
--- a/include/vcl/animate.hxx
+++ b/include/vcl/animate.hxx
@@ -130,9 +130,9 @@ public:
const Point& rDestPt,
const Size& rDestSz,
long nExtraData = 0,
- OutputDevice* pFirstFrameOutDev = NULL);
+ OutputDevice* pFirstFrameOutDev = nullptr);
- void Stop( OutputDevice* pOutDev = NULL, long nExtraData = 0 );
+ void Stop( OutputDevice* pOutDev = nullptr, long nExtraData = 0 );
void Draw( OutputDevice* pOutDev, const Point& rDestPt ) const;
void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz ) const;
@@ -184,7 +184,7 @@ public:
bool Filter(
BmpFilter eFilter,
- const BmpFilterParam* pFilterParam = NULL );
+ const BmpFilterParam* pFilterParam = nullptr );
friend VCL_DLLPUBLIC SvStream& ReadAnimation( SvStream& rIStream, Animation& rAnimation );
friend VCL_DLLPUBLIC SvStream& WriteAnimation( SvStream& rOStream, const Animation& rAnimation );
diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx
index 64ff2dca41ec..6e5f5d883768 100644
--- a/include/vcl/bitmap.hxx
+++ b/include/vcl/bitmap.hxx
@@ -253,7 +253,7 @@ public:
Bitmap();
Bitmap( const Bitmap& rBitmap );
- Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal = NULL );
+ Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalette* pPal = nullptr );
Bitmap( const ResId& rResId );
Bitmap( SalBitmap* pSalBitmap );
virtual ~Bitmap();
@@ -369,7 +369,7 @@ public:
*/
bool Expand(
sal_uLong nDX, sal_uLong nDY,
- const Color* pInitColor = NULL );
+ const Color* pInitColor = nullptr );
/** Copy a rectangular area from another bitmap
@@ -396,12 +396,12 @@ public:
bool CopyPixel(
const Rectangle& rRectDst,
const Rectangle& rRectSrc,
- const Bitmap* pBmpSrc = NULL );
+ const Bitmap* pBmpSrc = nullptr );
bool CopyPixel_AlphaOptimized(
const Rectangle& rRectDst,
const Rectangle& rRectSrc,
- const Bitmap* pBmpSrc = NULL );
+ const Bitmap* pBmpSrc = nullptr );
/** Perform boolean operations with another bitmap
@@ -610,7 +610,7 @@ public:
const Color* pSearchColors,
const Color* rReplaceColors,
sal_uLong nColorCount,
- sal_uLong* pTols = NULL );
+ sal_uLong* pTols = nullptr );
/** Convert the bitmap to a PolyPolygon
@@ -655,7 +655,7 @@ public:
GDIMetaFile& rMtf,
sal_uInt8 cReduce = 0,
BmpVectorizeFlags nFlags = BmpVectorizeFlags::Inner,
- const Link<long,void>* pProgress = NULL );
+ const Link<long,void>* pProgress = nullptr );
/** Change various global color characteristics
@@ -712,7 +712,7 @@ public:
*/
bool Filter(
BmpFilter eFilter,
- const BmpFilterParam* pFilterParam = NULL );
+ const BmpFilterParam* pFilterParam = nullptr );
public:
@@ -738,8 +738,8 @@ public:
SAL_DLLPRIVATE bool ImplMakeMono( sal_uInt8 cThreshold );
SAL_DLLPRIVATE bool ImplMakeMonoDither();
SAL_DLLPRIVATE bool ImplMakeGreyscales( sal_uInt16 nGreyscales );
- SAL_DLLPRIVATE bool ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor = NULL );
- SAL_DLLPRIVATE bool ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor = NULL );
+ SAL_DLLPRIVATE bool ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor = nullptr );
+ SAL_DLLPRIVATE bool ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor = nullptr );
SAL_DLLPRIVATE bool ImplConvertGhosted();
SAL_DLLPRIVATE bool ImplDitherMatrix();
SAL_DLLPRIVATE bool ImplDitherFloyd();
@@ -796,7 +796,7 @@ private:
inline bool Bitmap::operator!() const
{
- return( mpImpBmp == NULL );
+ return( mpImpBmp == nullptr );
}
inline bool Bitmap::operator==( const Bitmap& rBitmap ) const
@@ -816,7 +816,7 @@ inline bool Bitmap::IsSameInstance( const Bitmap& rBitmap ) const
inline bool Bitmap::IsEmpty() const
{
- return( mpImpBmp == NULL );
+ return( mpImpBmp == nullptr );
}
inline const MapMode& Bitmap::GetPrefMapMode() const
diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx
index 23d8dd94acde..6beb20de879a 100644
--- a/include/vcl/bitmapex.hxx
+++ b/include/vcl/bitmapex.hxx
@@ -72,7 +72,7 @@ public:
bool IsTransparent() const;
TransparentType GetTransparentType() const { return eTransparent; }
- Bitmap GetBitmap( const Color* pTransReplaceColor = NULL ) const;
+ Bitmap GetBitmap( const Color* pTransReplaceColor = nullptr ) const;
Bitmap GetMask() const;
bool IsAlpha() const;
@@ -165,7 +165,7 @@ public:
*/
bool Expand(
sal_uLong nDX, sal_uLong nDY,
- const Color* pInitColor = NULL,
+ const Color* pInitColor = nullptr,
bool bExpandTransparent = false );
/** Copy a rectangular area from another bitmap
@@ -193,7 +193,7 @@ public:
bool CopyPixel(
const Rectangle& rRectDst,
const Rectangle& rRectSrc,
- const BitmapEx* pBmpExSrc = NULL );
+ const BitmapEx* pBmpExSrc = nullptr );
/** Fill the entire bitmap with the given color
@@ -311,7 +311,7 @@ public:
const Color* pSearchColors,
const Color* pReplaceColors,
sal_uLong nColorCount,
- const sal_uLong* pTols = NULL );
+ const sal_uLong* pTols = nullptr );
/** Change various global color characteristics
@@ -365,7 +365,7 @@ public:
*/
bool Filter(
BmpFilter eFilter,
- const BmpFilterParam* pFilterParam = NULL );
+ const BmpFilterParam* pFilterParam = nullptr );
/** Get transparency at given position
diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx
index b877c227ea2a..4e9c44f81578 100644
--- a/include/vcl/bmpacc.hxx
+++ b/include/vcl/bmpacc.hxx
@@ -236,7 +236,7 @@ private:
// - Inlines -
inline bool BitmapInfoAccess::operator!() const
{
- return mpBuffer == NULL;
+ return mpBuffer == nullptr;
}
inline long BitmapInfoAccess::Width() const
@@ -337,7 +337,7 @@ inline Scanline BitmapReadAccess::GetBuffer() const
{
assert(mpBuffer && "Access is not valid!");
- return mpBuffer ? mpBuffer->mpBits : NULL;
+ return mpBuffer ? mpBuffer->mpBits : nullptr;
}
inline Scanline BitmapReadAccess::GetScanline(long nY) const
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 580cc74ab201..b844f5896b09 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -455,7 +455,7 @@ public:
void disposeBuilder();
static OUString getUIRootDir();
- bool hasBuilder() const { return m_pUIBuilder != NULL; }
+ bool hasBuilder() const { return m_pUIBuilder != nullptr; }
css::uno::Reference<css::frame::XFrame> getFrame() { return m_pUIBuilder->getFrame(); }
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 7e3cf2f315e0..cfd32e013b46 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -52,7 +52,7 @@ public:
SAL_DLLPRIVATE DrawTextFlags ImplGetTextStyle( OUString& rText, WinBits nWinStyle, DrawFlags nDrawFlags );
SAL_DLLPRIVATE void ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos, Size& rSize,
bool bLayout, sal_uLong nImageSep, DrawFlags nDrawFlags,
- DrawTextFlags nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false );
+ DrawTextFlags nTextStyle, Rectangle *pSymbolRect=nullptr, bool bAddImageSep = false );
SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect );
SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const;
SAL_DLLPRIVATE void ImplSetSymbolAlign( SymbolAlign eAlign );
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx
index 75556ad0971f..bba39cc97ddd 100644
--- a/include/vcl/cmdevt.hxx
+++ b/include/vcl/cmdevt.hxx
@@ -392,7 +392,7 @@ private:
public:
CommandEvent();
CommandEvent( const Point& rMousePos, CommandEventId nCmd,
- bool bMEvt = false, const void* pCmdData = NULL );
+ bool bMEvt = false, const void* pCmdData = nullptr );
CommandEventId GetCommand() const { return mnCommand; }
const Point& GetMousePosPixel() const { return maPos; }
@@ -412,7 +412,7 @@ public:
inline CommandEvent::CommandEvent()
{
- mpData = NULL;
+ mpData = nullptr;
mnCommand = CommandEventId::NONE;
mbMouseEvent = false;
}
@@ -431,7 +431,7 @@ inline const CommandExtTextInputData* CommandEvent::GetExtTextInputData() const
if ( mnCommand == CommandEventId::ExtTextInput )
return static_cast<const CommandExtTextInputData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandWheelData* CommandEvent::GetWheelData() const
@@ -439,7 +439,7 @@ inline const CommandWheelData* CommandEvent::GetWheelData() const
if ( mnCommand == CommandEventId::Wheel )
return static_cast<const CommandWheelData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandScrollData* CommandEvent::GetAutoScrollData() const
@@ -447,7 +447,7 @@ inline const CommandScrollData* CommandEvent::GetAutoScrollData() const
if ( mnCommand == CommandEventId::AutoScroll )
return static_cast<const CommandScrollData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandModKeyData* CommandEvent::GetModKeyData() const
@@ -455,7 +455,7 @@ inline const CommandModKeyData* CommandEvent::GetModKeyData() const
if( mnCommand == CommandEventId::ModKeyChange )
return static_cast<const CommandModKeyData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandDialogData* CommandEvent::GetDialogData() const
@@ -463,7 +463,7 @@ inline const CommandDialogData* CommandEvent::GetDialogData() const
if( mnCommand == CommandEventId::ShowDialog )
return static_cast<const CommandDialogData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline CommandMediaData* CommandEvent::GetMediaData() const
@@ -471,7 +471,7 @@ inline CommandMediaData* CommandEvent::GetMediaData() const
if( mnCommand == CommandEventId::Media )
return static_cast<CommandMediaData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData() const
@@ -479,7 +479,7 @@ inline const CommandSelectionChangeData* CommandEvent::GetSelectionChangeData()
if( mnCommand == CommandEventId::SelectionChange )
return static_cast<const CommandSelectionChangeData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandSwipeData* CommandEvent::GetSwipeData() const
@@ -487,7 +487,7 @@ inline const CommandSwipeData* CommandEvent::GetSwipeData() const
if( mnCommand == CommandEventId::Swipe )
return static_cast<const CommandSwipeData*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandLongPressData* CommandEvent::GetLongPressData() const
@@ -495,7 +495,7 @@ inline const CommandLongPressData* CommandEvent::GetLongPressData() const
if( mnCommand == CommandEventId::LongPress )
return static_cast<const CommandLongPressData*>(mpData);
else
- return NULL;
+ return nullptr;
}
#endif // INCLUDED_VCL_CMDEVT_HXX
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index e25e514f5c66..d4bbe5ce21dd 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -113,7 +113,7 @@ public:
void EndDialog( long nResult = 0 );
- static void EndAllDialogs( vcl::Window* pParent=NULL );
+ static void EndAllDialogs( vcl::Window* pParent=nullptr );
void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const;
diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index 3f015be0ca85..da5dc164e739 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -116,8 +116,8 @@ private:
SAL_DLLPRIVATE void ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, bool bLayout = false);
SAL_DLLPRIVATE void ImplInvalidateOrRepaint();
SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode );
- SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection = 0 );
- SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = 0, bool bIsUserInput = false );
+ SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection = nullptr );
+ SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = nullptr, bool bIsUserInput = false );
SAL_DLLPRIVATE OUString ImplGetValidString( const OUString& rString ) const;
SAL_DLLPRIVATE void ImplClearBackground(vcl::RenderContext& rRenderContext, const Rectangle& rRectangle, long nXStart, long nXEnd);
SAL_DLLPRIVATE void ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, long nXEnd);
@@ -205,7 +205,7 @@ public:
virtual bool IsModified() const { return mpSubEdit ? mpSubEdit->mbModified : mbModified; }
virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT );
- virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = NULL; }
+ virtual void DisableUpdateData() { delete mpUpdateDataTimer; mpUpdateDataTimer = nullptr; }
void SetEchoChar( sal_Unicode c );
sal_Unicode GetEchoChar() const { return mcEchoChar; }
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index 153ad9503717..aa9bb1f5fc9e 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -410,7 +410,7 @@ public:
NotifyEvent();
NotifyEvent( MouseNotifyEvent nEventType,
vcl::Window* pWindow,
- const void* pEvent = NULL,
+ const void* pEvent = nullptr,
long nRet = 0 );
MouseNotifyEvent GetType() const { return mnEventType; }
@@ -426,7 +426,7 @@ inline const KeyEvent* NotifyEvent::GetKeyEvent() const
if ( (mnEventType == MouseNotifyEvent::KEYINPUT) || (mnEventType == MouseNotifyEvent::KEYUP) )
return static_cast<const KeyEvent*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const MouseEvent* NotifyEvent::GetMouseEvent() const
@@ -434,7 +434,7 @@ inline const MouseEvent* NotifyEvent::GetMouseEvent() const
if ( (mnEventType >= MouseNotifyEvent::MOUSEBUTTONDOWN) && (mnEventType <= MouseNotifyEvent::MOUSEMOVE) )
return static_cast<const MouseEvent*>(mpData);
else
- return NULL;
+ return nullptr;
}
inline const CommandEvent* NotifyEvent::GetCommandEvent() const
@@ -442,7 +442,7 @@ inline const CommandEvent* NotifyEvent::GetCommandEvent() const
if ( mnEventType == MouseNotifyEvent::COMMAND )
return static_cast<const CommandEvent*>(mpData);
else
- return NULL;
+ return nullptr;
}
@@ -469,7 +469,7 @@ private:
public:
explicit DataChangedEvent();
explicit DataChangedEvent( DataChangedEventType nType,
- const void* pData = NULL,
+ const void* pData = nullptr,
AllSettingsFlags nFlags = AllSettingsFlags::NONE );
DataChangedEventType GetType() const { return mnType; }
@@ -480,7 +480,7 @@ public:
inline DataChangedEvent::DataChangedEvent()
{
- mpData = NULL;
+ mpData = nullptr;
mnFlags = AllSettingsFlags::NONE;
mnType = DataChangedEventType::NONE;
}
@@ -499,7 +499,7 @@ inline const AllSettings* DataChangedEvent::GetOldSettings() const
if ( mnType == DataChangedEventType::SETTINGS )
return static_cast<const AllSettings*>(mpData);
else
- return NULL;
+ return nullptr;
}
#endif // INCLUDED_VCL_EVENT_HXX
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 45a7bf6b7b2e..0f855a35b00f 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -50,7 +50,7 @@ private:
bool mbDefaultLocale;
protected:
- SAL_DLLPRIVATE void ImplSetText( const OUString& rText, Selection* pNewSel = NULL );
+ SAL_DLLPRIVATE void ImplSetText( const OUString& rText, Selection* pNewSel = nullptr );
SAL_DLLPRIVATE bool ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; }
void SetEmptyFieldValueData( bool bValue ) { mbEmptyFieldValue = bValue; }
@@ -59,7 +59,7 @@ protected:
bool IsDefaultLocale() const { return mbDefaultLocale; }
public:
- explicit FormatterBase( Edit* pField = NULL );
+ explicit FormatterBase( Edit* pField = nullptr );
virtual ~FormatterBase();
const LocaleDataWrapper& GetLocaleDataWrapper() const;
@@ -167,7 +167,7 @@ protected:
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
SAL_DLLPRIVATE bool ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue );
- SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = NULL );
+ SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = nullptr );
public:
virtual ~NumericFormatter();
@@ -319,7 +319,7 @@ protected:
SAL_DLLPRIVATE bool ImplDateReformat( const OUString& rStr, OUString& rOutStr,
const AllSettings& rSettings );
SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate,
- Selection* pNewSelection = NULL );
+ Selection* pNewSelection = nullptr );
SAL_DLLPRIVATE OUString ImplGetDateAsText( const Date& rDate,
const AllSettings& rSettings ) const;
SAL_DLLPRIVATE void ImplNewFieldValue( const Date& rDate );
@@ -410,7 +410,7 @@ protected:
SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr );
SAL_DLLPRIVATE void ImplNewFieldValue( const tools::Time& rTime );
- SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = NULL );
+ SAL_DLLPRIVATE void ImplSetUserTime( const tools::Time& rNewTime, Selection* pNewSelection = nullptr );
SAL_DLLPRIVATE bool ImplAllowMalformedInput() const;
public:
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 6f5c46ecbc39..b3c58309349c 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -135,7 +135,7 @@ public:
* - coordinates of actions will be transformed to preferred mapmode
* - the returned rectangle is relative to the preferred mapmode of the metafile
*/
- Rectangle GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline = 0 ) const;
+ Rectangle GetBoundRect( OutputDevice& i_rReference, Rectangle* pHairline = nullptr ) const;
void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0,
short nChannelRPercent = 0, short nChannelGPercent = 0,
@@ -144,7 +144,7 @@ public:
void Convert( MtfConversion eConversion );
void ReplaceColors( const Color* pSearchColors, const Color* rReplaceColors,
- sal_uLong nColorCount, sal_uLong* pTols = NULL );
+ sal_uLong nColorCount, sal_uLong* pTols = nullptr );
GDIMetaFile GetMonochromeMtf( const Color& rCol ) const;
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index eaf211d62e1e..b9e461761d2c 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -40,7 +40,7 @@ struct ImpBuffer
ImpBuffer( sal_uLong nSize )
{
mnRefCount = 1UL;
- mpBuffer = nSize ? new sal_uInt8[ nSize ] : NULL;
+ mpBuffer = nSize ? new sal_uInt8[ nSize ] : nullptr;
}
ImpBuffer( sal_uInt8* pBuf ) { mnRefCount = 1UL; mpBuffer = pBuf; }
@@ -170,7 +170,7 @@ public:
void SwapOut();
void SwapIn();
- bool IsSwappedOut() const { return( mpSwap != NULL ); }
+ bool IsSwappedOut() const { return( mpSwap != nullptr ); }
public:
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index ebd59dc8c142..d102d4f30d7a 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -134,7 +134,7 @@ public:
MapMode GetPrefMapMode() const;
void SetPrefMapMode( const MapMode& rPrefMapMode );
- Size GetSizePixel( const OutputDevice* pRefDevice = NULL ) const;
+ Size GetSizePixel( const OutputDevice* pRefDevice = nullptr ) const;
sal_uLong GetSizeBytes() const;
@@ -151,8 +151,8 @@ public:
const Point& rDestPt,
const Size& rDestSize,
long nExtraData = 0L,
- OutputDevice* pFirstFrameOutDev = NULL );
- void StopAnimation( OutputDevice* pOutputDevice = NULL,
+ OutputDevice* pFirstFrameOutDev = nullptr );
+ void StopAnimation( OutputDevice* pOutputDevice = nullptr,
long nExtraData = 0L );
void SetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 80f3cdcc6d04..a1d987f7fbe5 100644
--- a/include/vcl/graphicfilter.hxx
+++ b/include/vcl/graphicfilter.hxx
@@ -190,7 +190,7 @@ public:
As some formats (Mtf's) do not have a unique header, it makes sense
to supply the file name (incl. ext.), so that the format can be
derived from the extension */
- GraphicDescriptor( SvStream& rInStream, const OUString* pPath = NULL );
+ GraphicDescriptor( SvStream& rInStream, const OUString* pPath = nullptr );
virtual ~GraphicDescriptor();
@@ -231,7 +231,7 @@ class VCL_DLLPUBLIC GraphicFilter
private:
void ImplInit();
- sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = NULL );
+ sal_uLong ImplSetError( sal_uLong nError, const SvStream* pStm = nullptr );
sal_uInt16 ImpTestOrFindFormat( const OUString& rPath, SvStream& rStream, sal_uInt16& rFormat );
DECL_LINK_TYPED( FilterCallback, ConvertData&, bool );
@@ -276,35 +276,35 @@ public:
sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = NULL );
+ const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr );
sal_uInt16 ExportGraphic( const Graphic& rGraphic, const OUString& rPath,
SvStream& rOStm, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = NULL );
+ const css::uno::Sequence< css::beans::PropertyValue >* pFilterData = nullptr );
sal_uInt16 CanImportGraphic( const INetURLObject& rPath,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- sal_uInt16 * pDeterminedFormat = NULL);
+ sal_uInt16 * pDeterminedFormat = nullptr);
sal_uInt16 ImportGraphic( Graphic& rGraphic, const INetURLObject& rPath,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- sal_uInt16 * pDeterminedFormat = NULL, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE );
+ sal_uInt16 * pDeterminedFormat = nullptr, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE );
sal_uInt16 CanImportGraphic( const OUString& rPath, SvStream& rStream,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- sal_uInt16 * pDeterminedFormat = NULL);
+ sal_uInt16 * pDeterminedFormat = nullptr);
sal_uInt16 ImportGraphic( Graphic& rGraphic, const OUString& rPath,
SvStream& rStream,
sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW,
- sal_uInt16 * pDeterminedFormat = NULL, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE,
- WMF_EXTERNALHEADER *pExtHeader = NULL );
+ sal_uInt16 * pDeterminedFormat = nullptr, GraphicFilterImportFlags nImportFlags = GraphicFilterImportFlags::NONE,
+ WMF_EXTERNALHEADER *pExtHeader = nullptr );
sal_uInt16 ImportGraphic( Graphic& rGraphic, const OUString& rPath,
SvStream& rStream,
sal_uInt16 nFormat,
sal_uInt16 * pDeterminedFormat, GraphicFilterImportFlags nImportFlags,
css::uno::Sequence< css::beans::PropertyValue >* pFilterData,
- WMF_EXTERNALHEADER *pExtHeader = NULL );
+ WMF_EXTERNALHEADER *pExtHeader = nullptr );
const FilterErrorEx& GetLastError() const { return *pErrorEx;}
void ResetLastError();
@@ -313,8 +313,8 @@ public:
static GraphicFilter& GetGraphicFilter();
static int LoadGraphic( const OUString& rPath, const OUString& rFilter,
Graphic& rGraphic,
- GraphicFilter* pFilter = NULL,
- sal_uInt16* pDeterminedFormat = NULL );
+ GraphicFilter* pFilter = nullptr,
+ sal_uInt16* pDeterminedFormat = nullptr );
sal_uInt16 compressAsPNG(const Graphic& rGraphic, SvStream& rOutputStream, sal_uInt32 nCompression = 5);
};
diff --git a/include/vcl/idle.hxx b/include/vcl/idle.hxx
index 8347e9d9baf7..d746cf45e775 100644
--- a/include/vcl/idle.hxx
+++ b/include/vcl/idle.hxx
@@ -29,7 +29,7 @@ protected:
Link<Idle *, void> maIdleHdl; // Callback Link
public:
- Idle( const sal_Char *pDebugName = NULL );
+ Idle( const sal_Char *pDebugName = nullptr );
Idle( const Idle& rIdle );
virtual void Start() override;
diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index ab1cd2ce9f13..35b30c0d3128 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -85,7 +85,7 @@ public:
explicit ImageList( const ResId& rResId );
ImageList( const ::std::vector< OUString >& rNameVector,
const OUString& rPrefix,
- const Color* pMaskColor = NULL );
+ const Color* pMaskColor = nullptr );
ImageList( const ImageList& rImageList );
~ImageList();
@@ -94,8 +94,8 @@ public:
void InsertFromHorizontalBitmap( const ResId& rResId,
sal_uInt16 nCount,
const Color *pNonAlphaMaskColor,
- const Color *pSearchColors = NULL,
- const Color *pReplaceColors = NULL,
+ const Color *pSearchColors = nullptr,
+ const Color *pReplaceColors = nullptr,
sal_uLong nColorCount = 0);
BitmapEx GetAsHorizontalStrip() const;
sal_uInt16 GetImageCount() const;
diff --git a/include/vcl/impdel.hxx b/include/vcl/impdel.hxx
index 54159fcaec09..95f373b1dcb9 100644
--- a/include/vcl/impdel.hxx
+++ b/include/vcl/impdel.hxx
@@ -61,8 +61,8 @@ class DeletionListener
if( m_pNotifier )
m_pNotifier->removeDel( this );
}
- void deleted() { m_pNotifier = NULL; }
- bool isDeleted() const { return (m_pNotifier == NULL); }
+ void deleted() { m_pNotifier = nullptr; }
+ bool isDeleted() const { return (m_pNotifier == nullptr); }
};
inline void DeletionNotifier::notifyDelete()
diff --git a/include/vcl/jobdata.hxx b/include/vcl/jobdata.hxx
index c173863721c4..4244fdbaeda7 100644
--- a/include/vcl/jobdata.hxx
+++ b/include/vcl/jobdata.hxx
@@ -61,7 +61,7 @@ struct VCL_DLLPUBLIC JobData
m_nColorDevice( 0 ),
m_nPDFDevice( 0 ),
m_eOrientation( orientation::Portrait ),
- m_pParser( NULL ) {}
+ m_pParser( nullptr ) {}
JobData& operator=(const psp::JobData& rRight);
diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx
index f33daf7fe853..374066e3539c 100644
--- a/include/vcl/keycod.hxx
+++ b/include/vcl/keycod.hxx
@@ -63,7 +63,7 @@ public:
sal_uInt16 GetGroup() const
{ return (nKeyCodeAndModifiers & KEYGROUP_TYPE); }
- OUString GetName( vcl::Window* pWindow = NULL ) const;
+ OUString GetName( vcl::Window* pWindow = nullptr ) const;
bool IsFunction() const
{ return (eFunc != KeyFuncType::DONTKNOW); }
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 994b1e87fdc1..b270a06c115d 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -387,7 +387,7 @@ private:
public:
VclFrame(vcl::Window *pParent)
: VclBin(pParent)
- , m_pLabel(NULL)
+ , m_pLabel(nullptr)
{
}
virtual ~VclFrame();
diff --git a/include/vcl/lazydelete.hxx b/include/vcl/lazydelete.hxx
index bd1cc7515655..0b4bdca556bd 100644
--- a/include/vcl/lazydelete.hxx
+++ b/include/vcl/lazydelete.hxx
@@ -106,7 +106,7 @@ namespace vcl
bool m_bDeleted;
DeleteObjectEntry() :
- m_pObject( NULL ),
+ m_pObject( nullptr ),
m_bDeleted( false )
{}
@@ -133,7 +133,7 @@ namespace vcl
typeid(*this).name(), this );
#endif
if( s_pOneInstance == this ) // sanity check
- s_pOneInstance = NULL;
+ s_pOneInstance = nullptr;
// do the actual work
unsigned int nCount = m_aObjects.size();
@@ -169,7 +169,7 @@ namespace vcl
*/
static void Delete( vcl::Window* i_pObject )
{
- if( s_pOneInstance == NULL )
+ if( s_pOneInstance == nullptr )
s_pOneInstance = new LazyDeletor();
// is this object already in the list ?
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index 6acc9b3a5925..ab59cf4d6f86 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -108,7 +108,7 @@ struct ImplMenuDelData
explicit ImplMenuDelData( const Menu* );
~ImplMenuDelData();
- bool isDeleted() const { return mpMenu == 0; }
+ bool isDeleted() const { return mpMenu == nullptr; }
};
struct MenuLogo
@@ -176,7 +176,7 @@ protected:
SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const;
SAL_DLLPRIVATE void ImplPaint(vcl::RenderContext& rRenderContext,
- sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0,
+ sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = nullptr,
bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const;
SAL_DLLPRIVATE void ImplPaintMenuTitle(vcl::RenderContext&, const Rectangle& rRect) const;
SAL_DLLPRIVATE void ImplSelect();
@@ -277,7 +277,7 @@ public:
void SetItemBits( sal_uInt16 nItemId, MenuItemBits nBits );
MenuItemBits GetItemBits( sal_uInt16 nItemId ) const;
- void SetUserValue(sal_uInt16 nItemId, sal_uLong nValue, MenuUserDataReleaseFunction aFunc=0);
+ void SetUserValue(sal_uInt16 nItemId, sal_uLong nValue, MenuUserDataReleaseFunction aFunc=nullptr);
sal_uLong GetUserValue(sal_uInt16 nItemId) const;
void SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu );
@@ -516,7 +516,7 @@ private:
protected:
SAL_DLLPRIVATE sal_uInt16 ImplExecute( vcl::Window* pWindow, const Rectangle& rRect, FloatWinPopupFlags nPopupFlags, Menu* pStaredFrom, bool bPreSelectFirst );
SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const;
- SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = NULL ) const;
+ SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = nullptr ) const;
public:
PopupMenu();
diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx
index 71c7daf5c93e..476711af78ef 100644
--- a/include/vcl/metaact.hxx
+++ b/include/vcl/metaact.hxx
@@ -1441,7 +1441,7 @@ protected:
public:
explicit MetaCommentAction( sal_Int32 nValue = 0L );
explicit MetaCommentAction( const MetaCommentAction& rAct );
- explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
+ explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0UL );
virtual void Move( long nHorzMove, long nVertMove ) override;
virtual void Scale( double fScaleX, double fScaleY ) override;
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index a0484fe94f9b..783806d5d7db 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -81,13 +81,13 @@ struct GLWindow
char* lookHere;
char* deleteThis;
- if (extString==NULL)
+ if (extString==nullptr)
{
return GL_FALSE;
}
deleteThis=lookHere=static_cast<char*>(malloc(strlen(reinterpret_cast<const char*>(extString))+1));
- if (lookHere==NULL)
+ if (lookHere==nullptr)
{
return GL_FALSE;
}
@@ -95,14 +95,14 @@ struct GLWindow
/* strtok() will modify string, so copy it somewhere */
strcpy(lookHere, reinterpret_cast<const char*>(extString));
- while ((word=strtok(lookHere, " "))!=NULL)
+ while ((word=strtok(lookHere, " "))!=nullptr)
{
if (strcmp(word, reinterpret_cast<const char*>(extName))==0)
{
flag=GL_TRUE;
break;
}
- lookHere=NULL; /* get next token */
+ lookHere=nullptr; /* get next token */
}
free(static_cast<void*>(deleteThis));
@@ -149,22 +149,22 @@ struct GLWindow
#elif defined( ANDROID )
#elif defined( LIBO_HEADLESS )
#elif defined( UNX )
- dpy(NULL),
+ dpy(nullptr),
screen(0),
win(0),
pix(0),
#if defined( GLX_EXT_texture_from_pixmap )
- fbc(0),
+ fbc(nullptr),
#endif
- vi(NULL),
- ctx(0),
+ vi(nullptr),
+ ctx(nullptr),
glPix(0),
- GLXExtensions(NULL),
+ GLXExtensions(nullptr),
#endif
bpp(0),
Width(0),
Height(0),
- GLExtensions(NULL),
+ GLExtensions(nullptr),
bMultiSampleSupported(false)
{
}
@@ -186,7 +186,7 @@ public:
void requestLegacyContext();
void requestSingleBufferedRendering();
- bool init(vcl::Window* pParent = 0);
+ bool init(vcl::Window* pParent = nullptr);
bool init(SystemChildWindow* pChildWindow);
// these methods are for the deep platform layer, don't use them in normal code
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index f4cbc5f06704..a146c86dc635 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -721,7 +721,7 @@ public:
vcl::Region GetClipRegion() const;
void SetClipRegion();
void SetClipRegion( const vcl::Region& rRegion );
- bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = NULL );
+ bool SelectClipRegion( const vcl::Region&, SalGraphics* pGraphics = nullptr );
bool IsClipRegion() const { return mbClipRegion; }
@@ -750,7 +750,7 @@ public:
void DrawPixel( const Point& rPt );
void DrawPixel( const Point& rPt, const Color& rColor );
- void DrawPixel( const tools::Polygon& rPts, const Color* pColors = NULL );
+ void DrawPixel( const tools::Polygon& rPts, const Color* pColors = nullptr );
void DrawPixel( const tools::Polygon& rPts, const Color& rColor );
Color GetPixel( const Point& rPt ) const;
@@ -894,8 +894,8 @@ public:
private:
- SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = NULL );
- SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly = NULL );
+ SAL_DLLPRIVATE void ImplDrawPolygon( const tools::Polygon& rPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
+ SAL_DLLPRIVATE void ImplDrawPolyPolygon( const tools::PolyPolygon& rPolyPoly, const tools::PolyPolygon* pClipPolyPoly = nullptr );
SAL_DLLPRIVATE void ImplDrawPolyPolygon( sal_uInt16 nPoly, const tools::PolyPolygon& rPolyPoly );
// #i101491#
// Helper who implements the DrawPolyPolygon functionality for basegfx::B2DPolyPolygon
@@ -1017,12 +1017,12 @@ public:
void DrawText( const Point& rStartPt, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
+ MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr );
void DrawText( const Rectangle& rRect,
const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::NONE,
- MetricVector* pVector = NULL, OUString* pDisplayText = NULL,
- vcl::ITextLayout* _pTextLayout = NULL );
+ MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr,
+ vcl::ITextLayout* _pTextLayout = nullptr );
static void ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& rRect,
const OUString& rOrigStr, DrawTextFlags nStyle,
@@ -1034,7 +1034,7 @@ public:
void DrawCtrlText( const Point& rPos, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = NULL, OUString* pDisplayText = NULL );
+ DrawTextFlags nStyle = DrawTextFlags::Mnemonic, MetricVector* pVector = nullptr, OUString* pDisplayText = nullptr );
void DrawTextLine( const Point& rPos, long nWidth,
FontStrikeout eStrikeout,
@@ -1055,8 +1055,8 @@ public:
Rectangle GetTextRect( const Rectangle& rRect,
const OUString& rStr, DrawTextFlags nStyle = DrawTextFlags::WordBreak,
- TextRectInfo* pInfo = NULL,
- const vcl::ITextLayout* _pTextLayout = NULL ) const;
+ TextRectInfo* pInfo = nullptr,
+ const vcl::ITextLayout* _pTextLayout = nullptr ) const;
/** Return the exact bounding rectangle of rStr.
@@ -1109,24 +1109,24 @@ public:
*/
bool GetTextBoundRect( Rectangle& rRect,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
Rectangle ImplGetTextBoundRect( const SalLayout& );
bool GetTextOutline( tools::PolyPolygon&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
bool GetTextOutlines( PolyPolyVector&,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector &rVector,
const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0,
sal_Int32 nLen = -1, bool bOptimize = true,
- sal_uLong nLayoutWidth = 0, const long* pDXArray = NULL ) const;
+ sal_uLong nLayoutWidth = 0, const long* pDXArray = nullptr ) const;
OUString GetEllipsisString( const OUString& rStr, long nMaxWidth,
@@ -1190,17 +1190,17 @@ public:
float approximate_char_width() const;
void DrawTextArray( const Point& rStartPt, const OUString& rStr,
- const long* pDXAry = NULL,
+ const long* pDXAry = nullptr,
sal_Int32 nIndex = 0,
sal_Int32 nLen = -1,
SalLayoutFlags flags = SalLayoutFlags::NONE);
- long GetTextArray( const OUString& rStr, long* pDXAry = NULL,
+ long GetTextArray( const OUString& rStr, long* pDXAry = nullptr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
vcl::TextLayoutCache const* = nullptr) const;
bool GetCaretPositions( const OUString&, long* pCaretXArray,
sal_Int32 nIndex, sal_Int32 nLen,
- long* pDXAry = NULL, long nWidth = 0,
+ long* pDXAry = nullptr, long nWidth = 0,
bool bCellBreaking = true ) const;
void DrawStretchText( const Point& rStartPt, sal_uLong nWidth,
const OUString& rStr,
@@ -1306,7 +1306,7 @@ public:
static vcl::Font GetDefaultFont( DefaultFontType nType,
LanguageType eLang,
GetDefaultFontFlags nFlags,
- const OutputDevice* pOutDev = NULL );
+ const OutputDevice* pOutDev = nullptr );
SAL_DLLPRIVATE void ImplInitFontList() const;
SAL_DLLPRIVATE void ImplUpdateFontData( bool bNewFontLists );
@@ -1355,7 +1355,7 @@ public:
SystemTextLayoutData GetSysTextLayoutData( const Point& rStartPt, const OUString& rStr,
sal_Int32 nIndex = 0, sal_Int32 nLen = -1,
- const long* pDXAry = NULL ) const;
+ const long* pDXAry = nullptr ) const;
SAL_DLLPRIVATE bool ImplIsAntiparallel() const ;
SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const;
@@ -1365,7 +1365,7 @@ public:
virtual bool HasMirroredGraphics() const;
SAL_DLLPRIVATE SalLayout* ImplLayout( const OUString&, sal_Int32 nIndex, sal_Int32 nLen,
const Point& rLogicPos = Point(0,0), long nLogicWidth=0,
- const long* pLogicDXArray=NULL, SalLayoutFlags flags = SalLayoutFlags::NONE,
+ const long* pLogicDXArray=nullptr, SalLayoutFlags flags = SalLayoutFlags::NONE,
vcl::TextLayoutCache const* = nullptr) const;
SAL_DLLPRIVATE ImplLayoutArgs ImplPrepareLayoutArgs( OUString&, const sal_Int32 nIndex, const sal_Int32 nLen,
DeviceCoordinate nPixelWidth, const DeviceCoordinate* pPixelDXArray,
@@ -2033,7 +2033,7 @@ public:
that's too much for now, wrote \#i107046# for this */
bool DrawEPS(
const Point& rPt, const Size& rSz,
- const GfxLink& rGfxLink, GDIMetaFile* pSubst = NULL );
+ const GfxLink& rGfxLink, GDIMetaFile* pSubst = nullptr );
///@}
};
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index f6ed9a322b46..c10f1cc3622e 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -664,7 +664,7 @@ The following structure describes the permissions used in PDF security
DPIx( 0 ),
DPIy( 0 ),
ColorMode( PDFWriter::DrawColor ),
- SignCertificate( 0 )
+ SignCertificate( nullptr )
{}
};
@@ -709,7 +709,7 @@ The following structure describes the permissions used in PDF security
{}
};
- void PlayMetafile( const GDIMetaFile&, const PlayMetafileContext&, vcl::PDFExtOutDevData* pDevDat = NULL );
+ void PlayMetafile( const GDIMetaFile&, const PlayMetafileContext&, vcl::PDFExtOutDevData* pDevDat = nullptr );
/* sets the document locale originally passed with the context to a new value
* only affects the output if used before calling Emit.
diff --git a/include/vcl/pngwrite.hxx b/include/vcl/pngwrite.hxx
index bb32b2e0173c..a5b65532c132 100644
--- a/include/vcl/pngwrite.hxx
+++ b/include/vcl/pngwrite.hxx
@@ -36,7 +36,7 @@ namespace vcl
public:
- explicit PNGWriter(const BitmapEx&, const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = NULL);
+ explicit PNGWriter(const BitmapEx&, const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = nullptr);
~PNGWriter();
bool Write(SvStream& rStream);
diff --git a/include/vcl/ppdparser.hxx b/include/vcl/ppdparser.hxx
index 37cd2989375a..37165181fbb7 100644
--- a/include/vcl/ppdparser.hxx
+++ b/include/vcl/ppdparser.hxx
@@ -138,7 +138,7 @@ public:
const PPDKey* m_pKey2;
const PPDValue* m_pOption2;
- PPDConstraint() : m_pKey1( NULL ), m_pOption1( NULL ), m_pKey2( NULL ), m_pOption2( NULL ) {}
+ PPDConstraint() : m_pKey1( nullptr ), m_pOption1( nullptr ), m_pKey2( nullptr ), m_pOption2( nullptr ) {}
};
private:
hash_type m_aKeys;
@@ -258,7 +258,7 @@ class VCL_DLLPUBLIC PPDContext
bool checkConstraints( const PPDKey*, const PPDValue*, bool bDoReset );
bool resetValue( const PPDKey*, bool bDefaultable = false );
public:
- PPDContext( const PPDParser* pParser = NULL );
+ PPDContext( const PPDParser* pParser = nullptr );
PPDContext( const PPDContext& rContext ) { operator=( rContext ); }
PPDContext& operator=( const PPDContext& rContext );
~PPDContext();
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 4ee1b94399db..11a4974e5497 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -305,7 +305,7 @@ public:
bool SetJobSetup( const JobSetup& rSetup );
const JobSetup& GetJobSetup() const { return maJobSetup; }
- bool Setup( vcl::Window* pWindow = NULL, bool bPapersizeFromSetup = false );
+ bool Setup( vcl::Window* pWindow = nullptr, bool bPapersizeFromSetup = false );
bool SetPrinterProps( const Printer* pPrinter );
// SetPrinterOptions is used internally only now
@@ -572,7 +572,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
* if the optional output set is not NULL then the names of the changed properties are returned
**/
bool processProperties( const css::uno::Sequence< css::beans::PropertyValue >& i_rNewProp,
- std::set< OUString >* o_pChangeProp = NULL );
+ std::set< OUString >* o_pChangeProp = nullptr );
/* append to a sequence of property values the ui property sequence passed at creation
* as the "ExtraPrintUIOptions" property. if that sequence was empty, no "ExtraPrintUIOptions" property
* will be appended.
@@ -634,7 +634,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper
const OUString& i_rTitle,
const css::uno::Sequence< OUString >& i_rHelpId,
const OUString& i_rType,
- const css::beans::PropertyValue* i_pValue = NULL,
+ const css::beans::PropertyValue* i_pValue = nullptr,
const UIControlOptions& i_rControlOptions = UIControlOptions()
);
diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx
index 9f2dd656c497..6037bdcfb1dc 100644
--- a/include/vcl/salbtype.hxx
+++ b/include/vcl/salbtype.hxx
@@ -289,7 +289,7 @@ BitmapAccessMode;
// - StretchAndConvert -
VCL_DLLPUBLIC BitmapBuffer* StretchAndConvert(
const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
- sal_uLong nDstBitmapFormat, const BitmapPalette* pDstPal = NULL, const ColorMask* pDstMask = NULL );
+ sal_uLong nDstBitmapFormat, const BitmapPalette* pDstPal = nullptr, const ColorMask* pDstMask = nullptr );
inline BitmapColor::BitmapColor() :
mcBlueOrIndex ( 0 ),
@@ -442,7 +442,7 @@ inline sal_uInt16 BitmapColor::GetColorError( const BitmapColor& rBitmapColor )
}
inline BitmapPalette::BitmapPalette() :
- mpBitmapColor ( NULL ),
+ mpBitmapColor ( nullptr ),
mnCount ( 0 )
{
}
@@ -457,7 +457,7 @@ inline BitmapPalette::BitmapPalette( const BitmapPalette& rBitmapPalette ) :
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
- mpBitmapColor = NULL;
+ mpBitmapColor = nullptr;
}
inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) :
@@ -470,7 +470,7 @@ inline BitmapPalette::BitmapPalette( sal_uInt16 nCount ) :
memset( mpBitmapColor, 0, nSize );
}
else
- mpBitmapColor = NULL;
+ mpBitmapColor = nullptr;
}
inline BitmapPalette::~BitmapPalette()
@@ -490,7 +490,7 @@ inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPale
memcpy( mpBitmapColor, rBitmapPalette.mpBitmapColor, nSize );
}
else
- mpBitmapColor = NULL;
+ mpBitmapColor = nullptr;
return *this;
}
@@ -536,7 +536,7 @@ inline void BitmapPalette::SetEntryCount( sal_uInt16 nCount )
if( !nCount )
{
delete[] reinterpret_cast<sal_uInt8*>(mpBitmapColor);
- mpBitmapColor = NULL;
+ mpBitmapColor = nullptr;
mnCount = 0;
}
else if( nCount != mnCount )
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index a197cbc3ef80..d88115b8f5b8 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -72,7 +72,7 @@ protected:
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) const = 0;
public:
- Scheduler( const sal_Char *pDebugName = NULL );
+ Scheduler( const sal_Char *pDebugName = nullptr );
Scheduler( const Scheduler& rScheduler );
virtual ~Scheduler();
diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx
index 33442becb30b..aa0c256d20b6 100644
--- a/include/vcl/seleng.hxx
+++ b/include/vcl/seleng.hxx
@@ -98,7 +98,7 @@ private:
public:
SelectionEngine( vcl::Window* pWindow,
- FunctionSet* pFunctions = NULL,
+ FunctionSet* pFunctions = nullptr,
sal_uLong nAutoRepeatInterval = SELENG_AUTOREPEAT_INTERVAL );
~SelectionEngine();
diff --git a/include/vcl/sound.hxx b/include/vcl/sound.hxx
index 14bc46b57cf9..7f4bc6f04517 100644
--- a/include/vcl/sound.hxx
+++ b/include/vcl/sound.hxx
@@ -31,7 +31,7 @@ namespace vcl { class Window; }
class VCL_DLLPUBLIC Sound
{
public:
- static void Beep( vcl::Window* pWindow = NULL );
+ static void Beep( vcl::Window* pWindow = nullptr );
};
#endif // INCLUDED_VCL_SOUND_HXX
diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx
index f1e96a6651a7..ceeb007c62e1 100644
--- a/include/vcl/split.hxx
+++ b/include/vcl/split.hxx
@@ -85,7 +85,7 @@ public:
void StartDrag();
void SetDragRectPixel( const Rectangle& rDragRect,
- vcl::Window* pRefWin = NULL );
+ vcl::Window* pRefWin = nullptr );
void SetSplitPosPixel( long nPos );
long GetSplitPosPixel() const { return mnSplitPos; }
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index c51f925bd727..a129c3f53478 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -854,7 +854,7 @@ public:
@return the event ID used to post the event.
*/
- static ImplSVEvent * PostUserEvent( const Link<void*,void>& rLink, void* pCaller = NULL,
+ static ImplSVEvent * PostUserEvent( const Link<void*,void>& rLink, void* pCaller = nullptr,
bool bReferenceLink = false );
/** Remove user event based on event ID
@@ -1185,7 +1185,7 @@ public:
@see GetHelp
*/
- static void SetHelp( Help* pHelp = NULL );
+ static void SetHelp( Help* pHelp = nullptr );
/** Gets the application's help
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 57217df2fb57..226db49b6169 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -84,17 +84,17 @@ struct SystemEnvData
#elif defined( ANDROID )
#elif defined( IOS )
#elif defined( UNX )
- , pDisplay(NULL)
+ , pDisplay(nullptr)
, aWindow(0)
- , pSalFrame(NULL)
- , pWidget(NULL)
- , pVisual(NULL)
+ , pSalFrame(nullptr)
+ , pWidget(nullptr)
+ , pVisual(nullptr)
, nScreen(0)
, nDepth(0)
, aColormap(0)
- , pAppContext(NULL)
+ , pAppContext(nullptr)
, aShellWindow(0)
- , pShellWidget(NULL)
+ , pShellWidget(nullptr)
#endif
{
}
@@ -167,13 +167,13 @@ struct SystemGraphicsData
#elif defined( IOS )
, rCGContext( NULL )
#elif defined( UNX )
- , pDisplay( NULL )
+ , pDisplay( nullptr )
, hDrawable( 0 )
- , pVisual( NULL )
+ , pVisual( nullptr )
, nScreen( 0 )
, nDepth( 0 )
, aColormap( 0 )
- , pXRenderFormat( NULL )
+ , pXRenderFormat( nullptr )
#endif
{ }
};
@@ -219,7 +219,7 @@ struct SystemFontData
SystemFontData()
: nSize( sizeof( SystemFontData ) )
#if defined( UNX )
- , nFontId( NULL )
+ , nFontId( nullptr )
, nFontFlags( 0 )
#endif
, bFakeBold( false )
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index dd1752b673fc..3def95a603f2 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -151,7 +151,7 @@ protected:
TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText );
TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, bool bKeepEndingAttribs = true );
TextPaM ImpInsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs = true );
- void ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars, SfxUndoAction* pCurUndo = 0 );
+ void ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars, SfxUndoAction* pCurUndo = nullptr );
TextPaM ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight );
void ImpRemoveParagraph( sal_uInt32 nPara );
void ImpInitWritingDirections( sal_uInt32 nPara );
@@ -176,7 +176,7 @@ protected:
DECL_LINK_TYPED( IdleFormatHdl, Idle *, void );
void CheckIdleFormatter();
- void IdleFormatAndUpdate( TextView* pCurView = 0, sal_uInt16 nMaxTimerRestarts = 5 );
+ void IdleFormatAndUpdate( TextView* pCurView = nullptr, sal_uInt16 nMaxTimerRestarts = 5 );
bool CreateLines( sal_uInt32 nPara );
void CreateAndInsertEmptyLine( sal_uInt32 nPara );
@@ -188,11 +188,11 @@ protected:
void FormatDoc();
void FormatFullDoc();
- void FormatAndUpdate( TextView* pCurView = 0 );
+ void FormatAndUpdate( TextView* pCurView = nullptr );
bool IsFormatting() const { return mbIsFormatting; }
- void UpdateViews( TextView* pCurView = 0 );
+ void UpdateViews( TextView* pCurView = nullptr );
- void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 );
+ void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = nullptr, TextSelection const* pSelection = nullptr );
bool IsFormatted() const { return mbFormatted; }
@@ -202,14 +202,14 @@ protected:
long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine* pLine, sal_uInt16 nTextPortion );
long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false );
long ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 );
- sal_uInt8 ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32* pStart = NULL, sal_Int32* pEnd = NULL );
+ sal_uInt8 ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32* pStart = nullptr, sal_Int32* pEnd = nullptr );
static void ImpInitLayoutMode( OutputDevice* pOutDev, bool bDrawingR2LPortion = false );
TxtAlign ImpGetAlign() const;
long CalcTextHeight();
long CalcParaHeight( sal_uInt32 nParagraph ) const;
long CalcTextWidth( sal_uInt32 nPara );
- long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen, const vcl::Font* pFont = 0 );
+ long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen, const vcl::Font* pFont = nullptr );
Range GetInvalidYOffsets( sal_uInt32 nPortion );
// for Undo/Redo
@@ -286,13 +286,13 @@ public:
void SetModified( bool bModified ) { mbModified = bModified; }
bool IsModified() const { return mbModified; }
- bool Read( SvStream& rInput, const TextSelection* pSel = NULL );
+ bool Read( SvStream& rInput, const TextSelection* pSel = nullptr );
- bool Write( SvStream& rOutput, const TextSelection* pSel = NULL, bool bHTML = false );
+ bool Write( SvStream& rOutput, const TextSelection* pSel = nullptr, bool bHTML = false );
TextPaM GetPaM( const Point& rDocPos, bool bSmart = true );
Rectangle PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial = false );
- OUString GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = 0 );
+ OUString GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = nullptr );
bool HasAttrib( sal_uInt16 nWhich ) const;
const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const;
diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx
index 4fa335cca908..44e4ef52d3ae 100644
--- a/include/vcl/textview.hxx
+++ b/include/vcl/textview.hxx
@@ -62,13 +62,13 @@ protected:
void ShowSelection();
void HideSelection();
void ShowSelection( const TextSelection& rSel );
- void ImpShowHideSelection( bool bShow, const TextSelection* pRange = NULL );
+ void ImpShowHideSelection( bool bShow, const TextSelection* pRange = nullptr );
TextSelection ImpMoveCursor( const KeyEvent& rKeyEvent );
TextPaM ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode );
bool IsInSelection( const TextPaM& rPaM );
- void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0);
+ void ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = nullptr, TextSelection const* pSelection = nullptr);
void ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRect, bool bUseVirtDev);
void ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bEndKey );
void ImpHighlight( const TextSelection& rSel );
diff --git a/include/vcl/threadex.hxx b/include/vcl/threadex.hxx
index c2aee506758a..8e3fa53231e6 100644
--- a/include/vcl/threadex.hxx
+++ b/include/vcl/threadex.hxx
@@ -45,7 +45,7 @@ namespace vcl
virtual ~SolarThreadExecutor();
virtual long doIt() = 0;
- long execute() { return impl_execute( NULL ); }
+ long execute() { return impl_execute( nullptr ); }
private:
long impl_execute( const TimeValue* _pTimeout );
diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx
index 5976db92276f..94a025ecd697 100644
--- a/include/vcl/timer.hxx
+++ b/include/vcl/timer.hxx
@@ -35,7 +35,7 @@ protected:
virtual sal_uInt64 UpdateMinPeriod( sal_uInt64 nMinPeriod, sal_uInt64 nTime ) const override;
public:
- Timer( const sal_Char *pDebugName = NULL );
+ Timer( const sal_Char *pDebugName = nullptr );
Timer( const Timer& rTimer );
/// Make it possible to associate a callback with this timer handler
diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index dee1d9825ae6..4883d076e533 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -51,15 +51,15 @@ public:
ToolBoxCustomizeEvent();
ToolBoxCustomizeEvent( ToolBox* pDropBox,
sal_uInt16 nId, sal_uInt16 nPos = 0,
- void* pUserData = NULL );
+ void* pUserData = nullptr );
};
inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent()
{
- mpTargetBox = NULL;
+ mpTargetBox = nullptr;
mnIdFrom = 0;
mnPosTo = 0;
- mpData = NULL;
+ mpData = nullptr;
}
inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent( ToolBox* pDropBox,
@@ -233,7 +233,7 @@ private:
ToolBox& operator= (const ToolBox &) = delete;
public:
- SAL_DLLPRIVATE void ImplFloatControl( bool bStart, FloatingWindow* pWindow = NULL );
+ SAL_DLLPRIVATE void ImplFloatControl( bool bStart, FloatingWindow* pWindow = nullptr );
SAL_DLLPRIVATE void ImplDisableFlatButtons();
static SAL_DLLPRIVATE int ImplGetDragWidth( ToolBox* pThis );
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index 1b65eb6764aa..5730999701a9 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -215,7 +215,7 @@ private:
void* pData;
public:
- VclWindowEvent( vcl::Window* pWin, sal_uLong n, void* pDat = NULL );
+ VclWindowEvent( vcl::Window* pWin, sal_uLong n, void* pDat = nullptr );
virtual ~VclWindowEvent();
TYPEINFO_OVERRIDE();
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index 2d577f7ab05a..de13e6fd91b2 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -73,7 +73,7 @@ public:
virtual bool IsModified() const override;
virtual void EnableUpdateData( sal_uLong nTimeout = EDIT_UPDATEDATA_TIMEOUT ) override;
- virtual void DisableUpdateData() override { delete pUpdateDataTimer; pUpdateDataTimer = NULL; }
+ virtual void DisableUpdateData() override { delete pUpdateDataTimer; pUpdateDataTimer = nullptr; }
virtual void SetReadOnly( bool bReadOnly = true ) override;
virtual bool IsReadOnly() const override;
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 75748b47a67d..b5d99cb3cbc0 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -42,7 +42,7 @@ private:
sal_Int8 mnAlphaDepth;
sal_uInt8 meRefDevMode;
- SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
+ SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = nullptr );
SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase,
const basebmp::RawMemorySharedArray &pBuffer,
const bool bTopDown );
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index fd62a8a17f70..67a9aac2afe1 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -567,7 +567,7 @@ public:
SAL_DLLPRIVATE vcl::Window* ImplGetWindow();
SAL_DLLPRIVATE ImplWinData* ImplGetWinData() const;
SAL_DLLPRIVATE vcl::Window* ImplGetClientWindow() const;
- SAL_DLLPRIVATE vcl::Window* ImplGetDlgWindow( sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = NULL );
+ SAL_DLLPRIVATE vcl::Window* ImplGetDlgWindow( sal_uInt16 n, GetDlgWindowType nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = nullptr );
SAL_DLLPRIVATE vcl::Window* ImplGetParent() const;
SAL_DLLPRIVATE vcl::Window* ImplFindWindow( const Point& rFramePos );
@@ -797,7 +797,7 @@ protected:
void SetCompoundControl( bool bCompound );
- void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
+ void CallEventListeners( sal_uLong nEvent, void* pData = nullptr );
static void FireVclEvent( VclSimpleEvent& rEvent );
virtual bool AcquireGraphics() const override;
@@ -882,7 +882,7 @@ public:
void AddChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
void RemoveChildEventListener( const Link<VclWindowEvent&,void>& rEventListener );
- ImplSVEvent * PostUserEvent( const Link<void*,void>& rLink, void* pCaller = NULL, bool bReferenceLink = false );
+ ImplSVEvent * PostUserEvent( const Link<void*,void>& rLink, void* pCaller = nullptr, bool bReferenceLink = false );
void RemoveUserEvent( ImplSVEvent * nUserEvent );
void IncrementLockCount();
@@ -949,7 +949,7 @@ public:
void SetInputContext( const InputContext& rInputContext );
const InputContext& GetInputContext() const;
void EndExtTextInput( EndExtTextInputFlags nFlags );
- void SetCursorRect( const Rectangle* pRect = NULL, long nExtTextInputWidth = 0 );
+ void SetCursorRect( const Rectangle* pRect = nullptr, long nExtTextInputWidth = 0 );
const Rectangle* GetCursorRect() const;
long GetCursorExtTextInputWidth() const;
@@ -1018,7 +1018,7 @@ public:
void EnableInput( bool bEnable = true, bool bChild = true );
void EnableInput( bool bEnable, bool bChild, bool bSysWin,
- const vcl::Window* pExcludeWindow = NULL );
+ const vcl::Window* pExcludeWindow = nullptr );
bool IsInputEnabled() const;
/** Override <code>EnableInput</code>. This can be necessary due to other people
@@ -1248,8 +1248,8 @@ public:
void EndAutoScroll();
bool HandleScrollCommand( const CommandEvent& rCmd,
- ScrollBar* pHScrl = NULL,
- ScrollBar* pVScrl = NULL );
+ ScrollBar* pHScrl = nullptr,
+ ScrollBar* pVScrl = nullptr );
void SaveBackground( const Point& rPos, const Size& rSize,
const Point& rDestOff, VirtualDevice& rSaveDevice );
diff --git a/include/vcl/wmf.hxx b/include/vcl/wmf.hxx
index bd8e9aff6872..f7864edcfa88 100644
--- a/include/vcl/wmf.hxx
+++ b/include/vcl/wmf.hxx
@@ -55,11 +55,11 @@ struct WMF_EXTERNALHEADER
}
};
-bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL, WMF_EXTERNALHEADER *pExtHeader = NULL );
+bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr, WMF_EXTERNALHEADER *pExtHeader = nullptr );
-VCL_DLLPUBLIC bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem = NULL );
+VCL_DLLPUBLIC bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem = nullptr );
-VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, bool bPlaceable = true );
+VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = nullptr, bool bPlaceable = true );
bool ConvertGDIMetaFileToEMF(const GDIMetaFile & rMTF, SvStream & rTargetStream);
diff --git a/include/vcl/wrkwin.hxx b/include/vcl/wrkwin.hxx
index c3fed0ce47e8..0d08b2a2b0b4 100644
--- a/include/vcl/wrkwin.hxx
+++ b/include/vcl/wrkwin.hxx
@@ -67,7 +67,7 @@ private:
protected:
explicit WorkWindow( WindowType nType );
- SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = NULL );
+ SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData = nullptr );
SAL_DLLPRIVATE void ImplSetFrameState( sal_uLong aFrameState );
public:
diff --git a/vcl/generic/app/gendisp.cxx b/vcl/generic/app/gendisp.cxx
index 06473a95f080..3d3a52a4003f 100644
--- a/vcl/generic/app/gendisp.cxx
+++ b/vcl/generic/app/gendisp.cxx
@@ -23,7 +23,7 @@
SalGenericDisplay::SalGenericDisplay()
{
- m_pCapture = NULL;
+ m_pCapture = nullptr;
m_aEventGuard = osl_createMutex();
}
@@ -31,7 +31,7 @@ SalGenericDisplay::~SalGenericDisplay()
{
if (m_aEventGuard)
osl_destroyMutex( m_aEventGuard );
- m_aEventGuard = NULL;
+ m_aEventGuard = nullptr;
}
void SalGenericDisplay::registerFrame( SalFrame* pFrame )
@@ -62,13 +62,13 @@ void SalGenericDisplay::deregisterFrame( SalFrame* pFrame )
void SalGenericDisplay::emitDisplayChanged()
{
if( !m_aFrames.empty() )
- m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, 0 );
+ m_aFrames.front()->CallCallback( SALEVENT_DISPLAYCHANGED, nullptr );
}
bool SalGenericDisplay::DispatchInternalEvent()
{
- void* pData = NULL;
- SalFrame* pFrame = NULL;
+ void* pData = nullptr;
+ SalFrame* pFrame = nullptr;
sal_uInt16 nEvent = 0;
if( osl_acquireMutex( m_aEventGuard ) )
@@ -89,7 +89,7 @@ bool SalGenericDisplay::DispatchInternalEvent()
if( pFrame )
pFrame->CallCallback( nEvent, pData );
- return pFrame != NULL;
+ return pFrame != nullptr;
}
void SalGenericDisplay::SendInternalEvent( SalFrame* pFrame, void* pData, sal_uInt16 nEvent )
diff --git a/vcl/generic/app/geninst.cxx b/vcl/generic/app/geninst.cxx
index d53ed30129a3..f481eb880b27 100644
--- a/vcl/generic/app/geninst.cxx
+++ b/vcl/generic/app/geninst.cxx
@@ -37,7 +37,7 @@ SalYieldMutex::SalYieldMutex()
SalYieldMutex::~SalYieldMutex()
{
- ::comphelper::SolarMutex::setSolarMutex( NULL );
+ ::comphelper::SolarMutex::setSolarMutex( nullptr );
}
void SalYieldMutex::acquire()
diff --git a/vcl/generic/fontmanager/fontcache.cxx b/vcl/generic/fontmanager/fontcache.cxx
index 7289b5bf1014..84f48f27d1cf 100644
--- a/vcl/generic/fontmanager/fontcache.cxx
+++ b/vcl/generic/fontmanager/fontcache.cxx
@@ -255,7 +255,7 @@ void FontCache::read()
}
int nDir = 0;
- FontDirMap* pDir = NULL;
+ FontDirMap* pDir = nullptr;
bool bKeepOnlyUserOverridden = false;
do
{
@@ -278,7 +278,7 @@ void FontCache::read()
else
{
// invalid format, remove
- pDir = NULL;
+ pDir = nullptr;
nDir = 0;
m_bDoFlush = true;
continue;
@@ -290,7 +290,7 @@ void FontCache::read()
! S_ISDIR(aStat.st_mode) )
{
// remove outdated cache data
- pDir = NULL;
+ pDir = nullptr;
nDir = 0;
m_bDoFlush = true;
continue;
@@ -300,7 +300,7 @@ void FontCache::read()
nDir = rManager.getDirectoryAtom( aDir, true );
m_aCache[ nDir ].m_nTimestamp = (sal_Int64)aStat.st_mtime;
m_aCache[ nDir ].m_bNoFiles = bEmpty;
- pDir = bEmpty ? NULL : &m_aCache[ nDir ].m_aEntries;
+ pDir = bEmpty ? nullptr : &m_aCache[ nDir ].m_aEntries;
bKeepOnlyUserOverridden = ((sal_Int64)aStat.st_mtime != nTimestamp);
m_aCache[ nDir ].m_bUserOverrideOnly = bKeepOnlyUserOverridden;
}
@@ -329,7 +329,7 @@ void FontCache::read()
pLine = aLine.getStr();
int nLen = aLine.getLength();
- PrintFontManager::PrintFont* pFont = NULL;
+ PrintFontManager::PrintFont* pFont = nullptr;
switch( eType )
{
case fonttype::TrueType:
@@ -581,7 +581,7 @@ bool FontCache::equalsPrintFont( const PrintFontManager::PrintFont* pLeft, Print
*/
PrintFontManager::PrintFont* FontCache::clonePrintFont( const PrintFontManager::PrintFont* pOldFont )
{
- PrintFontManager::PrintFont* pFont = NULL;
+ PrintFontManager::PrintFont* pFont = nullptr;
switch( pOldFont->m_eType )
{
case fonttype::TrueType:
@@ -646,7 +646,7 @@ void FontCache::updateFontCacheEntry( const PrintFontManager::PrintFont* pFont,
FontCacheData::const_iterator dir = m_aCache.find( nDirID );
FontDirMap::const_iterator entry;
FontCacheEntry::const_iterator font;
- PrintFontManager::PrintFont* pCacheFont = NULL;
+ PrintFontManager::PrintFont* pCacheFont = nullptr;
if( dir != m_aCache.end() )
{
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 2ba76387df51..9ed5c60f27c3 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -94,8 +94,8 @@ private:
FontCfgWrapper::FontCfgWrapper()
:
- m_pOutlineSet( NULL ),
- m_pLanguageTag( NULL )
+ m_pOutlineSet( nullptr ),
+ m_pLanguageTag( nullptr )
{
FcInit();
}
@@ -130,7 +130,7 @@ namespace
{
int compareFontNames(const FcPattern *a, const FcPattern *b)
{
- FcChar8 *pNameA=NULL, *pNameB=NULL;
+ FcChar8 *pNameA=nullptr, *pNameB=nullptr;
bool bHaveA = FcPatternGetString(a, FC_FAMILY, 0, &pNameA) == FcResultMatch;
bool bHaveB = FcPatternGetString(b, FC_FAMILY, 0, &pNameB) == FcResultMatch;
@@ -231,7 +231,7 @@ FontCfgWrapper::~FontCfgWrapper()
//FcFini();
}
-static FontCfgWrapper* pOneInstance = NULL;
+static FontCfgWrapper* pOneInstance = nullptr;
FontCfgWrapper& FontCfgWrapper::get()
{
@@ -245,7 +245,7 @@ void FontCfgWrapper::release()
if( pOneInstance )
{
delete pOneInstance;
- pOneInstance = NULL;
+ pOneInstance = nullptr;
}
}
@@ -330,7 +330,7 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern* pPattern, FcChar
if( eElementRes == FcResultMatch)
{
- FcChar8* elementlang = NULL;
+ FcChar8* elementlang = nullptr;
if (FcPatternGetString( pPattern, elementlangtype, 0, &elementlang ) == FcResultMatch)
{
std::vector< lang_and_element > lang_and_elements;
@@ -349,7 +349,7 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern* pPattern, FcChar
//possible to-do, sort by UILocale instead of process locale
if (!m_pLanguageTag)
{
- rtl_Locale* pLoc = NULL;
+ rtl_Locale* pLoc = nullptr;
osl_getProcessLocale(&pLoc);
m_pLanguageTag = new LanguageTag(*pLoc);
}
@@ -371,10 +371,10 @@ void FontCfgWrapper::clear()
if( m_pOutlineSet )
{
FcFontSetDestroy( m_pOutlineSet );
- m_pOutlineSet = NULL;
+ m_pOutlineSet = nullptr;
}
delete m_pLanguageTag;
- m_pLanguageTag = NULL;
+ m_pLanguageTag = nullptr;
}
/*
@@ -482,10 +482,10 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
#endif
for( int i = 0; i < pFSet->nfont; i++ )
{
- FcChar8* file = NULL;
- FcChar8* family = NULL;
- FcChar8* style = NULL;
- FcChar8* format = NULL;
+ FcChar8* file = nullptr;
+ FcChar8* family = nullptr;
+ FcChar8* style = nullptr;
+ FcChar8* format = nullptr;
int slant = 0;
int weight = 0;
int width = 0;
@@ -555,7 +555,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
// not known, analyze font file to get attributes
// not described by fontconfig (e.g. alias names, PSName)
if (eFormatRes != FcResultMatch)
- format = NULL;
+ format = nullptr;
analyzeFontFile( nDirID, aBase, aFonts, reinterpret_cast<char*>(format) );
#if OSL_DEBUG_LEVEL > 1
if( aFonts.empty() )
@@ -607,7 +607,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
// we have found more than one font in this file
// but fontconfig will not tell us which index is meant
// -> something is in disorder, do not use this font
- pUpdate = NULL;
+ pUpdate = nullptr;
}
}
@@ -880,8 +880,8 @@ namespace
#if defined(ENABLE_DBUS) && defined(ENABLE_PACKAGEKIT)
guint get_xid_for_dbus()
{
- const vcl::Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow();
- const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : NULL;
+ const vcl::Window *pTopWindow = Application::IsHeadlessModeEnabled() ? nullptr : Application::GetActiveTopWindow();
+ const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : nullptr;
return pEnvData ? pEnvData->aWindow : 0;
}
#endif
@@ -895,10 +895,10 @@ IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, voi
if (!xid)
return;
- GError *error = NULL;
+ GError *error = nullptr;
/* get the DBUS session connection */
DBusGConnection *session_connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
- if (error != NULL)
+ if (error != nullptr)
{
g_debug ("DBUS cannot connect : %s", error->message);
g_error_free (error);
@@ -910,7 +910,7 @@ IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, voi
"org.freedesktop.PackageKit",
"/org/freedesktop/PackageKit",
"org.freedesktop.PackageKit.Modify");
- if (proxy == NULL)
+ if (proxy == nullptr)
{
g_debug("Could not get DBUS proxy: org.freedesktop.PackageKit");
return;
@@ -920,7 +920,7 @@ IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, voi
gchar **font = fonts;
for (std::vector<OString>::const_iterator aI = m_aCurrentRequests.begin(); aI != m_aCurrentRequests.end(); ++aI)
*font++ = const_cast<gchar*>(aI->getStr());
- *font = NULL;
+ *font = nullptr;
gboolean res = dbus_g_proxy_call(proxy, "InstallFontconfigResources", &error,
G_TYPE_UINT, xid, /* xid */
G_TYPE_STRV, fonts, /* data */
@@ -932,7 +932,7 @@ IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, voi
g_debug("InstallFontconfigResources method failed");
/* check the error value */
- if (error != NULL)
+ if (error != nullptr)
{
g_debug("InstallFontconfigResources problem : %s", error->message);
g_error_free(error);
@@ -1003,7 +1003,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
FcPattern* pResult = FcFontSetMatch(FcConfigGetCurrent(), &pFontSet, 1, pPattern, &eResult);
FcPatternDestroy( pPattern );
- FcFontSet* pSet = NULL;
+ FcFontSet* pSet = nullptr;
if( pResult )
{
pSet = FcFontSetCreate();
@@ -1017,7 +1017,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
if( pSet->nfont > 0 )
{
//extract the closest match
- FcChar8* file = NULL;
+ FcChar8* file = nullptr;
FcResult eFileRes = FcPatternGetString(pSet->fonts[0], FC_FILE, 0, &file);
int nCollectionEntry = 0;
FcResult eIndexRes = FcPatternGetInteger(pSet->fonts[0], FC_INDEX, 0, &nCollectionEntry);
@@ -1041,7 +1041,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
if (!bRet)
{
- FcChar8* family = NULL;
+ FcChar8* family = nullptr;
FcResult eFamilyRes = FcPatternGetString( pSet->fonts[0], FC_FAMILY, 0, &family );
// get the family name
@@ -1071,7 +1071,7 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
FcBool bEmbolden;
if (FcResultMatch == FcPatternGetBool(pSet->fonts[0], FC_EMBOLDEN, 0, &bEmbolden))
rPattern.mbEmbolden = bEmbolden;
- FcMatrix *pMatrix = 0;
+ FcMatrix *pMatrix = nullptr;
if (FcResultMatch == FcPatternGetMatrix(pSet->fonts[0], FC_MATRIX, 0, &pMatrix))
{
rPattern.maItalicMatrix.xx = pMatrix->xx;
@@ -1166,7 +1166,7 @@ FontConfigFontOptions* PrintFontManager::getFontOptions(
{
FontCfgWrapper& rWrapper = FontCfgWrapper::get();
- FontConfigFontOptions* pOptions = NULL;
+ FontConfigFontOptions* pOptions = nullptr;
FcConfig* pConfig = FcConfigGetCurrent();
FcPattern* pPattern = FcPatternCreate();
@@ -1263,7 +1263,7 @@ bool PrintFontManager::matchFont( FastPrintFontInfo& rInfo, const com::sun::star
if( pSet->nfont > 0 )
{
//extract the closest match
- FcChar8* file = NULL;
+ FcChar8* file = nullptr;
FcResult eFileRes = FcPatternGetString(pSet->fonts[0], FC_FILE, 0, &file);
int nCollectionEntry = 0;
FcResult eIndexRes = FcPatternGetInteger(pSet->fonts[0], FC_INDEX, 0, &nCollectionEntry);
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 09153318a259..91d2bddd3cc2 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -144,7 +144,7 @@ PrintFontManager::PrintFont::PrintFont( fonttype::type eType ) :
m_ePitch( PITCH_DONTKNOW ),
m_aEncoding( RTL_TEXTENCODING_DONTKNOW ),
m_bFontEncodingOnly( false ),
- m_pMetrics( NULL ),
+ m_pMetrics( nullptr ),
m_nAscend( 0 ),
m_nDescend( 0 ),
m_nLeading( 0 ),
@@ -188,7 +188,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
OString aFile( PrintFontManager::get().getFontFile( this ) );
- TrueTypeFont* pTTFont = NULL;
+ TrueTypeFont* pTTFont = nullptr;
if( OpenTTFontFile( aFile.getStr(), m_nCollectionEntry, &pTTFont ) == SF_OK )
{
@@ -205,7 +205,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
table[ i ] = 256*nPage + i;
int nCharacters = nPage < 255 ? 256 : 254;
- MapString( pTTFont, table, nCharacters, NULL, false );
+ MapString( pTTFont, table, nCharacters, nullptr, false );
TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, false );
if( pMetrics )
{
@@ -224,7 +224,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
for( i = 0; i < 256; i++ )
table_vert[ i ] = 256*nPage + i;
- MapString( pTTFont, table_vert, nCharacters, NULL, true );
+ MapString( pTTFont, table_vert, nCharacters, nullptr, true );
pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, true );
if( pMetrics )
{
@@ -277,7 +277,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
PrintFontManager& rManager( PrintFontManager::get() );
const OString& rFileName = rManager.getAfmFile( this );
- FontInfo* pInfo = NULL;
+ FontInfo* pInfo = nullptr;
parseFile( rFileName.getStr(), &pInfo, P_ALL );
if( ! pInfo || ! pInfo->numOfChars )
{
@@ -642,7 +642,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
*/
PrintFontManager& PrintFontManager::get()
{
- static PrintFontManager* pManager = NULL;
+ static PrintFontManager* pManager = nullptr;
if( ! pManager )
{
static PrintFontManager theManager;
@@ -660,7 +660,7 @@ PrintFontManager::PrintFontManager()
: m_nNextFontID( 1 )
, m_pAtoms( new MultiAtomProvider() )
, m_nNextDirAtom( 1 )
- , m_pFontCache( NULL )
+ , m_pFontCache( nullptr )
{
for( unsigned int i = 0; i < SAL_N_ELEMENTS( aAdobeCodes ); i++ )
{
@@ -820,7 +820,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
if( ! pFont->readAfmMetrics( m_pAtoms, false, true ) )
{
delete pFont;
- pFont = NULL;
+ pFont = nullptr;
}
if( pFont )
rNewFonts.push_back( pFont );
@@ -873,7 +873,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
if( ! analyzeTrueTypeFile( pFont ) )
{
delete pFont;
- pFont = NULL;
+ pFont = nullptr;
}
else
rNewFonts.push_back( pFont );
@@ -890,7 +890,7 @@ bool PrintFontManager::analyzeFontFile( int nDirID, const OString& rFontFile, ::
if( ! analyzeTrueTypeFile( pFont ) )
{
delete pFont;
- pFont = NULL;
+ pFont = nullptr;
}
else
rNewFonts.push_back( pFont );
@@ -1127,7 +1127,7 @@ void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OU
rNames.clear();
::std::set< OUString > aSet;
- NameRecord* pNameRecords = NULL;
+ NameRecord* pNameRecords = nullptr;
int nNameRecords = GetTTNameRecords( static_cast<TrueTypeFont*>(pTTFont), &pNameRecords );
if( nNameRecords && pNameRecords )
{
@@ -1136,7 +1136,7 @@ void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OU
int nLastMatch = -1;
for( int i = 0; i < nNameRecords; i++ )
{
- if( pNameRecords[i].nameID != 1 || pNameRecords[i].sptr == NULL )
+ if( pNameRecords[i].nameID != 1 || pNameRecords[i].sptr == nullptr )
continue;
int nMatch = -1;
if( pNameRecords[i].platformID == 0 ) // Unicode
@@ -1192,7 +1192,7 @@ bool PrintFontManager::analyzeTrueTypeFile( PrintFont* pFont ) const
bool bSuccess = false;
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
OString aFile = getFontFile( pFont );
- TrueTypeFont* pTTFont = NULL;
+ TrueTypeFont* pTTFont = nullptr;
TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont);
if( OpenTTFontFile( aFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK )
@@ -1806,7 +1806,7 @@ bool PrintFontManager::isFontDownloadingAllowedForPrinting( fontID nFont ) const
TrueTypeFontFile* pTTFontFile = static_cast<TrueTypeFontFile*>(pFont);
if( pTTFontFile->m_nTypeFlags & TYPEFLAG_INVALID )
{
- TrueTypeFont* pTTFont = NULL;
+ TrueTypeFont* pTTFont = nullptr;
OString aFile = getFontFile( pFont );
if( OpenTTFontFile( aFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) == SF_OK )
{
@@ -1977,7 +1977,7 @@ bool PrintFontManager::createFontSubset(
// TODO: since this file is usually already mmapped there is no need to open it again
const OString aFromFile = getFontFile( pFont );
- TrueTypeFont* pTTFont = NULL; // TODO: rename to SfntFont
+ TrueTypeFont* pTTFont = nullptr; // TODO: rename to SfntFont
TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont);
if( OpenTTFontFile( aFromFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK )
return false;
@@ -1991,7 +1991,7 @@ bool PrintFontManager::createFontSubset(
// do CFF subsetting if possible
int nCffLength = 0;
- const sal_uInt8* pCffBytes = NULL;
+ const sal_uInt8* pCffBytes = nullptr;
if( GetSfntTable( pTTFont, O_CFF, &pCffBytes, &nCffLength ) )
{
rInfo.LoadFont( FontSubsetInfo::CFF_FONT, pCffBytes, nCffLength );
@@ -2008,7 +2008,7 @@ bool PrintFontManager::createFontSubset(
return false;
}
// create font subset
- const char* pGlyphSetName = NULL; // TODO: better name?
+ const char* pGlyphSetName = nullptr; // TODO: better name?
const bool bOK = rInfo.CreateFontSubset(
FontSubsetInfo::TYPE1_PFB,
pOutFile, pGlyphSetName,
@@ -2057,7 +2057,7 @@ bool PrintFontManager::createFontSubset(
pEnc,
nGlyphs,
0,
- NULL,
+ nullptr,
0 ) );
CloseTTFont( pTTFont );
@@ -2075,7 +2075,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
return;
if( pFont->m_eType == fonttype::TrueType )
{
- TrueTypeFont* pTTFont = NULL;
+ TrueTypeFont* pTTFont = nullptr;
TrueTypeFontFile* pTTFontFile = static_cast< TrueTypeFontFile* >(pFont);
OString aFromFile = getFontFile( pFont );
if( OpenTTFontFile( aFromFile.getStr(), pTTFontFile->m_nCollectionEntry, &pTTFont ) != SF_OK )
@@ -2101,7 +2101,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
// fill the unicode map
// TODO: isn't this map already available elsewhere in the fontmanager?
- const sal_uInt8* pCmapData = NULL;
+ const sal_uInt8* pCmapData = nullptr;
int nCmapSize = 0;
if( GetSfntTable( pTTFont, O_cmap, &pCmapData, &nCmapSize ) )
{
@@ -2126,7 +2126,7 @@ void PrintFontManager::getGlyphWidths( fontID nFont,
rUnicodeEnc[ (sal_Unicode)c ] = aGlyphId;
}
- pCharMap = 0;
+ pCharMap = nullptr;
}
}
}
@@ -2159,20 +2159,20 @@ const std::map< sal_Unicode, sal_Int32 >* PrintFontManager::getEncodingMap( font
{
PrintFont* pFont = getFont( nFont );
if( !pFont || pFont->m_eType != fonttype::Type1 )
- return NULL;
+ return nullptr;
if( pFont->m_aEncodingVector.empty() )
pFont->readAfmMetrics( m_pAtoms, true, true );
if( pNonEncoded )
- *pNonEncoded = !pFont->m_aNonEncoded.empty() ? &pFont->m_aNonEncoded : NULL;
+ *pNonEncoded = !pFont->m_aNonEncoded.empty() ? &pFont->m_aNonEncoded : nullptr;
if (ppPriority)
{
*ppPriority = &pFont->m_aEncodingVectorPriority;
}
- return !pFont->m_aEncodingVector.empty() ? &pFont->m_aEncodingVector : NULL;
+ return !pFont->m_aEncodingVector.empty() ? &pFont->m_aEncodingVector : nullptr;
}
std::list< OString > PrintFontManager::getAdobeNameFromUnicode( sal_Unicode aChar ) const
diff --git a/vcl/generic/fontmanager/helper.cxx b/vcl/generic/fontmanager/helper.cxx
index 2dca718e8b2a..af8ae0aedeaa 100644
--- a/vcl/generic/fontmanager/helper.cxx
+++ b/vcl/generic/fontmanager/helper.cxx
@@ -79,7 +79,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
#if OSL_DEBUG_LEVEL > 1
oslFileError eErr =
#endif
- osl_createDirectoryPath( aUPath.pData, NULL, NULL );
+ osl_createDirectoryPath( aUPath.pData, nullptr, nullptr );
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "try to create \"%s\" = %d\n", OUStringToOString( aUPath, RTL_TEXTENCODING_UTF8 ).getStr(), eErr );
#endif
diff --git a/vcl/generic/fontmanager/parseAFM.cxx b/vcl/generic/fontmanager/parseAFM.cxx
index 82cb46f3f6a3..3db271bab3ba 100644
--- a/vcl/generic/fontmanager/parseAFM.cxx
+++ b/vcl/generic/fontmanager/parseAFM.cxx
@@ -109,7 +109,7 @@ class FileInputStream
};
FileInputStream::FileInputStream(const char* pFilename)
- : m_pMemory(NULL)
+ : m_pMemory(nullptr)
, m_nPos(0)
, m_nLen(0)
{
@@ -357,7 +357,7 @@ static inline enum parseKey recognize( char* ident, int len)
static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
{
- bool cont = true, save = (gfi != NULL);
+ bool cont = true, save = (gfi != nullptr);
int error = ok;
int direction = -1;
int tokenlen;
@@ -366,7 +366,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
{
char *keyword = token(fp, tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
/* Have reached an early and unexpected EOF. */
/* Set flag and stop parsing */
{
@@ -394,38 +394,38 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
switch(recognize(keyword, tokenlen))
{
case STARTFONTMETRICS:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->afmVersion = strdup( keyword );
break;
case COMMENT:
linetoken(fp);
break;
case FONTNAME:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->fontName = strdup( keyword );
break;
case ENCODINGSCHEME:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->encodingScheme = strdup( keyword );
break;
case FULLNAME:
- if ((keyword = linetoken(fp)) != NULL)
+ if ((keyword = linetoken(fp)) != nullptr)
gfi->fullName = strdup( keyword );
break;
case FAMILYNAME:
- if ((keyword = linetoken(fp)) != NULL)
+ if ((keyword = linetoken(fp)) != nullptr)
gfi->familyName = strdup( keyword );
break;
case WEIGHT:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->weight = strdup( keyword );
break;
case ITALICANGLE:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->italicAngle = StringToDouble( keyword );
break;
case ISFIXEDPITCH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
{
if (MATCH(keyword, False))
gfi->isFixedPitch = false;
@@ -434,50 +434,50 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
}
break;
case UNDERLINEPOSITION:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->underlinePosition = atoi(keyword);
break;
case UNDERLINETHICKNESS:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->underlineThickness = atoi(keyword);
break;
case VERSION:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->version = strdup( keyword );
break;
case NOTICE:
- if ((keyword = linetoken(fp)) != NULL)
+ if ((keyword = linetoken(fp)) != nullptr)
gfi->notice = strdup( keyword );
break;
case FONTBBOX:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->fontBBox.llx = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->fontBBox.lly = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->fontBBox.urx = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->fontBBox.ury = atoi(keyword);
break;
case CAPHEIGHT:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->capHeight = atoi(keyword);
break;
case XHEIGHT:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->xHeight = atoi(keyword);
break;
case DESCENT:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->descender = -atoi(keyword);
break;
case DESCENDER:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->descender = atoi(keyword);
break;
case ASCENT:
case ASCENDER:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
gfi->ascender = atoi(keyword);
break;
case STARTCHARMETRICS:
@@ -492,7 +492,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
token(fp,tokenlen);
break;
case STARTDIRECTION:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
direction = atoi(keyword);
break; /* ignore this for now */
case ENDDIRECTION:
@@ -516,7 +516,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
token(fp,tokenlen); //ignore
break;
case CHARWIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
{
if (direction == 0)
gfi->charwidth = atoi(keyword);
@@ -560,7 +560,7 @@ static int parseGlobals( FileInputStream* fp, GlobalFontInfo* gfi )
static int parseCharWidths( FileInputStream* fp, int* cwi)
{
- bool cont = true, save = (cwi != NULL);
+ bool cont = true, save = (cwi != nullptr);
int pos = 0, error = ok, tokenlen;
while (cont)
@@ -568,7 +568,7 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
char *keyword = token(fp,tokenlen);
/* Have reached an early and unexpected EOF. */
/* Set flag and stop parsing */
- if (keyword == NULL)
+ if (keyword == nullptr)
{
error = earlyEOF;
break; /* get out of loop */
@@ -597,7 +597,7 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
linetoken(fp); /*eat token*/
break;
case CODE:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
pos = atoi(keyword);
break;
case XYWIDTH:
@@ -606,14 +606,14 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
error = parseError;
break;
case CODEHEX:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
sscanf(keyword, "<%x>", &pos);
break;
case X0WIDTH:
(void) token(fp,tokenlen);
break;
case XWIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
if (pos >= 0) /* ignore unmapped chars */
cwi[pos] = atoi(keyword);
break;
@@ -657,16 +657,16 @@ static int parseCharWidths( FileInputStream* fp, int* cwi)
static int
reallocFontMetrics( void **pp_fontmetrics, int *p_oldcount, int n_newcount, unsigned int n_size )
{
- char *p_tmpmetrics = NULL;
+ char *p_tmpmetrics = nullptr;
- if ((pp_fontmetrics == NULL) || (*pp_fontmetrics == NULL))
+ if ((pp_fontmetrics == nullptr) || (*pp_fontmetrics == nullptr))
return storageProblem;
if (*p_oldcount == n_newcount)
return ok;
p_tmpmetrics = static_cast<char*>(realloc(*pp_fontmetrics, n_newcount * n_size));
- if (p_tmpmetrics == NULL)
+ if (p_tmpmetrics == nullptr)
return storageProblem;
if ( n_newcount > *p_oldcount )
@@ -718,7 +718,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
while (cont)
{
char *keyword = token(fp,tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
{
error = earlyEOF;
break; /* get out of loop */
@@ -740,7 +740,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
{
if (firstTime) firstTime = false;
else temp++;
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->code = atoi(keyword);
if (fi->gfi && fi->gfi->charwidth)
temp->wx = fi->gfi->charwidth;
@@ -765,7 +765,7 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
firstTime = false;
else
temp++;
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
sscanf(keyword,"<%x>", &temp->code);
if (fi->gfi && fi->gfi->charwidth)
temp->wx = fi->gfi->charwidth;
@@ -777,48 +777,48 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
}
break;
case XYWIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->wx = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->wy = atoi(keyword);
break;
case X0WIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->wx = atoi(keyword);
break;
case XWIDTH:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->wx = atoi(keyword);
break;
case CHARNAME:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->name = strdup(keyword);
break;
case CHARBBOX:
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->charBBox.llx = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->charBBox.lly = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->charBBox.urx = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
temp->charBBox.ury = atoi(keyword);
break;
case LIGATURE: {
Ligature **tail = &(temp->ligs);
Ligature *node = *tail;
- if (*tail != NULL)
+ if (*tail != nullptr)
{
- while (node->next != NULL)
+ while (node->next != nullptr)
node = node->next;
tail = &(node->next);
}
*tail = static_cast<Ligature *>(calloc(1, sizeof(Ligature)));
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
(*tail)->succ = strdup(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
(*tail)->lig = strdup(keyword);
break; }
case ENDCHARMETRICS:
@@ -867,14 +867,14 @@ static int parseCharMetrics( FileInputStream* fp, FontInfo* fi)
static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
{
- bool cont = true, save = (fi->tkd != NULL);
+ bool cont = true, save = (fi->tkd != nullptr);
int pos = 0, error = ok, tcount = 0, tokenlen;
while (cont)
{
char *keyword = token(fp,tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
{
error = earlyEOF;
break; /* get out of loop */
@@ -912,15 +912,15 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
if (tcount < fi->numOfTracks)
{
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->tkd[pos].degree = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->tkd[pos].minPtSize = StringToDouble(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->tkd[pos].minKernAmt = StringToDouble(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->tkd[pos].maxPtSize = StringToDouble(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->tkd[pos++].maxKernAmt = StringToDouble(keyword);
tcount++;
}
@@ -973,14 +973,14 @@ static int parseTrackKernData( FileInputStream* fp, FontInfo* fi)
static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
{
- bool cont = true, save = (fi->pkd != NULL);
+ bool cont = true, save = (fi->pkd != nullptr);
int pos = 0, error = ok, pcount = 0, tokenlen;
while (cont)
{
char *keyword = token(fp,tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
{
error = earlyEOF;
break; /* get out of loop */
@@ -1017,13 +1017,13 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
}
if (pcount < fi->numOfPairs)
{
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos].name1 = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos].name2 = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos].xamt = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos++].yamt = atoi(keyword);
pcount++;
}
@@ -1041,11 +1041,11 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
}
if (pcount < fi->numOfPairs)
{
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos].name1 = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos].name2 = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->pkd[pos++].xamt = atoi(keyword);
pcount++;
}
@@ -1101,13 +1101,13 @@ static int parsePairKernData( FileInputStream* fp, FontInfo* fi)
static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
{
- bool cont = true, firstTime = true, save = (fi->ccd != NULL);
+ bool cont = true, firstTime = true, save = (fi->ccd != nullptr);
int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0, tokenlen;
while (cont)
{
char *keyword = token(fp,tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
/* Have reached an early and unexpected EOF. */
/* Set flag and stop parsing */
{
@@ -1166,7 +1166,7 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
if (firstTime) firstTime = false;
else pos++;
fi->ccd[pos].ccName = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->ccd[pos].numOfPieces = atoi(keyword);
fi->ccd[pos].pieces = static_cast<Pcc *>(
calloc(fi->ccd[pos].numOfPieces, sizeof(Pcc)));
@@ -1182,11 +1182,11 @@ static int parseCompCharData( FileInputStream* fp, FontInfo* fi)
case COMPCHARPIECE:
if (pcount < fi->ccd[pos].numOfPieces)
{
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->ccd[pos].pieces[j].pccName = strdup( keyword );
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->ccd[pos].pieces[j].deltax = atoi(keyword);
- if ((keyword = token(fp,tokenlen)) != NULL)
+ if ((keyword = token(fp,tokenlen)) != nullptr)
fi->ccd[pos].pieces[j++].deltay = atoi(keyword);
pcount++;
}
@@ -1252,12 +1252,12 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
char *keyword; /* used to store a token */
(*fi) = static_cast<FontInfo *>(calloc(1, sizeof(FontInfo)));
- if ((*fi) == NULL) { error = storageProblem; return error; }
+ if ((*fi) == nullptr) { error = storageProblem; return error; }
if (flags & P_G)
{
(*fi)->gfi = static_cast<GlobalFontInfo *>(calloc(1, sizeof(GlobalFontInfo)));
- if ((*fi)->gfi == NULL) { error = storageProblem; return error; }
+ if ((*fi)->gfi == nullptr) { error = storageProblem; return error; }
}
/* The AFM file begins with Global Font Information. This section */
@@ -1276,13 +1276,13 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if ((code != normalEOF) && (code != earlyEOF))
{
- if ((keyword = token(&aFile,tokenlen)) != NULL)
+ if ((keyword = token(&aFile,tokenlen)) != nullptr)
(*fi)->numOfChars = atoi(keyword);
if (flags & (P_M ^ P_W))
{
(*fi)->cmi = static_cast<CharMetricInfo *>(
calloc((*fi)->numOfChars, sizeof(CharMetricInfo)));
- if ((*fi)->cmi == NULL) { error = storageProblem; return error; }
+ if ((*fi)->cmi == nullptr) { error = storageProblem; return error; }
code = parseCharMetrics(&aFile, *fi);
}
else
@@ -1290,7 +1290,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
if (flags & P_W)
{
(*fi)->cwi = static_cast<int *>(calloc(256, sizeof(int)));
- if ((*fi)->cwi == NULL)
+ if ((*fi)->cwi == nullptr)
{
error = storageProblem;
return error;
@@ -1312,7 +1312,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
while ((code != normalEOF) && (code != earlyEOF))
{
keyword = token(&aFile,tokenlen);
- if (keyword == NULL)
+ if (keyword == nullptr)
/* Have reached an early and unexpected EOF. */
/* Set flag and stop parsing */
{
@@ -1332,7 +1332,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
(*fi)->numOfTracks = atoi(keyword);
(*fi)->tkd = static_cast<TrackKernData *>(
calloc((*fi)->numOfTracks, sizeof(TrackKernData)));
- if ((*fi)->tkd == NULL)
+ if ((*fi)->tkd == nullptr)
{
error = storageProblem;
return error;
@@ -1347,7 +1347,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
(*fi)->numOfPairs = atoi(keyword);
(*fi)->pkd = static_cast<PairKernData *>(
calloc((*fi)->numOfPairs, sizeof(PairKernData)));
- if ((*fi)->pkd == NULL)
+ if ((*fi)->pkd == nullptr)
{
error = storageProblem;
return error;
@@ -1362,7 +1362,7 @@ int parseFile( const char* pFilename, FontInfo** fi, FLAGS flags)
(*fi)->numOfComps = atoi(keyword);
(*fi)->ccd = static_cast<CompCharData *>(
calloc((*fi)->numOfComps, sizeof(CompCharData)));
- if ((*fi)->ccd == NULL)
+ if ((*fi)->ccd == nullptr)
{
error = storageProblem;
return error;
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index 11d53c72e1b4..bef54776e6b8 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -86,7 +86,7 @@ static void InitGammaTable()
}
}
-static FT_Library aLibFT = 0;
+static FT_Library aLibFT = nullptr;
// enable linking with old FT versions
static int nFTVERSION = 0;
@@ -110,7 +110,7 @@ static int nDefaultPrioAntiAlias = 1;
FtFontFile::FtFontFile( const OString& rNativeFileName )
: maNativeFileName( rNativeFileName ),
- mpFileMap( NULL ),
+ mpFileMap( nullptr ),
mnFileSize( 0 ),
mnRefCount( 0 ),
mnLangBoost( 0 )
@@ -121,7 +121,7 @@ FtFontFile::FtFontFile( const OString& rNativeFileName )
mnLangBoost += 0x1000; // no langinfo => good
else
{
- static const char* pLangBoost = NULL;
+ static const char* pLangBoost = nullptr;
static bool bOnce = true;
if( bOnce )
{
@@ -168,22 +168,22 @@ bool FtFontFile::Map()
}
mnFileSize = aStat.st_size;
mpFileMap = static_cast<unsigned char*>(
- mmap( NULL, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 ));
+ mmap( nullptr, mnFileSize, PROT_READ, MAP_SHARED, nFile, 0 ));
if( mpFileMap == MAP_FAILED )
- mpFileMap = NULL;
+ mpFileMap = nullptr;
close( nFile );
}
- return (mpFileMap != NULL);
+ return (mpFileMap != nullptr);
}
void FtFontFile::Unmap()
{
- if( (--mnRefCount > 0) || (mpFileMap == NULL) )
+ if( (--mnRefCount > 0) || (mpFileMap == nullptr) )
return;
munmap( mpFileMap, mnFileSize );
- mpFileMap = NULL;
+ mpFileMap = nullptr;
}
#if ENABLE_GRAPHITE
@@ -216,19 +216,19 @@ const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, siz
FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
const OString& rNativeFileName, int nFaceNum, sal_IntPtr nFontId)
:
- maFaceFT( NULL ),
+ maFaceFT( nullptr ),
mpFontFile( FtFontFile::FindFontFile( rNativeFileName ) ),
mnFaceNum( nFaceNum ),
mnRefCount( 0 ),
#if ENABLE_GRAPHITE
mbCheckedGraphite(false),
- mpGraphiteFace(NULL),
+ mpGraphiteFace(nullptr),
#endif
mnFontId( nFontId ),
maDevFontAttributes( rDevFontAttributes ),
- mpFontCharMap( NULL ),
- mpChar2Glyph( NULL ),
- mpGlyph2Char( NULL )
+ mpFontCharMap( nullptr ),
+ mpChar2Glyph( nullptr ),
+ mpGlyph2Char( nullptr )
{
// prefer font with low ID
maDevFontAttributes.mnQuality += 10000 - nFontId;
@@ -239,7 +239,7 @@ FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
FtFontInfo::~FtFontInfo()
{
if( mpFontCharMap )
- mpFontCharMap = 0;
+ mpFontCharMap = nullptr;
delete mpChar2Glyph;
delete mpGlyph2Char;
#if ENABLE_GRAPHITE
@@ -262,7 +262,7 @@ FT_FaceRec_* FtFontInfo::GetFaceFT()
mpFontFile->GetBuffer(),
mpFontFile->GetFileSize(), mnFaceNum, &maFaceFT );
if( (rc != FT_Err_Ok) || (maFaceFT->num_glyphs <= 0) )
- maFaceFT = NULL;
+ maFaceFT = nullptr;
}
++mnRefCount;
@@ -297,7 +297,7 @@ void FtFontInfo::ReleaseFaceFT()
if (--mnRefCount <= 0)
{
FT_Done_Face( maFaceFT );
- maFaceFT = NULL;
+ maFaceFT = nullptr;
mpFontFile->Unmap();
}
}
@@ -315,7 +315,7 @@ const unsigned char* FtFontInfo::GetTable( const char* pTag, sal_uLong* pLength
const unsigned char* pBuffer = mpFontFile->GetBuffer();
int nFileSize = mpFontFile->GetFileSize();
if( !pBuffer || nFileSize<1024 )
- return NULL;
+ return nullptr;
// we currently handle TTF, TTC and OTF headers
unsigned nFormat = GetUInt( pBuffer );
@@ -324,18 +324,18 @@ const unsigned char* FtFontInfo::GetTable( const char* pTag, sal_uLong* pLength
if( nFormat == T_ttcf ) // TTC_MAGIC
p += GetUInt( p + 4 * mnFaceNum );
else if( nFormat != 0x00010000 && nFormat != T_true && nFormat != T_otto) // TTF_MAGIC and Apple TTF Magic and PS-OpenType font
- return NULL;
+ return nullptr;
// walk table directory until match
int nTables = GetUShort( p - 8 );
if( nTables >= 64 ) // something fishy?
- return NULL;
+ return nullptr;
for( int i = 0; i < nTables; ++i, p+=16 )
{
if( p[0]==pTag[0] && p[1]==pTag[1] && p[2]==pTag[2] && p[3]==pTag[3] )
{
sal_uLong nLength = GetUInt( p + 12 );
- if( pLength != NULL )
+ if( pLength != nullptr )
*pLength = nLength;
const unsigned char* pTable = pBuffer + GetUInt( p + 8 );
if( (pTable + nLength) <= (mpFontFile->GetBuffer() + nFileSize) )
@@ -343,7 +343,7 @@ const unsigned char* FtFontInfo::GetTable( const char* pTag, sal_uLong* pLength
}
}
- return NULL;
+ return nullptr;
}
void FtFontInfo::AnnounceFont( PhysicalFontCollection* pFontCollection )
@@ -426,7 +426,7 @@ void FreetypeManager::ClearFontList( )
ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
{
- FtFontInfo* pFontInfo = NULL;
+ FtFontInfo* pFontInfo = nullptr;
// find a FontInfo matching to the font id
sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFSD.mpFontData );
@@ -435,7 +435,7 @@ ServerFont* FreetypeManager::CreateFont( const FontSelectPattern& rFSD )
pFontInfo = it->second;
if( !pFontInfo )
- return NULL;
+ return nullptr;
ServerFont* pNew = new ServerFont( rFSD, pFontInfo );
@@ -463,8 +463,8 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
maFontSelData(rFSD),
mnRefCount(1),
mnBytesUsed( sizeof(ServerFont) ),
- mpPrevGCFont( NULL ),
- mpNextGCFont( NULL ),
+ mpPrevGCFont( nullptr ),
+ mpNextGCFont( nullptr ),
mnCos( 0x10000),
mnSin( 0 ),
mbCollectedZW( false ),
@@ -473,13 +473,13 @@ ServerFont::ServerFont( const FontSelectPattern& rFSD, FtFontInfo* pFI )
mnPrioAutoHint(nDefaultPrioAutoHint),
mpFontInfo( pFI ),
mnLoadFlags( 0 ),
- maFaceFT( NULL ),
- maSizeFT( NULL ),
+ maFaceFT( nullptr ),
+ maSizeFT( nullptr ),
mbFaceOk( false ),
mbArtItalic( false ),
mbArtBold( false ),
mbUseGamma( false ),
- mpLayoutEngine( NULL )
+ mpLayoutEngine( nullptr )
{
// TODO: move update of mpFontEntry into FontEntry class when
// it becomes responsible for the ServerFont instantiation
@@ -815,13 +815,13 @@ int ServerFont::ApplyGlyphTransform( int nGlyphFlags,
if( pGlyphFT->format != FT_GLYPH_FORMAT_BITMAP )
{
- FT_Glyph_Transform( pGlyphFT, NULL, &aVector );
+ FT_Glyph_Transform( pGlyphFT, nullptr, &aVector );
// orthogonal transforms are better handled by bitmap operations
if( bStretched || (bForBitmapProcessing && (nAngle % 900) != 0) )
{
// apply non-orthogonal or stretch transformations
- FT_Glyph_Transform( pGlyphFT, &aMatrix, NULL );
+ FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr );
nAngle = 0;
}
}
@@ -1029,7 +1029,7 @@ bool ServerFont::GetGlyphBitmap1( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap )
FT_Matrix aMatrix;
aMatrix.xx = aMatrix.yy = 0x10000L;
aMatrix.xy = 0x6000L, aMatrix.yx = 0;
- FT_Glyph_Transform( pGlyphFT, &aMatrix, NULL );
+ FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr );
}
// Check for zero area bounding boxes as this crashes some versions of FT.
@@ -1051,7 +1051,7 @@ bool ServerFont::GetGlyphBitmap1( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap )
reinterpret_cast<FT_OutlineGlyphRec*>(pGlyphFT)->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
FT_Render_Mode nRenderMode = FT_RENDER_MODE_MONO;
- rc = FT_Glyph_To_Bitmap( &pGlyphFT, nRenderMode, NULL, true );
+ rc = FT_Glyph_To_Bitmap( &pGlyphFT, nRenderMode, nullptr, true );
if( rc != FT_Err_Ok )
{
FT_Done_Glyph( pGlyphFT );
@@ -1162,7 +1162,7 @@ bool ServerFont::GetGlyphBitmap8( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap )
FT_Matrix aMatrix;
aMatrix.xx = aMatrix.yy = 0x10000L;
aMatrix.xy = 0x6000L, aMatrix.yx = 0;
- FT_Glyph_Transform( pGlyphFT, &aMatrix, NULL );
+ FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr );
}
if( pGlyphFT->format == FT_GLYPH_FORMAT_OUTLINE )
@@ -1171,7 +1171,7 @@ bool ServerFont::GetGlyphBitmap8( sal_GlyphId aGlyphId, RawBitmap& rRawBitmap )
bool bEmbedded = (pGlyphFT->format == FT_GLYPH_FORMAT_BITMAP);
if( !bEmbedded )
{
- rc = FT_Glyph_To_Bitmap( &pGlyphFT, FT_RENDER_MODE_NORMAL, NULL, true );
+ rc = FT_Glyph_To_Bitmap( &pGlyphFT, FT_RENDER_MODE_NORMAL, nullptr, true );
if( rc != FT_Err_Ok )
{
FT_Done_Glyph( pGlyphFT );
@@ -1433,7 +1433,7 @@ void PolyArgs::ClosePolygon()
DBG_ASSERT( (mpFlagAry[0]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFE failed!" );
DBG_ASSERT( (mpFlagAry[mnPoints]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFS failed!" );
- tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) );
+ tools::Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : nullptr) );
// #i35928#
// This may be a invalid polygons, e.g. the last point is a control point.
@@ -1556,7 +1556,7 @@ bool ServerFont::GetGlyphOutline( sal_GlyphId aGlyphId,
FT_Matrix aMatrix;
aMatrix.xx = aMatrix.yy = 0x10000L;
aMatrix.xy = 0x6000L, aMatrix.yx = 0;
- FT_Glyph_Transform( pGlyphFT, &aMatrix, NULL );
+ FT_Glyph_Transform( pGlyphFT, &aMatrix, nullptr );
}
FT_Outline& rOutline = reinterpret_cast<FT_OutlineGlyphRec*>(pGlyphFT)->outline;
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index cddddbc93065..82b52b30ee81 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -63,7 +63,7 @@ public:
int nFaceNum, sal_IntPtr nFontId);
~FtFontInfo();
- const unsigned char* GetTable( const char*, sal_uLong* pLength=0 ) const;
+ const unsigned char* GetTable( const char*, sal_uLong* pLength=nullptr ) const;
FT_FaceRec_* GetFaceFT();
#if ENABLE_GRAPHITE
diff --git a/vcl/generic/glyphs/gcach_layout.cxx b/vcl/generic/glyphs/gcach_layout.cxx
index 976c339df5ea..83498f6bb8d5 100644
--- a/vcl/generic/glyphs/gcach_layout.cxx
+++ b/vcl/generic/glyphs/gcach_layout.cxx
@@ -57,7 +57,7 @@ void ServerFontLayout::AdjustLayout( ImplLayoutArgs& rArgs )
// apply asian kerning if the glyphs are not already formatted
if( (rArgs.mnFlags & SalLayoutFlags::KerningAsian)
&& !(rArgs.mnFlags & SalLayoutFlags::Vertical) )
- if( (rArgs.mpDXArray != NULL) || (rArgs.mnLayoutWidth != 0) )
+ if( (rArgs.mpDXArray != nullptr) || (rArgs.mnLayoutWidth != 0) )
ApplyAsianKerning(rArgs.mrStr);
// insert kashidas where requested by the formatting array
@@ -131,9 +131,9 @@ static hb_blob_t *getFontTable(hb_face_t* /*face*/, hb_tag_t nTableTag, void* pU
sal_uLong nLength;
const unsigned char* pBuffer = pFont->GetTable(pTagName, &nLength);
- hb_blob_t* pBlob = NULL;
- if (pBuffer != NULL)
- pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, const_cast<unsigned char *>(pBuffer), NULL);
+ hb_blob_t* pBlob = nullptr;
+ if (pBuffer != nullptr)
+ pBlob = hb_blob_create(reinterpret_cast<const char*>(pBuffer), nLength, HB_MEMORY_MODE_READONLY, const_cast<unsigned char *>(pBuffer), nullptr);
return pBlob;
}
@@ -276,15 +276,15 @@ static hb_font_funcs_t* getFontFuncs()
{
static hb_font_funcs_t* funcs = hb_font_funcs_create();
- hb_font_funcs_set_glyph_func (funcs, getFontGlyph, NULL, NULL);
- hb_font_funcs_set_glyph_h_advance_func (funcs, getGlyphAdvanceH, NULL, NULL);
- hb_font_funcs_set_glyph_v_advance_func (funcs, getGlyphAdvanceV, NULL, NULL);
- hb_font_funcs_set_glyph_h_origin_func (funcs, getGlyphOriginH, NULL, NULL);
- hb_font_funcs_set_glyph_v_origin_func (funcs, getGlyphOriginV, NULL, NULL);
- hb_font_funcs_set_glyph_h_kerning_func (funcs, getGlyphKerningH, NULL, NULL);
- hb_font_funcs_set_glyph_v_kerning_func (funcs, getGlyphKerningV, NULL, NULL);
- hb_font_funcs_set_glyph_extents_func (funcs, getGlyphExtents, NULL, NULL);
- hb_font_funcs_set_glyph_contour_point_func (funcs, getGlyphContourPoint, NULL, NULL);
+ hb_font_funcs_set_glyph_func (funcs, getFontGlyph, nullptr, nullptr);
+ hb_font_funcs_set_glyph_h_advance_func (funcs, getGlyphAdvanceH, nullptr, nullptr);
+ hb_font_funcs_set_glyph_v_advance_func (funcs, getGlyphAdvanceV, nullptr, nullptr);
+ hb_font_funcs_set_glyph_h_origin_func (funcs, getGlyphOriginH, nullptr, nullptr);
+ hb_font_funcs_set_glyph_v_origin_func (funcs, getGlyphOriginV, nullptr, nullptr);
+ hb_font_funcs_set_glyph_h_kerning_func (funcs, getGlyphKerningH, nullptr, nullptr);
+ hb_font_funcs_set_glyph_v_kerning_func (funcs, getGlyphKerningV, nullptr, nullptr);
+ hb_font_funcs_set_glyph_extents_func (funcs, getGlyphExtents, nullptr, nullptr);
+ hb_font_funcs_set_glyph_contour_point_func (funcs, getGlyphContourPoint, nullptr, nullptr);
return funcs;
}
@@ -301,7 +301,7 @@ static unsigned int unicodeDecomposeCompatibility(hb_unicode_funcs_t* /*ufuncs*/
static hb_unicode_funcs_t* getUnicodeFuncs()
{
static hb_unicode_funcs_t* ufuncs = hb_unicode_funcs_create(hb_icu_get_unicode_funcs());
- hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, unicodeDecomposeCompatibility, NULL, NULL);
+ hb_unicode_funcs_set_decompose_compatibility_func(ufuncs, unicodeDecomposeCompatibility, nullptr, nullptr);
return ufuncs;
}
@@ -321,13 +321,13 @@ public:
HbLayoutEngine::HbLayoutEngine(ServerFont& rServerFont)
: maHbScript(HB_SCRIPT_INVALID),
- mpHbFace(NULL),
+ mpHbFace(nullptr),
mnUnitsPerEM(0)
{
FT_Face aFtFace = rServerFont.GetFtFace();
mnUnitsPerEM = rServerFont.GetEmUnits();
- mpHbFace = hb_face_create_for_tables(getFontTable, &rServerFont, NULL);
+ mpHbFace = hb_face_create_for_tables(getFontTable, &rServerFont, nullptr);
hb_face_set_index(mpHbFace, aFtFace->face_index);
hb_face_set_upem(mpHbFace, mnUnitsPerEM);
}
@@ -396,7 +396,7 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
static hb_font_funcs_t* pHbFontFuncs = getFontFuncs();
hb_font_t *pHbFont = hb_font_create(mpHbFace);
- hb_font_set_funcs(pHbFont, pHbFontFuncs, &rFont, NULL);
+ hb_font_set_funcs(pHbFont, pHbFontFuncs, &rFont, nullptr);
hb_font_set_scale(pHbFont,
((uint64_t) aFtFace->size->metrics.x_scale * (uint64_t) mnUnitsPerEM) >> 16,
((uint64_t) aFtFace->size->metrics.y_scale * (uint64_t) mnUnitsPerEM) >> 16);
@@ -484,11 +484,11 @@ bool HbLayoutEngine::Layout(ServerFontLayout& rLayout, ImplLayoutArgs& rArgs)
hb_buffer_set_language(pHbBuffer, hb_language_from_string(sLanguage.getStr(), -1));
hb_buffer_set_flags(pHbBuffer, (hb_buffer_flags_t) nHbFlags);
hb_buffer_add_utf16(pHbBuffer, pStr, nLength, nMinRunPos, nRunLen);
- hb_shape(pHbFont, pHbBuffer, NULL, 0);
+ hb_shape(pHbFont, pHbBuffer, nullptr, 0);
int nRunGlyphCount = hb_buffer_get_length(pHbBuffer);
- hb_glyph_info_t *pHbGlyphInfos = hb_buffer_get_glyph_infos(pHbBuffer, NULL);
- hb_glyph_position_t *pHbPositions = hb_buffer_get_glyph_positions(pHbBuffer, NULL);
+ hb_glyph_info_t *pHbGlyphInfos = hb_buffer_get_glyph_infos(pHbBuffer, nullptr);
+ hb_glyph_position_t *pHbPositions = hb_buffer_get_glyph_positions(pHbBuffer, nullptr);
for (int i = 0; i < nRunGlyphCount; ++i) {
int32_t nGlyphIndex = pHbGlyphInfos[i].codepoint;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 6f9e6114327f..79c827966cc7 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -34,7 +34,7 @@
#include <osl/file.hxx>
#include <tools/debug.hxx>
-static GlyphCache* pInstance = NULL;
+static GlyphCache* pInstance = nullptr;
GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
: mrPeer( rPeer ),
@@ -42,8 +42,8 @@ GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
mnBytesUsed(sizeof(GlyphCache)),
mnLruIndex(0),
mnGlyphCount(0),
- mpCurrentGCFont(NULL),
- mpFtManager(NULL)
+ mpCurrentGCFont(nullptr),
+ mpFtManager(nullptr)
{
pInstance = this;
mpFtManager = new FreetypeManager;
@@ -67,7 +67,7 @@ void GlyphCache::InvalidateAllGlyphs()
}
maFontList.clear();
- mpCurrentGCFont = NULL;
+ mpCurrentGCFont = nullptr;
}
inline
@@ -170,12 +170,12 @@ void GlyphCache::ClearFontCache()
ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
{
// a serverfont request has pFontData
- if( rFontSelData.mpFontData == NULL )
- return NULL;
+ if( rFontSelData.mpFontData == nullptr )
+ return nullptr;
// a serverfont request has a fontid > 0
sal_IntPtr nFontId = rFontSelData.mpFontData->GetFontId();
if( nFontId <= 0 )
- return NULL;
+ return nullptr;
// the FontList's key mpFontData member is reinterpreted as font id
FontSelectPattern aFontSelData = rFontSelData;
@@ -190,7 +190,7 @@ ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
}
// font not cached yet => create new font item
- ServerFont* pNew = NULL;
+ ServerFont* pNew = nullptr;
if( mpFtManager )
pNew = mpFtManager->CreateFont( aFontSelData );
@@ -259,7 +259,7 @@ void GlyphCache::GarbageCollect()
// free all pServerFont related data
pServerFont->GarbageCollect( mnLruIndex+0x10000000 );
if( pServerFont == mpCurrentGCFont )
- mpCurrentGCFont = NULL;
+ mpCurrentGCFont = nullptr;
const FontSelectPattern& rIFSD = pServerFont->GetFontSelData();
maFontList.erase( rIFSD );
mrPeer.RemovingFont( *pServerFont );
@@ -271,7 +271,7 @@ void GlyphCache::GarbageCollect()
if( pServerFont->mpNextGCFont )
pServerFont->mpNextGCFont->mpPrevGCFont = pServerFont->mpPrevGCFont;
if( pServerFont == mpCurrentGCFont )
- mpCurrentGCFont = NULL;
+ mpCurrentGCFont = nullptr;
delete pServerFont;
}
@@ -310,8 +310,8 @@ void ServerFont::ReleaseFromGarbageCollect()
ServerFont* pNext = mpNextGCFont;
if( pPrev ) pPrev->mpNextGCFont = pNext;
if( pNext ) pNext->mpPrevGCFont = pPrev;
- mpPrevGCFont = NULL;
- mpNextGCFont = NULL;
+ mpPrevGCFont = nullptr;
+ mpNextGCFont = nullptr;
}
long ServerFont::Release() const
@@ -358,7 +358,7 @@ void ServerFont::GarbageCollect( long nMinLruIndex )
ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
: ImplFontEntry( rFSD )
-, mpServerFont( NULL )
+, mpServerFont( nullptr )
, mbGotFontOptions( false )
{}
diff --git a/vcl/generic/glyphs/graphite_serverfont.cxx b/vcl/generic/glyphs/graphite_serverfont.cxx
index d92195e2f194..763846971715 100644
--- a/vcl/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/generic/glyphs/graphite_serverfont.cxx
@@ -45,7 +45,7 @@ float freetypeServerFontAdvance(const void* appFontHandle, gr_uint16 glyphId)
GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) throw()
: ServerFontLayout(rServerFont),
maImpl(rServerFont.GetGraphiteFace()->face(), rServerFont)
- , mpFeatures(NULL)
+ , mpFeatures(nullptr)
{
gr_font * pFont = rServerFont.GetGraphiteFace()->font(rServerFont.GetFontSelData().mnHeight, rServerFont.NeedsArtificialBold(), rServerFont.NeedsArtificialItalic());
if (!pFont)
@@ -102,7 +102,7 @@ GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
GraphiteServerFontLayout::~GraphiteServerFontLayout() throw()
{
delete mpFeatures;
- mpFeatures = NULL;
+ mpFeatures = nullptr;
}
bool GraphiteServerFontLayout::IsGraphiteEnabledFont(ServerFont& rServerFont)
diff --git a/vcl/generic/print/bitmap_gfx.cxx b/vcl/generic/print/bitmap_gfx.cxx
index c2c66a2aca37..3baff518fa46 100644
--- a/vcl/generic/print/bitmap_gfx.cxx
+++ b/vcl/generic/print/bitmap_gfx.cxx
@@ -309,13 +309,13 @@ LZWEncoder::LZWEncoder(osl::File* pOutputFile) :
for (sal_uInt32 i = 0; i < 4096; i++)
{
- mpTable[i].mpBrother = NULL;
- mpTable[i].mpFirstChild = NULL;
+ mpTable[i].mpBrother = nullptr;
+ mpTable[i].mpFirstChild = nullptr;
mpTable[i].mnCode = i;
mpTable[i].mnValue = (sal_uInt8)mpTable[i].mnCode;
}
- mpPrefix = NULL;
+ mpPrefix = nullptr;
WriteBits( mnClearCode, mnCodeSize );
}
@@ -359,13 +359,13 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte )
else
{
nV = nByte;
- for (p = mpPrefix->mpFirstChild; p != NULL; p = p->mpBrother)
+ for (p = mpPrefix->mpFirstChild; p != nullptr; p = p->mpBrother)
{
if (p->mnValue == nV)
break;
}
- if (p != NULL)
+ if (p != nullptr)
{
mpPrefix = p;
}
@@ -378,7 +378,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte )
WriteBits (mnClearCode, mnCodeSize);
for (i = 0; i < mnClearCode; i++)
- mpTable[i].mpFirstChild = NULL;
+ mpTable[i].mpFirstChild = nullptr;
mnCodeSize = mnDataSize + 1;
mnTableSize = mnEOICode + 1;
@@ -392,7 +392,7 @@ LZWEncoder::EncodeByte (sal_uInt8 nByte )
p->mpBrother = mpPrefix->mpFirstChild;
mpPrefix->mpFirstChild = p;
p->mnValue = nV;
- p->mpFirstChild = NULL;
+ p->mpFirstChild = nullptr;
}
mpPrefix = mpTable + nV;
diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx
index 6ec58b6f883f..cc9724c16ace 100644
--- a/vcl/generic/print/common_gfx.cxx
+++ b/vcl/generic/print/common_gfx.cxx
@@ -72,8 +72,8 @@ PrinterGfx::Init (PrinterJob &rPrinterJob)
bool
PrinterGfx::Init (const JobData& rData)
{
- mpPageHeader = NULL;
- mpPageBody = NULL;
+ mpPageHeader = nullptr;
+ mpPageBody = nullptr;
mnDepth = rData.m_nColorDepth;
mnPSLevel = rData.m_nPSLevel ? rData.m_nPSLevel : (rData.m_pParser ? rData.m_pParser->getLanguageLevel() : 2 );
mbColor = rData.m_nColorDevice ? ( rData.m_nColorDevice != -1 ) : ( rData.m_pParser == nullptr || rData.m_pParser->isColorDevice() );
@@ -96,8 +96,8 @@ PrinterGfx::PrinterGfx()
, mnPSLevel(0)
, mbColor(false)
, mbUploadPS42Fonts(false)
- , mpPageHeader(NULL)
- , mpPageBody(NULL)
+ , mpPageHeader(nullptr)
+ , mpPageBody(nullptr)
, mnFontID(0)
, mnFallbackID(0)
, mnTextAngle(0)
@@ -122,8 +122,8 @@ PrinterGfx::~PrinterGfx()
void
PrinterGfx::Clear()
{
- mpPageHeader = NULL;
- mpPageBody = NULL;
+ mpPageHeader = nullptr;
+ mpPageBody = nullptr;
mnFontID = 0;
maVirtualStatus = GraphicsStatus();
maVirtualStatus.mnTextHeight = 12;
@@ -390,7 +390,7 @@ void
PrinterGfx::DrawPolygon (sal_uInt32 nPoints, const Point* pPath)
{
// premature end of operation
- if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is()))
+ if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
return;
// setup closed path
@@ -541,7 +541,7 @@ PrinterGfx::DrawPolygonBezier (sal_uInt32 nPoints, const Point* pPath, const sal
const sal_uInt32 nBezString = 1024;
sal_Char pString[nBezString];
// premature end of operation
- if (!(nPoints > 1) || (pPath == NULL) || !(maFillColor.Is() || maLineColor.Is()))
+ if (!(nPoints > 1) || (pPath == nullptr) || !(maFillColor.Is() || maLineColor.Is()))
return;
snprintf(pString, nBezString, "%li %li moveto\n", pPath[0].X(), pPath[0].Y());
@@ -603,7 +603,7 @@ PrinterGfx::DrawPolyPolygonBezier (sal_uInt32 nPoly, const sal_uInt32 * pPoints,
{
sal_uInt32 nPoints = pPoints[i];
// sanity check
- if( nPoints == 0 || pPtAry[i] == NULL )
+ if( nPoints == 0 || pPtAry[i] == nullptr )
continue;
snprintf(pString, nBezString, "%li %li moveto\n", pPtAry[i][0].X(), pPtAry[i][0].Y()); //Move to the starting point
@@ -1075,7 +1075,7 @@ PrinterGfx::PSShowText (const unsigned char* pStr, sal_Int16 nGlyphs, sal_Int16
psp::getValueOfDouble( pBuffer, (double)nLW / 30.0 );
}
// dispatch to the drawing method
- if (pDeltaArray == NULL)
+ if (pDeltaArray == nullptr)
{
PSHexString (pStr, nBytes);
diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx
index db35f31cea2d..672b2225ade0 100644
--- a/vcl/generic/print/genprnpsp.cxx
+++ b/vcl/generic/print/genprnpsp.cxx
@@ -185,8 +185,8 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
}
// copy input slot
- const PPDKey* pKey = NULL;
- const PPDValue* pValue = NULL;
+ const PPDKey* pKey = nullptr;
+ const PPDValue* pValue = nullptr;
pJobSetup->mnPaperBin = 0;
if( rData.m_pParser )
@@ -205,8 +205,8 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
}
// copy duplex
- pKey = NULL;
- pValue = NULL;
+ pKey = nullptr;
+ pValue = nullptr;
pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
if( rData.m_pParser )
@@ -236,7 +236,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
rtl_freeMemory( pJobSetup->mpDriverData );
int nBytes;
- void* pBuffer = NULL;
+ void* pBuffer = nullptr;
if( rData.getStreamBuffer( pBuffer, nBytes ) )
{
pJobSetup->mnDriverDataLen = nBytes;
@@ -245,7 +245,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
else
{
pJobSetup->mnDriverDataLen = 0;
- pJobSetup->mpDriverData = NULL;
+ pJobSetup->mpDriverData = nullptr;
}
}
@@ -279,7 +279,7 @@ static bool passFileToCommandLine( const OUString& rFilename, const OUString& rC
argv[ 0 ] = "/bin/sh";
argv[ 1 ] = "-c";
argv[ 2 ] = aCmdLine.getStr();
- argv[ 3 ] = 0;
+ argv[ 3 ] = nullptr;
bool bHavePipes = false;
int pid, fd[2];
@@ -445,7 +445,7 @@ void SalGenericInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
pInfo->maDriver = rInfo.m_aDriverName;
pInfo->maLocation = rInfo.m_aLocation;
pInfo->maComment = rInfo.m_aComment;
- pInfo->mpSysData = NULL;
+ pInfo->mpSysData = nullptr;
sal_Int32 nIndex = 0;
while( nIndex != -1 )
@@ -480,7 +480,7 @@ OUString SalGenericInstance::GetDefaultPrinter()
}
PspSalInfoPrinter::PspSalInfoPrinter()
- : m_pGraphics( NULL )
+ : m_pGraphics( nullptr )
{
}
@@ -489,7 +489,7 @@ PspSalInfoPrinter::~PspSalInfoPrinter()
if( m_pGraphics )
{
delete m_pGraphics;
- m_pGraphics = NULL;
+ m_pGraphics = nullptr;
}
}
@@ -527,7 +527,7 @@ SalGraphics* PspSalInfoPrinter::AcquireGraphics()
// the reasoning behind this is that we could have different
// SalGraphics that can run in multiple threads
// (future plans)
- SalGraphics* pRet = NULL;
+ SalGraphics* pRet = nullptr;
if( ! m_pGraphics )
{
m_pGraphics = GetGenericInstance()->CreatePrintGraphics();
@@ -542,7 +542,7 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics )
if( pGraphics == m_pGraphics )
{
delete pGraphics;
- m_pGraphics = NULL;
+ m_pGraphics = nullptr;
}
return;
}
@@ -566,10 +566,10 @@ bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup )
{
aInfo.resolveDefaultBackend();
rtl_freeMemory( pJobSetup->mpDriverData );
- pJobSetup->mpDriverData = NULL;
+ pJobSetup->mpDriverData = nullptr;
int nBytes;
- void* pBuffer = NULL;
+ void* pBuffer = nullptr;
aInfo.getStreamBuffer( pBuffer, nBytes );
pJobSetup->mnDriverDataLen = nBytes;
pJobSetup->mpDriverData = static_cast<sal_uInt8*>(pBuffer);
@@ -626,7 +626,7 @@ bool PspSalInfoPrinter::SetData(
aPaper = OStringToOUString(PaperInfo::toPSName(pJobSetup->mePaperFormat), RTL_TEXTENCODING_ISO_8859_1);
pKey = aData.m_pParser->getKey( OUString("PageSize") );
- pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
+ pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
// some PPD files do not specify the standard paper names (e.g. C5 instead of EnvC5)
// try to find the correct paper anyway using the size
@@ -673,12 +673,12 @@ bool PspSalInfoPrinter::SetData(
pKey = aData.m_pParser->getKey( OUString("Duplex") );
if( pKey )
{
- pValue = NULL;
+ pValue = nullptr;
switch( pJobSetup->meDuplexMode )
{
case DUPLEX_OFF:
pValue = pKey->getValue( OUString("None") );
- if( pValue == NULL )
+ if( pValue == nullptr )
pValue = pKey->getValue( OUString("SimplexNoTumble") );
break;
case DUPLEX_SHORTEDGE:
@@ -689,7 +689,7 @@ bool PspSalInfoPrinter::SetData(
break;
case DUPLEX_UNKNOWN:
default:
- pValue = 0;
+ pValue = nullptr;
break;
}
if( ! pValue )
@@ -755,7 +755,7 @@ sal_uLong PspSalInfoPrinter::GetPaperBinCount( const ImplJobSetup* pJobSetup )
JobData aData;
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): nullptr;
return pKey ? pKey->countValues() : 0;
}
@@ -767,7 +767,7 @@ OUString PspSalInfoPrinter::GetPaperBinName( const ImplJobSetup* pJobSetup, sal_
OUString aRet;
if( aData.m_pParser )
{
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey( OUString("InputSlot") ): nullptr;
if( ! pKey || nPaperBin >= (sal_uLong)pKey->countValues() )
aRet = aData.m_pParser->getDefaultInputSlot();
else
@@ -812,8 +812,8 @@ sal_uLong PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, Pri
JobData aData = PrinterInfoManager::get().getPrinterInfo(pJobSetup->maPrinterName);
if( pJobSetup->mpDriverData )
JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, aData );
- const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey(OUString("Dial")) : NULL;
- const PPDValue* pValue = pKey ? aData.m_aContext.getValue(pKey) : NULL;
+ const PPDKey* pKey = aData.m_pParser ? aData.m_pParser->getKey(OUString("Dial")) : nullptr;
+ const PPDValue* pValue = pKey ? aData.m_aContext.getValue(pKey) : nullptr;
if (pValue && !pValue->m_aOption.equalsIgnoreAsciiCase("Manually"))
return 1;
return 0;
@@ -851,7 +851,7 @@ sal_uLong PspSalInfoPrinter::GetCapabilities( const ImplJobSetup* pJobSetup, Pri
PspSalPrinter::PspSalPrinter( SalInfoPrinter* pInfoPrinter )
: m_bPdf( false ),
m_bIsPDFWriterJob( false ),
- m_pGraphics( NULL ),
+ m_pGraphics( nullptr ),
m_nCopies( 1 ),
m_bCollate( false ),
m_pInfoPrinter( pInfoPrinter )
@@ -865,7 +865,7 @@ PspSalPrinter::~PspSalPrinter()
static OUString getTmpName()
{
OUString aTmp, aSys;
- osl_createTempFile( NULL, NULL, &aTmp.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmp.pData );
osl_getSystemPathFromFileURL( aTmp.pData, &aSys.pData );
return aSys;
@@ -1122,7 +1122,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
if( i_pFileName )
aPDFUrl = *i_pFileName;
else
- osl_createTempFile( NULL, NULL, &aPDFUrl.pData );
+ osl_createTempFile( nullptr, nullptr, &aPDFUrl.pData );
// normalize to file URL
if( !comphelper::isFileUrl(aPDFUrl) )
{
@@ -1210,7 +1210,7 @@ bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJo
{
for( size_t i = 0; i < aPDFFiles.size(); i++ )
{
- oslFileHandle pFile = NULL;
+ oslFileHandle pFile = nullptr;
osl_openFile( aPDFFiles[i].maTmpURL.pData, &pFile, osl_File_OpenFlag_Read );
if (pFile && (osl_setFilePos(pFile, osl_Pos_Absolut, 0) == osl_File_E_None))
{
@@ -1288,7 +1288,7 @@ public:
static void jobEnded();
};
-Idle* PrinterUpdate::pPrinterUpdateIdle = NULL;
+Idle* PrinterUpdate::pPrinterUpdateIdle = nullptr;
int PrinterUpdate::nActiveJobs = 0;
void PrinterUpdate::doUpdate()
@@ -1305,7 +1305,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( PrinterUpdate, UpdateTimerHdl, Idle*, void )
{
doUpdate();
delete pPrinterUpdateIdle;
- pPrinterUpdateIdle = NULL;
+ pPrinterUpdateIdle = nullptr;
}
else
pPrinterUpdateIdle->Start();
@@ -1329,7 +1329,7 @@ void PrinterUpdate::update(SalGenericInstance &rInstance)
{
pPrinterUpdateIdle = new Idle();
pPrinterUpdateIdle->SetPriority( SchedulerPriority::LOWEST );
- pPrinterUpdateIdle->SetIdleHdl( LINK( NULL, PrinterUpdate, UpdateTimerHdl ) );
+ pPrinterUpdateIdle->SetIdleHdl( LINK( nullptr, PrinterUpdate, UpdateTimerHdl ) );
pPrinterUpdateIdle->Start();
}
}
@@ -1353,7 +1353,7 @@ void PrinterUpdate::jobEnded()
{
pPrinterUpdateIdle->Stop();
delete pPrinterUpdateIdle;
- pPrinterUpdateIdle = NULL;
+ pPrinterUpdateIdle = nullptr;
doUpdate();
}
}
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 1ff761ccba50..029653f52eb5 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -145,7 +145,7 @@ SalPrinterBmp::SalPrinterBmp (BitmapBuffer* pBuffer)
default:
OSL_FAIL("Error: SalPrinterBmp::SalPrinterBmp() unknown bitmap format");
- mpFncGetPixel = NULL;
+ mpFncGetPixel = nullptr;
break;
}
}
@@ -254,13 +254,13 @@ SalPrinterBmp::GetPixelIdx (sal_uInt32 nRow, sal_uInt32 nColumn) const
*******************************************************/
GenPspGraphics::GenPspGraphics()
- : m_pJobData( NULL ),
- m_pPrinterGfx( NULL ),
+ : m_pJobData( nullptr ),
+ m_pPrinterGfx( nullptr ),
m_bFontVertical( false ),
- m_pInfoPrinter( NULL )
+ m_pInfoPrinter( nullptr )
{
for( int i = 0; i < MAX_FALLBACK; i++ )
- m_pServerFont[i] = NULL;
+ m_pServerFont[i] = nullptr;
}
void GenPspGraphics::Init(psp::JobData* pJob, psp::PrinterGfx* pGfx,
@@ -279,7 +279,7 @@ GenPspGraphics::~GenPspGraphics()
void GenPspGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY )
{
- if (m_pJobData != NULL)
+ if (m_pJobData != nullptr)
{
int x = m_pJobData->m_aContext.getRenderResolution();
@@ -525,7 +525,7 @@ void GenPspGraphics::drawMask( const SalTwoRect&,
SalBitmap* GenPspGraphics::getBitmap( long, long, long, long )
{
SAL_INFO("vcl", "Warning: PrinterGfx::GetBitmap() not implemented");
- return NULL;
+ return nullptr;
}
SalColor GenPspGraphics::getPixel( long, long )
@@ -703,7 +703,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
Point aPos;
long nUnitsPerPixel = rLayout.GetUnitsPerPixel();
- const sal_Unicode* pText = NULL;
+ const sal_Unicode* pText = nullptr;
int nMinCharPos = 0;
int nMaxCharPos = 0;
if (bIsPspServerFontLayout)
@@ -726,7 +726,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
}
for( int nStart = 0;; )
{
- int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : NULL );
+ int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : nullptr );
if( !nGlyphCount )
break;
@@ -767,7 +767,7 @@ void GenPspGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout )
const FontCharMapPtr GenPspGraphics::GetFontCharMap() const
{
if( !m_pServerFont[0] )
- return NULL;
+ return nullptr;
const FontCharMapPtr pFCMap = m_pServerFont[0]->GetFontCharMap();
return pFCMap;
@@ -785,11 +785,11 @@ sal_uInt16 GenPspGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLeve
// release all fonts that are to be overridden
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
{
- if( m_pServerFont[i] != NULL )
+ if( m_pServerFont[i] != nullptr )
{
// old server side font is no longer referenced
GlyphCache::GetInstance().UncacheFont( *m_pServerFont[i] );
- m_pServerFont[i] = NULL;
+ m_pServerFont[i] = nullptr;
}
}
@@ -821,7 +821,7 @@ sal_uInt16 GenPspGraphics::SetFont( FontSelectPattern *pEntry, int nFallbackLeve
{
// requesting a font provided by builtin rasterizer
ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry );
- if( pServerFont != NULL )
+ if( pServerFont != nullptr )
{
if( pServerFont->TestFont() )
m_pServerFont[ nFallbackLevel ] = pServerFont;
@@ -983,7 +983,7 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
else if( nFallbackLevel > 0 )
rArgs.mnFlags &= ~SalLayoutFlags::DisableGlyphProcessing;
- GenericSalLayout* pLayout = NULL;
+ GenericSalLayout* pLayout = nullptr;
if( m_pServerFont[ nFallbackLevel ]
&& !(rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing) )
@@ -1065,8 +1065,8 @@ const Ucs2SIntMap* GenPspGraphics::DoGetFontEncodingVector( fontID aFont, const
if( ! rMgr.getFontInfo( aFont, aFontInfo ) )
{
if( pNonEncoded )
- *pNonEncoded = NULL;
- return NULL;
+ *pNonEncoded = nullptr;
+ return nullptr;
}
return rMgr.getEncodingMap( aFont, pNonEncoded, ppPriority );
@@ -1151,7 +1151,7 @@ namespace vcl
else if (MsLangId::isTraditionalChinese(eLang))
pLangBoost = "zht";
else
- pLangBoost = NULL;
+ pLangBoost = nullptr;
return pLangBoost;
}
}
@@ -1170,7 +1170,7 @@ void GenPspGraphics::AnnounceFonts( PhysicalFontCollection* pFontCollection, con
nQuality += 5;
else
{
- static const char* pLangBoost = NULL;
+ static const char* pLangBoost = nullptr;
static bool bOnce = true;
if( bOnce )
{
@@ -1285,7 +1285,7 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs
psp::PrintFontInfo aFontInfo;
if( ! rMgr.getFontInfo( aFont, aFontInfo ) )
- return NULL;
+ return nullptr;
// fill in font info
rInfo.m_nAscent = aFontInfo.m_nAscend;
@@ -1304,24 +1304,24 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs
pUnicodes = aUnicodes;
}
if (!rMgr.getMetrics(aFont, pUnicodes, nLen, aMetrics.data()))
- return NULL;
+ return nullptr;
OString aSysPath = rMgr.getFontFileSysPath( aFont );
#if defined( UNX )
int fd = open( aSysPath.getStr(), O_RDONLY );
if( fd < 0 )
- return NULL;
+ return nullptr;
struct stat aStat;
if( fstat( fd, &aStat ) )
{
close( fd );
- return NULL;
+ return nullptr;
}
- void* pFile = mmap( NULL, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 );
+ void* pFile = mmap( nullptr, aStat.st_size, PROT_READ, MAP_SHARED, fd, 0 );
close( fd );
if( pFile == MAP_FAILED )
- return NULL;
+ return nullptr;
*pDataLen = aStat.st_size;
#else
// FIXME: test me ! ...
@@ -1361,7 +1361,7 @@ const void* GenPspGraphics::DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs
break;
default:
DoFreeEmbedFontData( pFile, *pDataLen );
- return NULL;
+ return nullptr;
}
return pFile;
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index da7d0a313994..2d6f221b4bb8 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -514,7 +514,7 @@ void GlyphSet::DrawGlyphs(
rGfx.PSSetFont (aGlyphSetName, GetGlyphSetEncoding(*aSet));
rGfx.PSMoveTo (aPoint);
- rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : NULL);
+ rGfx.PSShowText (pGlyphSubset, nGlyphs, nGlyphs, nGlyphs > 1 ? pDeltaSubset : nullptr);
}
}
@@ -523,7 +523,7 @@ GlyphSet::DrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen, const sal_Int32* pDeltaArray)
{
// dispatch to the impl method
- if (pDeltaArray == NULL)
+ if (pDeltaArray == nullptr)
ImplDrawText (rGfx, rPoint, pStr, nLen);
else
ImplDrawText (rGfx, rPoint, pStr, nLen, pDeltaArray);
@@ -589,7 +589,7 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint,
return;
}
- DrawGlyphs( rGfx, rPoint, NULL, pStr, nLen, pDeltaArray, false);
+ DrawGlyphs( rGfx, rPoint, nullptr, pStr, nLen, pDeltaArray, false);
}
bool
@@ -745,7 +745,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42
utl::TempFile aTmpFile;
aTmpFile.EnableKillingFile();
FILE* pTmpFile = fopen(OUStringToOString(aTmpFile.GetFileName(), osl_getThreadTextEncoding()).getStr(), "w+b");
- if (pTmpFile == NULL)
+ if (pTmpFile == nullptr)
return false;
// array of unicode source characters
diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx
index 1d8a4612fb4f..4f68e502fb84 100644
--- a/vcl/generic/print/glyphset.hxx
+++ b/vcl/generic/print/glyphset.hxx
@@ -106,7 +106,7 @@ public:
void DrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
- const sal_Int32* pDeltaArray = NULL);
+ const sal_Int32* pDeltaArray = nullptr);
void DrawGlyphs (PrinterGfx& rGfx,
const Point& rPoint,
const sal_GlyphId* pGlyphIds,
diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx
index 315347c30632..b446c1b5cab7 100644
--- a/vcl/generic/print/printerjob.cxx
+++ b/vcl/generic/print/printerjob.cxx
@@ -55,7 +55,7 @@ bool
AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer,
sal_uInt32 nBlockSize = nBLOCKSIZE)
{
- if ((pDst == NULL) || (pSrc == NULL))
+ if ((pDst == nullptr) || (pSrc == nullptr))
return false;
if (pSrc->setPos(osl_Pos_Absolut, 0) != osl::FileBase::E_None)
@@ -63,7 +63,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer,
if (nBlockSize == 0)
nBlockSize = nBLOCKSIZE;
- if (pBuffer == NULL)
+ if (pBuffer == nullptr)
pBuffer = static_cast<unsigned char*>(alloca (nBlockSize));
sal_uInt64 nIn = 0;
@@ -88,13 +88,13 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer,
osl::File*
PrinterJob::CreateSpoolFile (const OUString& rName, const OUString& rExtension)
{
- osl::File* pFile = NULL;
+ osl::File* pFile = nullptr;
OUString aFile = rName + rExtension;
OUString aFileURL;
osl::File::RC nError = osl::File::getFileURLFromSystemPath( aFile, aFileURL );
if (nError != osl::File::E_None)
- return NULL;
+ return nullptr;
aFileURL = maSpoolDirName + "/" + aFileURL;
pFile = new osl::File (aFileURL);
@@ -102,7 +102,7 @@ PrinterJob::CreateSpoolFile (const OUString& rName, const OUString& rExtension)
if (nError != osl::File::E_None)
{
delete pFile;
- return NULL;
+ return nullptr;
}
osl::File::setAttributes (aFileURL,
@@ -135,7 +135,7 @@ PrinterJob::GetPostscriptLevel (const JobData *pJobData) const
{
sal_uInt16 nPSLevel = 2;
- if( pJobData == NULL )
+ if( pJobData == nullptr )
pJobData = &m_aLastJobData;
if( pJobData->m_nPSLevel )
@@ -177,9 +177,9 @@ PrinterJob::GetCurrentPageBody ()
*/
PrinterJob::PrinterJob()
: mnFileMode(0)
- , mpJobHeader(NULL)
- , mpJobTrailer(NULL)
- , m_pGraphics(NULL)
+ , mpJobHeader(nullptr)
+ , mpJobTrailer(nullptr)
+ , m_pGraphics(nullptr)
, mnResolution(96)
, mnWidthPt(0)
, mnHeightPt(0)
@@ -407,8 +407,8 @@ PrinterJob::StartJob (
writeProlog (mpJobHeader, rSetupData);
// mark last job setup as not set
- m_aLastJobData.m_pParser = NULL;
- m_aLastJobData.m_aContext.setParser( NULL );
+ m_aLastJobData.m_pParser = nullptr;
+ m_aLastJobData.m_aContext.setParser( nullptr );
return true;
}
@@ -448,7 +448,7 @@ PrinterJob::EndJob()
* spool the set of files to their final destination, this is U**X dependent
*/
- FILE* pDestFILE = NULL;
+ FILE* pDestFILE = nullptr;
/* create a destination either as file or as a pipe */
bool bSpoolToFile = !maFileName.isEmpty();
@@ -462,7 +462,7 @@ PrinterJob::EndJob()
if( nFile != -1 )
{
pDestFILE = fdopen( nFile, "w" );
- if( pDestFILE == NULL )
+ if( pDestFILE == nullptr )
{
close( nFile );
unlink( aFileName.getStr() );
@@ -474,17 +474,17 @@ PrinterJob::EndJob()
(void)chmod( aFileName.getStr(), mnFileMode );
}
}
- if (pDestFILE == NULL)
+ if (pDestFILE == nullptr)
pDestFILE = fopen (aFileName.getStr(), "w");
- if (pDestFILE == NULL)
+ if (pDestFILE == nullptr)
return false;
}
else
{
PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get ();
pDestFILE = rPrinterInfoManager.startSpool( m_aLastJobData.m_aPrinterName, m_bQuickJob );
- if (pDestFILE == NULL)
+ if (pDestFILE == nullptr)
return false;
}
@@ -557,7 +557,7 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup)
int nLeft = 0, nRight = 0, nUpper = 0, nLower = 0;
const PPDParser* pParser = rJobSetup.m_aContext.getParser();
- if (pParser != NULL)
+ if (pParser != nullptr)
pParser->getMargins (aPaper, nLeft, nRight, nUpper, nLower);
mnResolution = nRes;
@@ -719,7 +719,7 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
// sanity check
if( rJob.m_pParser == rJob.m_aContext.getParser() &&
rJob.m_pParser &&
- ( m_aLastJobData.m_pParser == rJob.m_pParser || m_aLastJobData.m_pParser == NULL )
+ ( m_aLastJobData.m_pParser == rJob.m_pParser || m_aLastJobData.m_pParser == nullptr )
)
{
int i;
@@ -746,7 +746,7 @@ bool PrinterJob::writeFeatureList( osl::File* pFile, const JobData& rJob, bool b
const PPDValue* pValue = rJob.m_aContext.getValue( pKey );
if( pValue
&& pValue->m_eType == eInvocation
- && ( m_aLastJobData.m_pParser == NULL
+ && ( m_aLastJobData.m_pParser == nullptr
|| m_aLastJobData.m_aContext.getValue( pKey ) != pValue
|| bDocumentSetup
)
@@ -824,7 +824,7 @@ void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData )
if( ! PrinterInfoManager::get().getUseJobPatch() )
return;
- const PPDKey* pKey = NULL;
+ const PPDKey* pKey = nullptr;
if( rJobData.m_pParser )
pKey = rJobData.m_pParser->getKey( OUString( "JobPatchFile" ) );
diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx
index 3f8d0dae4518..a89ded554bc9 100644
--- a/vcl/generic/print/prtsetup.cxx
+++ b/vcl/generic/print/prtsetup.cxx
@@ -32,7 +32,7 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
if( ! pKey || ! pParser )
return;
- const PPDValue* pValue = NULL;
+ const PPDValue* pValue = nullptr;
sal_Int32 nPos = 0;
OUString aOptionText;
@@ -74,8 +74,8 @@ void RTSDialog::insertAllPPDValues( ListBox& rBox, const PPDParser* pParser, con
RTSDialog::RTSDialog(const PrinterInfo& rJobData, vcl::Window* pParent)
: TabDialog(pParent, "PrinterPropertiesDialog", "vcl/ui/printerpropertiesdialog.ui")
, m_aJobData(rJobData)
- , m_pPaperPage(NULL)
- , m_pDevicePage(NULL)
+ , m_pPaperPage(nullptr)
+ , m_pDevicePage(nullptr)
, m_aInvalidString(VclResId(SV_PRINT_INVALID_TXT))
, mbDataModified(false)
{
@@ -116,7 +116,7 @@ IMPL_LINK_TYPED( RTSDialog, ActivatePage, TabControl*, pTabCtrl, void )
OString sPage = m_pTabControl->GetPageName(nId);
if ( ! m_pTabControl->GetTabPage( nId ) )
{
- TabPage *pPage = NULL;
+ TabPage *pPage = nullptr;
if (sPage == "paper")
pPage = m_pPaperPage = VclPtr<RTSPaperPage>::Create( this );
else if (sPage == "device")
@@ -180,13 +180,13 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
// duplex
nPos = m_pDuplexBox->InsertEntry( m_pParent->m_aInvalidString );
- m_pDuplexBox->SetEntryData( nPos, NULL );
+ m_pDuplexBox->SetEntryData( nPos, nullptr );
// paper does not have an invalid entry
// input slots
nPos = m_pSlotBox->InsertEntry( m_pParent->m_aInvalidString );
- m_pSlotBox->SetEntryData( nPos, NULL );
+ m_pSlotBox->SetEntryData( nPos, nullptr );
update();
}
@@ -211,7 +211,7 @@ void RTSPaperPage::dispose()
void RTSPaperPage::update()
{
- const PPDKey* pKey = NULL;
+ const PPDKey* pKey = nullptr;
// orientation
m_pOrientBox->SelectEntryPos(
@@ -264,7 +264,7 @@ void RTSPaperPage::update()
IMPL_LINK_TYPED( RTSPaperPage, SelectHdl, ListBox&, rBox, void )
{
- const PPDKey* pKey = NULL;
+ const PPDKey* pKey = nullptr;
if( &rBox == m_pPaperBox )
{
if( m_pParent->m_aJobData.m_pParser )
@@ -301,7 +301,7 @@ IMPL_LINK_TYPED( RTSPaperPage, SelectHdl, ListBox&, rBox, void )
RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
: TabPage(pParent->m_pTabControl, "PrinterDevicePage", "vcl/ui/printerdevicepage.ui")
, m_pParent(pParent)
- , m_pCustomValue(NULL)
+ , m_pCustomValue(nullptr)
{
get(m_pPPDKeyBox, "options");
get(m_pPPDValueBox, "values");
@@ -484,7 +484,7 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
if( ! pKey )
return;
- const PPDValue* pValue = NULL;
+ const PPDValue* pValue = nullptr;
for( int i = 0; i < pKey->countValues(); i++ )
{
pValue = pKey->getValue( i );
diff --git a/vcl/generic/print/prtsetup.hxx b/vcl/generic/print/prtsetup.hxx
index 33499423bc72..1d39f31420bb 100644
--- a/vcl/generic/print/prtsetup.hxx
+++ b/vcl/generic/print/prtsetup.hxx
@@ -64,7 +64,7 @@ class RTSDialog : public TabDialog
// helper functions
void insertAllPPDValues( ListBox&, const psp::PPDParser*, const psp::PPDKey* );
public:
- RTSDialog(const ::psp::PrinterInfo& rJobData, vcl::Window* pParent = NULL);
+ RTSDialog(const ::psp::PrinterInfo& rJobData, vcl::Window* pParent = nullptr);
virtual ~RTSDialog();
virtual void dispose() override;
diff --git a/vcl/generic/print/psputil.cxx b/vcl/generic/print/psputil.cxx
index ecea28f1b886..7c363b9898ee 100644
--- a/vcl/generic/print/psputil.cxx
+++ b/vcl/generic/print/psputil.cxx
@@ -205,7 +205,7 @@ ConverterFactory::Get (rtl_TextEncoding nEncoding)
aConverter = it->second;
return aConverter;
}
- return NULL;
+ return nullptr;
}
// wrapper for rtl_convertUnicodeToText that handles the usual cases for
diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx
index 30ae40d2753f..7531f3f950e3 100644
--- a/vcl/generic/print/text_gfx.cxx
+++ b/vcl/generic/print/text_gfx.cxx
@@ -336,7 +336,7 @@ PrinterGfx::DrawText (
// setup a new delta array, use virtual resolution of 1000
sal_Int32* pNewDeltaArray = static_cast<sal_Int32*>(alloca( sizeof( sal_Int32 )*nLen ));
- if ( pDeltaArray != 0)
+ if ( pDeltaArray != nullptr)
{
for (int i = 0; i < nLen - 1; i++)
pNewDeltaArray[i] = 1000 * pDeltaArray[i];
@@ -405,7 +405,7 @@ PrinterGfx::DrawText (
drawText(
Point(nCurrentPointX + nDelta, nCurrentPointY),
pEffectiveStr + nFrom, nTo - nFrom,
- pDeltaArray == NULL ? NULL : pNewDeltaArray + nFrom );
+ pDeltaArray == nullptr ? nullptr : pNewDeltaArray + nFrom );
}
nDelta += pNewDeltaArray[ nTo - 1 ];
}
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index d0fdf923c0ab..de06cd00ea00 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -136,7 +136,7 @@ sal_uInt16 SvpSalBitmap::GetBitCount() const
BitmapBuffer* SvpSalBitmap::AcquireBuffer( BitmapAccessMode )
{
- BitmapBuffer* pBuf = NULL;
+ BitmapBuffer* pBuf = nullptr;
if( m_aBitmap.get() )
{
pBuf = new BitmapBuffer();
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index f3f2ccef41f8..b881d2ca1e67 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -32,7 +32,7 @@
using namespace basebmp;
using namespace basegfx;
-SvpSalFrame* SvpSalFrame::s_pFocusFrame = NULL;
+SvpSalFrame* SvpSalFrame::s_pFocusFrame = nullptr;
#ifdef IOS
#define SvpSalGraphics AquaSalGraphics
@@ -125,19 +125,19 @@ SvpSalFrame::~SvpSalFrame()
if( s_pFocusFrame == this )
{
// SAL_DEBUG("SvpSalFrame::~SvpSalFrame: losing focus: " << this);
- s_pFocusFrame = NULL;
+ s_pFocusFrame = nullptr;
// call directly here, else an event for a destroyed frame would be dispatched
- CallCallback( SALEVENT_LOSEFOCUS, NULL );
+ CallCallback( SALEVENT_LOSEFOCUS, nullptr );
// if the handler has not set a new focus frame
// pass focus to another frame, preferably a document style window
- if( s_pFocusFrame == NULL )
+ if( s_pFocusFrame == nullptr )
{
const std::list< SalFrame* >& rFrames( m_pInstance->getFrames() );
for( std::list< SalFrame* >::const_iterator it = rFrames.begin(); it != rFrames.end(); ++it )
{
SvpSalFrame* pFrame = const_cast<SvpSalFrame*>(static_cast<const SvpSalFrame*>(*it));
if( pFrame->m_bVisible &&
- pFrame->m_pParent == NULL &&
+ pFrame->m_pParent == nullptr &&
(pFrame->m_nStyle & (SalFrameStyleFlags::MOVEABLE |
SalFrameStyleFlags::SIZEABLE |
SalFrameStyleFlags::CLOSEABLE) )
@@ -162,7 +162,7 @@ void SvpSalFrame::GetFocus()
s_pFocusFrame->LoseFocus();
// SAL_DEBUG("SvpSalFrame::GetFocus(): " << this);
s_pFocusFrame = this;
- m_pInstance->PostEvent( this, NULL, SALEVENT_GETFOCUS );
+ m_pInstance->PostEvent( this, nullptr, SALEVENT_GETFOCUS );
}
}
@@ -171,8 +171,8 @@ void SvpSalFrame::LoseFocus()
if( s_pFocusFrame == this )
{
// SAL_DEBUG("SvpSalFrame::LoseFocus: " << this);
- m_pInstance->PostEvent( this, NULL, SALEVENT_LOSEFOCUS );
- s_pFocusFrame = NULL;
+ m_pInstance->PostEvent( this, nullptr, SALEVENT_LOSEFOCUS );
+ s_pFocusFrame = nullptr;
}
}
@@ -235,7 +235,7 @@ void SvpSalFrame::Show( bool bVisible, bool bNoActivate )
{
// SAL_DEBUG("SvpSalFrame::Show: showing: " << this);
m_bVisible = true;
- m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
+ m_pInstance->PostEvent( this, nullptr, SALEVENT_RESIZE );
if( ! bNoActivate )
GetFocus();
}
@@ -243,7 +243,7 @@ void SvpSalFrame::Show( bool bVisible, bool bNoActivate )
{
// SAL_DEBUG("SvpSalFrame::Show: hiding: " << this);
m_bVisible = false;
- m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
+ m_pInstance->PostEvent( this, nullptr, SALEVENT_RESIZE );
LoseFocus();
}
else
@@ -307,7 +307,7 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
}
}
if( m_bVisible )
- m_pInstance->PostEvent( this, NULL, SALEVENT_RESIZE );
+ m_pInstance->PostEvent( this, nullptr, SALEVENT_RESIZE );
#endif
}
@@ -339,7 +339,7 @@ SalFrame* SvpSalFrame::GetParent() const
void SvpSalFrame::SetWindowState( const SalFrameState *pState )
{
- if (pState == NULL)
+ if (pState == nullptr)
return;
// Request for position or size change
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 3131410aac6e..fc7d5fa70e0a 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -822,7 +822,7 @@ bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr &rBuffer)
{
if (!isCairoCompatible(rBuffer))
- return NULL;
+ return nullptr;
basegfx::B2IVector size = rBuffer->getSize();
sal_Int32 nStride = rBuffer->getScanlineStride();
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 1c47be33c295..0d3aa65d3805 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -60,7 +60,7 @@ bool SvpSalInstance::isFrameAlive( const SalFrame* pFrame ) const
return false;
}
-SvpSalInstance* SvpSalInstance::s_pDefaultInstance = NULL;
+SvpSalInstance* SvpSalInstance::s_pDefaultInstance = nullptr;
SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) :
SalGenericInstance( pMutex )
@@ -100,14 +100,14 @@ SvpSalInstance::SvpSalInstance( SalYieldMutex *pMutex ) :
}
}
m_aEventGuard = osl_createMutex();
- if( s_pDefaultInstance == NULL )
+ if( s_pDefaultInstance == nullptr )
s_pDefaultInstance = this;
}
SvpSalInstance::~SvpSalInstance()
{
if( s_pDefaultInstance == this )
- s_pDefaultInstance = NULL;
+ s_pDefaultInstance = nullptr;
// close 'wakeup' pipe.
close (m_pTimeoutFDS[0]);
@@ -173,7 +173,7 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
if( m_aTimeout.tv_sec ) // timer is started
{
timeval aTimeOfDay;
- gettimeofday( &aTimeOfDay, 0 );
+ gettimeofday( &aTimeOfDay, nullptr );
if( aTimeOfDay >= m_aTimeout )
{
bRet = true;
@@ -200,7 +200,7 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
SalFrame* SvpSalInstance::CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle )
{
- return new SvpSalFrame( this, NULL, nStyle, false, SVP_DEFAULT_BITMAP_FORMAT, pParent );
+ return new SvpSalFrame( this, nullptr, nStyle, false, SVP_DEFAULT_BITMAP_FORMAT, pParent );
}
SalFrame* SvpSalInstance::CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
@@ -317,7 +317,7 @@ void SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents, sal_uLong
{
timeval Timeout;
// determine remaining timeout.
- gettimeofday (&Timeout, 0);
+ gettimeofday (&Timeout, nullptr);
nTimeoutMS = (m_aTimeout.tv_sec - Timeout.tv_sec) * 1000
+ m_aTimeout.tv_usec/1000 - Timeout.tv_usec/1000;
if( nTimeoutMS < 0 )
@@ -364,7 +364,7 @@ bool SvpSalInstance::AnyInput( VclInputFlags nType )
SalSession* SvpSalInstance::CreateSalSession()
{
- return NULL;
+ return nullptr;
}
void* SvpSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
@@ -384,7 +384,7 @@ void SvpSalInstance::StopTimer()
void SvpSalInstance::StartTimer( sal_uLong nMS )
{
timeval aPrevTimeout (m_aTimeout);
- gettimeofday (&m_aTimeout, 0);
+ gettimeofday (&m_aTimeout, nullptr);
m_nTimeoutMS = nMS;
m_aTimeout += m_nTimeoutMS;
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index cc7034930bd0..fd5047ed135e 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -89,8 +89,8 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
}
// copy input slot
- const PPDKey* pKey = NULL;
- const PPDValue* pValue = NULL;
+ const PPDKey* pKey = nullptr;
+ const PPDValue* pValue = nullptr;
pJobSetup->mnPaperBin = 0xffff;
if( rData.m_pParser )
@@ -109,8 +109,8 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
}
// copy duplex
- pKey = NULL;
- pValue = NULL;
+ pKey = nullptr;
+ pValue = nullptr;
pJobSetup->meDuplexMode = DUPLEX_UNKNOWN;
if( rData.m_pParser )
@@ -140,7 +140,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
rtl_freeMemory( pJobSetup->mpDriverData );
int nBytes;
- void* pBuffer = NULL;
+ void* pBuffer = nullptr;
if( rData.getStreamBuffer( pBuffer, nBytes ) )
{
pJobSetup->mnDriverDataLen = nBytes;
@@ -149,7 +149,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
else
{
pJobSetup->mnDriverDataLen = 0;
- pJobSetup->mpDriverData = NULL;
+ pJobSetup->mpDriverData = nullptr;
}
}
@@ -220,7 +220,7 @@ void SvpSalInstance::GetPrinterQueueInfo( ImplPrnQueueList* pList )
pInfo->maDriver = rInfo.m_aDriverName;
pInfo->maLocation = rInfo.m_aLocation;
pInfo->maComment = rInfo.m_aComment;
- pInfo->mpSysData = NULL;
+ pInfo->mpSysData = nullptr;
sal_Int32 nIndex = 0;
while( nIndex != -1 )
@@ -257,7 +257,7 @@ void SvpSalInstance::PostPrintersChanged()
const std::list< SalFrame* >& rList = SvpSalInstance::s_pDefaultInstance->getFrames();
for( std::list< SalFrame* >::const_iterator it = rList.begin();
it != rList.end(); ++it )
- SvpSalInstance::s_pDefaultInstance->PostEvent( *it, NULL, SALEVENT_PRINTERCHANGED );
+ SvpSalInstance::s_pDefaultInstance->PostEvent( *it, nullptr, SALEVENT_PRINTERCHANGED );
}
GenPspGraphics *SvpSalInstance::CreatePrintGraphics()
diff --git a/vcl/headless/svptextrender.cxx b/vcl/headless/svptextrender.cxx
index d8e4e162da44..c4bc49e827ab 100644
--- a/vcl/headless/svptextrender.cxx
+++ b/vcl/headless/svptextrender.cxx
@@ -116,7 +116,7 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
if( rGlyphData.ExtDataRef().meInfo != nBmpFormat )
{
SvpGcpHelper* pGcpHelper = rGlyphData.ExtDataRef().mpData;
- bool bNew = pGcpHelper == 0;
+ bool bNew = pGcpHelper == nullptr;
if( bNew )
pGcpHelper = new SvpGcpHelper;
@@ -162,7 +162,7 @@ BitmapDeviceSharedPtr SvpGlyphPeer::GetGlyphBmp( ServerFont& rServerFont,
SvpGcpHelper* pGcpHelper = static_cast<SvpGcpHelper*>(
rGlyphData.ExtDataRef().mpData);
- assert(pGcpHelper != 0);
+ assert(pGcpHelper != nullptr);
rTargetPos += B2IPoint( pGcpHelper->maRawBitmap.mnXOffset, pGcpHelper->maRawBitmap.mnYOffset );
return pGcpHelper->maBitmapDev;
}
@@ -176,7 +176,7 @@ void SvpGlyphPeer::RemovingGlyph( GlyphData& rGlyphData )
{
SvpGcpHelper* pGcpHelper = rGlyphData.ExtDataRef().mpData;
rGlyphData.ExtDataRef().meInfo = basebmp::Format::NONE;
- rGlyphData.ExtDataRef().mpData = 0;
+ rGlyphData.ExtDataRef().mpData = nullptr;
delete pGcpHelper;
}
@@ -186,7 +186,7 @@ SvpTextRender::SvpTextRender(SvpSalGraphics& rParent)
, m_eTextFmt(basebmp::Format::EightBitGrey)
{
for( int i = 0; i < MAX_FALLBACK; ++i )
- m_pServerFont[i] = NULL;
+ m_pServerFont[i] = nullptr;
}
sal_uInt16 SvpTextRender::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel )
@@ -194,11 +194,11 @@ sal_uInt16 SvpTextRender::SetFont( FontSelectPattern* pIFSD, int nFallbackLevel
// release all no longer needed font resources
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
{
- if( m_pServerFont[i] != NULL )
+ if( m_pServerFont[i] != nullptr )
{
// old server side font is no longer referenced
SvpGlyphCache::GetInstance().UncacheFont( *m_pServerFont[i] );
- m_pServerFont[i] = NULL;
+ m_pServerFont[i] = nullptr;
}
}
@@ -228,7 +228,7 @@ void SvpTextRender::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLev
if( nFallbackLevel >= MAX_FALLBACK )
return;
- if( m_pServerFont[nFallbackLevel] != NULL )
+ if( m_pServerFont[nFallbackLevel] != nullptr )
{
long rDummyFactor;
m_pServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor );
@@ -238,7 +238,7 @@ void SvpTextRender::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLev
const FontCharMapPtr SvpTextRender::GetFontCharMap() const
{
if( !m_pServerFont[0] )
- return NULL;
+ return nullptr;
const FontCharMapPtr pFCMap = m_pServerFont[0]->GetFontCharMap();
return pFCMap;
@@ -409,7 +409,7 @@ bool SvpTextRender::GetGlyphOutline( sal_GlyphId aGlyphId, B2DPolyPolygon& rPoly
SalLayout* SvpTextRender::GetTextLayout( ImplLayoutArgs&, int nFallbackLevel )
{
- GenericSalLayout* pLayout = NULL;
+ GenericSalLayout* pLayout = nullptr;
if( m_pServerFont[ nFallbackLevel ] )
pLayout = new ServerFontLayout( *m_pServerFont[ nFallbackLevel ] );
@@ -453,7 +453,7 @@ SystemFontData SvpTextRender::GetSysFontData( int nFallbackLevel ) const
if (nFallbackLevel >= MAX_FALLBACK) nFallbackLevel = MAX_FALLBACK - 1;
if (nFallbackLevel < 0 ) nFallbackLevel = 0;
- if (m_pServerFont[nFallbackLevel] != NULL)
+ if (m_pServerFont[nFallbackLevel] != nullptr)
{
ServerFont* rFont = m_pServerFont[nFallbackLevel];
aSysFontData.nFontId = rFont->GetFtFace();
diff --git a/vcl/inc/accmgr.hxx b/vcl/inc/accmgr.hxx
index 4f8e553d4bb4..aafe9c83160c 100644
--- a/vcl/inc/accmgr.hxx
+++ b/vcl/inc/accmgr.hxx
@@ -37,8 +37,8 @@ private:
public:
ImplAccelManager()
{
- mpAccelList = NULL;
- mpSequenceList = NULL;
+ mpAccelList = nullptr;
+ mpSequenceList = nullptr;
}
~ImplAccelManager();
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index 29a1cc676e76..8d0d74919bd0 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -233,7 +233,7 @@ public:
virtual void GetBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder,
sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const = 0;
virtual long CalcTitleWidth() const = 0;
- virtual void DrawWindow(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags, const Point* pOffset = NULL) = 0;
+ virtual void DrawWindow(vcl::RenderContext& rRenderContext, sal_uInt16 nDrawFlags, const Point* pOffset = nullptr) = 0;
virtual Rectangle GetMenuRect() const;
static void ImplInitTitle( ImplBorderFrameData* pData );
diff --git a/vcl/inc/controldata.hxx b/vcl/inc/controldata.hxx
index 0ef77c809541..e2ce242d3935 100644
--- a/vcl/inc/controldata.hxx
+++ b/vcl/inc/controldata.hxx
@@ -33,8 +33,8 @@ namespace vcl
VclPtr<OutputDevice> mpReferenceDevice;
ImplControlData()
- :mpLayoutData( NULL )
- ,mpReferenceDevice( NULL )
+ :mpLayoutData( nullptr )
+ ,mpReferenceDevice( nullptr )
{
}
diff --git a/vcl/inc/fontmanager.hxx b/vcl/inc/fontmanager.hxx
index f2839de68616..e286807f6d52 100644
--- a/vcl/inc/fontmanager.hxx
+++ b/vcl/inc/fontmanager.hxx
@@ -271,7 +271,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
OString getAfmFile( PrintFont* pFont ) const;
OString getFontFile( PrintFont* pFont ) const;
- bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=NULL ) const;
+ bool analyzeFontFile( int nDirID, const OString& rFileName, std::list< PrintFont* >& rNewFonts, const char *pFormat=nullptr ) const;
static OUString convertTrueTypeName( void* pNameRecord ); // actually a NameRecord* formt font subsetting code
static void analyzeTrueTypeFamilyName( void* pTTFont, std::list< OUString >& rnames ); // actually a TrueTypeFont* from font subsetting code
bool analyzeTrueTypeFile( PrintFont* pFont ) const;
@@ -288,7 +288,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
{
std::unordered_map< fontID, PrintFont* >::const_iterator it;
it = m_aFonts.find( nID );
- return it == m_aFonts.end() ? NULL : it->second;
+ return it == m_aFonts.end() ? nullptr : it->second;
}
void fillPrintFontInfo( PrintFont* pFont, FastPrintFontInfo& rInfo ) const;
void fillPrintFontInfo( PrintFont* pFont, PrintFontInfo& rInfo ) const;
diff --git a/vcl/inc/fontsubset.hxx b/vcl/inc/fontsubset.hxx
index a92b70519638..b341ad4daccc 100644
--- a/vcl/inc/fontsubset.hxx
+++ b/vcl/inc/fontsubset.hxx
@@ -56,7 +56,7 @@ public:
bool CreateFontSubset( int nOutFontTypeMask,
FILE* pOutFile, const char* pOutFontName,
const sal_GlyphId* pGlyphIds, const sal_uInt8* pEncodedIds,
- int nReqGlyphCount, sal_Int32* pOutGlyphWidths = NULL );
+ int nReqGlyphCount, sal_Int32* pOutGlyphWidths = nullptr );
public: // TODO: make subsetter results private and provide accessor methods instead
// subsetter-provided subset details needed by e.g. Postscript or PDF
@@ -83,9 +83,9 @@ private:
int mnReqGlyphCount;
protected:
- bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = NULL );
- bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = NULL );
- static bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = NULL );
+ bool CreateFontSubsetFromCff( sal_Int32* pOutGlyphWidths = nullptr );
+ bool CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths = nullptr );
+ static bool CreateFontSubsetFromType1( sal_Int32* pOutGlyphWidths = nullptr );
};
#endif // INCLUDED_VCL_INC_FONTSUBSET_HXX
diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx
index 6c3422697238..b2223b5c934f 100644
--- a/vcl/inc/generic/gendata.hxx
+++ b/vcl/inc/generic/gendata.hxx
@@ -32,7 +32,7 @@ class VCL_DLLPUBLIC SalGenericData : public SalData
// for transient storage of unicode strings eg. 'u123' by input methods
OUString m_aUnicodeEntry;
public:
- SalGenericData( SalGenericDataType t, SalInstance *pInstance ) : SalData(), m_eType( t ), m_pDisplay( NULL ) { m_pInstance = pInstance; SetSalData( this ); }
+ SalGenericData( SalGenericDataType t, SalInstance *pInstance ) : SalData(), m_eType( t ), m_pDisplay( nullptr ) { m_pInstance = pInstance; SetSalData( this ); }
virtual ~SalGenericData() {}
virtual void Dispose() {}
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 61c9bcc76140..a780f88a0c14 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -135,7 +135,7 @@ struct ExtGlyphData
basebmp::Format meInfo;
SvpGcpHelper* mpData;
- ExtGlyphData() : meInfo(basebmp::Format::NONE), mpData(NULL) {}
+ ExtGlyphData() : meInfo(basebmp::Format::NONE), mpData(nullptr) {}
};
class GlyphData
diff --git a/vcl/inc/generic/printergfx.hxx b/vcl/inc/generic/printergfx.hxx
index 703328304593..e6eec88e53ab 100644
--- a/vcl/inc/generic/printergfx.hxx
+++ b/vcl/inc/generic/printergfx.hxx
@@ -278,7 +278,7 @@ public:
void PSDeltaArray (const sal_Int32 *pArray, sal_Int16 nEntries);
void PSShowText (const unsigned char* pString,
sal_Int16 nGlyphs, sal_Int16 nBytes,
- const sal_Int32* pDeltaArray = NULL);
+ const sal_Int32* pDeltaArray = nullptr);
void PSComment (const sal_Char* pComment );
void LicenseWarning (const Point& rPoint, const sal_Unicode* pStr,
sal_Int16 nLen, const sal_Int32* pDeltaArray);
@@ -293,7 +293,7 @@ public:
const sal_Int32* pDeltaArray );
void drawText (const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
- const sal_Int32* pDeltaArray = NULL);
+ const sal_Int32* pDeltaArray = nullptr);
void drawGlyphs( const Point& rPoint,
sal_GlyphId* pGlyphIds,
@@ -378,7 +378,7 @@ public:
{ return maVirtualStatus.mbArtBold; }
void DrawText (const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
- const sal_Int32* pDeltaArray = NULL);
+ const sal_Int32* pDeltaArray = nullptr);
void SetTextColor (PrinterColor& rTextColor)
{ maTextColor = rTextColor; }
sal_Int32 GetCharWidth (sal_uInt16 nFrom, sal_uInt16 nTo,
diff --git a/vcl/inc/generic/printerjob.hxx b/vcl/inc/generic/printerjob.hxx
index 39dbc7b5760f..c3738a5c3bef 100644
--- a/vcl/inc/generic/printerjob.hxx
+++ b/vcl/inc/generic/printerjob.hxx
@@ -83,7 +83,7 @@ public: // for usage in PrinterGfx
sal_uInt32 GetResolution () const { return mnResolution; }
void GetScale (double &rXScale, double &rYScale) const;
sal_uInt16 GetDepth () const;
- sal_uInt16 GetPostscriptLevel (const JobData *pJobData = NULL) const;
+ sal_uInt16 GetPostscriptLevel (const JobData *pJobData = nullptr) const;
bool IsColorPrinter () const;
osl::File* GetCurrentPageHeader ();
diff --git a/vcl/inc/graphite_layout.hxx b/vcl/inc/graphite_layout.hxx
index a51ff4acab9b..ff258bff3a1d 100644
--- a/vcl/inc/graphite_layout.hxx
+++ b/vcl/inc/graphite_layout.hxx
@@ -64,7 +64,7 @@ public:
GrFontMap::const_iterator i = m_fonts.find(GrFontMapKey(ppm, styleKey));
if (i != m_fonts.end())
return i->second;
- return NULL;
+ return nullptr;
};
void addFont(int ppm, gr_font * pFont, bool isBold, bool isItalic)
{
@@ -104,8 +104,8 @@ private:
const grutils::GrFeatureParser * mpFeatures;
public:
- GraphiteLayout(const gr_face * pFace, gr_font * pFont = NULL,
- const grutils::GrFeatureParser * features = NULL) throw();
+ GraphiteLayout(const gr_face * pFace, gr_font * pFont = nullptr,
+ const grutils::GrFeatureParser * features = nullptr) throw();
// used by upper layers
virtual bool LayoutText( ImplLayoutArgs& ) override; // first step of layout
@@ -122,8 +122,8 @@ public:
// methods using glyph indexing
virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&,
- long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
- const PhysicalFontFace** pFallbackFonts = NULL ) const override;
+ long* pGlyphAdvAry = nullptr, int* pCharPosAry = nullptr,
+ const PhysicalFontFace** pFallbackFonts = nullptr ) const override;
// used by glyph+font+script fallback
virtual void MoveGlyph( int nStart, long nNewXPos ) override;
diff --git a/vcl/inc/graphite_serverfont.hxx b/vcl/inc/graphite_serverfont.hxx
index 6bf33aea8279..0a5b9133acf7 100644
--- a/vcl/inc/graphite_serverfont.hxx
+++ b/vcl/inc/graphite_serverfont.hxx
@@ -87,8 +87,8 @@ public:
// used by display layers
virtual int GetNextGlyphs( int l, sal_GlyphId* gia, Point& p, int& s,
- long* gaa = NULL, int* cpa = NULL,
- const PhysicalFontFace** pFallbackFonts = NULL ) const override
+ long* gaa = nullptr, int* cpa = nullptr,
+ const PhysicalFontFace** pFallbackFonts = nullptr ) const override
{
maImpl.DrawBase() = maDrawBase;
maImpl.DrawOffset() = maDrawOffset;
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index dbe7d916742e..78c31fbdcd01 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -65,7 +65,7 @@ public:
SalFrameStyleFlags nSalFrameStyle,
bool bTopDown,
basebmp::Format nScanlineFormat,
- SystemParentData* pSystemParent = NULL );
+ SystemParentData* pSystemParent = nullptr );
virtual ~SvpSalFrame();
void GetFocus();
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 694b888bfff4..ac24df4cf086 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -92,7 +92,7 @@ public:
SvpSalGraphics();
virtual ~SvpSalGraphics();
- virtual SalGraphicsImpl* GetImpl() const override { return NULL; };
+ virtual SalGraphicsImpl* GetImpl() const override { return nullptr; };
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY ) override;
virtual sal_uInt16 GetBitCount() const override;
virtual long GetGraphicsWidth() const override;
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index e113304df898..9599d3217ee5 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -129,7 +129,7 @@ public:
// pData allows for using a system dependent graphics or device context
virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
long &nDX, long &nDY,
- sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) override;
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = nullptr ) override;
// Printer
// pSetupData->mpDriverData can be 0
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index aa6c216e2de7..e37296269398 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -75,7 +75,7 @@ public:
void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
const OUString& rHelpText, const OUString& rStatusText,
- const Point& rScreenPos, const Rectangle* pHelpArea = NULL );
+ const Point& rScreenPos, const Rectangle* pHelpArea = nullptr );
void ImplDestroyHelpWindow( bool bUpdateHideTime );
void ImplSetHelpWindowPos( vcl::Window* pHelpWindow, sal_uInt16 nHelpWinStyle, QuickHelpFlags nStyle,
const Point& rPos, const Rectangle* pHelpArea );
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index 12d45703df06..7552f00f3205 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -62,7 +62,7 @@ struct ImplEntryType
mnHeight( 0 )
{
mbIsSelected = false;
- mpUserData = NULL;
+ mpUserData = nullptr;
}
ImplEntryType( const OUString& rStr ) :
@@ -71,7 +71,7 @@ struct ImplEntryType
mnHeight( 0 )
{
mbIsSelected = false;
- mpUserData = NULL;
+ mpUserData = nullptr;
}
ImplEntryType( const Image& rImage ) :
@@ -80,7 +80,7 @@ struct ImplEntryType
mnHeight( 0 )
{
mbIsSelected = false;
- mpUserData = NULL;
+ mpUserData = nullptr;
}
};
@@ -102,7 +102,7 @@ private:
ImplEntryType* GetEntry( sal_Int32 nPos ) const
{
if (nPos < 0 || static_cast<size_t>(nPos) >= maEntries.size())
- return NULL;
+ return nullptr;
return const_cast<ImplEntryType*>(&maEntries[nPos]);
}
diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx
index fd9fb347516c..ab2bd21ffe0d 100644
--- a/vcl/inc/impfont.hxx
+++ b/vcl/inc/impfont.hxx
@@ -139,7 +139,7 @@ public:
meAutoHint(AUTOHINT_DONTKNOW),
meHinting(HINTING_DONTKNOW),
meHintStyle(HINT_SLIGHT),
- mpPattern(0) {}
+ mpPattern(nullptr) {}
FontConfigFontOptions(FcPattern* pPattern) :
meEmbeddedBitmap(EMBEDDEDBITMAP_DONTKNOW),
meAntiAlias(ANTIALIAS_DONTKNOW),
@@ -205,8 +205,8 @@ class VCL_PLUGIN_PUBLIC CmapResult
{
public:
explicit CmapResult( bool bSymbolic = false,
- const sal_uInt32* pRangeCodes = NULL, int nRangeCount = 0,
- const int* pStartGlyphs = 0, const sal_uInt16* pGlyphIds = NULL );
+ const sal_uInt32* pRangeCodes = nullptr, int nRangeCount = 0,
+ const int* pStartGlyphs = nullptr, const sal_uInt16* pGlyphIds = nullptr );
const sal_uInt32* mpRangeCodes;
const int* mpStartGlyphs;
diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx
index fdcbb9ec4e99..739834ef286e 100644
--- a/vcl/inc/impgraph.hxx
+++ b/vcl/inc/impgraph.hxx
@@ -114,8 +114,8 @@ private:
const Point& rDestPt,
const Size& rDestSize,
long nExtraData = 0,
- OutputDevice* pFirstFrameOutDev = NULL );
- void ImplStopAnimation( OutputDevice* pOutputDevice = NULL,
+ OutputDevice* pFirstFrameOutDev = nullptr );
+ void ImplStopAnimation( OutputDevice* pOutputDevice = nullptr,
long nExtraData = 0 );
void ImplSetAnimationNotifyHdl( const Link<Animation*,void>& rLink );
diff --git a/vcl/inc/impoct.hxx b/vcl/inc/impoct.hxx
index 4183fc7fb5bc..87bfea22c120 100644
--- a/vcl/inc/impoct.hxx
+++ b/vcl/inc/impoct.hxx
@@ -130,7 +130,7 @@ inline OctreeNode* ImpNodeCache::ImplGetFreeNode()
if ( !pActNode )
{
pActNode = new NODE;
- pActNode->pNextInCache = NULL;
+ pActNode->pNextInCache = nullptr;
}
pNode = pActNode;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 0c284bd328c1..edf8875f4ba8 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -142,7 +142,7 @@ public:
virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ) = 0;
// release the fonts
- void ReleaseFonts() { SetFont( NULL, 0 ); }
+ void ReleaseFonts() { SetFont( nullptr, 0 ); }
// get the current font's metrics
virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel = 0 ) = 0;
@@ -438,7 +438,7 @@ public:
sal_uInt8 nTransparency,
const OutputDevice *pOutDev );
- virtual OpenGLContext *BeginPaint() { return NULL; }
+ virtual OpenGLContext *BeginPaint() { return nullptr; }
virtual SystemGraphicsData GetGraphicsData() const = 0;
diff --git a/vcl/inc/salgdiimpl.hxx b/vcl/inc/salgdiimpl.hxx
index 86575a4cbc4b..406f0ce15ba1 100644
--- a/vcl/inc/salgdiimpl.hxx
+++ b/vcl/inc/salgdiimpl.hxx
@@ -212,7 +212,7 @@ public:
virtual bool drawGradient(const tools::PolyPolygon& rPolygon, const Gradient& rGradient) = 0;
- virtual OpenGLContext *beginPaint() { return NULL; }
+ virtual OpenGLContext *beginPaint() { return nullptr; }
};
#endif
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx
index ec429b99e00c..34be18878dd3 100644
--- a/vcl/inc/salinst.hxx
+++ b/vcl/inc/salinst.hxx
@@ -90,7 +90,7 @@ public:
virtual SalVirtualDevice*
CreateVirtualDevice( SalGraphics* pGraphics,
long &rDX, long &rDY,
- sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ) = 0;
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = nullptr ) = 0;
// Printer
// pSetupData->mpDriverData can be 0
diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index a0c87e18efbc..f2b274461230 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -178,14 +178,14 @@ public:
// methods using string indexing
virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, DeviceCoordinate nCharExtra=0, int nFactor=1) const = 0;
virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const = 0;
- virtual DeviceCoordinate GetTextWidth() const { return FillDXArray( NULL ); }
+ virtual DeviceCoordinate GetTextWidth() const { return FillDXArray( nullptr ); }
virtual void GetCaretPositions( int nArraySize, long* pCaretXArray ) const = 0;
virtual bool IsKashidaPosValid ( int /*nCharPos*/ ) const { return true; } // i60594
// methods using glyph indexing
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdAry, Point& rPos, int&,
- DeviceCoordinate* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
- const PhysicalFontFace** pFallbackFonts = NULL ) const = 0;
+ DeviceCoordinate* pGlyphAdvAry = nullptr, int* pCharPosAry = nullptr,
+ const PhysicalFontFace** pFallbackFonts = nullptr ) const = 0;
virtual bool GetOutline( SalGraphics&, ::basegfx::B2DPolyPolygonVector& ) const;
virtual bool GetBoundRect( SalGraphics&, Rectangle& ) const;
@@ -246,7 +246,7 @@ public:
// used only by OutputDevice::ImplLayout, TODO: make friend
explicit MultiSalLayout( SalLayout& rBaseLayout,
- const PhysicalFontFace* pBaseFont = NULL );
+ const PhysicalFontFace* pBaseFont = nullptr );
bool AddFallback( SalLayout& rFallbackLayout,
ImplLayoutRuns&, const PhysicalFontFace* pFallbackFont );
virtual bool LayoutText( ImplLayoutArgs& ) override;
@@ -349,8 +349,8 @@ public:
// used by display layers
virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphIdxAry, Point& rPos, int&,
- DeviceCoordinate* pGlyphAdvAry = NULL, int* pCharPosAry = NULL,
- const PhysicalFontFace** pFallbackFonts = NULL ) const override;
+ DeviceCoordinate* pGlyphAdvAry = nullptr, int* pCharPosAry = nullptr,
+ const PhysicalFontFace** pFallbackFonts = nullptr ) const override;
protected:
GenericSalLayout();
diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx
index 943cefe514a4..948c36d43367 100644
--- a/vcl/inc/salobj.hxx
+++ b/vcl/inc/salobj.hxx
@@ -40,7 +40,7 @@ class VCL_PLUGIN_PUBLIC SalObject
bool m_bMouseTransparent:1,
m_bEraseBackground:1;
public:
- SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( false ), m_bEraseBackground( true ) {}
+ SalObject() : m_pInst( nullptr ), m_pCallback( nullptr ), m_bMouseTransparent( false ), m_bEraseBackground( true ) {}
virtual ~SalObject();
virtual void ResetClipRegion() = 0;
diff --git a/vcl/inc/salsession.hxx b/vcl/inc/salsession.hxx
index 8da8dc60e0aa..67481176968a 100644
--- a/vcl/inc/salsession.hxx
+++ b/vcl/inc/salsession.hxx
@@ -83,8 +83,8 @@ class VCL_PLUGIN_PUBLIC SalSession
void * m_pProcData;
public:
SalSession()
- : m_aProc(0)
- , m_pProcData(NULL)
+ : m_aProc(nullptr)
+ , m_pProcData(nullptr)
{
}
virtual ~SalSession();
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index 1e1a941c1287..01a3012ec00b 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -34,7 +34,7 @@ class VCL_PLUGIN_PUBLIC SalTimer
{
SALTIMERPROC m_pProc;
public:
- SalTimer() : m_pProc( NULL ) {}
+ SalTimer() : m_pProc( nullptr ) {}
virtual ~SalTimer();
// AutoRepeat and Restart
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index b464b5c27131..222c8c85a54a 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -110,7 +110,7 @@ struct SalMenuEvent
sal_uInt16 mnId; // Menu item ID
void* mpMenu; // pointer to VCL menu (class Menu)
- SalMenuEvent() : mnId( 0 ), mpMenu( NULL ) {}
+ SalMenuEvent() : mnId( 0 ), mpMenu( nullptr ) {}
SalMenuEvent( sal_uInt16 i_nId, void* i_pMenu )
: mnId( i_nId ), mpMenu( i_pMenu ) {}
};
diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index 10fda4952fc4..5cac95e73312 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -398,7 +398,7 @@ struct ImplDelData
VclPtr<vcl::Window> mpWindow;
bool mbDel;
- ImplDelData( vcl::Window* pWindow = NULL );
+ ImplDelData( vcl::Window* pWindow = nullptr );
virtual ~ImplDelData();
bool IsDead() const
diff --git a/vcl/inc/textlayout.hxx b/vcl/inc/textlayout.hxx
index 5b7a122adf13..27cc5f1a0646 100644
--- a/vcl/inc/textlayout.hxx
+++ b/vcl/inc/textlayout.hxx
@@ -94,7 +94,7 @@ namespace vcl
Rectangle DrawText( const Rectangle& _rRect,
const OUString& _rText, DrawTextFlags _nStyle = DrawTextFlags::NONE,
- MetricVector* _pVector = NULL, OUString* _pDisplayText = NULL );
+ MetricVector* _pVector = nullptr, OUString* _pDisplayText = nullptr );
private:
ControlTextRenderer( const ControlTextRenderer& ) = delete;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 41cd6aafc5e0..df54508d4640 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -69,7 +69,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
GtkSalGraphics* pGraphics;
bool bInUse;
GraphicsHolder()
- : pGraphics( NULL ),
+ : pGraphics( nullptr ),
bInUse( false )
{}
~GraphicsHolder();
@@ -96,7 +96,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
guint8 group;
PreviousKeyPress (GdkEventKey *event)
- : window (NULL),
+ : window (nullptr),
send_event (0),
time (0),
state (0),
@@ -128,7 +128,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
bool operator== (GdkEventKey *event) const
{
- return (event != NULL)
+ return (event != nullptr)
&& (event->window == window)
&& (event->send_event == send_event)
// ignore non-Gdk state bits, e.g., these used by IBus
@@ -317,7 +317,7 @@ class GtkSalFrame : public SalFrame, public X11WindowProvider
void TriggerPaintEvent();
void updateWMClass();
- void SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSize = NULL );
+ void SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSize = nullptr );
public:
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 6c8c274313f0..b1a01e04eb34 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -300,7 +300,7 @@ public:
int *pLen,
KeySym *pUnmodifiedKeySym,
Status *pStatus,
- XIC = NULL ) const;
+ XIC = nullptr ) const;
Cursor GetPointer( PointerStyle ePointerStyle );
virtual int CaptureMouse( SalFrame *pCapture );
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index fc8f0d3563d4..9ba19574cbbf 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -181,7 +181,7 @@ public:
::Window GetShellWindow() const { return mhShellWindow; }
::Window GetForeignParent() const { return mhForeignParent; }
::Window GetStackingWindow() const { return mhStackingWindow; }
- long Close() const { return CallCallback( SALEVENT_CLOSE, 0 ); }
+ long Close() const { return CallCallback( SALEVENT_CLOSE, NULL ); }
SalFrameStyleFlags GetStyle() const { return nStyle_; }
Cursor GetCursor() const { return hCursor_; }
diff --git a/vcl/inc/unx/wmadaptor.hxx b/vcl/inc/unx/wmadaptor.hxx
index 5eab4d5be1dd..c50542797314 100644
--- a/vcl/inc/unx/wmadaptor.hxx
+++ b/vcl/inc/unx/wmadaptor.hxx
@@ -261,7 +261,7 @@ public:
* set hints what decoration is needed;
* must be called before showing the frame
*/
- virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const;
+ virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = nullptr ) const;
/*
* tells whether there is WM support for splash screens
diff --git a/vcl/opengl/framebuffer.cxx b/vcl/opengl/framebuffer.cxx
index 403c37922695..0c2cca920ed9 100644
--- a/vcl/opengl/framebuffer.cxx
+++ b/vcl/opengl/framebuffer.cxx
@@ -18,8 +18,8 @@ OpenGLFramebuffer::OpenGLFramebuffer() :
mnWidth( 0 ),
mnHeight( 0 ),
mnAttachedTexture( 0 ),
- mpPrevFramebuffer( NULL ),
- mpNextFramebuffer( NULL )
+ mpPrevFramebuffer( nullptr ),
+ mpNextFramebuffer( nullptr )
{
glGenFramebuffers( 1, &mnId );
VCL_GL_INFO( "vcl.opengl", "Created framebuffer " << (int)mnId );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 83352eca7961..51dbc5ae8b56 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -38,11 +38,11 @@
#include <vector>
OpenGLSalGraphicsImpl::OpenGLSalGraphicsImpl(SalGraphics& rParent, SalGeometryProvider *pProvider)
- : mpContext(0)
+ : mpContext(nullptr)
, mrParent(rParent)
, mpProvider(pProvider)
- , mpFramebuffer(NULL)
- , mpProgram(NULL)
+ , mpFramebuffer(nullptr)
+ , mpProgram(nullptr)
, mbUseScissor(false)
, mbUseStencil(false)
, mbOffscreen(false)
@@ -64,7 +64,7 @@ OpenGLSalGraphicsImpl::~OpenGLSalGraphicsImpl()
rtl::Reference<OpenGLContext> OpenGLSalGraphicsImpl::GetOpenGLContext()
{
if( !AcquireContext() )
- return NULL;
+ return nullptr;
return mpContext;
}
@@ -193,7 +193,7 @@ void OpenGLSalGraphicsImpl::PostDraw()
if( mpProgram )
{
mpProgram->Clean();
- mpProgram = NULL;
+ mpProgram = nullptr;
#ifdef DBG_UTIL
mProgramIsSolidColor = false;
#endif
@@ -392,13 +392,13 @@ bool OpenGLSalGraphicsImpl::CheckOffscreenTexture()
bool OpenGLSalGraphicsImpl::UseProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const OString& preamble )
{
- if( mpProgram != NULL )
+ if( mpProgram != nullptr )
mpProgram->Clean();
mpProgram = mpContext->UseProgram( rVertexShader, rFragmentShader, preamble );
#ifdef DBG_UTIL
mProgramIsSolidColor = false; // UseSolid() will set to true if needed
#endif
- return ( mpProgram != NULL );
+ return ( mpProgram != nullptr );
}
bool OpenGLSalGraphicsImpl::UseSolid( SalColor nColor, sal_uInt8 nTransparency )
@@ -1601,7 +1601,7 @@ SalBitmap* OpenGLSalGraphicsImpl::getBitmap( long nX, long nY, long nWidth, long
if( !pBitmap->Create( maOffscreenTex, nX, nY, nWidth, nHeight ) )
{
delete pBitmap;
- pBitmap = NULL;
+ pBitmap = nullptr;
}
PostDraw();
return pBitmap;
@@ -1758,7 +1758,7 @@ bool OpenGLSalGraphicsImpl::drawTransformedBitmap(
OpenGLTexture& rTexture( rBitmap.GetTexture() );
OpenGLTexture aMask; // no texture
- if( pMaskBitmap != NULL )
+ if( pMaskBitmap != nullptr )
aMask = pMaskBitmap->GetTexture();
VCL_GL_INFO( "vcl.opengl", "::drawTransformedBitmap" );
@@ -1865,7 +1865,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
OpenGLContext *OpenGLSalGraphicsImpl::beginPaint()
{
if( mbOffscreen || !AcquireContext() )
- return NULL;
+ return nullptr;
else
return mpContext.get();
}
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 14250b7b01a8..7cda1eea7eb0 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -64,7 +64,7 @@ static std::vector<std::unique_ptr<FixedTextureAtlasManager>> sTextureAtlases;
}
OpenGLSalBitmap::OpenGLSalBitmap()
-: mpContext(NULL)
+: mpContext(nullptr)
, mbDirtyTexture(true)
, mnBits(0)
, mnBytesPerRow(0)
@@ -225,7 +225,7 @@ bool OpenGLSalBitmap::AllocateUserData()
if (!alloc)
{
SAL_WARN("vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << mnHeight);
- maUserBuffer.reset( static_cast<sal_uInt8*>(NULL) );
+ maUserBuffer.reset( static_cast<sal_uInt8*>(nullptr) );
mnBytesPerRow = 0;
}
#ifdef DBG_UTIL
@@ -236,7 +236,7 @@ bool OpenGLSalBitmap::AllocateUserData()
}
#endif
- return maUserBuffer.get() != 0;
+ return maUserBuffer.get() != nullptr;
}
namespace {
@@ -335,7 +335,7 @@ ImplPixelFormat* ImplPixelFormat::GetFormat( sal_uInt16 nBits, const BitmapPalet
case 8: return new ImplPixelFormat8( rPalette );
}
- return 0;
+ return nullptr;
}
void lclInstantiateTexture(OpenGLTexture& rTexture, const int nWidth, const int nHeight,
@@ -394,10 +394,10 @@ GLuint OpenGLSalBitmap::CreateTexture()
VCL_GL_INFO( "vcl.opengl", "::CreateTexture bits: " << mnBits);
GLenum nFormat = GL_RGBA;
GLenum nType = GL_UNSIGNED_BYTE;
- sal_uInt8* pData( NULL );
+ sal_uInt8* pData( nullptr );
bool bAllocated( false );
- if( maUserBuffer.get() != 0 )
+ if( maUserBuffer.get() != nullptr )
{
if( mnBits == 16 || mnBits == 24 || mnBits == 32 )
{
@@ -481,7 +481,7 @@ bool OpenGLSalBitmap::ReadTexture()
VCL_GL_INFO( "vcl.opengl", "::ReadTexture " << mnWidth << "x" << mnHeight << " bits: " << mnBits);
- if( pData == NULL )
+ if( pData == nullptr )
return false;
if (mnBits == 8 || mnBits == 16 || mnBits == 24 || mnBits == 32)
@@ -578,7 +578,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, ChecksumType&
int nHeight = rInputTexture.GetHeight();
OpenGLProgram* pProgram = mpContext->UseProgram("textureVertexShader", FragShader);
- if (pProgram == 0)
+ if (pProgram == nullptr)
return false;
int nNewWidth = ceil( nWidth / 4.0 );
@@ -606,7 +606,7 @@ bool OpenGLSalBitmap::calcChecksumGL(OpenGLTexture& rInputTexture, ChecksumType&
nHeight = aFirstPassTexture.GetHeight();
pProgram = mpContext->UseProgram("textureVertexShader", FragShader);
- if (pProgram == 0)
+ if (pProgram == nullptr)
return false;
nNewWidth = ceil( nWidth / 4.0 );
@@ -694,16 +694,16 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( BitmapAccessMode nMode )
if( !maUserBuffer.get() )
{
if( !AllocateUserData() )
- return NULL;
+ return nullptr;
if( maTexture && !ReadTexture() )
- return NULL;
+ return nullptr;
}
if( !maPendingOps.empty() )
{
VCL_GL_INFO( "vcl.opengl", "** Creating texture and reading it back immediately" );
if( !CreateTexture() || !AllocateUserData() || !ReadTexture() )
- return NULL;
+ return nullptr;
}
}
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 2953e0eb0136..24c137df565f 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -134,7 +134,7 @@ bool OpenGLSalBitmap::ImplScaleConvolution(
{
OpenGLFramebuffer* pFramebuffer;
OpenGLProgram* pProgram;
- GLfloat* pWeights( 0 );
+ GLfloat* pWeights( nullptr );
sal_uInt32 nKernelSize;
GLfloat aOffsets[32];
int nNewWidth( mnWidth * rScaleX );
@@ -144,7 +144,7 @@ bool OpenGLSalBitmap::ImplScaleConvolution(
pProgram = mpContext->UseProgram( "textureVertexShader",
"convolutionFragmentShader" );
- if( pProgram == 0 )
+ if( pProgram == nullptr )
return false;
// horizontal scaling in scratch texture
@@ -231,7 +231,7 @@ bool OpenGLSalBitmap::ImplScaleArea( double rScaleX, double rScaleY )
OpenGLProgram* pProgram = mpContext->UseProgram( "textureVertexShader",
fast ? OUString( "areaScaleFastFragmentShader" ) : OUString( "areaScaleFragmentShader" ));
- if( pProgram == 0 )
+ if( pProgram == nullptr )
return false;
OpenGLTexture aScratchTex(nNewWidth, nNewHeight);
@@ -351,7 +351,7 @@ bool OpenGLSalBitmap::Scale( const double& rScaleX, const double& rScaleY, BmpSc
nScaleFlag == BmpScaleFlag::BestQuality )
{
makeCurrent();
- if( mpContext == NULL )
+ if( mpContext == nullptr )
{
VCL_GL_INFO( "vcl.opengl", "Add ScaleOp to pending operations" );
maPendingOps.push_back( new ScaleOp( this, rScaleX, rScaleY, nScaleFlag ) );
diff --git a/vcl/opengl/texture.cxx b/vcl/opengl/texture.cxx
index c0373cc46a5a..909532682b7e 100644
--- a/vcl/opengl/texture.cxx
+++ b/vcl/opengl/texture.cxx
@@ -44,7 +44,7 @@ ImplOpenGLTexture::ImplOpenGLTexture( int nWidth, int nHeight, bool bAllocate )
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
if( bAllocate )
- glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL );
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, nWidth, nHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr );
glBindTexture( GL_TEXTURE_2D, 0 );
VCL_GL_INFO( "vcl.opengl", "OpenGLTexture " << mnTexture << " " << nWidth << "x" << nHeight << " allocate" );
@@ -165,7 +165,7 @@ int ImplOpenGLTexture::FindFreeSlot()
OpenGLTexture::OpenGLTexture() :
maRect( 0, 0, 0, 0 ),
- mpImpl(NULL),
+ mpImpl(nullptr),
mnSlotNumber(-1)
{
}
@@ -234,7 +234,7 @@ OpenGLTexture::~OpenGLTexture()
bool OpenGLTexture::IsUnique() const
{
- return ( mpImpl == NULL || mpImpl->mnRefCount == 1 );
+ return ( mpImpl == nullptr || mpImpl->mnRefCount == 1 );
}
GLuint OpenGLTexture::Id() const
@@ -258,7 +258,7 @@ void OpenGLTexture::GetCoord( GLfloat* pCoord, const SalTwoRect& rPosAry, bool b
{
VCL_GL_INFO( "vcl.opengl", "Getting coord " << Id() << " [" << maRect.Left() << "," << maRect.Top() << "] " << GetWidth() << "x" << GetHeight() );
- if( mpImpl == NULL )
+ if( mpImpl == nullptr )
{
pCoord[0] = pCoord[1] = pCoord[2] = pCoord[3] = 0.0f;
pCoord[4] = pCoord[5] = pCoord[6] = pCoord[7] = 0.0f;
@@ -355,7 +355,7 @@ void OpenGLTexture::SaveToFile(const OUString& rFileName)
void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
{
- if( mpImpl == NULL )
+ if( mpImpl == nullptr )
{
SAL_WARN( "vcl.opengl", "Can't read invalid texture" );
return;
@@ -392,7 +392,7 @@ void OpenGLTexture::Read( GLenum nFormat, GLenum nType, sal_uInt8* pData )
OpenGLTexture::operator bool() const
{
- return ( mpImpl != NULL );
+ return ( mpImpl != nullptr );
}
OpenGLTexture& OpenGLTexture::operator=( const OpenGLTexture& rTexture )
diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx
index f60f9c18106c..e9754eab67d1 100644
--- a/vcl/opengl/x11/X11DeviceInfo.cxx
+++ b/vcl/opengl/x11/X11DeviceInfo.cxx
@@ -215,7 +215,7 @@ void X11OpenGLDeviceInfo::GetData()
}
// determine the major OpenGL version. That's the first integer in the version string.
- mnGLMajorVersion = strtol(maVersion.getStr(), 0, 10);
+ mnGLMajorVersion = strtol(maVersion.getStr(), nullptr, 10);
// determine driver type (vendor) and where in the version string
// the actual driver version numbers should be expected to be found (whereToReadVersionNumbers)
@@ -267,14 +267,14 @@ void X11OpenGLDeviceInfo::GetData()
char *token = strtok_wrapper(".", &bufptr);
if (token)
{
- mnMajorVersion = strtol(token, 0, 10);
+ mnMajorVersion = strtol(token, nullptr, 10);
token = strtok_wrapper(".", &bufptr);
if (token)
{
- mnMinorVersion = strtol(token, 0, 10);
+ mnMinorVersion = strtol(token, nullptr, 10);
token = strtok_wrapper(".", &bufptr);
if (token)
- mnRevisionVersion = strtol(token, 0, 10);
+ mnRevisionVersion = strtol(token, nullptr, 10);
}
}
}
diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index fa47b271aec4..20c45ffe108b 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -49,7 +49,7 @@ rtl::Reference<OpenGLContext> X11OpenGLSalGraphicsImpl::CreateWinContext()
X11WindowProvider *pProvider = dynamic_cast<X11WindowProvider*>(mrParent.m_pFrame);
if( !pProvider )
- return NULL;
+ return nullptr;
Window aWin = pProvider->GetX11Window();
rtl::Reference<OpenGLContext> pContext = OpenGLContext::Create();
@@ -102,7 +102,7 @@ bool X11OpenGLSalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX,
pImage = XCreateImage( pDisplay, aVisualInfo.visual, 24, ZPixmap, 0, pData,
pPixmap->GetWidth(), pPixmap->GetHeight(), 8, 0 );
XInitImage( pImage );
- GC aGC = XCreateGC( pDisplay, pPixmap->GetPixmap(), 0, NULL );
+ GC aGC = XCreateGC( pDisplay, pPixmap->GetPixmap(), 0, nullptr );
XPutImage( pDisplay, pPixmap->GetDrawable(), aGC, pImage,
0, 0, 0, 0, pPixmap->GetWidth(), pPixmap->GetHeight() );
XFreeGC( pDisplay, aGC );
@@ -140,7 +140,7 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap* pPixmap, X11Pixmap* pMask
GLXFBConfig pFbConfig = OpenGLHelper::GetPixmapFBConfig( pDisplay, bInverted );
GLXPixmap pGlxPixmap = glXCreatePixmap( pDisplay, pFbConfig, pPixmap->GetPixmap(), aAttribs);
GLXPixmap pGlxMask;
- if( pMask != NULL )
+ if( pMask != nullptr )
pGlxMask = glXCreatePixmap( pDisplay, pFbConfig, pMask->GetPixmap(), aAttribs);
else
pGlxMask = 0;
@@ -155,14 +155,14 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmap(X11Pixmap* pPixmap, X11Pixmap* pMask
glActiveTexture( GL_TEXTURE0 );
rCombo.mpTexture->Bind();
- glXBindTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT, NULL );
+ glXBindTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT, nullptr );
rCombo.mpTexture->Unbind();
- if( pMask != NULL && pGlxMask )
+ if( pMask != nullptr && pGlxMask )
{
rCombo.mpMask.reset(new OpenGLTexture(pPixmap->GetWidth(), pPixmap->GetHeight(), false));
rCombo.mpMask->Bind();
- glXBindTexImageEXT( pDisplay, pGlxMask, GLX_FRONT_LEFT_EXT, NULL );
+ glXBindTexImageEXT( pDisplay, pGlxMask, GLX_FRONT_LEFT_EXT, nullptr );
rCombo.mpMask->Unbind();
DrawTextureDiff(*rCombo.mpTexture, *rCombo.mpMask, aPosAry, bInverted);
diff --git a/vcl/opengl/x11/salvd.cxx b/vcl/opengl/x11/salvd.cxx
index 99abcddfdaab..9c8c20e02f0e 100644
--- a/vcl/opengl/x11/salvd.cxx
+++ b/vcl/opengl/x11/salvd.cxx
@@ -25,7 +25,7 @@ void X11SalGraphics::Init( X11OpenGLSalVirtualDevice *pDevice )
m_pColormap = &pDisplay->GetColormap( m_nXScreen );
m_pVDev = pDevice;
- m_pFrame = NULL;
+ m_pFrame = nullptr;
bWindow_ = pDisplay->IsDisplay();
bVirDev_ = true;
@@ -48,7 +48,7 @@ X11OpenGLSalVirtualDevice::X11OpenGLSalVirtualDevice( SalGraphics* pGraphics,
nBitCount = pGraphics->GetBitCount();
// TODO Check where a VirtualDevice is created from SystemGraphicsData
- assert( pData == NULL ); (void)pData;
+ assert( pData == nullptr ); (void)pData;
mpDisplay = vcl_sal::getSalDisplay(GetGenericData());
mnDepth = nBitCount;
@@ -67,7 +67,7 @@ X11OpenGLSalVirtualDevice::~X11OpenGLSalVirtualDevice()
SalGraphics* X11OpenGLSalVirtualDevice::AcquireGraphics()
{
if( mbGraphics )
- return NULL;
+ return nullptr;
if( mpGraphics )
mbGraphics = true;
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 949f75d1e323..b0c234b3bbb8 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -178,7 +178,7 @@ void BitmapTest::testCRC()
{
CRCHash aCRCs;
- Bitmap aBitmap(Size(1023,759), 24, 0);
+ Bitmap aBitmap(Size(1023,759), 24, nullptr);
aBitmap.Erase(COL_BLACK);
checkAndInsert(aCRCs, aBitmap, "black bitmap");
aBitmap.Invert();
diff --git a/vcl/qa/cppunit/fontcharmap.cxx b/vcl/qa/cppunit/fontcharmap.cxx
index 2a88b66764b5..17923afc983e 100644
--- a/vcl/qa/cppunit/fontcharmap.cxx
+++ b/vcl/qa/cppunit/fontcharmap.cxx
@@ -40,7 +40,7 @@ void VclFontCharMapTest::testDefaultFontCharMap()
CPPUNIT_ASSERT( nStartSupBMPPlane == 0xE000 );
CPPUNIT_ASSERT( nEndBMPPlane == 0xFFF0-1 );
- pfcmap = 0;
+ pfcmap = nullptr;
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclFontCharMapTest);
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 58b61880ae1d..748f603d3b6d 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -81,12 +81,12 @@ void LifecycleTest::testVirtualDevice()
void LifecycleTest::testMultiDispose()
{
VclPtrInstance<WorkWindow> xWin(nullptr, WB_APP|WB_STDWORK);
- CPPUNIT_ASSERT(xWin.get() != NULL);
+ CPPUNIT_ASSERT(xWin.get() != nullptr);
xWin->disposeOnce();
xWin->disposeOnce();
xWin->disposeOnce();
- CPPUNIT_ASSERT(xWin->GetWindow(GetWindowType::Parent) == NULL);
- CPPUNIT_ASSERT(xWin->GetChild(0) == NULL);
+ CPPUNIT_ASSERT(xWin->GetWindow(GetWindowType::Parent) == nullptr);
+ CPPUNIT_ASSERT(xWin->GetChild(0) == nullptr);
CPPUNIT_ASSERT(xWin->GetChildCount() == 0);
}
@@ -109,13 +109,13 @@ void LifecycleTest::testWidgets(vcl::Window *pParent)
void LifecycleTest::testIsolatedWidgets()
{
- testWidgets(NULL);
+ testWidgets(nullptr);
}
void LifecycleTest::testParentedWidgets()
{
ScopedVclPtrInstance<WorkWindow> xWin(nullptr, WB_APP|WB_STDWORK);
- CPPUNIT_ASSERT(xWin.get() != NULL);
+ CPPUNIT_ASSERT(xWin.get() != nullptr);
xWin->Show();
testWidgets(xWin);
}
@@ -133,7 +133,7 @@ public:
void LifecycleTest::testChildDispose()
{
VclPtrInstance<WorkWindow> xWin(nullptr, WB_APP|WB_STDWORK);
- CPPUNIT_ASSERT(xWin.get() != NULL);
+ CPPUNIT_ASSERT(xWin.get() != nullptr);
VclPtrInstance< DisposableChild > xChild( xWin.get() );
xWin->Show();
xChild->disposeOnce();
@@ -217,7 +217,7 @@ class LeakTestObject
void *mpRef;
LeakTestObject()
: mbDeleted(false)
- , mpRef(NULL)
+ , mpRef(nullptr)
{
}
public:
diff --git a/vcl/source/app/brand.cxx b/vcl/source/app/brand.cxx
index 3304c86d2685..5a7bd2d04b8b 100644
--- a/vcl/source/app/brand.cxx
+++ b/vcl/source/app/brand.cxx
@@ -56,7 +56,7 @@ bool Application::LoadBrandBitmap (const char* pName, BitmapEx &rBitmap)
OUString aBaseName( "/" + OUString::createFromAscii( pName ) );
OUString aPng( ".png" );
- rtl_Locale *pLoc = NULL;
+ rtl_Locale *pLoc = nullptr;
osl_getProcessLocale (&pLoc);
LanguageTag aLanguageTag( *pLoc);
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 17f350b5dfeb..7e53c09d8ffa 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -54,7 +54,7 @@ void DbgGUIInitSolarMutexCheck()
void DbgGUIDeInitSolarMutexCheck()
{
- DbgSetTestSolarMutex( NULL );
+ DbgSetTestSolarMutex( nullptr );
}
#endif // DBG_UTIL
diff --git a/vcl/source/app/dndhelp.cxx b/vcl/source/app/dndhelp.cxx
index 82961c2d154b..7e2ef1c918f7 100644
--- a/vcl/source/app/dndhelp.cxx
+++ b/vcl/source/app/dndhelp.cxx
@@ -86,7 +86,7 @@ void vcl::unohelper::DragAndDropWrapper::disposing( const ::com::sun::star::lang
{
// Empty Source means it's the client, because the client is not a XInterface
if ( !rEvent.Source.is() )
- mpClient = NULL;
+ mpClient = nullptr;
}
// ::com::sun::star::datatransfer::dnd::XDragGestureListener
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index f8702df094db..912607d788b5 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -196,7 +196,7 @@ bool Help::ShowQuickHelp( vcl::Window* pParent,
void Help::HideBalloonAndQuickHelp()
{
HelpTextWindow const * pHelpWin = ImplGetSVData()->maHelpData.mpHelpWin;
- bool const bIsVisible = ( pHelpWin != NULL ) && pHelpWin->IsVisible();
+ bool const bIsVisible = ( pHelpWin != nullptr ) && pHelpWin->IsVisible();
ImplDestroyHelpWindow( bIsVisible );
}
@@ -216,7 +216,7 @@ sal_uIntPtr Help::ShowTip( vcl::Window* pParent, const Rectangle& rScreenRect,
void Help::UpdateTip( sal_uIntPtr nId, vcl::Window* pParent, const Rectangle& rScreenRect, const OUString& rText )
{
HelpTextWindow* pHelpWin = reinterpret_cast< HelpTextWindow* >( nId );
- ENSURE_OR_RETURN_VOID( pHelpWin != NULL, "Help::UpdateTip: invalid ID!" );
+ ENSURE_OR_RETURN_VOID( pHelpWin != nullptr, "Help::UpdateTip: invalid ID!" );
Size aSz = pHelpWin->CalcOutSize();
pHelpWin->SetOutputSizePixel( aSz );
@@ -304,7 +304,7 @@ void HelpTextWindow::dispose()
maHideTimer.Stop();
if( this == ImplGetSVData()->maHelpData.mpHelpWin )
- ImplGetSVData()->maHelpData.mpHelpWin = NULL;
+ ImplGetSVData()->maHelpData.mpHelpWin = nullptr;
FloatingWindow::dispose();
}
@@ -497,7 +497,7 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
bool bWasVisible = pHelpWin->IsVisible();
if ( bWasVisible )
nDelayMode = HELPDELAY_NONE; // display it quickly if we were already in quick help mode
- pHelpWin = NULL;
+ pHelpWin = nullptr;
ImplDestroyHelpWindow( bWasVisible );
}
else
@@ -556,7 +556,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime )
Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) );
if( pHelpWin->IsVisible() )
pWindow->Invalidate( aInvRect );
- pSVData->maHelpData.mpHelpWin = NULL;
+ pSVData->maHelpData.mpHelpWin = nullptr;
pSVData->maHelpData.mbKeyboardHelp = false;
pHelpWin->Hide();
pHelpWin.disposeAndClear();
diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx
index 0ea1286cd9b0..75176fb6bbb2 100644
--- a/vcl/source/app/i18nhelp.cxx
+++ b/vcl/source/app/i18nhelp.cxx
@@ -37,8 +37,8 @@ vcl::I18nHelper::I18nHelper( const ::com::sun::star::uno::Reference< ::com::sun
maLanguageTag( rLanguageTag)
{
m_xContext = rxContext;
- mpLocaleDataWrapper = NULL;
- mpTransliterationWrapper= NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpTransliterationWrapper= nullptr;
mbTransliterateIgnoreCase = false;
}
@@ -50,10 +50,10 @@ vcl::I18nHelper::~I18nHelper()
void vcl::I18nHelper::ImplDestroyWrappers()
{
delete mpLocaleDataWrapper;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
delete mpTransliterationWrapper;
- mpTransliterationWrapper= NULL;
+ mpTransliterationWrapper= nullptr;
}
utl::TransliterationWrapper& vcl::I18nHelper::ImplGetTransliterationWrapper() const
@@ -120,7 +120,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const OUString& rStr1, const OUString&
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = false;
delete const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper;
- const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = NULL;
+ const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = nullptr;
}
OUString aStr1( filterFormattingChars(rStr1) );
@@ -138,7 +138,7 @@ bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rStr2
// ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase
const_cast<vcl::I18nHelper*>(this)->mbTransliterateIgnoreCase = true;
delete const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper;
- const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = NULL;
+ const_cast<vcl::I18nHelper*>(this)->mpTransliterationWrapper = nullptr;
}
OUString aStr1( filterFormattingChars(rStr1) );
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 227e1e27235d..c540eef538f3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -31,8 +31,8 @@
SalFrame::SalFrame()
: m_bPaintsBlocked(false)
- , m_pWindow(NULL)
- , m_pProc(NULL)
+ , m_pWindow(nullptr)
+ , m_pProc(nullptr)
{
}
@@ -68,24 +68,24 @@ SalInstance::~SalInstance()
SalMenu* SalInstance::CreateMenu( bool, Menu* )
{
// default: no native menus
- return NULL;
+ return nullptr;
}
void SalInstance::DestroyMenu( SalMenu* pMenu )
{
(void)pMenu;
- OSL_ENSURE( pMenu == 0, "DestroyMenu called with non-native menus" );
+ OSL_ENSURE( pMenu == nullptr, "DestroyMenu called with non-native menus" );
}
SalMenuItem* SalInstance::CreateMenuItem( const SalItemParams* )
{
- return NULL;
+ return nullptr;
}
void SalInstance::DestroyMenuItem( SalMenuItem* pItem )
{
(void)pItem;
- OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" );
+ OSL_ENSURE( pItem == nullptr, "DestroyMenu called with non-native menus" );
}
SalTimer::~SalTimer()
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 3f18ab7136af..9e43a9326c6f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -44,7 +44,7 @@ void ImplSchedulerData::Invoke()
ImplSchedulerData *ImplSchedulerData::GetMostImportantTask( bool bTimer )
{
ImplSVData* pSVData = ImplGetSVData();
- ImplSchedulerData *pMostUrgent = NULL;
+ ImplSchedulerData *pMostUrgent = nullptr;
for ( ImplSchedulerData *pSchedulerData = pSVData->mpFirstSchedulerData; pSchedulerData; pSchedulerData = pSchedulerData->mpNext )
{
@@ -89,19 +89,19 @@ void Scheduler::ImplDeInitScheduler()
if ( pSchedulerData->mpScheduler )
{
pSchedulerData->mpScheduler->mbActive = false;
- pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+ pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
}
pSchedulerData = pSchedulerData->mpNext;
delete pTempSchedulerData;
}
while ( pSchedulerData );
- pSVData->mpFirstSchedulerData = NULL;
+ pSVData->mpFirstSchedulerData = nullptr;
pSVData->mnTimerPeriod = 0;
}
delete pSVData->mpSalTimer;
- pSVData->mpSalTimer = 0;
+ pSVData->mpSalTimer = nullptr;
}
/**
@@ -155,8 +155,8 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
{
// process all pending Tasks
// if bTimer True, only handle timer
- ImplSchedulerData* pSchedulerData = NULL;
- ImplSchedulerData* pPrevSchedulerData = NULL;
+ ImplSchedulerData* pSchedulerData = nullptr;
+ ImplSchedulerData* pPrevSchedulerData = nullptr;
ImplSVData* pSVData = ImplGetSVData();
sal_uInt64 nTime = tools::Time::GetSystemTicks();
sal_uInt64 nMinPeriod = MaximumTimeoutMs;
@@ -185,7 +185,7 @@ void Scheduler::ProcessTaskScheduling( bool bTimer )
else
pSVData->mpFirstSchedulerData = pSchedulerData->mpNext;
if ( pSchedulerData->mpScheduler )
- pSchedulerData->mpScheduler->mpSchedulerData = NULL;
+ pSchedulerData->mpScheduler->mpSchedulerData = nullptr;
ImplSchedulerData* pTempSchedulerData = pSchedulerData;
pSchedulerData = pSchedulerData->mpNext;
delete pTempSchedulerData;
@@ -227,14 +227,14 @@ void Scheduler::Start()
mpSchedulerData->mbInScheduler = false;
// insert last due to SFX!
- ImplSchedulerData* pPrev = NULL;
+ ImplSchedulerData* pPrev = nullptr;
ImplSchedulerData* pData = pSVData->mpFirstSchedulerData;
while ( pData )
{
pPrev = pData;
pData = pData->mpNext;
}
- mpSchedulerData->mpNext = NULL;
+ mpSchedulerData->mpNext = nullptr;
if ( pPrev )
pPrev->mpNext = mpSchedulerData;
else
@@ -268,7 +268,7 @@ Scheduler& Scheduler::operator=( const Scheduler& rScheduler )
}
Scheduler::Scheduler(const sal_Char *pDebugName):
- mpSchedulerData(NULL),
+ mpSchedulerData(nullptr),
mpDebugName(pDebugName),
mePriority(SchedulerPriority::HIGH),
mbActive(false)
@@ -276,7 +276,7 @@ Scheduler::Scheduler(const sal_Char *pDebugName):
}
Scheduler::Scheduler( const Scheduler& rScheduler ):
- mpSchedulerData(NULL),
+ mpSchedulerData(nullptr),
mpDebugName(rScheduler.mpDebugName),
mePriority(rScheduler.mePriority),
mbActive(false)
@@ -290,7 +290,7 @@ Scheduler::~Scheduler()
if ( mpSchedulerData )
{
mpSchedulerData->mbDelete = true;
- mpSchedulerData->mpScheduler = NULL;
+ mpSchedulerData->mpScheduler = nullptr;
}
}
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index cd3e91d8abc1..3d7a76c41067 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -549,7 +549,7 @@ ImplStyleData::ImplStyleData() :
mbAutoMnemonic = true;
mnToolbarIconSize = ToolbarIconSize::Unknown;
meUseImagesInMenus = TRISTATE_INDET;
- mpFontOptions = NULL;
+ mpFontOptions = nullptr;
mnEdgeBlending = 35;
maEdgeBlendingTopLeftColor = RGB_COLORDATA(0xC0, 0xC0, 0xC0);
maEdgeBlendingBottomRightColor = RGB_COLORDATA(0x40, 0x40, 0x40);
@@ -2422,7 +2422,7 @@ ImplMiscData::ImplMiscData()
mnEnableATT = TRISTATE_INDET;
mnDisablePrinting = TRISTATE_INDET;
static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI
- mbEnableLocalizedDecimalSep = (pEnv != NULL);
+ mbEnableLocalizedDecimalSep = (pEnv != nullptr);
// Should we display any windows?
mbPseudoHeadless = getenv("VCL_HIDE_WINDOWS") || comphelper::LibreOfficeKit::isActive();
}
@@ -2707,10 +2707,10 @@ ImplAllSettingsData::ImplAllSettingsData()
{
mnWindowUpdate = AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE |
AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
- mpLocaleDataWrapper = NULL;
- mpUILocaleDataWrapper = NULL;
- mpI18nHelper = NULL;
- mpUII18nHelper = NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpUILocaleDataWrapper = nullptr;
+ mpI18nHelper = nullptr;
+ mpUII18nHelper = nullptr;
if (!utl::ConfigManager::IsAvoidConfig())
maMiscSettings.SetEnableLocalizedDecimalSep( maSysLocale.GetOptions().IsDecimalSeparatorAsLocale() );
}
@@ -2727,10 +2727,10 @@ ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) :
// Pointer couldn't shared and objects haven't a copy ctor
// So we create the cache objects new, if the GetFunction is
// called
- mpLocaleDataWrapper = NULL;
- mpUILocaleDataWrapper = NULL;
- mpI18nHelper = NULL;
- mpUII18nHelper = NULL;
+ mpLocaleDataWrapper = nullptr;
+ mpUILocaleDataWrapper = nullptr;
+ mpI18nHelper = nullptr;
+ mpUII18nHelper = nullptr;
}
ImplAllSettingsData::~ImplAllSettingsData()
@@ -2857,12 +2857,12 @@ void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag )
if ( mxData->mpLocaleDataWrapper )
{
delete mxData->mpLocaleDataWrapper;
- mxData->mpLocaleDataWrapper = NULL;
+ mxData->mpLocaleDataWrapper = nullptr;
}
if ( mxData->mpI18nHelper )
{
delete mxData->mpI18nHelper;
- mxData->mpI18nHelper = NULL;
+ mxData->mpI18nHelper = nullptr;
}
}
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index a14b8841ef9f..b57b45e7f3b8 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -168,9 +168,9 @@ struct ImplPostEventData
ScrollEvent maScrollEvent;
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const KeyEvent& rKeyEvent ) :
- mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maKeyEvent( rKeyEvent ) {}
+ mnEvent( nEvent ), mpWin( pWin ), mnEventId( nullptr ), maKeyEvent( rKeyEvent ) {}
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const MouseEvent& rMouseEvent ) :
- mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maMouseEvent( rMouseEvent ) {}
+ mnEvent( nEvent ), mpWin( pWin ), mnEventId( nullptr ), maMouseEvent( rMouseEvent ) {}
#if !HAVE_FEATURE_DESKTOP
ImplPostEventData( sal_uLong nEvent, vcl::Window* pWin, const ZoomEvent& rZoomEvent ) :
mnEvent( nEvent ), mpWin( pWin ), mnEventId( 0 ), maZoomEvent( rZoomEvent ) {}
@@ -189,7 +189,7 @@ Application* GetpApp()
{
ImplSVData* pSVData = ImplGetSVData();
if ( !pSVData )
- return NULL;
+ return nullptr;
return pSVData->mpApp;
}
@@ -207,7 +207,7 @@ Application::~Application()
{
ImplDeInitSVData();
DeInitSalData();
- ImplGetSVData()->mpApp = NULL;
+ ImplGetSVData()->mpApp = nullptr;
}
int Application::Main()
@@ -326,7 +326,7 @@ sal_uLong Application::GetReservedKeyCodeCount()
const vcl::KeyCode* Application::GetReservedKeyCode( sal_uLong i )
{
if( i >= GetReservedKeyCodeCount() )
- return NULL;
+ return nullptr;
else
return &ImplReservedKeys::get()->first[i].mKeyCode;
}
@@ -350,12 +350,12 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplEndAllDialogsMsg, void*, void )
void Application::EndAllDialogs()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllDialogsMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllDialogsMsg ) );
}
void Application::EndAllPopups()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplEndAllPopupsMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllPopupsMsg ) );
}
@@ -406,7 +406,7 @@ namespace
{
Application::EndAllPopups();
Application::EndAllDialogs();
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplPrepareExitMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplPrepareExitMsg ) );
}
}
@@ -418,7 +418,7 @@ IMPL_LINK_NOARG_TYPED(ImplSVAppData, VclEventTestingHdl, Idle *, void)
}
else
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplVclEventTestingHdl ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplVclEventTestingHdl ) );
}
}
@@ -441,7 +441,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplVclEventTestingHdl, void*, void
SAL_INFO("vcl.eventtesting", "Event Input exhausted, exit next cycle");
pSVData->maAppData.mnEventTestLimit = 0;
}
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplVclEventTestingHdl ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplVclEventTestingHdl ) );
}
}
@@ -565,7 +565,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( ImplSVAppData, ImplQuitMsg, void*, void )
void Application::Quit()
{
- Application::PostUserEvent( LINK( NULL, ImplSVAppData, ImplQuitMsg ) );
+ Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplQuitMsg ) );
}
comphelper::SolarMutex& Application::GetSolarMutex()
@@ -679,7 +679,7 @@ void Application::SetSettings( const AllSettings& rSettings )
pSVData->mpResMgr )
{
delete pSVData->mpResMgr;
- pSVData->mpResMgr = NULL;
+ pSVData->mpResMgr = nullptr;
}
ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag() );
*pSVData->maAppData.mpSettings = rSettings;
@@ -689,7 +689,7 @@ void Application::SetSettings( const AllSettings& rSettings )
DataChangedEvent aDCEvt( DataChangedEventType::SETTINGS, &aOldSettings, nChangeFlags );
// notify data change handler
- ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, NULL, &aDCEvt);
+ ImplCallEventListeners( VCLEVENT_APPLICATION_DATACHANGED, nullptr, &aDCEvt);
// Update all windows
vcl::Window* pFirstFrame = pSVData->maWinData.mpFirstFrame;
@@ -883,14 +883,14 @@ bool Application::HandleKey( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKey
ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, vcl::Window *pWin, KeyEvent* pKeyEvent )
{
const SolarMutexGuard aGuard;
- ImplSVEvent * nEventId = 0;
+ ImplSVEvent * nEventId = nullptr;
if( pWin && pKeyEvent )
{
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, *pKeyEvent );
nEventId = PostUserEvent(
- LINK( NULL, Application, PostEventHandler ),
+ LINK( nullptr, Application, PostEventHandler ),
pPostEventData );
if( nEventId )
@@ -908,7 +908,7 @@ ImplSVEvent * Application::PostKeyEvent( sal_uLong nEvent, vcl::Window *pWin, Ke
ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin, MouseEvent* pMouseEvent )
{
const SolarMutexGuard aGuard;
- ImplSVEvent * nEventId = 0;
+ ImplSVEvent * nEventId = nullptr;
if( pWin && pMouseEvent )
{
@@ -923,7 +923,7 @@ ImplSVEvent * Application::PostMouseEvent( sal_uLong nEvent, vcl::Window *pWin,
ImplPostEventData* pPostEventData = new ImplPostEventData( nEvent, pWin, aTransformedEvent );
nEventId = PostUserEvent(
- LINK( NULL, Application, PostEventHandler ),
+ LINK( nullptr, Application, PostEventHandler ),
pPostEventData );
if( nEventId )
@@ -986,12 +986,12 @@ IMPL_STATIC_LINK_TYPED( Application, PostEventHandler, void*, pCallData, void )
default:
nEvent = 0;
- pEventData = NULL;
+ pEventData = nullptr;
break;
};
if( pData->mpWin && pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get() && pEventData )
- ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), NULL, (sal_uInt16) nEvent, pEventData );
+ ImplWindowFrameProc( pData->mpWin.get()->mpWindowImpl->mpFrameWindow.get(), nullptr, (sal_uInt16) nEvent, pEventData );
// remove this event from list of posted events, watch for destruction of internal data
::std::list< ImplPostEventPair >::iterator aIter( aPostedEventList.begin() );
@@ -1036,7 +1036,7 @@ ImplSVEvent * Application::PostUserEvent( const Link<void*,void>& rLink, void* p
ImplSVEvent* pSVEvent = new ImplSVEvent;
pSVEvent->mpData = pCaller;
pSVEvent->maLink = rLink;
- pSVEvent->mpWindow = NULL;
+ pSVEvent->mpWindow = nullptr;
pSVEvent->mbCall = true;
if (bReferenceLink)
{
@@ -1049,10 +1049,10 @@ ImplSVEvent * Application::PostUserEvent( const Link<void*,void>& rLink, void* p
}
vcl::Window* pDefWindow = ImplGetDefaultWindow();
- if ( pDefWindow == 0 || !pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
+ if ( pDefWindow == nullptr || !pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
{
delete pSVEvent;
- pSVEvent = 0;
+ pSVEvent = nullptr;
}
return pSVEvent;
}
@@ -1159,7 +1159,7 @@ long Application::GetTopWindowCount()
{
long nRet = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : nullptr;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1173,7 +1173,7 @@ vcl::Window* Application::GetTopWindow( long nIndex )
{
long nIdx = 0;
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : NULL;
+ vcl::Window *pWin = pSVData ? pSVData->maWinData.mpFirstFrame.get() : nullptr;
while( pWin )
{
if( pWin->ImplGetWindow()->IsTopWindow() )
@@ -1185,7 +1185,7 @@ vcl::Window* Application::GetTopWindow( long nIndex )
}
pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Application::GetActiveTopWindow()
@@ -1197,7 +1197,7 @@ vcl::Window* Application::GetActiveTopWindow()
return pWin;
pWin = pWin->mpWindowImpl->mpParent;
}
- return NULL;
+ return nullptr;
}
void Application::SetAppName( const OUString& rUniqueName )
@@ -1417,7 +1417,7 @@ vcl::Window* Application::GetDefDialogParent()
// #103442# find some useful dialog parent if there
// was no default set
// NOTE: currently even the default is not used
- if( false && pSVData->maWinData.mpDefDialogParent.get() != NULL )
+ if( false && pSVData->maWinData.mpDefDialogParent.get() != nullptr )
return pSVData->maWinData.mpDefDialogParent;
else
{
@@ -1426,8 +1426,8 @@ vcl::Window* Application::GetDefDialogParent()
// as DefDialogParent
// current focus frame
- vcl::Window *pWin = NULL;
- if( (pWin = pSVData->maWinData.mpFocusWin) != NULL )
+ vcl::Window *pWin = nullptr;
+ if( (pWin = pSVData->maWinData.mpFocusWin) != nullptr )
{
while( pWin->mpWindowImpl && pWin->mpWindowImpl->mpParent )
pWin = pWin->mpWindowImpl->mpParent;
@@ -1436,8 +1436,8 @@ vcl::Window* Application::GetDefDialogParent()
if( !pWin->mpWindowImpl )
{
OSL_FAIL( "Window hierarchy corrupted!" );
- pSVData->maWinData.mpFocusWin = NULL; // avoid further access
- return NULL;
+ pSVData->maWinData.mpFocusWin = nullptr; // avoid further access
+ return nullptr;
}
if( (pWin->mpWindowImpl->mnStyle & WB_INTROWIN) == 0 )
@@ -1446,7 +1446,7 @@ vcl::Window* Application::GetDefDialogParent()
}
}
// last active application frame
- if( NULL != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
+ if( nullptr != (pWin = pSVData->maWinData.mpActiveApplicationFrame) )
{
return pWin->mpWindowImpl->mpFrameWindow->ImplGetWindow();
}
@@ -1468,7 +1468,7 @@ vcl::Window* Application::GetDefDialogParent()
pWin = pWin->mpWindowImpl->mpFrameData->mpNextFrame;
}
// use the desktop
- return NULL;
+ return nullptr;
}
}
}
@@ -1599,7 +1599,7 @@ void ImplFreeHotKeyData()
pHotKeyData = pTempHotKeyData;
}
- pSVData->maAppData.mpFirstHotKey = NULL;
+ pSVData->maAppData.mpFirstHotKey = nullptr;
}
void ImplFreeEventHookData()
@@ -1614,7 +1614,7 @@ void ImplFreeEventHookData()
pEventHookData = pTempEventHookData;
}
- pSVData->maAppData.mpFirstEventHook = NULL;
+ pSVData->maAppData.mpFirstEventHook = nullptr;
}
long Application::CallEventHooks( NotifyEvent& rEvt )
@@ -1790,8 +1790,8 @@ void Application::setDeInitHook(Link<LinkParamNone*,void> const & hook) {
}
ImplDelData::ImplDelData( vcl::Window* pWindow ) :
- mpNext( NULL ),
- mpWindow( NULL ),
+ mpNext( nullptr ),
+ mpWindow( nullptr ),
mbDel( false )
{
if( pWindow ) AttachToWindow( pWindow );
@@ -1818,7 +1818,7 @@ ImplDelData::~ImplDelData()
{
// the window still exists but we were not removed
mpWindow.get()->ImplRemoveDel( this );
- mpWindow = NULL;
+ mpWindow = nullptr;
}
}
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index a4b03dec9afe..487c8959c4f7 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -107,11 +107,11 @@ void ImplDeInitSVData()
delete pSVData->mpDockingManager;
if( pSVData->maCtrlData.mpFieldUnitStrings )
- delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = NULL;
+ delete pSVData->maCtrlData.mpFieldUnitStrings, pSVData->maCtrlData.mpFieldUnitStrings = nullptr;
if( pSVData->maCtrlData.mpCleanUnitStrings )
- delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = NULL;
+ delete pSVData->maCtrlData.mpCleanUnitStrings, pSVData->maCtrlData.mpCleanUnitStrings = nullptr;
if( pSVData->mpPaperNames )
- delete pSVData->mpPaperNames, pSVData->mpPaperNames = NULL;
+ delete pSVData->mpPaperNames, pSVData->mpPaperNames = nullptr;
}
vcl::Window* ImplGetDefaultWindow()
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index 684546f430e0..ca2ae8245436 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -208,10 +208,10 @@ int SVMain()
// This variable is set when no Application object has been instantiated
// before InitVCL is called
-static Application * pOwnSvApp = NULL;
+static Application * pOwnSvApp = nullptr;
// Exception handler. pExceptionHandler != NULL => VCL already inited
-static oslSignalHandler pExceptionHandler = NULL;
+static oslSignalHandler pExceptionHandler = nullptr;
class DesktopEnvironmentContext: public cppu::WeakImplHelper< com::sun::star::uno::XCurrentContext >
{
@@ -245,7 +245,7 @@ uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Nam
bool InitVCL()
{
- if( pExceptionHandler != NULL )
+ if( pExceptionHandler != nullptr )
return false;
EmbeddedFontsHelper::clearTemporaryFontFiles();
@@ -293,7 +293,7 @@ bool InitVCL()
pSVData->maGDIData.mpGrfConverter = new GraphicConverter;
// Set exception handler
- pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, NULL);
+ pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, nullptr);
DBGGUI_INIT_SOLARMUTEXCHECK();
@@ -325,7 +325,7 @@ VCLUnoWrapperDeleter::disposing(lang::EventObject const& /* rSource */)
if (pSVData && pSVData->mpUnoWrapper)
{
pSVData->mpUnoWrapper->Destroy();
- pSVData->mpUnoWrapper = NULL;
+ pSVData->mpUnoWrapper = nullptr;
}
}
@@ -340,7 +340,7 @@ void DeInitVCL()
// give ime status a chance to destroy its own windows
delete pSVData->mpImeStatus;
- pSVData->mpImeStatus = NULL;
+ pSVData->mpImeStatus = nullptr;
#if OSL_DEBUG_LEVEL > 0
OStringBuffer aBuf( 256 );
@@ -371,13 +371,13 @@ void DeInitVCL()
ImplImageTree::get().shutDown();
osl_removeSignalHandler( pExceptionHandler);
- pExceptionHandler = NULL;
+ pExceptionHandler = nullptr;
// free global data
delete pSVData->maGDIData.mpGrfConverter;
if( pSVData->mpSettingsConfigItem )
- delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = NULL;
+ delete pSVData->mpSettingsConfigItem, pSVData->mpSettingsConfigItem = nullptr;
if ( pSVData->maAppData.mpIdleMgr )
delete pSVData->maAppData.mpIdleMgr;
@@ -386,52 +386,52 @@ void DeInitVCL()
if ( pSVData->maWinData.mpMsgBoxImgList )
{
delete pSVData->maWinData.mpMsgBoxImgList;
- pSVData->maWinData.mpMsgBoxImgList = NULL;
+ pSVData->maWinData.mpMsgBoxImgList = nullptr;
}
if ( pSVData->maCtrlData.mpCheckImgList )
{
delete pSVData->maCtrlData.mpCheckImgList;
- pSVData->maCtrlData.mpCheckImgList = NULL;
+ pSVData->maCtrlData.mpCheckImgList = nullptr;
}
if ( pSVData->maCtrlData.mpRadioImgList )
{
delete pSVData->maCtrlData.mpRadioImgList;
- pSVData->maCtrlData.mpRadioImgList = NULL;
+ pSVData->maCtrlData.mpRadioImgList = nullptr;
}
if ( pSVData->maCtrlData.mpPinImgList )
{
delete pSVData->maCtrlData.mpPinImgList;
- pSVData->maCtrlData.mpPinImgList = NULL;
+ pSVData->maCtrlData.mpPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitHPinImgList )
{
delete pSVData->maCtrlData.mpSplitHPinImgList;
- pSVData->maCtrlData.mpSplitHPinImgList = NULL;
+ pSVData->maCtrlData.mpSplitHPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitVPinImgList )
{
delete pSVData->maCtrlData.mpSplitVPinImgList;
- pSVData->maCtrlData.mpSplitVPinImgList = NULL;
+ pSVData->maCtrlData.mpSplitVPinImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitHArwImgList )
{
delete pSVData->maCtrlData.mpSplitHArwImgList;
- pSVData->maCtrlData.mpSplitHArwImgList = NULL;
+ pSVData->maCtrlData.mpSplitHArwImgList = nullptr;
}
if ( pSVData->maCtrlData.mpSplitVArwImgList )
{
delete pSVData->maCtrlData.mpSplitVArwImgList;
- pSVData->maCtrlData.mpSplitVArwImgList = NULL;
+ pSVData->maCtrlData.mpSplitVArwImgList = nullptr;
}
if ( pSVData->maCtrlData.mpDisclosurePlus )
{
delete pSVData->maCtrlData.mpDisclosurePlus;
- pSVData->maCtrlData.mpDisclosurePlus = NULL;
+ pSVData->maCtrlData.mpDisclosurePlus = nullptr;
}
if ( pSVData->maCtrlData.mpDisclosureMinus )
{
delete pSVData->maCtrlData.mpDisclosureMinus;
- pSVData->maCtrlData.mpDisclosureMinus = NULL;
+ pSVData->maCtrlData.mpDisclosureMinus = nullptr;
}
pSVData->mpDefaultWin.disposeAndClear();
@@ -463,7 +463,7 @@ void DeInitVCL()
}
if( pSVData->maDeInitHook.IsSet() )
{
- pSVData->maDeInitHook.Call(0);
+ pSVData->maDeInitHook.Call(nullptr);
}
}
@@ -476,42 +476,42 @@ void DeInitVCL()
}
delete pSVData->maAppData.mpSettings;
- pSVData->maAppData.mpSettings = NULL;
+ pSVData->maAppData.mpSettings = nullptr;
}
if ( pSVData->maAppData.mpAccelMgr )
{
delete pSVData->maAppData.mpAccelMgr;
- pSVData->maAppData.mpAccelMgr = NULL;
+ pSVData->maAppData.mpAccelMgr = nullptr;
}
if ( pSVData->maAppData.mpAppFileName )
{
delete pSVData->maAppData.mpAppFileName;
- pSVData->maAppData.mpAppFileName = NULL;
+ pSVData->maAppData.mpAppFileName = nullptr;
}
if ( pSVData->maAppData.mpAppName )
{
delete pSVData->maAppData.mpAppName;
- pSVData->maAppData.mpAppName = NULL;
+ pSVData->maAppData.mpAppName = nullptr;
}
if ( pSVData->maAppData.mpDisplayName )
{
delete pSVData->maAppData.mpDisplayName;
- pSVData->maAppData.mpDisplayName = NULL;
+ pSVData->maAppData.mpDisplayName = nullptr;
}
if ( pSVData->maAppData.mpEventListeners )
{
delete pSVData->maAppData.mpEventListeners;
- pSVData->maAppData.mpEventListeners = NULL;
+ pSVData->maAppData.mpEventListeners = nullptr;
}
if ( pSVData->maAppData.mpKeyListeners )
{
delete pSVData->maAppData.mpKeyListeners;
- pSVData->maAppData.mpKeyListeners = NULL;
+ pSVData->maAppData.mpKeyListeners = nullptr;
}
if ( pSVData->maAppData.mpPostYieldListeners )
{
delete pSVData->maAppData.mpPostYieldListeners;
- pSVData->maAppData.mpPostYieldListeners = NULL;
+ pSVData->maAppData.mpPostYieldListeners = nullptr;
}
if ( pSVData->maAppData.mpFirstHotKey )
@@ -520,18 +520,18 @@ void DeInitVCL()
ImplFreeEventHookData();
if (pSVData->mpBlendFrameCache)
- delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = NULL;
+ delete pSVData->mpBlendFrameCache, pSVData->mpBlendFrameCache = nullptr;
ImplDeletePrnQueueList();
delete pSVData->maGDIData.mpScreenFontList;
- pSVData->maGDIData.mpScreenFontList = NULL;
+ pSVData->maGDIData.mpScreenFontList = nullptr;
delete pSVData->maGDIData.mpScreenFontCache;
- pSVData->maGDIData.mpScreenFontCache = NULL;
+ pSVData->maGDIData.mpScreenFontCache = nullptr;
if ( pSVData->mpResMgr )
{
delete pSVData->mpResMgr;
- pSVData->mpResMgr = NULL;
+ pSVData->mpResMgr = nullptr;
}
ResMgr::DestroyAllResMgr();
@@ -539,9 +539,9 @@ void DeInitVCL()
// destroy all Sal interfaces before destorying the instance
// and thereby unloading the plugin
delete pSVData->mpSalSystem;
- pSVData->mpSalSystem = NULL;
+ pSVData->mpSalSystem = nullptr;
delete pSVData->mpSalTimer;
- pSVData->mpSalTimer = NULL;
+ pSVData->mpSalTimer = nullptr;
// Deinit Sal
DestroySalInstance( pSVData->mpDefInst );
@@ -549,7 +549,7 @@ void DeInitVCL()
if( pOwnSvApp )
{
delete pOwnSvApp;
- pOwnSvApp = NULL;
+ pOwnSvApp = nullptr;
}
EmbeddedFontsHelper::clearTemporaryFontFiles();
@@ -579,14 +579,14 @@ static unsigned __stdcall _threadmain( void *pArgs )
return 0;
}
#else
-static oslThread hThreadID = 0;
+static oslThread hThreadID = nullptr;
extern "C"
{
static void SAL_CALL MainWorkerFunction( void* pArgs )
{
static_cast<WorkerThreadData*>(pArgs)->pWorker( static_cast<WorkerThreadData*>(pArgs)->pThreadData );
delete static_cast<WorkerThreadData*>(pArgs);
- hThreadID = 0;
+ hThreadID = nullptr;
}
} // extern "C"
#endif
diff --git a/vcl/source/app/unohelp2.cxx b/vcl/source/app/unohelp2.cxx
index 280f04eeadeb..73389919f4bf 100644
--- a/vcl/source/app/unohelp2.cxx
+++ b/vcl/source/app/unohelp2.cxx
@@ -50,7 +50,7 @@ namespace vcl { namespace unohelper {
SolarMutexReleaser aReleaser;
try
{
- rxClipboard->setContents( pDataObj, NULL );
+ rxClipboard->setContents( pDataObj, nullptr );
uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
if( xFlushableClipboard.is() )
diff --git a/vcl/source/components/factory.cxx b/vcl/source/components/factory.cxx
index 403232c0c91f..856bddc23d35 100644
--- a/vcl/source/components/factory.cxx
+++ b/vcl/source/components/factory.cxx
@@ -38,7 +38,7 @@ extern "C" {
void* /*pXUnoKey*/
)
{
- void* pRet = 0;
+ void* pRet = nullptr;
if( pXUnoSMgr )
{
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 5a259d07c779..0bfd72004960 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -256,8 +256,8 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
WinBits nWinStyle = GetStyle();
Rectangle aOutRect( rPos, rSize );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
ImageAlign eImageAlign = mpButtonData->meImageAlign;
Size aImageSize = mpButtonData->maImage.GetSizePixel();
@@ -611,7 +611,7 @@ bool Button::set_property(const OString &rKey, const OString &rValue)
IMPL_STATIC_LINK_TYPED( Button, dispatchCommandHandler, Button*, pButton, void )
{
- if (pButton == NULL)
+ if (pButton == nullptr)
return;
comphelper::dispatchCommand(pButton->maCommand, uno::Sequence<beans::PropertyValue>());
@@ -633,14 +633,14 @@ namespace
{
vcl::Window* getPreviousSibling(vcl::Window *pParent)
{
- return pParent ? pParent->GetWindow(GetWindowType::LastChild) : NULL;
+ return pParent ? pParent->GetWindow(GetWindowType::LastChild) : nullptr;
}
}
void PushButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
if ( nStyle & WB_NOLIGHTBORDER )
ImplGetButtonState() |= DrawButtonFlags::NoLightBorder;
@@ -868,7 +868,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
aSymbolRect.Left() = aSymbolRect.Right() - nSymbolSize;
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep,
- nDrawFlags, nTextStyle, NULL, true );
+ nDrawFlags, nTextStyle, nullptr, true );
}
else
ImplCalcSymbolRect( aSymbolRect );
@@ -893,7 +893,7 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice* pDev, DrawFlags nDrawFl
{
Rectangle aSymbolRect;
ImplDrawAlignedImage( pDev, aPos, aSize, bLayout, nImageSep, nDrawFlags,
- nTextStyle, IsSymbol() ? &aSymbolRect : NULL, true );
+ nTextStyle, IsSymbol() ? &aSymbolRect : nullptr, true );
if ( IsSymbol() && ! bLayout )
{
@@ -1479,9 +1479,9 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt )
bool PushButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() )
{
@@ -1817,7 +1817,7 @@ void RadioButton::ImplInitRadioButtonData()
void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings( true, true, true );
}
@@ -2003,8 +2003,8 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
{
WinBits nWinStyle = GetStyle();
OUString aText( GetText() );
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
pDev->Push( PushFlags::CLIPREGION );
pDev->IntersectClipRegion( Rectangle( rPos, rSize ) );
@@ -2610,9 +2610,9 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt )
bool RadioButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -2960,7 +2960,7 @@ void CheckBox::ImplInitCheckBoxData()
void CheckBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle(getPreviousSibling(pParent), nStyle);
- Button::ImplInit( pParent, nStyle, NULL );
+ Button::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings( true, true, true );
}
@@ -3565,9 +3565,9 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt )
bool CheckBox::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -3896,7 +3896,7 @@ void DisclosureButton::ImplDrawCheckBoxState(vcl::RenderContext& rRenderContext)
if (!rCtrlData.mpDisclosureMinus)
rCtrlData.mpDisclosureMinus = new Image(BitmapEx(VclResId(SV_DISCLOSURE_MINUS)));
- Image* pImg = NULL;
+ Image* pImg = nullptr;
pImg = IsChecked() ? rCtrlData.mpDisclosureMinus : rCtrlData.mpDisclosurePlus;
DBG_ASSERT(pImg, "no disclosure image");
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index db1af03e1862..f7e04c7eb1cb 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -50,7 +50,7 @@ Control::Control( vcl::Window* pParent, WinBits nStyle ) :
Window( WINDOW_CONTROL )
{
ImplInitControlData();
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
}
Control::Control( vcl::Window* pParent, const ResId& rResId ) :
@@ -59,7 +59,7 @@ Control::Control( vcl::Window* pParent, const ResId& rResId ) :
ImplInitControlData();
rResId.SetRT( RSC_CONTROL );
WinBits nStyle = ImplInitRes( rResId );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE) )
@@ -73,7 +73,7 @@ Control::~Control()
void Control::dispose()
{
- delete mpControlData, mpControlData = NULL;
+ delete mpControlData, mpControlData = nullptr;
Window::dispose();
}
@@ -114,7 +114,7 @@ void Control::CreateLayoutData() const
bool Control::HasLayoutData() const
{
- return mpControlData && mpControlData->mpLayoutData != NULL;
+ return mpControlData && mpControlData->mpLayoutData != nullptr;
}
void Control::SetText( const OUString& rStr )
@@ -123,7 +123,7 @@ void Control::SetText( const OUString& rStr )
Window::SetText( rStr );
}
-ControlLayoutData::ControlLayoutData() : m_pParent( NULL )
+ControlLayoutData::ControlLayoutData() : m_pParent( nullptr )
{
}
@@ -350,7 +350,7 @@ void Control::ImplClearLayoutData() const
if (mpControlData)
{
delete mpControlData->mpLayoutData;
- mpControlData->mpLayoutData = NULL;
+ mpControlData->mpLayoutData = nullptr;
}
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 7ac3a4443d1e..e905fba3df8b 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -77,7 +77,7 @@ using namespace ::com::sun::star::lang;
// - Redo
// - Bei Tracking-Cancel DefaultSelection wieder herstellen
-static FncGetSpecialChars pImplFncGetSpecialChars = NULL;
+static FncGetSpecialChars pImplFncGetSpecialChars = nullptr;
#define EDIT_ALIGN_LEFT 1
#define EDIT_ALIGN_CENTER 2
@@ -133,7 +133,7 @@ Impl_IMEInfos::Impl_IMEInfos(sal_Int32 nP, const OUString& rOldTextAfterStartPos
nPos = nP;
nLen = 0;
bCursor = true;
- pAttribs = NULL;
+ pAttribs = nullptr;
bWasCursorOverwrite = false;
}
@@ -153,7 +153,7 @@ void Impl_IMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL)
void Impl_IMEInfos::DestroyAttribs()
{
delete[] pAttribs;
- pAttribs = NULL;
+ pAttribs = nullptr;
nLen = 0;
}
@@ -256,20 +256,20 @@ Edit::~Edit()
void Edit::dispose()
{
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
vcl::Cursor* pCursor = GetCursor();
if ( pCursor )
{
- SetCursor( NULL );
+ SetCursor( nullptr );
delete pCursor;
}
delete mpIMEInfos;
- mpIMEInfos = NULL;
+ mpIMEInfos = nullptr;
delete mpUpdateDataTimer;
- mpUpdateDataTimer = NULL;
+ mpUpdateDataTimer = nullptr;
if ( mxDnDListener.is() )
{
@@ -298,8 +298,8 @@ void Edit::dispose()
void Edit::ImplInitEditData()
{
mpSubEdit = VclPtr<Edit>();
- mpUpdateDataTimer = NULL;
- mpFilterText = NULL;
+ mpUpdateDataTimer = nullptr;
+ mpFilterText = nullptr;
mnXOffset = 0;
mnAlign = EDIT_ALIGN_LEFT;
mnMaxTextLen = EDIT_NOLIMIT;
@@ -314,8 +314,8 @@ void Edit::ImplInitEditData()
mbActivePopup = false;
mbIsSubEdit = false;
mbInMBDown = false;
- mpDDInfo = NULL;
- mpIMEInfos = NULL;
+ mpDDInfo = nullptr;
+ mpIMEInfos = nullptr;
mcEchoChar = 0;
// --- RTL --- no default mirroring for Edit controls
@@ -349,7 +349,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle)
if (!(nStyle & (WB_CENTER | WB_RIGHT)))
nStyle |= WB_LEFT;
- Control::ImplInit(pParent, nStyle, NULL);
+ Control::ImplInit(pParent, nStyle, nullptr);
mbReadOnly = (nStyle & WB_READONLY) != 0;
@@ -1758,7 +1758,7 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt )
bDone = true; // read characters also when in ReadOnly
if ( !mbReadOnly )
{
- ImplInsertText(OUString(rKEvt.GetCharCode()), 0, true);
+ ImplInsertText(OUString(rKEvt.GetCharCode()), nullptr, true);
if (!m_pImpl->m_AutocompleteSignal.empty())
{
if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) )
@@ -2117,7 +2117,7 @@ void Edit::Command( const CommandEvent& rCEvt )
{
bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite;
delete mpIMEInfos;
- mpIMEInfos = NULL;
+ mpIMEInfos = nullptr;
SetInsertMode(bInsertMode);
ImplModified();
@@ -2185,7 +2185,7 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( mpIMEInfos )
{
sal_Int32 nCursorPos = GetSelection().Max();
- SetCursorRect( NULL, GetTextWidth( maText.toString(), nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
+ SetCursorRect( nullptr, GetTextWidth( maText.toString(), nCursorPos, mpIMEInfos->nPos+mpIMEInfos->nLen-nCursorPos ) );
}
else
{
@@ -2936,7 +2936,7 @@ void Edit::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourceDro
ImplHideDDCursor();
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
}
// ::com::sun::star::datatransfer::dnd::XDropTargetListener
@@ -2980,7 +2980,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent&
if ( !mpDDInfo->bStarterOfDD )
{
delete mpDDInfo;
- mpDDInfo = NULL;
+ mpDDInfo = nullptr;
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 040cfa87d9a0..8036d1640d1d 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -370,7 +370,7 @@ static void ImplUpdateSeparators( const OUString& rOldDecSep, const OUString& rN
FormatterBase::FormatterBase( Edit* pField )
{
mpField = pField;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
mbReformat = false;
mbStrictFormat = false;
mbEmptyFieldValue = false;
@@ -802,7 +802,7 @@ NumericField::NumericField( vcl::Window* pParent, const ResId& rResId ) :
void NumericField::dispose()
{
- NumericFormatter::SetField( NULL );
+ NumericFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -957,7 +957,7 @@ NumericBox::NumericBox( vcl::Window* pParent, WinBits nWinStyle ) :
void NumericBox::dispose()
{
- NumericFormatter::SetField( NULL );
+ NumericFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -1626,7 +1626,7 @@ MetricField::MetricField( vcl::Window* pParent, const ResId& rResId ) :
void MetricField::dispose()
{
- MetricFormatter::SetField( NULL );
+ MetricFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -1796,7 +1796,7 @@ MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) :
void MetricBox::dispose()
{
- MetricFormatter::SetField(NULL);
+ MetricFormatter::SetField(nullptr);
ComboBox::dispose();
}
@@ -2030,7 +2030,7 @@ CurrencyField::CurrencyField( vcl::Window* pParent, WinBits nWinStyle ) :
void CurrencyField::dispose()
{
- CurrencyFormatter::SetField( NULL );
+ CurrencyFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -2114,7 +2114,7 @@ CurrencyBox::CurrencyBox( vcl::Window* pParent, WinBits nWinStyle ) :
void CurrencyBox::dispose()
{
- CurrencyFormatter::SetField( NULL );
+ CurrencyFormatter::SetField( nullptr );
ComboBox::dispose();
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 0c2644994e93..8fd5b2215899 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -821,7 +821,7 @@ PatternField::PatternField( vcl::Window* pParent, WinBits nWinStyle ) :
void PatternField::dispose()
{
- PatternFormatter::SetField( NULL );
+ PatternFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -873,7 +873,7 @@ PatternBox::PatternBox( vcl::Window* pParent, WinBits nWinStyle ) :
void PatternBox::dispose()
{
- PatternFormatter::SetField( NULL );
+ PatternFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -1407,7 +1407,7 @@ void DateFormatter::ImplInit()
{
mbLongFormat = false;
mbShowDateCentury = true;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
mnDateFormat = 0xFFFF;
mnExtDateFormat = XTDATEF_SYSTEM_SHORT;
}
@@ -1425,13 +1425,13 @@ DateFormatter::DateFormatter() :
DateFormatter::~DateFormatter()
{
delete mpCalendarWrapper;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
}
void DateFormatter::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
{
delete mpCalendarWrapper;
- mpCalendarWrapper = NULL;
+ mpCalendarWrapper = nullptr;
FormatterBase::SetLocale( rLocale );
}
@@ -1730,7 +1730,7 @@ DateField::DateField( vcl::Window* pParent, WinBits nWinStyle ) :
void DateField::dispose()
{
- DateFormatter::SetField( NULL );
+ DateFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -1835,7 +1835,7 @@ DateBox::DateBox( vcl::Window* pParent, WinBits nWinStyle ) :
void DateBox::dispose()
{
- DateFormatter::SetField( NULL );
+ DateFormatter::SetField( nullptr );
ComboBox::dispose();
}
@@ -2513,7 +2513,7 @@ TimeField::TimeField( vcl::Window* pParent, WinBits nWinStyle ) :
void TimeField::dispose()
{
- TimeFormatter::SetField( NULL );
+ TimeFormatter::SetField( nullptr );
SpinField::dispose();
}
@@ -2656,7 +2656,7 @@ TimeBox::TimeBox( vcl::Window* pParent, WinBits nWinStyle ) :
void TimeBox::dispose()
{
- TimeFormatter::SetField( NULL );
+ TimeFormatter::SetField( nullptr );
ComboBox::dispose();
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 9502c08e97fc..a5f9e95d60f0 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -83,7 +83,7 @@ static Point ImplCalcPos( WinBits nStyle, const Point& rPos,
void FixedText::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -108,7 +108,7 @@ FixedText::FixedText( vcl::Window* pParent, WinBits nStyle )
: Control(WINDOW_FIXEDTEXT)
, m_nMaxWidthChars(-1)
, m_nMinWidthChars(-1)
- , m_pMnemonicWindow(NULL)
+ , m_pMnemonicWindow(nullptr)
{
ImplInit( pParent, nStyle );
}
@@ -117,7 +117,7 @@ FixedText::FixedText( vcl::Window* pParent, const ResId& rResId )
: Control(WINDOW_FIXEDTEXT)
, m_nMaxWidthChars(-1)
, m_nMinWidthChars(-1)
- , m_pMnemonicWindow(NULL)
+ , m_pMnemonicWindow(nullptr)
{
rResId.SetRT( RSC_TEXT );
WinBits nStyle = ImplInitRes( rResId );
@@ -199,8 +199,8 @@ void FixedText::ImplDraw(OutputDevice* pDev, DrawFlags nDrawFlags,
Rectangle aRect( Rectangle( aPos, rSize ) );
DrawControlText(*pDev, aRect, aText, nTextStyle,
- bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL,
- bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL);
+ bFillLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
+ bFillLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
}
void FixedText::ApplySettings(vcl::RenderContext& rRenderContext)
@@ -445,7 +445,7 @@ void FixedText::set_mnemonic_widget(vcl::Window *pWindow)
if (m_pMnemonicWindow)
{
vcl::Window *pTempReEntryGuard = m_pMnemonicWindow;
- m_pMnemonicWindow = NULL;
+ m_pMnemonicWindow = nullptr;
pTempReEntryGuard->remove_mnemonic_label(this);
}
m_pMnemonicWindow = pWindow;
@@ -460,7 +460,7 @@ FixedText::~FixedText()
void FixedText::dispose()
{
- set_mnemonic_widget(NULL);
+ set_mnemonic_widget(nullptr);
m_pMnemonicWindow.clear();
Control::dispose();
}
@@ -492,7 +492,7 @@ void SelectableFixedText::LoseFocus()
void FixedLine::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -521,8 +521,8 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
OUString aText = GetText();
WinBits nWinStyle = GetStyle();
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
DecorationView aDecoView(&rRenderContext);
if (aText.isEmpty())
@@ -713,7 +713,7 @@ Size FixedLine::GetOptimalSize() const
void FixedBitmap::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
@@ -851,7 +851,7 @@ void FixedImage::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
mbInUserDraw = false;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ApplySettings(*this);
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 18906a58efc4..680362a7c9ba 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -33,7 +33,7 @@
void GroupBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
nStyle = ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
SetMouseTransparent( true );
ImplInitSettings( true, true, true );
}
@@ -177,8 +177,8 @@ void GroupBox::ImplDraw( OutputDevice* pDev, DrawFlags nDrawFlags,
}
}
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
DrawControlText( *pDev, aRect, aText, nTextStyle, pVector, pDisplayText );
}
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 358fcf2cc93b..caf3099eea05 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -373,7 +373,7 @@ void ImplEntryList::SetEntryData( sal_Int32 nPos, void* pNewData )
void* ImplEntryList::GetEntryData( sal_Int32 nPos ) const
{
ImplEntryType* pImplEntry = GetEntry( nPos );
- return pImplEntry ? pImplEntry->mpUserData : NULL;
+ return pImplEntry ? pImplEntry->mpUserData : nullptr;
}
void ImplEntryList::SetEntryFlags( sal_Int32 nPos, ListBoxEntryFlags nFlags )
@@ -733,11 +733,11 @@ void ImplListBoxWindow::ImplCallSelect()
ImplUpdateEntryMetrics( *pNewEntry );
GetEntryList()->SetMRUCount( ++nMRUCount );
SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 );
- maMRUChangedHdl.Call( NULL );
+ maMRUChangedHdl.Call( nullptr );
}
}
- maSelectHdl.Call( NULL );
+ maSelectHdl.Call( nullptr );
mbSelectionChanged = false;
}
@@ -801,7 +801,7 @@ sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
nY += pEntry->mnHeight;
pEntry = mpEntryList->GetEntryPtr( ++nSelect );
}
- if( pEntry == NULL )
+ if( pEntry == nullptr )
nSelect = LISTBOX_ENTRY_NOTFOUND;
return nSelect;
@@ -934,7 +934,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt )
// VCLEVENT_LISTBOX_SELECT vcl event.
else
{
- maListItemSelectHdl.Call(NULL);
+ maListItemSelectHdl.Call(nullptr);
}
}
mbTrackingSelect = false;
@@ -1188,7 +1188,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt )
}
else
{
- maCancelHdl.Call( NULL );
+ maCancelHdl.Call( nullptr );
if ( !mbMulti )
{
mbTrackingSelect = true;
@@ -1813,8 +1813,8 @@ void ImplListBoxWindow::DrawEntry(vcl::RenderContext& rRenderContext, sal_Int32
if (bDrawText)
{
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
OUString aStr(mpEntryList->GetEntryText(nPos));
if (!aStr.isEmpty())
{
@@ -2633,9 +2633,9 @@ void ImplWin::FillLayoutData() const
bool ImplWin::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( pMouseEvt->IsEnterWindow() || pMouseEvt->IsLeaveWindow() )
{
@@ -2850,8 +2850,8 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
aTextRect.Left() += nMaxWidth + IMG_TXT_DISTANCE;
}
- MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr;
rRenderContext.DrawText( aTextRect, maString, nTextStyle, pVector, pDisplayText );
}
@@ -2939,7 +2939,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& )
ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( vcl::Window* pParent ) :
FloatingWindow( pParent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ) // no drop shadow for list boxes
{
- mpImplLB = NULL;
+ mpImplLB = nullptr;
mnDDLineCount = 0;
mbAutoWidth = false;
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index cf1230b154c7..2858c08287d7 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -44,7 +44,7 @@ void ListBox::EnableQuickSelection( const bool& b )
ListBox::ListBox(WindowType nType)
: Control(nType)
- , mpImplLB(NULL)
+ , mpImplLB(nullptr)
{
ImplInitListBoxData();
}
@@ -87,9 +87,9 @@ void ListBox::dispose()
void ListBox::ImplInitListBoxData()
{
- mpFloatWin = NULL;
- mpImplWin = NULL;
- mpBtn = NULL;
+ mpFloatWin = nullptr;
+ mpImplWin = nullptr;
+ mpBtn = nullptr;
mnDDHeight = 0;
mnSaveValue = LISTBOX_ENTRY_NOTFOUND;
mnLineCount = 0;
@@ -104,7 +104,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NOBORDER) && ( nStyle & WB_DROPDOWN ) )
nStyle |= WB_BORDER;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetListener> xDrop = new DNDEventDispatcher(this);
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index 7da797e51a50..773d439a6572 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -30,9 +30,9 @@ void MenuButton::ImplInitMenuButtonData()
{
mnDDStyle = PushButtonDropdownStyle::MenuButton;
- mpMenuTimer = NULL;
- mpMenu = NULL;
- mpOwnMenu = NULL;
+ mpMenuTimer = nullptr;
+ mpMenu = nullptr;
+ mpOwnMenu = nullptr;
mnCurItemId = 0;
mnMenuMode = 0;
}
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index b8bcbc2632b8..fa375da538c9 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -36,7 +36,7 @@ void MoreButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
meUnit = MAP_PIXEL;
mbState = false;
- mpMBData->mpItemList = NULL;
+ mpMBData->mpItemList = nullptr;
PushButton::ImplInit( pParent, nStyle );
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 2ed4d8e38e25..dc0e8117fc19 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -88,7 +88,7 @@ namespace vcl
pSearchEntry = _engineData.rEntryList.NextEntry( pSearchEntry, sEntryText );
if ( pSearchEntry == pStartedWith )
- pSearchEntry = NULL;
+ pSearchEntry = nullptr;
}
return pSearchEntry;
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index be52f24918f5..be571fddb93e 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -76,7 +76,7 @@ struct ImplScrollBarData
void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
- mpData = NULL;
+ mpData = nullptr;
mnThumbPixRange = 0;
mnThumbPixPos = 0;
mnThumbPixSize = 0;
@@ -102,7 +102,7 @@ void ScrollBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
ImplInitStyle( nStyle );
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
long nScrollSize = GetSettings().GetStyleSettings().GetScrollBarSize();
SetSizePixel( Size( nScrollSize, nScrollSize ) );
@@ -129,7 +129,7 @@ ScrollBar::~ScrollBar()
void ScrollBar::dispose()
{
- delete mpData; mpData = NULL;
+ delete mpData; mpData = nullptr;
Control::dispose();
}
@@ -1258,14 +1258,14 @@ Rectangle* ScrollBar::ImplFindPartRect( const Point& rPt )
maThumbRect.IsInside( rPt ) )
return &maThumbRect;
else
- return NULL;
+ return nullptr;
}
bool ScrollBar::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -1436,7 +1436,7 @@ Size ScrollBar::getCurrentCalcSize() const
void ScrollBarBox::ImplInit(vcl::Window* pParent, WinBits nStyle)
{
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
long nScrollSize = rStyleSettings.GetScrollBarSize();
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index ef6bd776f40f..149041421797 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -63,7 +63,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle )
mpLinkedField = nullptr;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
SetSizePixel( CalcWindowSizePixel() );
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index a675f01bb518..f720420a9546 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -45,7 +45,7 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
else
mbHorz = false;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
}
SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle )
@@ -433,14 +433,14 @@ Rectangle* SpinButton::ImplFindPartRect( const Point& rPt )
else if( maLowerRect.IsInside( rPt ) )
return &maLowerRect;
else
- return NULL;
+ return nullptr;
}
bool SpinButton::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL)
+ if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr)
{
if (!pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged())
{
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index b21c70344135..5f86629d5d17 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -862,14 +862,14 @@ Rectangle* SpinField::ImplFindPartRect(const Point& rPt)
else if (maLowerRect.IsInside(rPt))
return &maLowerRect;
else
- return NULL;
+ return nullptr;
}
bool SpinField::PreNotify(NotifyEvent& rNEvt)
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL)
+ if ((rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr)
{
if (!pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged())
{
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 1a725a30c818..d848ab04d945 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -55,7 +55,7 @@ struct ImplTabItem
Image maTabImage;
ImplTabItem()
- : mnId( 0 ), mpTabPage( NULL ),
+ : mnId( 0 ), mpTabPage( nullptr ),
mnLine( 0 ), mbFullVisible( false ), mbEnabled( true )
{}
};
@@ -84,7 +84,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
- Control::ImplInit( pParent, nStyle, NULL );
+ Control::ImplInit( pParent, nStyle, nullptr );
mnLastWidth = 0;
mnLastHeight = 0;
@@ -97,7 +97,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
mbRestoreUnqId = false;
mbSmallInvalidate = false;
mpTabCtrlData = new ImplTabCtrlData;
- mpTabCtrlData->mpListBox = NULL;
+ mpTabCtrlData->mpListBox = nullptr;
ImplInitSettings( true, true, true );
@@ -198,7 +198,7 @@ void TabControl::dispose()
if (mpTabCtrlData)
mpTabCtrlData->mpListBox.disposeAndClear();
delete mpTabCtrlData;
- mpTabCtrlData = NULL;
+ mpTabCtrlData = nullptr;
Control::dispose();
}
@@ -211,7 +211,7 @@ ImplTabItem* TabControl::ImplGetItem( sal_uInt16 nId ) const
return &(*it);
}
- return NULL;
+ return nullptr;
}
Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
@@ -571,8 +571,8 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId )
ImplTabItem* pOldItem = ImplGetItem( nOldId );
ImplTabItem* pItem = ImplGetItem( nId );
- TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : NULL;
- TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : NULL;
+ TabPage* pOldPage = (pOldItem) ? pOldItem->mpTabPage.get() : nullptr;
+ TabPage* pPage = (pItem) ? pItem->mpTabPage.get() : nullptr;
vcl::Window* pCtrlParent = GetParent();
if ( IsReallyVisible() && IsUpdateMode() )
@@ -954,8 +954,8 @@ void TabControl::ImplDrawItem(vcl::RenderContext& rRenderContext, ImplTabItem* p
Rectangle aOutRect(nXPos + aImageSize.Width(), nYPos,
nXPos + aImageSize.Width() + nTextWidth, nYPos + nTextHeight);
DrawControlText(rRenderContext, aOutRect, pItem->maFormatText, nStyle,
- bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : NULL,
- bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : NULL);
+ bLayout ? &mpControlData->mpLayoutData->m_aUnicodeBoundRects : nullptr,
+ bLayout ? &mpControlData->mpLayoutData->m_aDisplayText : nullptr);
rRenderContext.SetTextColor(aOldColor);
}
@@ -1022,7 +1022,7 @@ IMPL_LINK_TYPED( TabControl, ImplWindowEventListener, VclWindowEvent&, rEvent, v
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
{
- if( mpTabCtrlData->mpListBox.get() == NULL )
+ if( mpTabCtrlData->mpListBox.get() == nullptr )
{
if( rMEvt.IsLeft() )
{
@@ -1068,7 +1068,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
Rectangle aRect = ImplGetTabRect(TAB_PAGERECT);
// find current item
- ImplTabItem* pCurItem = NULL;
+ ImplTabItem* pCurItem = nullptr;
for (std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
{
@@ -1092,7 +1092,7 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
// in this case we're only interested in the top border of the tabpage because the tabitems are used
// standalone (eg impress)
bool bNoTabPage = false;
- TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage.get() : NULL;
+ TabPage* pCurPage = pCurItem ? pCurItem->mpTabPage.get() : nullptr;
if (!pCurPage || !pCurPage->IsVisible())
{
bNoTabPage = true;
@@ -1197,8 +1197,8 @@ void TabControl::ImplPaint(vcl::RenderContext& rRenderContext, const Rectangle&
// Some native toolkits (GTK+) draw tabs right-to-left, with an
// overlap between adjacent tabs
bool bDrawTabsRTL = rRenderContext.IsNativeControlSupported(CTRL_TAB_ITEM, PART_TABS_DRAW_RTL);
- ImplTabItem* pFirstTab = NULL;
- ImplTabItem* pLastTab = NULL;
+ ImplTabItem* pFirstTab = nullptr;
+ ImplTabItem* pLastTab = nullptr;
size_t idx;
// Event though there is a tab overlap with GTK+, the first tab is not
@@ -1542,7 +1542,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt )
Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
{
- ImplTabItem* pFoundItem = NULL;
+ ImplTabItem* pFoundItem = nullptr;
int nFound = 0;
for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin();
it != mpTabCtrlData->maItemList.end(); ++it )
@@ -1555,14 +1555,14 @@ Rectangle* TabControl::ImplFindPartRect( const Point& rPt )
}
}
// assure that only one tab is highlighted at a time
- return nFound == 1 ? &pFoundItem->maRect : NULL;
+ return nFound == 1 ? &pFoundItem->maRect : nullptr;
}
bool TabControl::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -1652,7 +1652,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText,
"TabControl::InsertPage(): PageId already exists" );
// insert new page item
- ImplTabItem* pItem = NULL;
+ ImplTabItem* pItem = nullptr;
if( nPos == TAB_APPEND || size_t(nPos) >= mpTabCtrlData->maItemList.size() )
{
mpTabCtrlData->maItemList.push_back( ImplTabItem() );
@@ -1681,7 +1681,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText,
// init new page item
pItem->mnId = nPageId;
- pItem->mpTabPage = NULL;
+ pItem->mpTabPage = nullptr;
pItem->maText = rText;
pItem->mbFullVisible = false;
@@ -1926,7 +1926,7 @@ void TabControl::SetTabPage( sal_uInt16 nPageId, TabPage* pTabPage )
}
else
{
- pItem->mpTabPage = NULL;
+ pItem->mpTabPage = nullptr;
queue_resize();
}
}
@@ -1939,7 +1939,7 @@ TabPage* TabControl::GetTabPage( sal_uInt16 nPageId ) const
if ( pItem )
return pItem->mpTabPage;
else
- return NULL;
+ return nullptr;
}
void TabControl::SetPageText( sal_uInt16 nPageId, const OUString& rText )
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index 19adc7d4cfca..a3b32c8287c8 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -222,14 +222,14 @@ TEParaPortions::~TEParaPortions()
IdleFormatter::IdleFormatter()
{
- mpView = 0;
+ mpView = nullptr;
mnRestarts = 0;
SetPriority(SchedulerPriority::HIGH);
}
IdleFormatter::~IdleFormatter()
{
- mpView = 0;
+ mpView = nullptr;
}
void IdleFormatter::DoIdleFormat( TextView* pV, sal_uInt16 nMaxRestarts )
@@ -274,7 +274,7 @@ TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const OUString& rOldTextAfterStartP
aPos = rPos;
nLen = 0;
bCursor = true;
- pAttribs = NULL;
+ pAttribs = nullptr;
bWasCursorOverwrite = false;
}
@@ -294,7 +294,7 @@ void TEIMEInfos::CopyAttribs(const sal_uInt16* pA, sal_Int32 nL)
void TEIMEInfos::DestroyAttribs()
{
delete[] pAttribs;
- pAttribs = NULL;
+ pAttribs = nullptr;
nLen = 0;
}
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index 2398fffc9482..f90331090b30 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -92,12 +92,12 @@ TextCharAttrib* TextCharAttribList::FindAttrib( sal_uInt16 nWhich, sal_Int32 nPo
for (TextCharAttribs::reverse_iterator it = maAttribs.rbegin(); it != maAttribs.rend(); ++it)
{
if ( it->GetEnd() < nPos )
- return 0;
+ return nullptr;
if ( ( it->Which() == nWhich ) && it->IsIn(nPos) )
return &*it;
}
- return NULL;
+ return nullptr;
}
const TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_Int32 nFromPos, sal_Int32 nMaxPos ) const
@@ -110,7 +110,7 @@ const TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal
( it->Which() == nWhich ) )
return &*it;
}
- return NULL;
+ return nullptr;
}
bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const
@@ -139,17 +139,17 @@ bool TextCharAttribList::HasBoundingAttrib( sal_Int32 nBound )
TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_Int32 nPos )
{
if ( !mbHasEmptyAttribs )
- return 0;
+ return nullptr;
for (TextCharAttribs::iterator it = maAttribs.begin(); it != maAttribs.end(); ++it)
{
if ( it->GetStart() > nPos )
- return 0;
+ return nullptr;
if ( ( it->GetStart() == nPos ) && ( it->GetEnd() == nPos ) && ( it->Which() == nWhich ) )
return &*it;
}
- return 0;
+ return nullptr;
}
void TextCharAttribList::DeleteEmptyAttribs()
@@ -446,7 +446,7 @@ OUString TextDoc::GetText( const sal_Unicode* pSep ) const
OUString TextDoc::GetText( sal_uInt32 nPara ) const
{
- TextNode* pNode = ( nPara < maTextNodes.size() ) ? maTextNodes[ nPara ] : 0;
+ TextNode* pNode = ( nPara < maTextNodes.size() ) ? maTextNodes[ nPara ] : nullptr;
if ( pNode )
return pNode->GetText();
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index 4a3e7c2f7a09..f332f8bb0f59 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -113,7 +113,7 @@ public:
TextPaM InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
- sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
+ sal_Int32 GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = nullptr ) const;
OUString GetText( const sal_Unicode* pSep ) const;
OUString GetText( sal_uInt32 nPara ) const;
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index b91f1bdd0d9a..5eeded23a498 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -64,11 +64,11 @@ using namespace ::com::sun::star::uno;
TextEngine::TextEngine()
{
- mpDoc = 0;
- mpTEParaPortions = 0;
+ mpDoc = nullptr;
+ mpTEParaPortions = nullptr;
mpViews = new TextViews;
- mpActiveView = NULL;
+ mpActiveView = nullptr;
mbIsFormatting = false;
mbFormatted = false;
@@ -87,9 +87,9 @@ TextEngine::TextEngine()
mnCurTextWidth = -1;
mnCurTextHeight = 0;
- mpUndoManager = NULL;
- mpIMEInfos = NULL;
- mpLocaleDataWrapper = NULL;
+ mpUndoManager = nullptr;
+ mpIMEInfos = nullptr;
+ mpLocaleDataWrapper = nullptr;
mpIdleFormatter = new IdleFormatter;
mpIdleFormatter->SetIdleHdl( LINK( this, TextEngine, IdleFormatHdl ) );
@@ -140,7 +140,7 @@ void TextEngine::RemoveView( TextView* pTextView )
pTextView->HideCursor();
mpViews->erase( it );
if ( pTextView == GetActiveView() )
- SetActiveView( 0 );
+ SetActiveView( nullptr );
}
}
@@ -237,7 +237,7 @@ static const sal_Unicode static_aCRLFText[] = { '\r', '\n', 0 };
static inline const sal_Unicode* static_getLineEndText( LineEnd aLineEnd )
{
- const sal_Unicode* pRet = NULL;
+ const sal_Unicode* pRet = nullptr;
switch( aLineEnd )
{
@@ -892,7 +892,7 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bP
long nY = 0;
sal_Int32 nCurIndex = 0;
- TextLine* pLine = 0;
+ TextLine* pLine = nullptr;
for ( size_t nLine = 0; nLine < pPortion->GetLines().size(); nLine++ )
{
TextLine& pTmpLine = pPortion->GetLines()[ nLine ];
@@ -1009,7 +1009,7 @@ long TextEngine::ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex
const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
- const TextAttrib* pAttr = NULL;
+ const TextAttrib* pAttr = nullptr;
const TextCharAttrib* pCharAttr = FindCharAttrib( rPaM, nWhich );
if ( pCharAttr )
pAttr = &pCharAttr->GetAttr();
@@ -1018,7 +1018,7 @@ const TextAttrib* TextEngine::FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich
const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const
{
- const TextCharAttrib* pAttr = NULL;
+ const TextCharAttrib* pAttr = nullptr;
TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ];
if ( pNode && ( rPaM.GetIndex() < pNode->GetText().getLength() ) )
pAttr = pNode->GetCharAttribs().FindAttrib( nWhich, rPaM.GetIndex() );
@@ -1072,7 +1072,7 @@ sal_Int32 TextEngine::ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara
sal_Int32 nCurIndex = 0;
long nY = 0;
- TextLine* pLine = 0;
+ TextLine* pLine = nullptr;
sal_uInt16 nLine;
for ( nLine = 0; nLine < pPortion->GetLines().size(); nLine++ )
{
@@ -1123,7 +1123,7 @@ sal_Int32 TextEngine::GetCharPos( sal_uInt32 nPortion, sal_uInt16 nLine, long nX
nTmpX -= pTextPortion->GetWidth(); // position before Portion
// TODO: Optimize: no GetTextBreak if fixed-width Font
vcl::Font aFont;
- SeekCursor( nPortion, nCurIndex+1, aFont, NULL );
+ SeekCursor( nPortion, nCurIndex+1, aFont, nullptr );
mpRefDev->SetFont( aFont);
long nPosInPortion = nXPos-nTmpX;
if ( IsRightToLeft() != pTextPortion->IsRightToLeft() )
@@ -1228,7 +1228,7 @@ long TextEngine::CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_I
else
{
vcl::Font aFont;
- SeekCursor( nPara, nPortionStart+1, aFont, NULL );
+ SeekCursor( nPara, nPortionStart+1, aFont, nullptr );
mpRefDev->SetFont( aFont );
}
TextNode* pNode = mpDoc->GetNodes()[ nPara ];
@@ -1660,7 +1660,7 @@ void TextEngine::ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, TETextPortion*
nMaxBreakPos = pNode->GetText().getLength() - 1;
uno::Reference < i18n::XBreakIterator > xBI = GetBreakIterator();
- i18n::LineBreakHyphenationOptions aHyphOptions( NULL, uno::Sequence< beans::PropertyValue >(), 1 );
+ i18n::LineBreakHyphenationOptions aHyphOptions( nullptr, uno::Sequence< beans::PropertyValue >(), 1 );
i18n::LineBreakUserOptions aUserOptions;
aUserOptions.forbiddenBeginCharacters = ImpGetLocaleDataWrapper()->getForbiddenCharacters().beginLine;
@@ -1706,7 +1706,7 @@ sal_uInt16 TextEngine::SplitTextPortion( sal_uInt32 nPara, sal_Int32 nPos )
sal_uInt16 nSplitPortion;
sal_Int32 nTmpPos = 0;
- TETextPortion* pTextPortion = 0;
+ TETextPortion* pTextPortion = nullptr;
TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara );
const sal_uInt16 nPortions = pTEParaPortion->GetTextPortions().size();
for ( nSplitPortion = 0; nSplitPortion < nPortions; nSplitPortion++ )
@@ -1882,7 +1882,7 @@ void TextEngine::RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_I
sal_Int32 nPos = 0;
sal_Int32 nEnd = nStartPos-nNewChars;
const size_t nPortions = pTEParaPortion->GetTextPortions().size();
- TETextPortion* pTP = 0;
+ TETextPortion* pTP = nullptr;
for ( nPortion = 0; nPortion < nPortions; nPortion++ )
{
pTP = pTEParaPortion->GetTextPortions()[ nPortion ];
@@ -1924,8 +1924,8 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan
long nY = rStartPos.Y();
- TextPaM const* pSelStart = 0;
- TextPaM const* pSelEnd = 0;
+ TextPaM const* pSelStart = nullptr;
+ TextPaM const* pSelEnd = nullptr;
if ( pSelection && pSelection->HasRange() )
{
bool bInvers = pSelection->GetEnd() < pSelection->GetStart();
@@ -2223,7 +2223,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
nXWidth = nTmpWidth;
// search for Portion that does not fit anymore into line
- TETextPortion* pPortion = 0;
+ TETextPortion* pPortion = nullptr;
bool bBrokenLine = false;
while ( ( nTmpWidth <= nXWidth ) && !bEOL && ( nTmpPortion < pTEParaPortion->GetTextPortions().size() ) )
@@ -2382,7 +2382,7 @@ bool TextEngine::CreateLines( sal_uInt32 nPara )
sal_uInt16 nEndPortion = pLine->GetEndPortion();
// next line or new line
- pLine = NULL;
+ pLine = nullptr;
if ( nLine < pTEParaPortion->GetLines().size()-1 )
pLine = &( pTEParaPortion->GetLines()[ ++nLine ] );
if ( pLine && ( nIndex >= pNode->GetText().getLength() ) )
@@ -2587,7 +2587,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, bool bIdleFormatAndUpdate )
mbFormatted = false;
if ( bIdleFormatAndUpdate )
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2611,7 +2611,7 @@ void TextEngine::RemoveAttribs( sal_uInt32 nPara, sal_uInt16 nWhich, bool bIdleF
pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() );
mbFormatted = false;
if(bIdleFormatAndUpdate)
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2666,7 +2666,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32
mbFormatted = false;
if ( bIdleFormatAndUpdate )
- IdleFormatAndUpdate( NULL, 0xFFFF );
+ IdleFormatAndUpdate( nullptr, 0xFFFF );
else
FormatAndUpdate();
}
@@ -2823,7 +2823,7 @@ void TextEngine::ImpTextFormatted()
void TextEngine::Draw( OutputDevice* pDev, const Point& rPos )
{
- ImpPaint( pDev, rPos, NULL );
+ ImpPaint( pDev, rPos, nullptr );
}
void TextEngine::SetLeftMargin( sal_uInt16 n )
@@ -2843,7 +2843,7 @@ void TextEngine::SetLocale( const ::com::sun::star::lang::Locale& rLocale )
{
maLocale = rLocale;
delete mpLocaleDataWrapper;
- mpLocaleDataWrapper = NULL;
+ mpLocaleDataWrapper = nullptr;
}
::com::sun::star::lang::Locale TextEngine::GetLocale()
@@ -2891,7 +2891,7 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, NULL, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
long nCount = ubidi_countRuns( pBidi, &nError );
diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx
index ad46c8b28ad4..6fc11ef96d4b 100644
--- a/vcl/source/edit/textundo.cxx
+++ b/vcl/source/edit/textundo.cxx
@@ -275,7 +275,7 @@ void TextUndoInsertChars::Redo()
bool TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
{
- if ( 0 == dynamic_cast< const TextUndoInsertChars*>( pNextAction ) )
+ if ( nullptr == dynamic_cast< const TextUndoInsertChars*>( pNextAction ) )
return false;
TextUndoInsertChars* pNext = static_cast<TextUndoInsertChars*>(pNextAction);
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index eef662d8139a..28bdd32ac37d 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -186,7 +186,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mpWindow = pWindow;
mpImpl->mpTextEngine = pEng;
- mpImpl->mpVirtDev = NULL;
+ mpImpl->mpVirtDev = nullptr;
mpImpl->mbPaintSelection = true;
mpImpl->mbAutoScroll = true;
@@ -217,7 +217,7 @@ TextView::TextView( TextEngine* pEng, vcl::Window* pWindow ) :
pWindow->SetLineColor();
- mpImpl->mpDDInfo = NULL;
+ mpImpl->mpDDInfo = nullptr;
if ( pWindow->GetDragGestureRecognizer().is() )
{
@@ -240,7 +240,7 @@ TextView::~TextView()
mpImpl->mpVirtDev.disposeAndClear();
if ( mpImpl->mpWindow->GetCursor() == mpImpl->mpCursor )
- mpImpl->mpWindow->SetCursor( 0 );
+ mpImpl->mpWindow->SetCursor( nullptr );
delete mpImpl->mpCursor;
delete mpImpl->mpDDInfo;
delete mpImpl;
@@ -299,7 +299,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Point& rStartP
{
if (!mpImpl->mbPaintSelection)
{
- pSelection = NULL;
+ pSelection = nullptr;
}
else
{
@@ -330,7 +330,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() )
return;
- TextSelection *pDrawSelection = NULL;
+ TextSelection *pDrawSelection = nullptr;
if (!mpImpl->mbHighlightSelection && mpImpl->maSelection.HasRange())
pDrawSelection = &mpImpl->maSelection;
@@ -375,7 +375,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
Point aDocPos(mpImpl->maStartDocPos.X(), mpImpl->maStartDocPos.Y() + rRect.Top());
Point aStartPos = ImpGetOutputStartPos(aDocPos);
- ImpPaint(*pVDev, aStartPos, &aTmpRect, NULL, pDrawSelection);
+ ImpPaint(*pVDev, aStartPos, &aTmpRect, nullptr, pDrawSelection);
rRenderContext.DrawOutDev(rRect.TopLeft(), rRect.GetSize(), Point(0,0), rRect.GetSize(), *pVDev);
if (mpImpl->mbHighlightSelection)
ImpHighlight(mpImpl->maSelection);
@@ -383,7 +383,7 @@ void TextView::ImpPaint(vcl::RenderContext& rRenderContext, const Rectangle& rRe
else
{
Point aStartPos = ImpGetOutputStartPos(mpImpl->maStartDocPos);
- ImpPaint(rRenderContext, aStartPos, &rRect, NULL, pDrawSelection);
+ ImpPaint(rRenderContext, aStartPos, &rRect, nullptr, pDrawSelection);
if (mpImpl->mbHighlightSelection)
ImpHighlight(mpImpl->maSelection);
}
@@ -930,7 +930,7 @@ void TextView::Command( const CommandEvent& rCEvt )
bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite;
delete mpImpl->mpTextEngine->mpIMEInfos;
- mpImpl->mpTextEngine->mpIMEInfos = NULL;
+ mpImpl->mpTextEngine->mpIMEInfos = nullptr;
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -1128,7 +1128,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl
try
{
- rxClipboard->setContents( pDataObj, NULL );
+ rxClipboard->setContents( pDataObj, nullptr );
uno::Reference< datatransfer::clipboard::XFlushableClipboard > xFlushableClipboard( rxClipboard, uno::UNO_QUERY );
if( xFlushableClipboard.is() )
@@ -2010,7 +2010,7 @@ void TextView::dragDropEnd( const ::com::sun::star::datatransfer::dnd::DragSourc
{
ImpHideDDCursor();
delete mpImpl->mpDDInfo;
- mpImpl->mpDDInfo = NULL;
+ mpImpl->mpDDInfo = nullptr;
}
void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& rDTDE ) throw (::com::sun::star::uno::RuntimeException, std::exception)
@@ -2111,7 +2111,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv
mpImpl->mpTextEngine->UndoActionEnd();
delete mpImpl->mpDDInfo;
- mpImpl->mpDDInfo = 0;
+ mpImpl->mpDDInfo = nullptr;
mpImpl->mpTextEngine->FormatAndUpdate( this );
@@ -2148,7 +2148,7 @@ void TextView::dragOver( const ::com::sun::star::datatransfer::dnd::DropTargetDr
const TextCharAttrib* pStartAttr = mpImpl->mpTextEngine->FindCharAttrib(
mpImpl->mpDDInfo->maDropPos,
TEXTATTR_PROTECTED );
- bProtected = pStartAttr != 0 &&
+ bProtected = pStartAttr != nullptr &&
pStartAttr->GetStart() != mpImpl->mpDDInfo->maDropPos.GetIndex() &&
pStartAttr->GetEnd() != mpImpl->mpDDInfo->maDropPos.GetIndex();
}
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index b8ff14c923f3..a2e075555368 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -147,9 +147,9 @@ public:
};
ImpVclMEdit::ImpVclMEdit( VclMultiLineEdit* pEdt, WinBits nWinStyle )
- :mpHScrollBar(NULL)
- ,mpVScrollBar(NULL)
- ,mpScrollBox(NULL)
+ :mpHScrollBar(nullptr)
+ ,mpVScrollBar(nullptr)
+ ,mpScrollBox(nullptr)
{
pVclMultiLineEdit = pEdt;
mnTextWidth = 0;
@@ -735,9 +735,9 @@ TextWindow::~TextWindow()
void TextWindow::dispose()
{
delete mpExtTextView;
- mpExtTextView = NULL;
+ mpExtTextView = nullptr;
delete mpExtTextEngine;
- mpExtTextEngine = NULL;
+ mpExtTextEngine = nullptr;
Window::dispose();
}
@@ -936,7 +936,7 @@ VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle )
SetType( WINDOW_MULTILINEEDIT );
pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
ImplInitSettings( true, true, true );
- pUpdateDataTimer = 0;
+ pUpdateDataTimer = nullptr;
SetCompoundControl( true );
SetStyle( ImplInitStyle( nWinStyle ) );
@@ -951,10 +951,10 @@ void VclMultiLineEdit::dispose()
{
{
std::unique_ptr< ImpVclMEdit > xDelete(pImpVclMEdit);
- pImpVclMEdit = NULL;
+ pImpVclMEdit = nullptr;
}
delete pUpdateDataTimer;
- pUpdateDataTimer = NULL;
+ pUpdateDataTimer = nullptr;
Edit::dispose();
}
diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx
index 6c11e98925cd..5d090f1b3b68 100644
--- a/vcl/source/filter/FilterConfigCache.cxx
+++ b/vcl/source/filter/FilterConfigCache.cxx
@@ -37,19 +37,19 @@ using namespace ::com::sun::star::configuration ;
const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] =
{
IMP_BMP, IMP_GIF, IMP_PNG,IMP_JPEG, IMP_XBM, IMP_XPM,
- EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, NULL
+ EXP_BMP, EXP_JPEG, EXP_PNG, IMP_MOV, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::InternalVectorFilterNameList[] =
{
IMP_SVMETAFILE, IMP_WMF, IMP_EMF, IMP_SVSGF, IMP_SVSGV, IMP_SVG,
- EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, NULL
+ EXP_SVMETAFILE, EXP_WMF, EXP_EMF, EXP_SVG, nullptr
};
const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameList[] =
{
"egi", "icd", "ipd", "ipx", "ipb", "epb", "epg",
- "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL
+ "epp", "ira", "era", "itg", "iti", "eti", "exp", nullptr
};
bool FilterConfigCache::bInitialized = false;
@@ -268,7 +268,7 @@ const char* FilterConfigCache::InternalFilterListForSvxLight[] =
"xpm","2","exp",
"svg","1","SVISVG",
"svg","2","SVESVG",
- NULL
+ nullptr
};
void FilterConfigCache::ImplInitSmart()
diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx
index a70a0c46313a..428cf72225d6 100644
--- a/vcl/source/filter/FilterConfigItem.cxx
+++ b/vcl/source/filter/FilterConfigItem.cxx
@@ -239,7 +239,7 @@ bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XProper
// otherwise the result is null
PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rPropSeq, const OUString& rName )
{
- PropertyValue* pPropValue = NULL;
+ PropertyValue* pPropValue = nullptr;
sal_Int32 i, nCount;
for ( i = 0, nCount = rPropSeq.getLength(); i < nCount; i++ )
diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 5f19fa4c86ec..653d5367a165 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -76,7 +76,7 @@ using namespace ::com::sun::star;
using comphelper::string::getTokenCount;
typedef ::std::vector< GraphicFilter* > FilterList_impl;
-static FilterList_impl* pFilterHdlList = NULL;
+static FilterList_impl* pFilterHdlList = nullptr;
static ::osl::Mutex& getListMutex()
{
@@ -172,7 +172,7 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest, sal_uLo
return pSource;
pSource++;
}
- return NULL;
+ return nullptr;
}
inline OUString ImpGetExtension( const OUString &rPath )
@@ -946,13 +946,13 @@ struct ImpFilterLibCacheEntry
};
ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const OUString& rPathname, const OUString& rFiltername, const OUString& rFormatName ) :
- mpNext ( NULL ),
+ mpNext ( nullptr ),
#ifndef DISABLE_DYNLOADING
maLibrary ( rPathname ),
#endif
maFiltername ( rFiltername ),
maFormatName ( rFormatName ),
- mpfnImport ( NULL )
+ mpfnImport ( nullptr )
{
#ifdef DISABLE_DYNLOADING
(void) rPathname;
@@ -1044,8 +1044,8 @@ public:
};
ImpFilterLibCache::ImpFilterLibCache() :
- mpFirst ( NULL ),
- mpLast ( NULL )
+ mpFirst ( nullptr ),
+ mpLast ( nullptr )
{
}
@@ -1088,7 +1088,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter(const OUString& rFilterPath
else
{
delete pEntry;
- pEntry = NULL;
+ pEntry = nullptr;
}
#endif
}
@@ -1098,7 +1098,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter(const OUString& rFilterPath
namespace { struct Cache : public rtl::Static<ImpFilterLibCache, Cache> {}; }
GraphicFilter::GraphicFilter( bool bConfig )
- : pErrorEx(NULL)
+ : pErrorEx(nullptr)
, bUseConfig(bConfig)
, nExpGraphHint(0)
{
@@ -1122,7 +1122,7 @@ GraphicFilter::~GraphicFilter()
}
if( pFilterHdlList->empty() )
{
- delete pFilterHdlList, pFilterHdlList = NULL;
+ delete pFilterHdlList, pFilterHdlList = nullptr;
delete pConfig;
}
}
@@ -1289,7 +1289,7 @@ sal_uInt16 GraphicFilter::CanImportGraphic( const OUString& rMainUrl, SvStream&
rIStream.Seek(nStreamPos);
- if( nRes==GRFILTER_OK && pDeterminedFormat!=NULL )
+ if( nRes==GRFILTER_OK && pDeterminedFormat!=nullptr )
*pDeterminedFormat = nFormat;
return (sal_uInt16) ImplSetError( nRes, &rIStream );
@@ -1314,7 +1314,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const INetURLObject&
sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
sal_uInt16 nFormat, sal_uInt16* pDeterminedFormat, GraphicFilterImportFlags nImportFlags, WMF_EXTERNALHEADER *pExtHeader )
{
- return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, NULL, pExtHeader );
+ return ImportGraphic( rGraphic, rPath, rIStream, nFormat, pDeterminedFormat, nImportFlags, nullptr, pExtHeader );
}
sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, SvStream& rIStream,
@@ -1330,13 +1330,13 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
GfxLinkType eLinkType = GFX_LINK_TYPE_NONE;
bool bDummyContext = ( pContext == reinterpret_cast<GraphicReader*>(1) );
const bool bLinkSet = rGraphic.IsLink();
- FilterConfigItem* pFilterConfigItem = NULL;
+ FilterConfigItem* pFilterConfigItem = nullptr;
Size aPreviewSizeHint( 0, 0 );
bool bAllowPartialStreamRead = false;
bool bCreateNativeLink = true;
- sal_uInt8* pGraphicContent = NULL;
+ sal_uInt8* pGraphicContent = nullptr;
bool bGraphicContentOwned = true;
sal_Int32 nGraphicContentSize = 0;
@@ -1378,7 +1378,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
{
if( bDummyContext )
{
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
nStreamBegin = 0;
}
else
@@ -1421,7 +1421,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( aFilterName.equalsIgnoreAsciiCase( IMP_GIF ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportGIF( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1431,7 +1431,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_PNG ) )
{
if ( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
vcl::PNGReader aPNGReader( rIStream );
@@ -1489,14 +1489,14 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_JPEG ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
// set LOGSIZE flag always, if not explicitly disabled
// (see #90508 and #106763)
if( !( nImportFlags & GraphicFilterImportFlags::DontSetLogsizeForJpeg ) )
nImportFlags |= GraphicFilterImportFlags::SetLogsizeForJpeg;
- if( !ImportJPEG( rIStream, rGraphic, NULL, nImportFlags ) )
+ if( !ImportJPEG( rIStream, rGraphic, nullptr, nImportFlags ) )
nStatus = GRFILTER_FILTERERROR;
else
eLinkType = GFX_LINK_TYPE_NATIVE_JPG;
@@ -1504,7 +1504,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_SVG ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
const sal_uInt32 nStreamPosition(rIStream.Tell());
const sal_uInt32 nStreamLength(rIStream.Seek(STREAM_SEEK_TO_END) - nStreamPosition);
@@ -1574,7 +1574,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XBM ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportXBM( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1582,7 +1582,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
else if( aFilterName.equalsIgnoreAsciiCase( IMP_XPM ) )
{
if( rGraphic.GetContext() == reinterpret_cast<GraphicReader*>(1) )
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
if( !ImportXPM( rIStream, rGraphic ) )
nStatus = GRFILTER_FILTERERROR;
@@ -1618,7 +1618,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
aFilterName.equalsIgnoreAsciiCase( IMP_EMF ) )
{
GDIMetaFile aMtf;
- if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, NULL, pExtHeader ) )
+ if( !ConvertWMFToGDIMetaFile( rIStream, aMtf, nullptr, pExtHeader ) )
nStatus = GRFILTER_FORMATERROR;
else
{
@@ -1693,12 +1693,12 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
}
else
{
- ImpFilterLibCacheEntry* pFilter = NULL;
+ ImpFilterLibCacheEntry* pFilter = nullptr;
// find first filter in filter paths
sal_Int32 i, nTokenCount = getTokenCount(aFilterPath, ';');
ImpFilterLibCache &rCache = Cache::get();
- for( i = 0; ( i < nTokenCount ) && ( pFilter == NULL ); i++ )
+ for( i = 0; ( i < nTokenCount ) && ( pFilter == nullptr ); i++ )
pFilter = rCache.GetFilter(aFilterPath.getToken(i, ';'), aFilterName, aExternalFilterName);
if( !pFilter )
nStatus = GRFILTER_FILTERERROR;
@@ -1714,7 +1714,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( nFormat != GRFILTER_FORMAT_DONTKNOW )
{
aShortName = GetImportFormatShortName( nFormat ).toAsciiUpperCase();
- if ( ( pFilterConfigItem == NULL ) && aShortName == "PCD" )
+ if ( ( pFilterConfigItem == nullptr ) && aShortName == "PCD" )
{
OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
pFilterConfigItem = new FilterConfigItem( aFilterConfigPath );
@@ -1741,7 +1741,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat
if( nStatus == GRFILTER_OK && bCreateNativeLink && ( eLinkType != GFX_LINK_TYPE_NONE ) && !rGraphic.GetContext() && !bLinkSet )
{
- if (pGraphicContent == NULL)
+ if (pGraphicContent == nullptr)
{
const sal_uLong nStreamEnd = rIStream.Tell();
nGraphicContentSize = nStreamEnd - nStreamBegin;
@@ -2118,7 +2118,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
OUString aPhysicalName( ImpCreateFullFilterPath( aFilterPath.getToken(i, ';'), aFilterName ) );
osl::Module aLibrary( aPhysicalName );
- PFilterCall pFunc = NULL;
+ PFilterCall pFunc = nullptr;
OUString tmpFilterName = aExternalFilterName;
if (tmpFilterName == "egi")
pFunc = reinterpret_cast<PFilterCall>(aLibrary.getFunctionSymbol("egiGraphicExport"));
@@ -2276,7 +2276,7 @@ int GraphicFilter::LoadGraphic( const OUString &rPath, const OUString &rFilterNa
aURL.SetSmartURL( rPath );
}
- SvStream* pStream = NULL;
+ SvStream* pStream = nullptr;
if ( INetProtocol::File != aURL.GetProtocol() )
{
pStream = ::utl::UcbStreamHelper::CreateStream( rPath, StreamMode::READ );
diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx
index 1e52932920fe..822452bd450e 100644
--- a/vcl/source/filter/graphicfilter2.cxx
+++ b/vcl/source/filter/graphicfilter2.cxx
@@ -1100,7 +1100,7 @@ bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, bool /*bExtendedInfo*/
OUString GraphicDescriptor::GetImportFormatShortName( GraphicFileFormat nFormat )
{
- const char *pKeyName = 0;
+ const char *pKeyName = nullptr;
switch( nFormat )
{
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 00d7e7575678..b0454d2cb270 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -27,7 +27,7 @@ struct GIFLZWTableEntry
};
GIFLZWDecompressor::GIFLZWDecompressor(sal_uInt8 cDataSize)
- : pBlockBuf(NULL)
+ : pBlockBuf(nullptr)
, nInputBitsBuf(0)
, nOutBufDataLen(0)
, nInputBitsBufSize(0)
@@ -49,7 +49,7 @@ GIFLZWDecompressor::GIFLZWDecompressor(sal_uInt8 cDataSize)
for (sal_uInt16 i = 0; i < nTableSize; ++i)
{
- pTable[i].pPrev = NULL;
+ pTable[i].pPrev = nullptr;
pTable[i].pFirst = pTable + i;
pTable[i].nData = (sal_uInt8) i;
}
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index be41ccebf5b6..cb0e0ee79201 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -29,9 +29,9 @@ GIFReader::GIFReader( SvStream& rStm )
: aGPalette ( 256 )
, aLPalette ( 256 )
, rIStm ( rStm )
- , pDecomp ( NULL )
- , pAcc8 ( NULL )
- , pAcc1 ( NULL )
+ , pDecomp ( nullptr )
+ , pAcc8 ( nullptr )
+ , pAcc1 ( nullptr )
, nYAcc ( 0 )
, nLastPos ( rStm.Tell() )
, nLogWidth100 ( 0UL )
@@ -66,7 +66,7 @@ GIFReader::GIFReader( SvStream& rStm )
GIFReader::~GIFReader()
{
- aImGraphic.SetContext( NULL );
+ aImGraphic.SetContext( nullptr );
if( pAcc1 )
Bitmap::ReleaseAccess( pAcc1 );
@@ -133,7 +133,7 @@ bool GIFReader::CreateBitmaps( long nWidth, long nHeight, BitmapPalette* pPal,
aBmp8.Erase( Color( COL_WHITE ) );
pAcc8 = aBmp8.AcquireWriteAccess();
- bStatus = ( pAcc8 != NULL );
+ bStatus = ( pAcc8 != nullptr );
}
return bStatus;
@@ -459,7 +459,7 @@ void GIFReader::FillImages( sal_uInt8* pBytes, sal_uLong nCount )
{
sal_uInt8* pScanline8 = pAcc8->GetScanline( nYAcc );
sal_uLong nSize8 = pAcc8->GetScanlineSize();
- sal_uInt8* pScanline1 = 0;
+ sal_uInt8* pScanline1 = nullptr;
sal_uLong nSize1 = 0;
if( bGCTransparent )
@@ -545,12 +545,12 @@ void GIFReader::CreateNewBitmaps()
AnimationBitmap aAnimBmp;
Bitmap::ReleaseAccess( pAcc8 );
- pAcc8 = NULL;
+ pAcc8 = nullptr;
if( bGCTransparent )
{
Bitmap::ReleaseAccess( pAcc1 );
- pAcc1 = NULL;
+ pAcc1 = nullptr;
aAnimBmp.aBmpEx = BitmapEx( aBmp8, aBmp1 );
}
else
@@ -593,13 +593,13 @@ const Graphic& GIFReader::GetIntermediateGraphic()
aImGraphic = BitmapEx( aBmp8, aBmp1 );
pAcc1 = aBmp1.AcquireWriteAccess();
- bStatus = bStatus && ( pAcc1 != NULL );
+ bStatus = bStatus && ( pAcc1 != nullptr );
}
else
aImGraphic = aBmp8;
pAcc8 = aBmp8.AcquireWriteAccess();
- bStatus = bStatus && ( pAcc8 != NULL );
+ bStatus = bStatus && ( pAcc8 != nullptr );
}
return aImGraphic;
@@ -814,7 +814,7 @@ VCL_DLLPUBLIC bool ImportGIF( SvStream & rStm, Graphic& rGraphic )
if( !pGIFReader )
pGIFReader = new GIFReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pGIFReader->ReadGIF( rGraphic );
if( eReadState == GIFREAD_ERROR )
diff --git a/vcl/source/filter/ixbm/xbmread.cxx b/vcl/source/filter/ixbm/xbmread.cxx
index 0ab94ba02da2..b12aea3b973c 100644
--- a/vcl/source/filter/ixbm/xbmread.cxx
+++ b/vcl/source/filter/ixbm/xbmread.cxx
@@ -24,7 +24,7 @@
XBMReader::XBMReader( SvStream& rStm ) :
rIStm ( rStm ),
- pAcc1 ( NULL ),
+ pAcc1 ( nullptr ),
nLastPos ( rStm.Tell() ),
nWidth ( 0 ),
nHeight ( 0 ),
@@ -319,7 +319,7 @@ ReadState XBMReader::ReadXBM( Graphic& rGraphic )
{
Bitmap aBlackBmp( Size( pAcc1->Width(), pAcc1->Height() ), 1 );
- Bitmap::ReleaseAccess( pAcc1 ), pAcc1 = NULL;
+ Bitmap::ReleaseAccess( pAcc1 ), pAcc1 = nullptr;
aBlackBmp.Erase( Color( COL_BLACK ) );
rGraphic = BitmapEx( aBlackBmp, aBmp1 );
eReadState = XBMREAD_OK;
@@ -345,7 +345,7 @@ VCL_DLLPUBLIC bool ImportXBM( SvStream& rStm, Graphic& rGraphic )
if( !pXBMReader )
pXBMReader = new XBMReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pXBMReader->ReadXBM( rGraphic );
if( eReadState == XBMREAD_ERROR )
diff --git a/vcl/source/filter/ixbm/xbmread.hxx b/vcl/source/filter/ixbm/xbmread.hxx
index 94ada437b1a8..3794a374ca4b 100644
--- a/vcl/source/filter/ixbm/xbmread.hxx
+++ b/vcl/source/filter/ixbm/xbmread.hxx
@@ -53,7 +53,7 @@ class XBMReader : public GraphicReader
void InitTable();
OString FindTokenLine( SvStream* pInStm, const char* pTok1,
- const char* pTok2 = NULL, const char* pTok3 = NULL );
+ const char* pTok2 = nullptr, const char* pTok3 = nullptr );
long ParseDefine( const sal_Char* pDefine );
bool ParseData( SvStream* pInStm, const OString& aLastLine, XBMFormat eFormat );
diff --git a/vcl/source/filter/ixpm/rgbtable.hxx b/vcl/source/filter/ixpm/rgbtable.hxx
index 73786a488c29..7dcc340938d8 100644
--- a/vcl/source/filter/ixpm/rgbtable.hxx
+++ b/vcl/source/filter/ixpm/rgbtable.hxx
@@ -686,7 +686,7 @@ static const XPMRGBTab pRGBTable[] = {
{ "DarkMagenta", 139, 0, 139 },
{ "DarkRed", 139, 0, 0 },
{ "LightGreen", 144, 238, 144 },
-{ NULL, 0 , 0, 0}
+{ nullptr, 0 , 0, 0}
};
#endif // INCLUDED_VCL_SOURCE_FILTER_IXPM_RGBTABLE_HXX
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 40ac67565240..cfc7956f33cd 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -26,8 +26,8 @@
XPMReader::XPMReader(SvStream& rStm)
: mrIStm(rStm)
- , mpAcc(NULL)
- , mpMaskAcc(NULL)
+ , mpAcc(nullptr)
+ , mpMaskAcc(nullptr)
, mnLastPos(rStm.Tell())
, mnWidth(0)
, mnHeight(0)
@@ -40,14 +40,14 @@ XPMReader::XPMReader(SvStream& rStm)
, mcThisByte(0)
, mcLastByte(0)
, mnTempAvail(0)
- , mpTempBuf(NULL)
- , mpTempPtr(NULL)
- , mpFastColorTable(NULL)
- , mpColMap(NULL)
+ , mpTempBuf(nullptr)
+ , mpTempPtr(nullptr)
+ , mpFastColorTable(nullptr)
+ , mpColMap(nullptr)
, mnStringSize(0)
- , mpStringBuf(NULL)
+ , mpStringBuf(nullptr)
, mnParaSize(0)
- , mpPara(NULL)
+ , mpPara(nullptr)
{
}
@@ -128,7 +128,7 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
if ( mbTransparent )
{
maMaskBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
- if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == NULL )
+ if ( ( mpMaskAcc = maMaskBmp.AcquireWriteAccess() ) == nullptr )
mbStatus = false;
}
if( mpAcc && mbStatus )
@@ -181,21 +181,21 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
{
if ( mpMaskAcc )
{
- Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL;
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
rGraphic = Graphic( BitmapEx( maBmp, maMaskBmp ) );
}
else
{
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
rGraphic = maBmp;
}
eReadState = XPMREAD_OK;
}
else
{
- if ( mpMaskAcc ) Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = NULL;
- if ( mpAcc ) Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ if ( mpMaskAcc ) Bitmap::ReleaseAccess ( mpMaskAcc), mpMaskAcc = nullptr;
+ if ( mpAcc ) Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
eReadState = XPMREAD_ERROR;
}
}
@@ -336,7 +336,7 @@ bool XPMReader::ImplGetColSub( sal_uInt8* pDest )
sal_uLong i = 0;
while ( true )
{
- if ( pRGBTable[ i ].name == NULL )
+ if ( pRGBTable[ i ].name == nullptr )
break;
if ( std::strlen(pRGBTable[i].name) > mnParaSize &&
pRGBTable[ i ].name[ mnParaSize ] == 0 )
@@ -500,7 +500,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb )
}
else
{
- mpPara = NULL;
+ mpPara = nullptr;
nCount = 0xffffffff;
}
@@ -515,7 +515,7 @@ bool XPMReader::ImplGetPara ( sal_uLong nNumb )
if ( nCount == nNumb )
break;
else
- mpPara = NULL;
+ mpPara = nullptr;
}
else
mnParaSize++;
@@ -644,7 +644,7 @@ VCL_DLLPUBLIC bool ImportXPM( SvStream& rStm, Graphic& rGraphic )
if( !pXPMReader )
pXPMReader = new XPMReader( rStm );
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pXPMReader->ReadXPM( rGraphic );
if( eReadState == XPMREAD_ERROR )
diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 14f3ca4319bf..b1a4034532ea 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -152,7 +152,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
bool Exif::processIFD(sal_uInt8* pExifData, sal_uInt16 aLength, sal_uInt16 aOffset, sal_uInt16 aNumberOfTags, bool bSetValue, bool bSwap)
{
- ExifIFD* ifd = NULL;
+ ExifIFD* ifd = nullptr;
while (aOffset <= aLength - 12 && aNumberOfTags > 0)
{
diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx
index 66c94576c30d..5f42009d6ca9 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -156,7 +156,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
* manager serially with the same JPEG object. Caveat programmer.
*/
- if (cinfo->src == NULL)
+ if (cinfo->src == nullptr)
{ /* first time for this JPEG object? */
cinfo->src = static_cast<jpeg_source_mgr *>(
(*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(SourceManagerStruct)));
@@ -173,14 +173,14 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* input)
source->pub.term_source = term_source;
source->stream = stream;
source->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */
- source->pub.next_input_byte = NULL; /* until buffer loaded */
+ source->pub.next_input_byte = nullptr; /* until buffer loaded */
}
JPEGReader::JPEGReader( SvStream& rStream, void* /*pCallData*/, bool bSetLogSize ) :
mrStream ( rStream ),
- mpAcc ( NULL ),
- mpAcc1 ( NULL ),
- mpBuffer ( NULL ),
+ mpAcc ( nullptr ),
+ mpAcc1 ( nullptr ),
+ mpBuffer ( nullptr ),
mnLastPos ( rStream.Tell() ),
mnLastLines ( 0 ),
mbSetLogSize ( bSetLogSize )
@@ -203,34 +203,34 @@ JPEGReader::~JPEGReader()
unsigned char * JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam)
{
if (rParam.nWidth > SAL_MAX_INT32 / 8 || rParam.nHeight > SAL_MAX_INT32 / 8)
- return NULL; // avoid overflows later
+ return nullptr; // avoid overflows later
if (rParam.nWidth == 0 || rParam.nHeight == 0)
- return NULL;
+ return nullptr;
Size aSize(rParam.nWidth, rParam.nHeight );
bool bGray = rParam.bGray != 0;
- unsigned char * pBmpBuf = NULL;
+ unsigned char * pBmpBuf = nullptr;
if( mpAcc )
{
Bitmap::ReleaseAccess( mpAcc );
maBmp = Bitmap();
- mpAcc = NULL;
+ mpAcc = nullptr;
}
sal_uInt64 nSize = aSize.Width();
nSize *= aSize.Height();
if (nSize > SAL_MAX_INT32 / (bGray?1:3))
- return NULL;
+ return nullptr;
// Check if the bitmap is untypically large.
if (nSize*(bGray?1:3) > MAX_BITMAP_BYTE_SIZE)
{
// Do not try to acquire resources for the large bitmap or to
// read the bitmap into memory.
- return NULL;
+ return nullptr;
}
if( bGray )
@@ -295,7 +295,7 @@ unsigned char * JPEGReader::CreateBitmap(JPEGCreateBitmapParam& rParam)
{
Bitmap::ReleaseAccess( mpAcc );
maBmp = Bitmap();
- mpAcc = NULL;
+ mpAcc = nullptr;
}
return pBmpBuf;
@@ -460,11 +460,11 @@ ReadState JPEGReader::Read( Graphic& rGraphic )
{
FillBitmap();
delete[] mpBuffer;
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
Bitmap::ReleaseAccess( mpAcc );
- mpAcc = NULL;
+ mpAcc = nullptr;
if( mrStream.GetError() == ERRCODE_IO_PENDING )
{
diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx
index 1c6594b61e54..cb1a67f90712 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -90,7 +90,7 @@ void jpeg_svstream_dest (j_compress_ptr cinfo, void* output)
* manager serially with the same JPEG object, because their private object
* sizes may be different. Caveat programmer.
*/
- if (cinfo->dest == NULL)
+ if (cinfo->dest == nullptr)
{ /* first time for this JPEG object? */
cinfo->dest = static_cast<jpeg_destination_mgr*>(
(*cinfo->mem->alloc_small) (reinterpret_cast<j_common_ptr>(cinfo), JPOOL_PERMANENT, sizeof(DestinationManagerStruct)));
@@ -105,8 +105,8 @@ void jpeg_svstream_dest (j_compress_ptr cinfo, void* output)
JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans::PropertyValue >* pFilterData, bool* pExportWasGrey ) :
mrStream ( rStream ),
- mpReadAccess ( NULL ),
- mpBuffer ( NULL ),
+ mpReadAccess ( nullptr ),
+ mpBuffer ( nullptr ),
mbNative ( false ),
mpExpWasGrey ( pExportWasGrey )
{
@@ -132,7 +132,7 @@ JPEGWriter::JPEGWriter( SvStream& rStream, const css::uno::Sequence< css::beans:
void* JPEGWriter::GetScanline( long nY )
{
- void* pScanline = NULL;
+ void* pScanline = nullptr;
if( mpReadAccess )
{
@@ -233,10 +233,10 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
bRet = WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator );
delete[] mpBuffer;
- mpBuffer = NULL;
+ mpBuffer = nullptr;
Bitmap::ReleaseAccess( mpReadAccess );
- mpReadAccess = NULL;
+ mpReadAccess = nullptr;
}
if ( mxStatusIndicator.is() )
mxStatusIndicator->end();
diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx
index 8c4b13bbf197..a9f765a7c67e 100644
--- a/vcl/source/filter/jpeg/JpegWriter.hxx
+++ b/vcl/source/filter/jpeg/JpegWriter.hxx
@@ -44,7 +44,7 @@ class JPEGWriter
public:
JPEGWriter( SvStream& rStream,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
- bool* pExportWasGrey = NULL );
+ bool* pExportWasGrey = nullptr );
virtual ~JPEGWriter() {};
diff --git a/vcl/source/filter/jpeg/jpeg.cxx b/vcl/source/filter/jpeg/jpeg.cxx
index 467c1b89b6bb..e403dce69cfe 100644
--- a/vcl/source/filter/jpeg/jpeg.cxx
+++ b/vcl/source/filter/jpeg/jpeg.cxx
@@ -46,7 +46,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void*
pJPEGReader->DisablePreviewMode();
}
- rGraphic.SetContext( NULL );
+ rGraphic.SetContext( nullptr );
eReadState = pJPEGReader->Read( rGraphic );
if( eReadState == JPEGREAD_ERROR )
diff --git a/vcl/source/filter/jpeg/jpeg.hxx b/vcl/source/filter/jpeg/jpeg.hxx
index 9076a4f85386..e53eab2be6b9 100644
--- a/vcl/source/filter/jpeg/jpeg.hxx
+++ b/vcl/source/filter/jpeg/jpeg.hxx
@@ -32,7 +32,7 @@ VCL_DLLPUBLIC bool ImportJPEG( SvStream& rInputStream, Graphic& rGraphic, void*
bool ExportJPEG(SvStream& rOutputStream,
const Graphic& rGraphic,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData,
- bool* pExportWasGrey = NULL);
+ bool* pExportWasGrey = nullptr);
#endif // INCLUDED_VCL_SOURCE_FILTER_JPEG_JPEG_HXX
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index c8f27b987aea..d42ae785b623 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -325,8 +325,8 @@ long Transform(void* pInputStream, void* pOutputStream, long nAngle)
ErrorManagerStruct aSourceError;
ErrorManagerStruct aDestinationError;
- jvirt_barray_ptr* aSourceCoefArrays = 0;
- jvirt_barray_ptr* aDestinationCoefArrays = 0;
+ jvirt_barray_ptr* aSourceCoefArrays = nullptr;
+ jvirt_barray_ptr* aDestinationCoefArrays = nullptr;
aTransformOption.force_grayscale = FALSE;
aTransformOption.trim = FALSE;
diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx
index e666b3f0f570..18e2d2ce16bc 100644
--- a/vcl/source/filter/sgvmain.cxx
+++ b/vcl/source/filter/sgvmain.cxx
@@ -92,7 +92,7 @@
// - no rotated ellipses
// for font translation
-SgfFontLst* pSgfFonts = 0;
+SgfFontLst* pSgfFonts = nullptr;
// for circle kinds, text and rotated rectangles
void RotatePoint(PointType& P, sal_Int16 cx, sal_Int16 cy, double sn, double cs)
@@ -250,7 +250,7 @@ SvStream& ReadTextType(SvStream& rInp, TextType& rText)
SWAPPOINT(rText.FitSize);
rText.FitBreit = OSL_SWAPWORD(rText.FitBreit);
#endif
- rText.Buffer=NULL;
+ rText.Buffer=nullptr;
return rInp;
}
SvStream& ReadBmapType(SvStream& rInp, BmapType& rBmap)
diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx
index 545def3963e3..976683b5dd42 100644
--- a/vcl/source/filter/sgvtext.cxx
+++ b/vcl/source/filter/sgvtext.cxx
@@ -466,7 +466,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u
pSgfFont = pSgfFonts->GetFontDesc(Atr.GetFont());
- if ( pSgfFont!=NULL )
+ if ( pSgfFont!=nullptr )
{
FNam =pSgfFont->SVFName;
StdBrei=pSgfFont->SVWidth;
@@ -995,7 +995,7 @@ void ObjTextType::SetFont(sal_uInt32 FontID)
// SGF.Ini lesen
SgfFontOne::SgfFontOne()
{
- Next=NULL;
+ Next=nullptr;
IFID=0;
Bold=false;
Ital=false;
@@ -1058,10 +1058,10 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc )
SgfFontLst::SgfFontLst()
{
- pList=NULL;
- Last=NULL;
+ pList=nullptr;
+ Last=nullptr;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
Tried=false;
}
@@ -1075,16 +1075,16 @@ void SgfFontLst::RausList()
SgfFontOne* P;
SgfFontOne* P1;
P=pList;
- while (P!=NULL) {
+ while (P!=nullptr) {
P1=P->Next;
delete P;
P=P1;
}
- pList=NULL;
- Last=NULL;
+ pList=nullptr;
+ Last=nullptr;
Tried=false;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
}
void SgfFontLst::AssignFN(const OUString& rFName)
@@ -1096,7 +1096,7 @@ void SgfFontLst::ReadList()
{
Tried=true;
LastID=0;
- LastLn=NULL;
+ LastLn=nullptr;
SgfFontOne* P,P1;
Config aCfg(FNam);
aCfg.SetGroup("SGV Fonts fuer StarView");
@@ -1112,7 +1112,7 @@ void SgfFontLst::ReadList()
if (comphelper::string::isdigitAsciiString(FID))
{
P=new SgfFontOne; // new entry
- if (Last!=NULL) Last->Next=P; else pList=P; Last=P; // link it
+ if (Last!=nullptr) Last->Next=P; else pList=P; Last=P; // link it
P->ReadOne(FID,Dsc); // interpret line
}
}
@@ -1124,7 +1124,7 @@ SgfFontOne* SgfFontLst::GetFontDesc(sal_uInt32 ID)
if (ID!=LastID) {
SgfFontOne* P;
P=pList;
- while (P!=NULL && P->IFID!=ID) P=P->Next;
+ while (P!=nullptr && P->IFID!=ID) P=P->Next;
LastID=ID;
LastLn=P;
}
diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx
index 2d022b27f3b3..15375dd10394 100644
--- a/vcl/source/filter/wmf/emfwr.cxx
+++ b/vcl/source/filter/wmf/emfwr.cxx
@@ -1370,7 +1370,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetPoint(), aText, NULL, 0 );
+ ImplWriteTextRecord( pA->GetPoint(), aText, nullptr, 0 );
}
break;
@@ -1380,7 +1380,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText( pA->GetText() );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, NULL, 0 );
+ ImplWriteTextRecord( pA->GetRect().TopLeft(), aText, nullptr, 0 );
}
break;
@@ -1400,7 +1400,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf )
const OUString aText = pA->GetText().copy( pA->GetIndex(), std::min(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
ImplCheckTextAttr();
- ImplWriteTextRecord( pA->GetPoint(), aText, NULL, pA->GetWidth() );
+ ImplWriteTextRecord( pA->GetPoint(), aText, nullptr, pA->GetWidth() );
}
break;
diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx
index 35506c209b36..a7aa6fb3aab5 100644
--- a/vcl/source/filter/wmf/emfwr.hxx
+++ b/vcl/source/filter/wmf/emfwr.hxx
@@ -92,7 +92,7 @@ public:
explicit EMFWriter(SvStream &rStream)
: maVDev( VclPtr<VirtualDevice>::Create() )
, m_rStm(rStream)
- , mpHandlesUsed(NULL)
+ , mpHandlesUsed(nullptr)
, mnHandleCount(0)
, mnRecordCount(0)
, mnRecordPos(0)
diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx
index 47679f6dc39a..eabb1fd72dd9 100644
--- a/vcl/source/filter/wmf/enhwmf.cxx
+++ b/vcl/source/filter/wmf/enhwmf.cxx
@@ -623,7 +623,7 @@ bool EnhWMFReader::ReadEnhWMF()
bool bStatus = ReadHeader();
bool bHaveDC = false;
- static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL );
+ static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == nullptr );
while( bStatus && nRecordCount-- && pWMF->good())
{
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index a34beda5366d..c19642ad9fb5 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -532,7 +532,7 @@ tools::PolyPolygon& WinMtfOutput::ImplMap( tools::PolyPolygon& rPolyPolygon )
void WinMtfOutput::SelectObject( sal_Int32 nIndex )
{
- GDIObj* pGDIObj = NULL;
+ GDIObj* pGDIObj = nullptr;
if ( nIndex & ENHMETA_STOCK_OBJECT )
pGDIObj = new GDIObj();
@@ -544,7 +544,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex )
pGDIObj = vGDIObj[ nIndex ];
}
- if( pGDIObj == NULL )
+ if( pGDIObj == nullptr )
return;
if ( nIndex & ENHMETA_STOCK_OBJECT )
@@ -649,7 +649,7 @@ void WinMtfOutput::SetTextAlign( sal_uInt32 nAlign )
void WinMtfOutput::ImplResizeObjectArry( sal_uInt32 nNewEntrys )
{
- vGDIObj.resize(nNewEntrys, NULL);
+ vGDIObj.resize(nNewEntrys, nullptr);
}
void WinMtfOutput::ImplDrawClippedPolyPolygon( const tools::PolyPolygon& rPolyPoly )
@@ -703,7 +703,7 @@ void WinMtfOutput::CreateObject( GDIObjectType eType, void* pStyle )
sal_uInt32 nIndex;
for ( nIndex = 0; nIndex < vGDIObj.size(); nIndex++ )
{
- if ( vGDIObj[ nIndex ] == NULL )
+ if ( vGDIObj[ nIndex ] == nullptr )
break;
}
if ( nIndex == vGDIObj.size() )
@@ -737,7 +737,7 @@ void WinMtfOutput::CreateObject( sal_Int32 nIndex, GDIObjectType eType, void* pS
if ( (sal_uInt32)nIndex >= vGDIObj.size() )
ImplResizeObjectArry( nIndex + 16 );
- if ( vGDIObj[ nIndex ] != NULL )
+ if ( vGDIObj[ nIndex ] != nullptr )
delete vGDIObj[ nIndex ];
vGDIObj[ nIndex ] = new GDIObj( eType, pStyle );
@@ -770,7 +770,7 @@ void WinMtfOutput::DeleteObject( sal_Int32 nIndex )
if ( (sal_uInt32)nIndex < vGDIObj.size() )
{
delete vGDIObj[ nIndex ];
- vGDIObj[ nIndex ] = NULL;
+ vGDIObj[ nIndex ] = nullptr;
}
}
}
diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx
index 095dfbe1d28d..ab7b1aefbddc 100644
--- a/vcl/source/filter/wmf/winmtf.hxx
+++ b/vcl/source/filter/wmf/winmtf.hxx
@@ -490,7 +490,7 @@ struct GDIObj
GDIObjectType eType;
GDIObj()
- : pStyle (NULL)
+ : pStyle (nullptr)
, eType (GDI_DUMMY)
{}
@@ -508,7 +508,7 @@ struct GDIObj
void Delete()
{
- if (pStyle == NULL)
+ if (pStyle == nullptr)
return;
switch (eType)
@@ -527,7 +527,7 @@ struct GDIObj
OSL_FAIL( "unsupported style deleted" );
break;
}
- pStyle = NULL;
+ pStyle = nullptr;
}
~GDIObj()
@@ -643,8 +643,8 @@ public:
void SetBkColor( const Color& rColor );
void SetTextColor( const Color& rColor );
void SetTextAlign( sal_uInt32 nAlign );
- void CreateObject( GDIObjectType, void* pStyle = NULL );
- void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = NULL );
+ void CreateObject( GDIObjectType, void* pStyle = nullptr );
+ void CreateObject( sal_Int32 nIndex, GDIObjectType, void* pStyle = nullptr );
void DeleteObject( sal_Int32 nIndex );
void SelectObject( sal_Int32 nIndex );
rtl_TextEncoding GetCharSet(){ return maFont.GetCharSet(); };
@@ -695,7 +695,7 @@ public:
);
void DrawText( Point& rPosition,
OUString& rString,
- long* pDXArry = NULL,
+ long* pDXArry = nullptr,
bool bRecordPath = false,
sal_Int32 nGraphicsMode = GM_COMPATIBLE);
@@ -742,7 +742,7 @@ protected:
WinMtf(
WinMtfOutput* pOut,
SvStream& rStreamWMF,
- FilterConfigItem* pConfigItem = NULL
+ FilterConfigItem* pConfigItem = nullptr
);
~WinMtf();
};
@@ -758,7 +758,7 @@ class EnhWMFReader : public WinMtf
static Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 );
public:
- EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = NULL);
+ EnhWMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile, FilterConfigItem* pConfigItem = nullptr);
~EnhWMFReader();
bool ReadEnhWMF();
@@ -812,8 +812,8 @@ private:
public:
WMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile,
- FilterConfigItem* pConfigItem = NULL,
- WMF_EXTERNALHEADER* pExtHeader = NULL);
+ FilterConfigItem* pConfigItem = nullptr,
+ WMF_EXTERNALHEADER* pExtHeader = nullptr);
~WMFReader();
// read WMF file from stream and fill the GDIMetaFile
diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx
index 0cf9f569c265..29d2f5529829 100644
--- a/vcl/source/filter/wmf/winwmf.cxx
+++ b/vcl/source/filter/wmf/winwmf.cxx
@@ -1107,7 +1107,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
// total records should be the same as in previous comments
nEMFRecCount = 0xFFFFFFFF;
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
nEMFRec++;
@@ -1115,7 +1115,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc )
{
nEMFRecCount = 0xFFFFFFFF;
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
if( pEMFStream )
@@ -1211,7 +1211,7 @@ bool WMFReader::ReadHeader()
nUnitsPerInch = 96;
- if ( pExternalHeader != NULL
+ if ( pExternalHeader != nullptr
&& pExternalHeader->xExt > 0
&& pExternalHeader->yExt > 0
&& (pExternalHeader->mapMode == MM_ISOTROPIC || pExternalHeader->mapMode == MM_ANISOTROPIC))
@@ -1307,7 +1307,7 @@ void WMFReader::ReadWMF()
nCurrentAction = 0;
nUnicodeEscapeAction = 0;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
nEMFRecCount = 0;
nEMFRec = 0;
nEMFSize = 0;
@@ -1393,7 +1393,7 @@ void WMFReader::ReadWMF()
// something went wrong
// continue with WMF, don't try this again
delete pEMFStream;
- pEMFStream = NULL;
+ pEMFStream = nullptr;
}
}
}
@@ -1803,7 +1803,7 @@ WMFReader::WMFReader(SvStream& rStreamWMF, GDIMetaFile& rGDIMetaFile,
: WinMtf(new WinMtfOutput(rGDIMetaFile) , rStreamWMF, pConfigItem)
, nUnitsPerInch(96)
, nRecSize(0)
- , pEMFStream(NULL)
+ , pEMFStream(nullptr)
, nEMFRecCount(0)
, nEMFRec(0)
, nEMFSize(0)
diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx
index c566bc3e7b04..e2f1b6b4b6d3 100644
--- a/vcl/source/filter/wmf/wmf.cxx
+++ b/vcl/source/filter/wmf/wmf.cxx
@@ -76,7 +76,7 @@ bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem*
if ( nMetaType == 0x464d4520 )
{
- if ( !EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() )
+ if ( !EnhWMFReader( rStream, rMTF, nullptr ).ReadEnhWMF() )
rStream.SetError( SVSTREAM_FILEFORMAT_ERROR );
}
else
@@ -122,7 +122,7 @@ bool ConvertGDIMetaFileToEMF(const GDIMetaFile & rMTF, SvStream & rTargetStream)
bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF )
{
- return WMFWriter().WriteWMF( rMTF, rStream, NULL, false );
+ return WMFWriter().WriteWMF( rMTF, rStream, nullptr, false );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/wmf/wmfwr.cxx b/vcl/source/filter/wmf/wmfwr.cxx
index bdcf8701445e..dbb9ad3a7a34 100644
--- a/vcl/source/filter/wmf/wmfwr.cxx
+++ b/vcl/source/filter/wmf/wmfwr.cxx
@@ -136,15 +136,15 @@
WMFWriter::WMFWriter()
: bStatus(false)
, nLastPercent(0)
- , pWMF(NULL)
- , pVirDev(NULL)
+ , pWMF(nullptr)
+ , pVirDev(nullptr)
, nMetafileHeaderPos(0)
, nMaxRecordSize(0)
, nActRecordPos(0)
, eSrcRasterOp(ROP_OVERPAINT)
, eSrcTextAlign(ALIGN_BASELINE)
, bSrcIsClipping(false)
- , pAttrStack(NULL)
+ , pAttrStack(nullptr)
, eSrcHorTextAlign(W_TA_LEFT)
, eDstROP2(ROP_OVERPAINT)
, eDstTextAlign(ALIGN_BASELINE)
@@ -545,7 +545,7 @@ void WMFWriter::WMFRecord_ExtTextOut( const Point& rPoint,
{
sal_Int32 nOriginalTextLen = rString.getLength();
- if ( (nOriginalTextLen <= 1) || (pDXAry == NULL) )
+ if ( (nOriginalTextLen <= 1) || (pDXAry == nullptr) )
{
WMFRecord_TextOut(rPoint, rString);
return;
@@ -956,7 +956,7 @@ void WMFWriter::SetAllAttr()
aSrcFont.SetCharSet( RTL_TEXTENCODING_MS_1252 );
}
- pFontCharMap = 0;
+ pFontCharMap = nullptr;
}
aDstFont = aSrcFont;
@@ -1164,7 +1164,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
SetAllAttr();
Point aPos( pA->GetRect().TopLeft() );
- if ( !WMFRecord_Escape_Unicode( aPos, aTemp, NULL ) )
+ if ( !WMFRecord_Escape_Unicode( aPos, aTemp, nullptr ) )
WMFRecord_TextOut( aPos, aTemp );
}
break;
@@ -1175,7 +1175,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
OUString aTemp = pA->GetText().copy( pA->GetIndex(), std::min<sal_Int32>(pA->GetText().getLength() - pA->GetIndex(), pA->GetLen()) );
aSrcLineInfo = LineInfo();
SetAllAttr();
- if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, NULL ) )
+ if ( !WMFRecord_Escape_Unicode( pA->GetPoint(), aTemp, nullptr ) )
WMFRecord_TextOut( pA->GetPoint(), aTemp );
}
break;
@@ -1199,7 +1199,7 @@ void WMFWriter::WriteRecords( const GDIMetaFile & rMTF )
pVirDev->SetFont( aSrcFont );
const sal_Int32 nLen = aTemp.getLength();
- std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : NULL);
+ std::unique_ptr<long[]> pDXAry(nLen ? new long[ nLen ] : nullptr);
const sal_Int32 nNormSize = pVirDev->GetTextArray( aTemp, pDXAry.get() );
if (nLen && nNormSize == 0)
{
@@ -1748,7 +1748,7 @@ bool WMFWriter::WriteWMF( const GDIMetaFile& rMTF, SvStream& rTargetStream,
pVirDev->SetMapMode( aTargetMapMode );
- pAttrStack=NULL;
+ pAttrStack=nullptr;
for (sal_uInt16 i=0; i<MAXOBJECTHANDLES; i++)
bHandleAllocated[i]=false;
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index cd89bdf0e6a1..c33924247352 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -73,9 +73,9 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
PhysicalFontCollection::PhysicalFontCollection()
: mbMatchData( false )
, mbMapNames( false )
- , mpPreMatchHook( NULL )
- , mpFallbackHook( NULL )
- , mpFallbackList( NULL )
+ , mpPreMatchHook( nullptr )
+ , mpFallbackHook( nullptr )
+ , mpFallbackList( nullptr )
, mnFallbackCount( -1 )
{}
@@ -98,7 +98,7 @@ void PhysicalFontCollection::Clear()
{
// remove fallback lists
delete[] mpFallbackList;
- mpFallbackList = NULL;
+ mpFallbackList = nullptr;
mnFallbackCount = -1;
// clear all entries in the device font list
@@ -141,13 +141,13 @@ void PhysicalFontCollection::InitGenericGlyphFallback() const
"phetsarathot", "",
"padauk", "pinlonmyanmar", "",
"iskoolapota", "lklug", "",
- 0
+ nullptr
};
bool bHasEudc = false;
int nMaxLevel = 0;
int nBestQuality = 0;
- PhysicalFontFamily** pFallbackList = NULL;
+ PhysicalFontFamily** pFallbackList = nullptr;
for( const char** ppNames = &aGlyphFallbackList[0];; ++ppNames )
{
@@ -218,7 +218,7 @@ PhysicalFontFamily* PhysicalFontCollection::GetGlyphFallbackFont( FontSelectPatt
OUString& rMissingCodes,
int nFallbackLevel ) const
{
- PhysicalFontFamily* pFallbackData = NULL;
+ PhysicalFontFamily* pFallbackData = nullptr;
// find a matching font candidate for platform specific glyph fallback
if( mpFallbackHook )
@@ -335,7 +335,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySearchName( const OUString
PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( rSearchName );
if( it == maPhysicalFontFamilies.end() )
- return NULL;
+ return nullptr;
PhysicalFontFamily* pFoundData = (*it).second;
return pFoundData;
@@ -346,11 +346,11 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAliasName(const OUString&
{
// short circuit for impossible font name alias
if (rSearchName.isEmpty())
- return NULL;
+ return nullptr;
// short circuit if no alias names are available
if (!mbMapNames)
- return NULL;
+ return nullptr;
// use the font's alias names to find the font
// TODO: get rid of linear search
@@ -375,7 +375,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAliasName(const OUString&
while ( nIndex != -1 );
}
- return NULL;
+ return nullptr;
}
PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFontName ) const
@@ -386,7 +386,7 @@ PhysicalFontFamily* PhysicalFontCollection::FindFontFamily( const OUString& rFon
PhysicalFontFamily *PhysicalFontCollection::FindOrCreateFamily( const OUString &rFamilyName )
{
PhysicalFontFamilies::const_iterator it = maPhysicalFontFamilies.find( rFamilyName );
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
if( it != maPhysicalFontFamilies.end() )
pFoundData = (*it).second;
@@ -402,7 +402,7 @@ PhysicalFontFamily *PhysicalFontCollection::FindOrCreateFamily( const OUString &
PhysicalFontFamily* PhysicalFontCollection::ImplFindByTokenNames(const OUString& rTokenStr) const
{
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
// use normalized font name tokens to find the font
for( sal_Int32 nTokenPos = 0; nTokenPos != -1; )
@@ -422,7 +422,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByTokenNames(const OUString&
PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::FontNameAttr& rFontAttr ) const
{
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
// use the font substitutions suggested by the FontNameAttr to find the font
::std::vector< OUString >::const_iterator it = rFontAttr.Substitutions.begin();
@@ -449,7 +449,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindBySubstFontAttr( const utl::
return pFoundData;
}
- return NULL;
+ return nullptr;
}
void PhysicalFontCollection::InitMatchData() const
@@ -488,10 +488,10 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByAttributes( ImplFontAttrs
if( nSearchType == ImplFontAttrs::None
&& ((eSearchWeight == WEIGHT_DONTKNOW) || (eSearchWeight == WEIGHT_NORMAL))
&& ((eSearchWidth == WIDTH_DONTKNOW) || (eSearchWidth == WIDTH_NORMAL)) )
- return NULL;
+ return nullptr;
InitMatchData();
- PhysicalFontFamily* pFoundData = NULL;
+ PhysicalFontFamily* pFoundData = nullptr;
long nBestMatch = 40000;
ImplFontAttrs nBestType = ImplFontAttrs::None;
@@ -993,7 +993,7 @@ ImplGetDevSizeList* PhysicalFontCollection::GetDevSizeList( const OUString& rFon
ImplGetDevSizeList* pGetDevSizeList = new ImplGetDevSizeList;
PhysicalFontFamily* pFontFamily = FindFontFamily( rFontName );
- if( pFontFamily != NULL )
+ if( pFontFamily != nullptr )
{
std::set<int> rHeights;
pFontFamily->GetFontHeights( rHeights );
@@ -1010,7 +1010,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
{
// give up if no fonts are available
if( !Count() )
- return NULL;
+ return nullptr;
bool bMultiToken = false;
sal_Int32 nTokenPos = 0;
@@ -1181,7 +1181,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
}
// use font fallback
- const utl::FontNameAttr* pFontAttr = NULL;
+ const utl::FontNameAttr* pFontAttr = nullptr;
if (!aSearchName.isEmpty() && !utl::ConfigManager::IsAvoidConfig())
{
// get fallback info using FontSubstConfiguration and
@@ -1240,7 +1240,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
return pFoundData;
}
- const utl::FontNameAttr* pTempFontAttr = NULL;
+ const utl::FontNameAttr* pTempFontAttr = nullptr;
if (!utl::ConfigManager::IsAvoidConfig())
{
// use a font name from font fallback list to determine font attributes
diff --git a/vcl/source/font/PhysicalFontFace.cxx b/vcl/source/font/PhysicalFontFace.cxx
index b79969b498fd..b93022333635 100644
--- a/vcl/source/font/PhysicalFontFace.cxx
+++ b/vcl/source/font/PhysicalFontFace.cxx
@@ -30,7 +30,7 @@ PhysicalFontFace::PhysicalFontFace( const ImplDevFontAttributes& rDFA, int nMagi
, mnWidth(0)
, mnHeight(0)
, mnMagic( nMagic )
- , mpNext( NULL )
+ , mpNext( nullptr )
{
// StarSymbol is a unicode font, but it still deserves the symbol flag
if( !IsSymbolFont() )
diff --git a/vcl/source/font/PhysicalFontFamily.cxx b/vcl/source/font/PhysicalFontFamily.cxx
index b3c650cf4c94..8cfc0e895836 100644
--- a/vcl/source/font/PhysicalFontFamily.cxx
+++ b/vcl/source/font/PhysicalFontFamily.cxx
@@ -90,7 +90,7 @@ static ImplFontAttrs lcl_IsCJKFont( const OUString& rFontName )
}
PhysicalFontFamily::PhysicalFontFamily( const OUString& rSearchName )
-: mpFirst( NULL ),
+: mpFirst( nullptr ),
maSearchName( rSearchName ),
mnTypeFaces( 0 ),
mnMatchType( ImplFontAttrs::None ),
@@ -114,7 +114,7 @@ PhysicalFontFamily::~PhysicalFontFamily()
bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
{
- pNewData->mpNext = NULL;
+ pNewData->mpNext = nullptr;
if( !mpFirst )
{
@@ -167,7 +167,7 @@ bool PhysicalFontFamily::AddFontFace( PhysicalFontFace* pNewData )
// TODO: get rid of linear search?
PhysicalFontFace* pData;
PhysicalFontFace** ppHere = &mpFirst;
- for(; (pData=*ppHere) != NULL; ppHere=&pData->mpNext )
+ for(; (pData=*ppHere) != nullptr; ppHere=&pData->mpNext )
{
sal_Int32 eComp = pNewData->CompareWithSize( *pData );
if( eComp > 0 )
@@ -219,14 +219,14 @@ void PhysicalFontFamily::InitMatchData( const utl::FontSubstConfiguration& rFont
PhysicalFontFace* PhysicalFontFamily::FindBestFontFace( const FontSelectPattern& rFSD ) const
{
if( !mpFirst )
- return NULL;
+ return nullptr;
if( !mpFirst->GetNextFace() )
return mpFirst;
// FontName+StyleName should map to FamilyName+StyleName
const OUString& rSearchName = rFSD.maTargetName;
OUString aTargetStyleName;
- const OUString* pTargetStyleName = NULL;
+ const OUString* pTargetStyleName = nullptr;
if( (rSearchName.getLength() > maSearchName.getLength())
&& rSearchName.startsWith( maSearchName ) )
{
@@ -249,7 +249,7 @@ PhysicalFontFace* PhysicalFontFamily::FindBestFontFace( const FontSelectPattern&
// meaning different font attributes, but not different fonts sizes
void PhysicalFontFamily::UpdateDevFontList( ImplGetDevFontList& rDevFontList ) const
{
- PhysicalFontFace* pPrevFace = NULL;
+ PhysicalFontFace* pPrevFace = nullptr;
for( PhysicalFontFace* pFace = mpFirst; pFace; pFace = pFace->GetNextFace() )
{
if( !pPrevFace || pFace->CompareIgnoreSize( *pPrevFace ) )
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index f026a67e9dfb..3a46f474e00b 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -146,9 +146,9 @@ static const char* pDictOps[] = {
"dFamilyBlues", "dFamilyOtherBlues", "nStdHW", "nStdVW",
"xESC", "nUniqueID", "aXUID", "nCharset",
"nEncoding", "nCharStrings", "PPrivate", "nSubrs",
- "nDefaultWidthX", "nNominalWidthX", NULL, NULL,
- NULL, NULL, NULL, NULL,
- "shortint", "longint", "BCD", NULL
+ "nDefaultWidthX", "nNominalWidthX", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ "shortint", "longint", "BCD", nullptr
};
// TOP DICT escapes (also covers PRIV DICT escapes)
@@ -156,36 +156,36 @@ static const char* pDictEscs[] = {
"sCopyright", "bIsFixedPitch", "nItalicAngle", "nUnderlinePosition",
"nUnderlineThickness", "nPaintType", "tCharstringType", "aFontMatrix",
"nStrokeWidth", "nBlueScale", "nBlueShift", "nBlueFuzz",
- "dStemSnapH", "dStemSnapV", "bForceBold", NULL,
- NULL, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
+ "dStemSnapH", "dStemSnapV", "bForceBold", nullptr,
+ nullptr, "nLanguageGroup", "nExpansionFactor", "nInitialRandomSeed",
"nSyntheticBase", "sPostScript", "sBaseFontName", "dBaseFontBlend",
- NULL, NULL, NULL, NULL,
- NULL, NULL, "rROS", "nCIDFontVersion",
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "rROS", "nCIDFontVersion",
"nCIDFontRevision", "nCIDFontType", "nCIDCount", "nUIDBase",
"nFDArray", "nFDSelect", "sFontName"
};
static const char* pType1Ops[] = {
- NULL, "2hstem", NULL, "2vstem",
+ nullptr, "2hstem", nullptr, "2vstem",
"1vmoveto", "Arlineto", "1hlineto", "1vlineto",
"Crrcurveto", "0closepath", "Lcallsubr", "0return",
- "xT1ESC", "2hsbw", "0endchar", NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2rmoveto", "1hmoveto", NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, "4vhcurveto", "4hvcurveto"
+ "xT1ESC", "2hsbw", "0endchar", nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, "2rmoveto", "1hmoveto", nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, "4vhcurveto", "4hvcurveto"
};
static const char* pT1EscOps[] = {
- "0dotsection", "6vstem3", "6hstem3", NULL,
- NULL, NULL, "5seac", "4sbw",
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, NULL, NULL,
- "Gcallothersubr", "1pop", NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL,
- NULL, "2setcurrentpoint"
+ "0dotsection", "6vstem3", "6hstem3", nullptr,
+ nullptr, nullptr, "5seac", "4sbw",
+ nullptr, "1abs", "2add", "2sub",
+ "2div", nullptr, nullptr, nullptr,
+ "Gcallothersubr", "1pop", nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr,
+ nullptr, "2setcurrentpoint"
};
struct TYPE1OP
@@ -208,26 +208,26 @@ struct TYPE1OP
};
static const char* pType2Ops[] = {
- NULL, "hhstem", NULL, "vvstem",
+ nullptr, "hhstem", nullptr, "vvstem",
"mvmoveto", "Arlineto", "Ehlineto", "Evlineto",
- "Crrcurveto", NULL, "Lcallsubr", "Xreturn",
- "xT2ESC", NULL, "eendchar", NULL,
- NULL, NULL, "Hhstemhm", "Khintmask",
+ "Crrcurveto", nullptr, "Lcallsubr", "Xreturn",
+ "xT2ESC", nullptr, "eendchar", nullptr,
+ nullptr, nullptr, "Hhstemhm", "Khintmask",
"Kcntrmask", "Mrmoveto", "mhmoveto", "Vvstemhm",
".rcurveline", ".rlinecurve", ".vvcurveto", ".hhcurveto",
".shortint", "Gcallgsubr", ".vhcurveto", ".hvcurveto"
};
static const char* pT2EscOps[] = {
- NULL, NULL, NULL, "2and",
- "2or", "1not", NULL, NULL,
- NULL, "1abs", "2add", "2sub",
- "2div", NULL, "1neg", "2eq",
- NULL, NULL, "1drop", NULL,
+ nullptr, nullptr, nullptr, "2and",
+ "2or", "1not", nullptr, nullptr,
+ nullptr, "1abs", "2add", "2sub",
+ "2div", nullptr, "1neg", "2eq",
+ nullptr, nullptr, "1drop", nullptr,
"1put", "1get", "4ifelse", "0random",
- "2mul", NULL, "1sqrt", "1dup",
- "2exch", "Iindex", "Rroll", NULL,
- NULL, NULL, "7hflex", "Fflex",
+ "2mul", nullptr, "1sqrt", "1dup",
+ "2exch", "Iindex", "Rroll", nullptr,
+ nullptr, nullptr, "7hflex", "Fflex",
"9hflex1", "fflex1"
};
@@ -414,15 +414,15 @@ private:
CffSubsetterContext::CffSubsetterContext( const U8* pBasePtr, int nBaseLen)
: mpBasePtr( pBasePtr)
, mpBaseEnd( pBasePtr+nBaseLen)
- , mpReadPtr(NULL)
- , mpReadEnd(NULL)
- , mpWritePtr(NULL)
+ , mpReadPtr(nullptr)
+ , mpReadEnd(nullptr)
+ , mpWritePtr(nullptr)
, mbSawError(false)
, mbNeedClose(false)
, mbIgnoreHints(false)
, mnCntrMask(0)
- , mpCharStringOps(NULL)
- , mpCharStringEscs(NULL)
+ , mpCharStringOps(nullptr)
+ , mpCharStringEscs(nullptr)
, mnStackIdx(0)
, mnHintSize(0)
, mnHorzHintSize(0)
@@ -509,7 +509,7 @@ void CffSubsetterContext::readDictOp()
const U8 c = *mpReadPtr;
if( c <= 21 ) {
int nOpId = *(mpReadPtr++);
- const char* pCmdName = 0;
+ const char* pCmdName = nullptr;
if( nOpId != 12)
pCmdName = pDictOps[nOpId];
else {
@@ -1748,7 +1748,7 @@ Type1Emitter::~Type1Emitter()
return;
if( mbCloseOutfile )
fclose( mpFileOut);
- mpFileOut = NULL;
+ mpFileOut = nullptr;
}
void Type1Emitter::setSubsetName( const char* pSubsetName)
diff --git a/vcl/source/fontsubset/fontsubset.cxx b/vcl/source/fontsubset/fontsubset.cxx
index a50b50e1e166..26403cc88f2d 100644
--- a/vcl/source/fontsubset/fontsubset.cxx
+++ b/vcl/source/fontsubset/fontsubset.cxx
@@ -29,15 +29,15 @@ FontSubsetInfo::FontSubsetInfo()
, m_nDescent( 0)
, m_nCapHeight( 0)
, m_nFontType( FontSubsetInfo::NO_FONT)
- , mpInFontBytes( NULL)
+ , mpInFontBytes( nullptr)
, mnInByteLength( 0)
, meInFontType( FontSubsetInfo::NO_FONT)
- , mpSftTTFont( NULL)
+ , mpSftTTFont( nullptr)
, mnReqFontTypeMask(0)
- , mpOutFile(NULL)
- , mpReqFontName(NULL)
- , mpReqGlyphIds(NULL)
- , mpReqEncodedIds(NULL)
+ , mpOutFile(nullptr)
+ , mpReqFontName(nullptr)
+ , mpReqGlyphIds(nullptr)
+ , mpReqEncodedIds(nullptr)
, mnReqGlyphCount(0)
{
}
@@ -51,7 +51,7 @@ bool FontSubsetInfo::LoadFont(
FontSubsetInfo::FontType eInFontType,
const unsigned char* pInFontBytes, int nInByteLength)
{
- DBG_ASSERT( (mpSftTTFont == NULL), "Subset from SFT and from mapped font-file requested");
+ DBG_ASSERT( (mpSftTTFont == nullptr), "Subset from SFT and from mapped font-file requested");
meInFontType = eInFontType;
mpInFontBytes = pInFontBytes;
mnInByteLength = nInByteLength;
@@ -61,10 +61,10 @@ bool FontSubsetInfo::LoadFont(
// prepare subsetting for fonts that are known to the SFT-parser
bool FontSubsetInfo::LoadFont( vcl::_TrueTypeFont* pSftTTFont )
{
- DBG_ASSERT( (mpInFontBytes == NULL), "Subset from SFT and from mapped font-file requested");
+ DBG_ASSERT( (mpInFontBytes == nullptr), "Subset from SFT and from mapped font-file requested");
mpSftTTFont = pSftTTFont;
meInFontType = ANY_SFNT;
- return (mpSftTTFont == NULL);
+ return (mpSftTTFont == nullptr);
}
bool FontSubsetInfo::CreateFontSubset(
@@ -117,7 +117,7 @@ bool FontSubsetInfo::CreateFontSubsetFromSfnt( sal_Int32* pOutGlyphWidths )
{
// handle SFNT_CFF fonts
int nCffLength = 0;
- const sal_uInt8* pCffBytes = NULL;
+ const sal_uInt8* pCffBytes = nullptr;
if( GetSfntTable( mpSftTTFont, O_CFF, &pCffBytes, &nCffLength))
{
LoadFont( CFF_FONT, pCffBytes, nCffLength);
diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx
index cd76e54303a6..8966ce3f41d2 100644
--- a/vcl/source/fontsubset/gsub.cxx
+++ b/vcl/source/fontsubset/gsub.cxx
@@ -325,7 +325,7 @@ void ReleaseGSUB(struct _TrueTypeFont* pTTFile)
int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph )
{
GlyphSubstitution* pGlyphSubstitution = static_cast<GlyphSubstitution*>(pTTFile->pGSubstitution);
- if( pGlyphSubstitution != 0 )
+ if( pGlyphSubstitution != nullptr )
{
GlyphSubstitution::const_iterator it( pGlyphSubstitution->find( sal::static_int_cast<sal_uInt16>(nGlyph) ) );
if( it != pGlyphSubstitution->end() )
diff --git a/vcl/source/fontsubset/list.cxx b/vcl/source/fontsubset/list.cxx
index 6578183ebe0e..42cc6577f0c2 100644
--- a/vcl/source/fontsubset/list.cxx
+++ b/vcl/source/fontsubset/list.cxx
@@ -50,7 +50,7 @@ struct _list {
static lnode *newNode(void *el)
{
lnode *ptr = static_cast<lnode *>(rtl_allocateMemory(sizeof(lnode)));
- assert(ptr != 0);
+ assert(ptr != nullptr);
ptr->value = el;
@@ -62,12 +62,12 @@ static lnode *appendPrim(list pThis, void *el)
lnode *ptr = newNode(el);
lnode **flink, *blink;
- if (pThis->tail != 0) {
+ if (pThis->tail != nullptr) {
flink = &(pThis->tail->next);
blink = pThis->tail;
} else {
flink = &pThis->head;
- blink = 0;
+ blink = nullptr;
pThis->cptr = ptr; /*- list was empty - set current to this element */
}
@@ -75,7 +75,7 @@ static lnode *appendPrim(list pThis, void *el)
pThis->tail = ptr;
ptr->prev = blink;
- ptr->next = 0;
+ ptr->next = nullptr;
pThis->aCount++;
return ptr;
@@ -85,45 +85,45 @@ static lnode *appendPrim(list pThis, void *el)
list listNewEmpty() /*- default ctor */
{
list pThis = static_cast<list>(rtl_allocateMemory(sizeof(struct _list)));
- assert(pThis != 0);
+ assert(pThis != nullptr);
pThis->aCount = 0;
- pThis->eDtor = 0;
- pThis->head = pThis->tail = pThis->cptr = 0;
+ pThis->eDtor = nullptr;
+ pThis->head = pThis->tail = pThis->cptr = nullptr;
return pThis;
}
void listDispose(list pThis) /*- dtor */
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
listClear(pThis);
rtl_freeMemory(pThis);
}
void listSetElementDtor(list pThis, list_destructor f)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
pThis->eDtor = f;
}
/* calling this function on an empty list is a run-time error */
void *listCurrent(list pThis)
{
- assert(pThis != 0);
- assert(pThis->cptr != 0);
+ assert(pThis != nullptr);
+ assert(pThis->cptr != nullptr);
return pThis->cptr->value;
}
int listCount(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
return pThis->aCount;
}
int listIsEmpty(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
return pThis->aCount == 0;
}
@@ -135,12 +135,12 @@ int listNext(list pThis)
int listSkipForward(list pThis, int n)
{
int m = 0;
- assert(pThis != 0);
+ assert(pThis != nullptr);
- if (pThis->cptr == 0) return 0;
+ if (pThis->cptr == nullptr) return 0;
while (n != 0) {
- if (pThis->cptr->next == 0) break;
+ if (pThis->cptr->next == nullptr) break;
pThis->cptr = pThis->cptr->next;
n--;
m++;
@@ -150,7 +150,7 @@ int listSkipForward(list pThis, int n)
int listToFirst(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
if (pThis->cptr != pThis->head) {
pThis->cptr = pThis->head;
@@ -161,7 +161,7 @@ int listToFirst(list pThis)
int listToLast(list pThis)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
if (pThis->cptr != pThis->tail) {
pThis->cptr = pThis->tail;
@@ -172,7 +172,7 @@ int listToLast(list pThis)
list listAppend(list pThis, void *el)
{
- assert(pThis != 0);
+ assert(pThis != nullptr);
appendPrim(pThis, el);
return pThis;
@@ -180,18 +180,18 @@ list listAppend(list pThis, void *el)
list listRemove(list pThis)
{
- lnode *ptr = 0;
- if (pThis->cptr == 0) return pThis;
+ lnode *ptr = nullptr;
+ if (pThis->cptr == nullptr) return pThis;
- if (pThis->cptr->next != 0) {
+ if (pThis->cptr->next != nullptr) {
ptr = pThis->cptr->next;
pThis->cptr->next->prev = pThis->cptr->prev;
} else {
pThis->tail = pThis->cptr->prev;
}
- if (pThis->cptr->prev != 0) {
- if (ptr == 0) ptr = pThis->cptr->prev;
+ if (pThis->cptr->prev != nullptr) {
+ if (ptr == nullptr) ptr = pThis->cptr->prev;
pThis->cptr->prev->next = pThis->cptr->next;
} else {
pThis->head = pThis->cptr->next;
@@ -217,7 +217,7 @@ list listClear(list pThis)
node = ptr;
}
- pThis->head = pThis->tail = pThis->cptr = 0;
+ pThis->head = pThis->tail = pThis->cptr = nullptr;
assert(pThis->aCount == 0);
return pThis;
}
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 7461f56b80d5..7e3932c2a5ee 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -141,14 +141,14 @@ static const sal_uInt32 T_otto = 0x4f54544f; /* 'OTTO' */
_inline void *smalloc(size_t size)
{
void *res = malloc(size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
_inline void *scalloc(size_t n, size_t size)
{
void *res = calloc(n, size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -156,7 +156,7 @@ _inline void *scalloc(size_t n, size_t size)
_inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_Int16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -170,7 +170,7 @@ _inline sal_Int16 GetInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_uInt16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -184,7 +184,7 @@ _inline sal_uInt16 GetUInt16(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_Int32 GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_Int32 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 |
@@ -200,7 +200,7 @@ _inline sal_Int32 GetInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
_inline sal_uInt32 GetUInt32(const sal_uInt8 *ptr, size_t offset, int bigendian)
{
sal_uInt32 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 24 | (ptr+offset)[1] << 16 |
@@ -406,7 +406,7 @@ static int GetSimpleTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoin
sal_uInt8 flag, n;
int i, j, z;
- *pointArray = 0;
+ *pointArray = nullptr;
/* printf("GetSimpleTTOutline(%d)\n", glyphID); */
@@ -528,7 +528,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
int i, np;
F16Dot16 a = 0x10000, b = 0, c = 0, d = 0x10000, m, n, abs1, abs2, abs3;
- *pointArray = 0;
+ *pointArray = nullptr;
/* printf("GetCompoundTTOutline(%d)\n", glyphID); */
if (glyphID >= ttf->nglyphs) /*- incorrect glyphID */
@@ -572,7 +572,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
glyphlist.push_back( index );
- if ((np = GetTTGlyphOutline(ttf, index, &nextComponent, 0, &glyphlist)) == 0)
+ if ((np = GetTTGlyphOutline(ttf, index, &nextComponent, nullptr, &glyphlist)) == 0)
{
/* XXX that probably indicates a corrupted font */
#if OSL_DEBUG_LEVEL > 1
@@ -665,7 +665,7 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPo
np = myPoints.size();
pa = static_cast<ControlPoint*>(calloc(np, sizeof(ControlPoint)));
- assert(pa != 0);
+ assert(pa != nullptr);
if (np > 0)
memcpy( pa, &myPoints[0], np*sizeof(ControlPoint) );
@@ -686,7 +686,7 @@ static int GetTTGlyphOutline(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint
const sal_uInt8 *table = getTable( ttf, O_glyf );
sal_Int16 numberOfContours;
int res;
- *pointArray = 0;
+ *pointArray = nullptr;
if (metrics) {
memset(metrics, 0, sizeof(TTGlyphMetrics)); /*- metrics is initialized to all zeroes */
@@ -733,7 +733,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
int cp = 0; /*- current point */
int StartContour = 0, EndContour = 1;
- *path = 0;
+ *path = nullptr;
/* if (srcCount > 0) for(;;) */
while (srcCount > 0) { /*- srcCount does not get changed inside the loop. */
@@ -839,7 +839,7 @@ static int BSplineToPSPath(ControlPoint *srcA, int srcCount, PSPathElement **pat
if( (nPathCount = (int)aPathList.size()) > 0)
{
*path = static_cast<PSPathElement*>(calloc(nPathCount, sizeof(PSPathElement)));
- assert(*path != 0);
+ assert(*path != nullptr);
memcpy( *path, &aPathList[0], nPathCount * sizeof(PSPathElement) );
}
@@ -860,15 +860,15 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
if( (len <= 0) || len > available_space)
{
if( ucs2result )
- *ucs2result = NULL;
- return NULL;
+ *ucs2result = nullptr;
+ return nullptr;
}
if( ucs2result )
- *ucs2result = NULL;
+ *ucs2result = nullptr;
if (dbFlag) {
res = static_cast<char*>(malloc(1 + len/2));
- assert(res != 0);
+ assert(res != nullptr);
for (int i = 0; i < len/2; i++)
res[i] = *(ptr + i * 2 + 1);
res[len/2] = 0;
@@ -881,7 +881,7 @@ static char *nameExtract( const sal_uInt8* name, int nTableSize, int n, int dbFl
}
} else {
res = static_cast<char*>(malloc(1 + len));
- assert(res != 0);
+ assert(res != nullptr);
memcpy(res, ptr, len);
res[len] = 0;
}
@@ -956,20 +956,20 @@ static void GetNames(TrueTypeFont *t)
bool bPSNameOK = true;
/* PostScript name: preferred Microsoft */
- t->psname = NULL;
+ t->psname = nullptr;
if ((r = findname(table, n, 3, 1, 0x0409, 6)) != -1)
- t->psname = nameExtract(table, nTableSize, r, 1, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 1, nullptr);
if ( ! t->psname && (r = findname(table, n, 1, 0, 0, 6)) != -1)
- t->psname = nameExtract(table, nTableSize, r, 0, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 0, nullptr);
if ( ! t->psname && (r = findname(table, n, 3, 0, 0x0409, 6)) != -1)
{
// some symbol fonts like Marlett have a 3,0 name!
- t->psname = nameExtract(table, nTableSize, r, 1, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 1, nullptr);
}
// for embedded font in Ghostscript PDFs
if ( ! t->psname && (r = findname(table, n, 2, 2, 0, 6)) != -1)
{
- t->psname = nameExtract(table, nTableSize, r, 0, NULL);
+ t->psname = nameExtract(table, nTableSize, r, 0, nullptr);
}
if ( ! t->psname )
{
@@ -980,7 +980,7 @@ static void GetNames(TrueTypeFont *t)
while(pReverse != t->fname && *pReverse != '/') pReverse--;
if(*pReverse == '/') pReverse++;
t->psname = strdup(pReverse);
- assert(t->psname != 0);
+ assert(t->psname != nullptr);
for (i=strlen(t->psname) - 1; i > 0; i--)
{
/*- Remove the suffix -*/
@@ -995,13 +995,13 @@ static void GetNames(TrueTypeFont *t)
}
/* Font family and subfamily names: preferred Apple */
- t->family = NULL;
+ t->family = nullptr;
if ((r = findname(table, n, 0, 0, 0, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 3, 1, 0x0409, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 1, 0, 0, 1)) != -1)
- t->family = nameExtract(table, nTableSize, r, 0, NULL);
+ t->family = nameExtract(table, nTableSize, r, 0, nullptr);
if ( ! t->family && (r = findname(table, n, 3, 1, 0x0411, 1)) != -1)
t->family = nameExtract(table, nTableSize, r, 1, &t->ufamily);
if ( ! t->family && (r = findname(table, n, 3, 0, 0x0409, 1)) != -1)
@@ -1009,11 +1009,11 @@ static void GetNames(TrueTypeFont *t)
if ( ! t->family )
{
t->family = strdup(t->psname);
- assert(t->family != 0);
+ assert(t->family != nullptr);
}
- t->subfamily = NULL;
- t->usubfamily = NULL;
+ t->subfamily = nullptr;
+ t->usubfamily = nullptr;
if ((r = findname(table, n, 1, 0, 0, 2)) != -1)
t->subfamily = nameExtract(table, nTableSize, r, 0, &t->usubfamily);
if ( ! t->subfamily && (r = findname(table, n, 3, 1, 0x0409, 2)) != -1)
@@ -1338,7 +1338,7 @@ static void FindCmap(TrueTypeFont *ttf)
ttf->cmap = table + ThreeZero;
} else {
ttf->cmapType = CMAP_NOT_USABLE;
- ttf->cmap = 0;
+ ttf->cmap = nullptr;
}
if (ttf->cmapType != CMAP_NOT_USABLE) {
@@ -1354,8 +1354,8 @@ static void FindCmap(TrueTypeFont *ttf)
printf("%s: %d is not a recognized cmap format.\n", ttf->fname, GetUInt16(ttf->cmap, 0, 1));
#endif
ttf->cmapType = CMAP_NOT_USABLE;
- ttf->cmap = 0;
- ttf->mapper = 0;
+ ttf->cmap = nullptr;
+ ttf->mapper = nullptr;
}
}
}
@@ -1386,7 +1386,7 @@ static void GetKern(TrueTypeFont *ttf)
}
ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
- assert(ttf->kerntables != 0);
+ assert(ttf->kerntables != nullptr);
for( unsigned i = 0; i < ttf->nkern; ++i) {
ttf->kerntables[i] = ptr;
@@ -1418,7 +1418,7 @@ static void GetKern(TrueTypeFont *ttf)
}
ttf->kerntables = static_cast<const sal_uInt8**>(calloc(ttf->nkern, sizeof(sal_uInt8 *)));
- assert(ttf->kerntables != 0);
+ assert(ttf->kerntables != nullptr);
for( unsigned i = 0; i < ttf->nkern; ++i) {
ttf->kerntables[i] = ptr;
@@ -1435,7 +1435,7 @@ static void GetKern(TrueTypeFont *ttf)
badtable:
ttf->kerntype = KT_NONE;
- ttf->kerntables = 0;
+ ttf->kerntables = nullptr;
return;
}
@@ -1460,14 +1460,14 @@ int CountTTCFonts(const char* fname)
static void allocTrueTypeFont( TrueTypeFont** ttf )
{
*ttf = static_cast<TrueTypeFont*>(calloc(1,sizeof(TrueTypeFont)));
- if( *ttf != NULL )
+ if( *ttf != nullptr )
{
(*ttf)->tag = 0;
- (*ttf)->fname = 0;
+ (*ttf)->fname = nullptr;
(*ttf)->fsize = -1;
- (*ttf)->ptr = 0;
+ (*ttf)->ptr = nullptr;
(*ttf)->nglyphs = 0xFFFFFFFF;
- (*ttf)->pGSubstitution = 0;
+ (*ttf)->pGSubstitution = nullptr;
}
}
@@ -1516,7 +1516,7 @@ int OpenTTFontFile( const char* fname, sal_uInt32 facenum, TrueTypeFont** ttf )
goto cleanup;
}
- if (((*ttf)->ptr = static_cast<sal_uInt8 *>(mmap(0, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0))) == MAP_FAILED) {
+ if (((*ttf)->ptr = static_cast<sal_uInt8 *>(mmap(nullptr, (*ttf)->fsize, PROT_READ, MAP_SHARED, fd, 0))) == MAP_FAILED) {
ret = SF_MEMORY;
goto cleanup;
}
@@ -1529,7 +1529,7 @@ cleanup:
/*- t and t->fname have been allocated! */
free((*ttf)->fname);
free(*ttf);
- *ttf = NULL;
+ *ttf = nullptr;
return ret;
}
#endif
@@ -1537,10 +1537,10 @@ cleanup:
int OpenTTFontBuffer(const void* pBuffer, sal_uInt32 nLen, sal_uInt32 facenum, TrueTypeFont** ttf)
{
allocTrueTypeFont( ttf );
- if( *ttf == NULL )
+ if( *ttf == nullptr )
return SF_MEMORY;
- (*ttf)->fname = NULL;
+ (*ttf)->fname = nullptr;
(*ttf)->fsize = nLen;
(*ttf)->ptr = const_cast<sal_uInt8 *>(static_cast<sal_uInt8 const *>(pBuffer));
@@ -1584,9 +1584,9 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
return SF_TTFORMAT;
t->tables = static_cast<const sal_uInt8**>(calloc(NUM_TAGS, sizeof(sal_uInt8 *)));
- assert(t->tables != 0);
+ assert(t->tables != nullptr);
t->tlens = static_cast<sal_uInt32*>(calloc(NUM_TAGS, sizeof(sal_uInt32)));
- assert(t->tlens != 0);
+ assert(t->tlens != nullptr);
/* parse the tables */
for (i=0; i<(int)t->ntables; i++) {
@@ -1630,7 +1630,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
if( pHead > t->ptr + (t->fsize - 54) )
pHead = t->ptr + (t->fsize - 54);
/* TODO: find better method than searching head table's magic */
- sal_uInt8* p = NULL;
+ sal_uInt8* p = nullptr;
for( p = pHead + 12; p > t->ptr; --p ) {
if( p[0]==0x5F && p[1]==0x0F && p[2]==0x3C && p[3]==0xF5 ) {
int nDelta = (pHead + 12) - p;
@@ -1660,7 +1660,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
fprintf( stderr, "font file %s has bad table offset %" SAL_PRI_PTRDIFFT "d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->ptr, i );
#endif
t->tlens[i] = 0;
- t->tables[i] = NULL;
+ t->tables[i] = nullptr;
}
else if( const_cast<sal_uInt8*>(t->tables[i]) + t->tlens[i] > t->ptr + t->fsize )
{
@@ -1706,7 +1706,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
table = getTable(t, O_loca);
t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
- assert(t->goffsets != 0);
+ assert(t->goffsets != nullptr);
for( i = 0; i <= (int)t->nglyphs; ++i )
t->goffsets[i] = indexfmt ? GetUInt32(table, i << 2, 1) : (sal_uInt32)GetUInt16(table, i << 1, 1) << 1;
@@ -1716,17 +1716,17 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
t->nglyphs = k;
t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
/* TODO: implement to get subsetting */
- assert(t->goffsets != 0);
+ assert(t->goffsets != nullptr);
} else {
CloseTTFont(t);
return SF_TTFORMAT;
}
table = getTable(t, O_hhea);
- t->numberOfHMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0;
+ t->numberOfHMetrics = (table != nullptr) ? GetUInt16(table, 34, 1) : 0;
table = getTable(t, O_vhea);
- t->numOfLongVerMetrics = (table != 0) ? GetUInt16(table, 34, 1) : 0;
+ t->numOfLongVerMetrics = (table != nullptr) ? GetUInt16(table, 34, 1) : 0;
GetNames(t);
FindCmap(t);
@@ -1763,7 +1763,7 @@ void CloseTTFont(TrueTypeFont *ttf)
int GetTTGlyphPoints(TrueTypeFont *ttf, sal_uInt32 glyphID, ControlPoint **pointArray)
{
- return GetTTGlyphOutline(ttf, glyphID, pointArray, 0, 0);
+ return GetTTGlyphOutline(ttf, glyphID, pointArray, nullptr, nullptr);
}
int GetTTGlyphComponents(TrueTypeFont *ttf, sal_uInt32 glyphID, std::vector< sal_uInt32 >& glyphlist)
@@ -1905,13 +1905,13 @@ int CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname,
for (i = 0; i < nGlyphs; i++) {
fprintf(outf, h33, i);
- int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? glyphArray[i] : 0, &pa, &metrics, 0);
+ int r = GetTTGlyphOutline(ttf, glyphArray[i] < ttf->nglyphs ? glyphArray[i] : 0, &pa, &metrics, nullptr);
if (r > 0) {
n = BSplineToPSPath(pa, r, &path);
} else {
n = 0; /* glyph might have zero contours but valid metrics ??? */
- path = 0;
+ path = nullptr;
if (r < 0) { /* glyph is not present in the font - pa array was not allocated, so no need to free it */
continue;
}
@@ -1972,7 +1972,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
sal_uInt32 flags)
{
TrueTypeCreator *ttcr;
- TrueTypeTable *head=0, *hhea=0, *maxp=0, *cvt=0, *prep=0, *glyf=0, *fpgm=0, *cmap=0, *name=0, *post = 0, *os2 = 0;
+ TrueTypeTable *head=nullptr, *hhea=nullptr, *maxp=nullptr, *cvt=nullptr, *prep=nullptr, *glyf=nullptr, *fpgm=nullptr, *cmap=nullptr, *name=nullptr, *post = nullptr, *os2 = nullptr;
int i;
int res;
@@ -2002,9 +2002,9 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
*/
const sal_uInt8 ptr[] = {0,'T',0,'r',0,'u',0,'e',0,'T',0,'y',0,'p',0,'e',0,'S',0,'u',0,'b',0,'s',0,'e',0,'t'};
NameRecord n1 = {1, 0, 0, 6, 14, const_cast<sal_uInt8 *>(reinterpret_cast<sal_uInt8 const *>("TrueTypeSubset"))};
- NameRecord n2 = {3, 1, 1033, 6, 28, 0};
+ NameRecord n2 = {3, 1, 1033, 6, 28, nullptr};
n2.sptr = const_cast<sal_uInt8 *>(ptr);
- name = TrueTypeTableNew_name(0, 0);
+ name = TrueTypeTableNew_name(0, nullptr);
nameAdd(name, &n1);
nameAdd(name, &n2);
} else {
@@ -2032,7 +2032,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
/** head **/
p = getTable(ttf, O_head);
- assert(p != 0);
+ assert(p != nullptr);
head = TrueTypeTableNew_head(GetUInt32(p, 4, 1),
GetUInt16(p, 16, 1),
GetUInt16(p, 18, 1),
@@ -2058,22 +2058,22 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
}
/** cvt **/
- if ((p = getTable(ttf, O_cvt)) != 0) {
+ if ((p = getTable(ttf, O_cvt)) != nullptr) {
cvt = TrueTypeTableNew(T_cvt, getTableSize(ttf, O_cvt), p);
}
/** prep **/
- if ((p = getTable(ttf, O_prep)) != 0) {
+ if ((p = getTable(ttf, O_prep)) != nullptr) {
prep = TrueTypeTableNew(T_prep, getTableSize(ttf, O_prep), p);
}
/** fpgm **/
- if ((p = getTable(ttf, O_fpgm)) != 0) {
+ if ((p = getTable(ttf, O_fpgm)) != nullptr) {
fpgm = TrueTypeTableNew(T_fpgm, getTableSize(ttf, O_fpgm), p);
}
/** post **/
- if ((p = getTable(ttf, O_post)) != 0) {
+ if ((p = getTable(ttf, O_post)) != nullptr) {
post = TrueTypeTableNew_post(0x00030000,
GetUInt32(p, 4, 1),
GetUInt16(p, 8, 1),
@@ -2084,7 +2084,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
}
if (flags & TTCF_IncludeOS2) {
- if ((p = getTable(ttf, O_OS2)) != 0) {
+ if ((p = getTable(ttf, O_OS2)) != nullptr) {
os2 = TrueTypeTableNew(T_OS2, getTableSize(ttf, O_OS2), p);
}
}
@@ -2109,7 +2109,7 @@ int CreateTTFromTTGlyphs(TrueTypeFont *ttf,
static GlyphOffsets *GlyphOffsetsNew(sal_uInt8 *sfntP, sal_uInt32 sfntLen)
{
GlyphOffsets* res = static_cast<GlyphOffsets*>(smalloc(sizeof(GlyphOffsets)));
- sal_uInt8 *loca = NULL;
+ sal_uInt8 *loca = nullptr;
sal_uInt16 i, numTables = GetUInt16(sfntP, 4, 1);
sal_uInt32 locaLen = 0;
sal_Int16 indexToLocFormat = 0;
@@ -2260,7 +2260,7 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
int nGlyphs)
{
TrueTypeCreator *ttcr;
- TrueTypeTable *head=0, *hhea=0, *maxp=0, *cvt=0, *prep=0, *glyf=0, *fpgm=0;
+ TrueTypeTable *head=nullptr, *hhea=nullptr, *maxp=nullptr, *cvt=nullptr, *prep=nullptr, *glyf=nullptr, *fpgm=nullptr;
int i;
int res;
@@ -2272,14 +2272,14 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
if (nGlyphs >= 256) return SF_GLYPHNUM;
- assert(psname != 0);
+ assert(psname != nullptr);
TrueTypeCreatorNewEmpty(T_true, &ttcr);
/* head */
const sal_uInt8* p = getTable(ttf, O_head);
const sal_uInt8* headP = p;
- assert(p != 0);
+ assert(p != nullptr);
head = TrueTypeTableNew_head(GetUInt32(p, 4, 1), GetUInt16(p, 16, 1), GetUInt16(p, 18, 1), p+20, GetUInt16(p, 44, 1), GetUInt16(p, 46, 1), GetInt16(p, 48, 1));
ver = GetUInt32(p, 0, 1);
rev = GetUInt32(p, 4, 1);
@@ -2296,17 +2296,17 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf,
maxp = TrueTypeTableNew_maxp(getTable(ttf, O_maxp), getTableSize(ttf, O_maxp));
/** cvt **/
- if ((p = getTable(ttf, O_cvt)) != 0) {
+ if ((p = getTable(ttf, O_cvt)) != nullptr) {
cvt = TrueTypeTableNew(T_cvt, getTableSize(ttf, O_cvt), p);
}
/** prep **/
- if ((p = getTable(ttf, O_prep)) != 0) {
+ if ((p = getTable(ttf, O_prep)) != nullptr) {
prep = TrueTypeTableNew(T_prep, getTableSize(ttf, O_prep), p);
}
/** fpgm **/
- if ((p = getTable(ttf, O_fpgm)) != 0) {
+ if ((p = getTable(ttf, O_fpgm)) != nullptr) {
fpgm = TrueTypeTableNew(T_fpgm, getTableSize(ttf, O_fpgm), p);
}
@@ -2372,7 +2372,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
if (ttf->cmapType == CMAP_NOT_USABLE ) return -1;
if (!nchars) return 0;
- if (glyphArray == 0) {
+ if (glyphArray == nullptr) {
cp = str;
} else {
cp = glyphArray;
@@ -2394,7 +2394,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA
break;
case CMAP_MS_Unicode:
- if (glyphArray != 0) {
+ if (glyphArray != nullptr) {
memcpy(glyphArray, str, nchars * 2);
}
break;
@@ -2464,7 +2464,7 @@ bool GetSfntTable( TrueTypeFont* ttf, int nSubtableIndex,
return false;
*pRawLength = ttf->tlens[ nSubtableIndex ];
*ppRawBytes = ttf->tables[ nSubtableIndex ];
- bool bOk = (*pRawLength > 0) && (*ppRawBytes != NULL);
+ bool bOk = (*pRawLength > 0) && (*ppRawBytes != nullptr);
return bOk;
}
@@ -2484,11 +2484,11 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
nTableSize = getTableSize( ttf, O_vmtx );
}
- if (!nGlyphs || !glyphArray) return 0; /* invalid parameters */
- if (!n || !pTable) return 0; /* the font does not contain the requested metrics */
+ if (!nGlyphs || !glyphArray) return nullptr; /* invalid parameters */
+ if (!n || !pTable) return nullptr; /* the font does not contain the requested metrics */
TTSimpleGlyphMetrics* res = static_cast<TTSimpleGlyphMetrics*>(calloc(nGlyphs, sizeof(TTSimpleGlyphMetrics)));
- assert(res != 0);
+ assert(res != nullptr);
const int UPEm = ttf->unitsPerEm;
for( int i = 0; i < nGlyphs; ++i) {
@@ -2524,14 +2524,14 @@ TTSimpleGlyphMetrics *GetTTSimpleGlyphMetrics(TrueTypeFont *ttf, sal_uInt16 *gly
TTSimpleGlyphMetrics *GetTTSimpleCharMetrics(TrueTypeFont * ttf, sal_uInt16 firstChar, int nChars, bool vertical)
{
- TTSimpleGlyphMetrics *res = 0;
+ TTSimpleGlyphMetrics *res = nullptr;
int i, n;
sal_uInt16* str = static_cast<sal_uInt16*>(malloc(nChars * 2));
- assert(str != 0);
+ assert(str != nullptr);
for (i=0; i<nChars; i++) str[i] = (sal_uInt16)(firstChar + i);
- if ((n = MapString(ttf, str, nChars, 0, vertical)) != -1) {
+ if ((n = MapString(ttf, str, nChars, nullptr, vertical)) != -1) {
res = GetTTSimpleGlyphMetrics(ttf, str, n, vertical);
}
@@ -2620,26 +2620,26 @@ GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, sal_uInt32 glyphID)
int n;
if( glyphID >= ttf->nglyphs )
- return 0;
+ return nullptr;
/* #127161# check the glyph offsets */
sal_uInt32 length = getTableSize( ttf, O_glyf );
if( length < ttf->goffsets[ glyphID+1 ] )
- return 0;
+ return nullptr;
length = ttf->goffsets[glyphID+1] - ttf->goffsets[glyphID];
- GlyphData* d = static_cast<GlyphData*>(malloc(sizeof(GlyphData))); assert(d != 0);
+ GlyphData* d = static_cast<GlyphData*>(malloc(sizeof(GlyphData))); assert(d != nullptr);
if (length > 0) {
const sal_uInt8* srcptr = glyf + ttf->goffsets[glyphID];
const size_t nChunkLen = ((length + 1) & ~1);
- d->ptr = static_cast<sal_uInt8*>(malloc(nChunkLen)); assert(d->ptr != 0);
+ d->ptr = static_cast<sal_uInt8*>(malloc(nChunkLen)); assert(d->ptr != nullptr);
memcpy(d->ptr, srcptr, length);
memset(d->ptr + length, 0, nChunkLen - length);
d->compflag = (GetInt16( srcptr, 0, 1 ) < 0);
} else {
- d->ptr = 0;
+ d->ptr = nullptr;
d->compflag = false;
}
@@ -2694,7 +2694,7 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
int nStrBase = GetUInt16(table, 4, 1);
int i;
- *nr = 0;
+ *nr = nullptr;
if (n == 0) return 0;
const sal_uInt32 remaining_table_size = nTableSize-6;
@@ -2729,7 +2729,7 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
int nStrOffset = GetUInt16(table, nLargestFixedOffsetPos, 1);
if (rec[i].slen) {
if( nStrBase+nStrOffset+rec[i].slen >= nTableSize ) {
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
rec[i].slen = 0;
continue;
}
@@ -2740,16 +2740,16 @@ int GetTTNameRecords(TrueTypeFont *ttf, NameRecord **nr)
const size_t available_space = rec_string > end_table ? 0 : (end_table - rec_string);
if (rec[i].slen <= available_space)
{
- rec[i].sptr = static_cast<sal_uInt8 *>(malloc(rec[i].slen)); assert(rec[i].sptr != 0);
+ rec[i].sptr = static_cast<sal_uInt8 *>(malloc(rec[i].slen)); assert(rec[i].sptr != nullptr);
memcpy(rec[i].sptr, rec_string, rec[i].slen);
}
else
{
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
rec[i].slen = 0;
}
} else {
- rec[i].sptr = 0;
+ rec[i].sptr = nullptr;
}
// some fonts have 3.0 names => fix them to 3.1
if( (rec[i].platformID == 3) && (rec[i].encodingID == 0) )
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index a916c2d445bd..16e831fdea31 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -77,7 +77,7 @@ typedef struct {
_inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
{
sal_Int16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -91,7 +91,7 @@ _inline sal_Int16 GetInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendi
_inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigendian)
{
sal_uInt16 t;
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
t = (ptr+offset)[0] << 8 | (ptr+offset)[1];
@@ -104,7 +104,7 @@ _inline sal_uInt16 GetUInt16( const sal_uInt8* ptr, sal_uInt32 offset, int bigen
_inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
@@ -117,7 +117,7 @@ _inline void PutInt16(sal_Int16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bige
_inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 8) & 0xFF);
@@ -130,7 +130,7 @@ _inline void PutUInt16(sal_uInt16 val, sal_uInt8 *ptr, sal_uInt32 offset, int bi
_inline void PutUInt32(sal_uInt32 val, sal_uInt8 *ptr, sal_uInt32 offset, int bigendian)
{
- assert(ptr != 0);
+ assert(ptr != nullptr);
if (bigendian) {
ptr[offset] = (sal_uInt8)((val >> 24) & 0xFF);
@@ -183,14 +183,14 @@ static sal_uInt32 CheckSum(sal_uInt32 *ptr, sal_uInt32 length)
_inline void *smalloc(sal_uInt32 size)
{
void *res = malloc(size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
_inline void *scalloc(sal_uInt32 n, sal_uInt32 size)
{
void *res = calloc(n, size);
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -212,7 +212,7 @@ void TrueTypeCreatorNewEmpty(sal_uInt32 tag, TrueTypeCreator **_this)
int AddTable(TrueTypeCreator *_this, TrueTypeTable *table)
{
- if (table != 0) {
+ if (table != nullptr) {
listAppend(_this->tables, table);
}
return SF_OK;
@@ -247,7 +247,7 @@ int StreamToMemory(TrueTypeCreator *_this, sal_uInt8 **ptr, sal_uInt32 *length)
sal_uInt16 searchRange=1, entrySelector=0, rangeShift;
sal_uInt32 s, offset, checkSumAdjustment = 0;
sal_uInt32 *p;
- sal_uInt8 *head = NULL; /* saved pointer to the head table data for checkSumAdjustment calculation */
+ sal_uInt8 *head = nullptr; /* saved pointer to the head table data for checkSumAdjustment calculation */
if (listIsEmpty(_this->tables)) return SF_TTFORMAT;
@@ -329,7 +329,7 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
FILE* fd;
if ((r = StreamToMemory(_this, &ptr, &length)) != SF_OK) return r;
- if (fname && (fd = fopen(fname, "wb")) != NULL)
+ if (fname && (fd = fopen(fname, "wb")) != nullptr)
{
if (fwrite(ptr, 1, length, fd) != length) {
r = SF_FILEIO;
@@ -413,7 +413,7 @@ static sal_uInt8 *ttmalloc(sal_uInt32 nbytes)
n = (nbytes + 3) & (sal_uInt32) ~3;
sal_uInt8* res = static_cast<sal_uInt8*>(calloc(n, 1));
- assert(res != 0);
+ assert(res != nullptr);
return res;
}
@@ -545,8 +545,8 @@ static struct {
static int GetRawData_generic(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
- assert(_this != 0);
- assert(_this->data != 0);
+ assert(_this != nullptr);
+ assert(_this->data != nullptr);
*ptr = static_cast<tdata_generic *>(_this->data)->ptr;
*len = static_cast<tdata_generic *>(_this->data)->nbytes;
@@ -577,7 +577,7 @@ static int GetRawData_loca(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
{
tdata_loca *p;
- assert(_this->data != 0);
+ assert(_this->data != nullptr);
p = static_cast<tdata_loca *>(_this->data);
@@ -606,7 +606,7 @@ static int GetRawData_glyf(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
/* sal_uInt16 curID = 0; */ /* to check if glyph IDs are sequential and start from zero */
sal_uInt8 *p;
- *ptr = 0;
+ *ptr = nullptr;
*len = 0;
*tag = 0;
@@ -706,9 +706,9 @@ static int GetRawData_cmap(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
sal_uInt8 *cmap;
sal_uInt32 coffset;
- assert(_this != 0);
+ assert(_this != nullptr);
t = static_cast<table_cmap *>(_this->data);
- assert(t != 0);
+ assert(t != nullptr);
assert(t->n != 0);
sal_uInt8** subtables = static_cast<sal_uInt8**>(scalloc(t->n, sizeof(sal_uInt8 *)));
@@ -753,13 +753,13 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
int stringLen = 0;
sal_uInt8 *p1, *p2;
- *ptr = 0;
+ *ptr = nullptr;
*len = 0;
*tag = 0;
- assert(_this != 0);
+ assert(_this != nullptr);
l = static_cast<list>(_this->data);
- assert(l != 0);
+ assert(l != nullptr);
if ((n = (sal_Int16)listCount(l)) == 0) return TTCR_NONAMES;
@@ -820,7 +820,7 @@ static int GetRawData_name(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *le
static int GetRawData_post(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt32 *tag)
{
tdata_post *p = static_cast<tdata_post *>(_this->data);
- sal_uInt8 *post = 0;
+ sal_uInt8 *post = nullptr;
sal_uInt32 postLen = 0;
int ret;
@@ -891,12 +891,12 @@ TrueTypeTable *TrueTypeTableNew(sal_uInt32 tag,
pdata->ptr = ttmalloc(nbytes);
memcpy(pdata->ptr, ptr, nbytes);
} else {
- pdata->ptr = 0;
+ pdata->ptr = nullptr;
}
table->tag = 0;
table->data = pdata;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -909,7 +909,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
sal_uInt16 lowestRecPPEM,
sal_Int16 fontDirectionHint)
{
- assert(created != 0);
+ assert(created != nullptr);
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
sal_uInt8* ptr = ttmalloc(TABLESIZE_head);
@@ -928,7 +928,7 @@ TrueTypeTable *TrueTypeTableNew_head(sal_uInt32 fontRevision,
table->data = static_cast<void *>(ptr);
table->tag = T_head;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -957,7 +957,7 @@ TrueTypeTable *TrueTypeTableNew_hhea(sal_Int16 ascender,
table->data = static_cast<void *>(ptr);
table->tag = T_hhea;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -968,10 +968,10 @@ TrueTypeTable *TrueTypeTableNew_loca()
table->data = smalloc(sizeof(tdata_loca));
static_cast<tdata_loca *>(table->data)->nbytes = 0;
- static_cast<tdata_loca *>(table->data)->ptr = 0;
+ static_cast<tdata_loca *>(table->data)->ptr = nullptr;
table->tag = T_loca;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -986,7 +986,7 @@ TrueTypeTable *TrueTypeTableNew_maxp( const sal_uInt8* maxp, int size)
}
table->tag = T_maxp;
- table->rawdata = 0;
+ table->rawdata = nullptr;
return table;
}
@@ -996,12 +996,12 @@ TrueTypeTable *TrueTypeTableNew_glyf()
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
list l = listNewEmpty();
- assert(l != 0);
+ assert(l != nullptr);
listSetElementDtor(l, FreeGlyphData);
table->data = l;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_glyf;
return table;
@@ -1019,7 +1019,7 @@ TrueTypeTable *TrueTypeTableNew_cmap()
table->data = cmap;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_cmap;
return table;
@@ -1027,7 +1027,7 @@ TrueTypeTable *TrueTypeTableNew_cmap()
static void DisposeNameRecord(void *ptr)
{
- if (ptr != 0) {
+ if (ptr != nullptr) {
NameRecord *nr = static_cast<NameRecord *>(ptr);
if (nr->sptr) free(nr->sptr);
free(ptr);
@@ -1053,7 +1053,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
TrueTypeTable* table = static_cast<TrueTypeTable*>(smalloc(sizeof(TrueTypeTable)));
list l = listNewEmpty();
- assert(l != 0);
+ assert(l != nullptr);
listSetElementDtor(l, DisposeNameRecord);
@@ -1065,7 +1065,7 @@ TrueTypeTable *TrueTypeTableNew_name(int n, NameRecord *nr)
}
table->data = l;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_name;
return table;
@@ -1086,10 +1086,10 @@ TrueTypeTable *TrueTypeTableNew_post(sal_uInt32 format,
post->underlinePosition = underlinePosition;
post->underlineThickness = underlineThickness;
post->isFixedPitch = isFixedPitch;
- post->ptr = 0;
+ post->ptr = nullptr;
table->data = post;
- table->rawdata = 0;
+ table->rawdata = nullptr;
table->tag = T_post;
return table;
@@ -1100,16 +1100,16 @@ int GetRawData(TrueTypeTable *_this, sal_uInt8 **ptr, sal_uInt32 *len, sal_uInt3
/* XXX do a binary search */
unsigned int i;
- assert(_this != 0);
- assert(ptr != 0);
- assert(len != 0);
- assert(tag != 0);
+ assert(_this != nullptr);
+ assert(ptr != nullptr);
+ assert(len != nullptr);
+ assert(tag != nullptr);
- *ptr = 0; *len = 0; *tag = 0;
+ *ptr = nullptr; *len = 0; *tag = 0;
if (_this->rawdata) {
free(_this->rawdata);
- _this->rawdata = 0;
+ _this->rawdata = nullptr;
}
for(i=0; i < sizeof(vtable2)/sizeof(*vtable2); i++) {
@@ -1128,10 +1128,10 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
table_cmap *t;
CmapSubTable *s;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_cmap);
- t = static_cast<table_cmap *>(table->data); assert(t != 0);
- s = t->s; assert(s != 0);
+ t = static_cast<table_cmap *>(table->data); assert(t != nullptr);
+ s = t->s; assert(s != nullptr);
found = 0;
@@ -1173,8 +1173,8 @@ void cmapAdd(TrueTypeTable *table, sal_uInt32 id, sal_uInt32 c, sal_uInt32 g)
if (s[i].n == s[i].m) {
sal_uInt32* tmp1 = static_cast<sal_uInt32*>(scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)));
sal_uInt32* tmp2 = static_cast<sal_uInt32*>(scalloc(s[i].m + CMAP_PAIR_INCR, sizeof(sal_uInt32)));
- assert(tmp1 != 0);
- assert(tmp2 != 0);
+ assert(tmp1 != nullptr);
+ assert(tmp2 != nullptr);
memcpy(tmp1, s[i].xc, sizeof(sal_uInt32) * s[i].m);
memcpy(tmp2, s[i].xg, sizeof(sal_uInt32) * s[i].m);
s[i].m += CMAP_PAIR_INCR;
@@ -1195,7 +1195,7 @@ sal_uInt32 glyfAdd(TrueTypeTable *table, GlyphData *glyphdata, TrueTypeFont *fnt
sal_uInt32 currentID;
int ret, n, ncomponents;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_glyf);
if (!glyphdata) return (sal_uInt32)~0;
@@ -1245,7 +1245,7 @@ sal_uInt32 glyfAdd(TrueTypeTable *table, GlyphData *glyphdata, TrueTypeFont *fnt
sal_uInt32 glyfCount(const TrueTypeTable *table)
{
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_glyf);
return listCount(static_cast<list>(table->data));
}
@@ -1254,7 +1254,7 @@ void nameAdd(TrueTypeTable *table, NameRecord *nr)
{
list l;
- assert(table != 0);
+ assert(table != nullptr);
assert(table->tag == T_name);
l = static_cast<list>(table->data);
@@ -1264,7 +1264,7 @@ void nameAdd(TrueTypeTable *table, NameRecord *nr)
static TrueTypeTable *FindTable(TrueTypeCreator *tt, sal_uInt32 tag)
{
- if (listIsEmpty(tt->tables)) return 0;
+ if (listIsEmpty(tt->tables)) return nullptr;
listToFirst(tt->tables);
@@ -1274,7 +1274,7 @@ static TrueTypeTable *FindTable(TrueTypeCreator *tt, sal_uInt32 tag)
}
} while (listNext(tt->tables));
- return 0;
+ return nullptr;
}
/* This function processes all the tables and synchronizes them before creating
@@ -1432,7 +1432,7 @@ static void ProcessTables(TrueTypeCreator *tt)
glyf->rawdata = glyfPtr;
- loca = TrueTypeTableNew_loca(); assert(loca != 0);
+ loca = TrueTypeTableNew_loca(); assert(loca != nullptr);
static_cast<tdata_loca *>(loca->data)->ptr = locaPtr;
static_cast<tdata_loca *>(loca->data)->nbytes = locaLen;
@@ -1458,7 +1458,7 @@ static void ProcessTables(TrueTypeCreator *tt)
/*
* Generate an htmx table and update hhea table
*/
- hhea = FindTable(tt, T_hhea); assert(hhea != 0);
+ hhea = FindTable(tt, T_hhea); assert(hhea != nullptr);
hheaPtr = static_cast<sal_uInt8 *>(hhea->data);
if (nGlyphs > 2) {
for (i = nGlyphs - 1; i > 0; i--) {
@@ -1509,7 +1509,7 @@ extern "C"
/* XXX do a binary search */
unsigned int i;
- assert(_this != 0);
+ assert(_this != nullptr);
if (_this->rawdata) free(_this->rawdata);
diff --git a/vcl/source/fontsubset/xlat.cxx b/vcl/source/fontsubset/xlat.cxx
index 53daa33bf744..3716a1cd153e 100644
--- a/vcl/source/fontsubset/xlat.cxx
+++ b/vcl/source/fontsubset/xlat.cxx
@@ -43,8 +43,8 @@ ConverterCache::ConverterCache()
{
for( int i = 0; i <= MAX_CVT_SELECT; ++i)
{
- maConverterCache[i] = NULL;
- maContexts[i] = NULL;
+ maConverterCache[i] = nullptr;
+ maContexts[i] = nullptr;
}
}
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 0630a9c809cc..911e0ca0a051 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -246,7 +246,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
)
{
ImplAnimView* pView;
- ImplAnimView* pMatch = NULL;
+ ImplAnimView* pMatch = nullptr;
for( size_t i = 0; i < maViewList.size(); ++i )
{
@@ -263,7 +263,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe
{
delete maViewList[ i ];
maViewList.erase( maViewList.begin() + i );
- pView = NULL;
+ pView = nullptr;
}
break;
@@ -421,7 +421,7 @@ IMPL_LINK_NOARG_TYPED(Animation, ImplTimeoutHdl, Timer *, void)
ImplRestartTimer( 10 );
else
{
- AnimationBitmap* pStepBmp = (++mnPos < maList.size()) ? maList[ mnPos ] : NULL;
+ AnimationBitmap* pStepBmp = (++mnPos < maList.size()) ? maList[ mnPos ] : nullptr;
if( !pStepBmp )
{
@@ -799,8 +799,8 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation )
return rIStm;
}
-AInfo::AInfo() : pOutDev( NULL ),
- pViewData( NULL ),
+AInfo::AInfo() : pOutDev( nullptr ),
+ pViewData( nullptr ),
nExtraData( 0L ),
bWithSize( false ),
bPause( false ) {}
diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx
index e8bf0dd23595..6b675edc4f5e 100644
--- a/vcl/source/gdi/bitmap.cxx
+++ b/vcl/source/gdi/bitmap.cxx
@@ -35,12 +35,12 @@
#include <memory>
Bitmap::Bitmap() :
- mpImpBmp( NULL )
+ mpImpBmp( nullptr )
{
}
Bitmap::Bitmap( const ResId& rResId ) :
- mpImpBmp( NULL )
+ mpImpBmp( nullptr )
{
const BitmapEx aBmpEx( rResId );
@@ -70,7 +70,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
if( rSizePixel.Width() && rSizePixel.Height() )
{
BitmapPalette aPal;
- BitmapPalette* pRealPal = NULL;
+ BitmapPalette* pRealPal = nullptr;
if( nBitCount <= 8 )
{
@@ -125,7 +125,7 @@ Bitmap::Bitmap( const Size& rSizePixel, sal_uInt16 nBitCount, const BitmapPalett
mpImpBmp->ImplCreate( rSizePixel, nBitCount, pRealPal ? *pRealPal : aPal );
}
else
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
Bitmap::~Bitmap()
@@ -255,7 +255,7 @@ void Bitmap::SetEmpty()
maPrefSize = Size();
ImplReleaseRef();
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
Size Bitmap::GetSizePixel() const
@@ -305,7 +305,7 @@ void Bitmap::ImplReleaseRef()
else
{
delete mpImpBmp;
- mpImpBmp = NULL;
+ mpImpBmp = nullptr;
}
}
}
@@ -361,7 +361,7 @@ BitmapInfoAccess* Bitmap::AcquireInfoAccess()
if( !*pInfoAccess )
{
delete pInfoAccess;
- pInfoAccess = NULL;
+ pInfoAccess = nullptr;
}
return pInfoAccess;
@@ -374,7 +374,7 @@ BitmapReadAccess* Bitmap::AcquireReadAccess()
if( !*pReadAccess )
{
delete pReadAccess;
- pReadAccess = NULL;
+ pReadAccess = nullptr;
}
return pReadAccess;
@@ -387,7 +387,7 @@ BitmapWriteAccess* Bitmap::AcquireWriteAccess()
if( !*pWriteAccess )
{
delete pWriteAccess;
- pWriteAccess = NULL;
+ pWriteAccess = nullptr;
}
return pWriteAccess;
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 85c64a11193f..9359fb981308 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -704,7 +704,7 @@ bool Bitmap::ImplConvertDown(sal_uInt16 nBitCount, Color* pExtColor)
std::vector<ImpErrorQuad> pErrQuad1(nWidth);
std::vector<ImpErrorQuad> pErrQuad2(nWidth);
ImpErrorQuad* pQLine1 = pErrQuad1.data();
- ImpErrorQuad* pQLine2 = NULL;
+ ImpErrorQuad* pQLine2 = nullptr;
long nYTmp = 0L;
sal_uInt8 cIndex;
bool bQ1 = true;
@@ -1394,16 +1394,16 @@ namespace
if(pReadAcc)
{
- double* pWeights = 0;
- sal_uInt32* pPixels = 0;
- sal_uInt32* pCount = 0;
+ double* pWeights = nullptr;
+ sal_uInt32* pPixels = nullptr;
+ sal_uInt32* pCount = nullptr;
sal_uInt32 aNumberOfContributions(0);
const sal_uInt32 nHeight(rSource.GetSizePixel().Height());
ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, pWeights, pPixels, pCount, aKernel);
rTarget = Bitmap(Size(nNewWidth, nHeight), 24);
BitmapWriteAccess* pWriteAcc = rTarget.AcquireWriteAccess();
- bool bResult(0 != pWriteAcc);
+ bool bResult(nullptr != pWriteAcc);
if(bResult)
{
@@ -1485,16 +1485,16 @@ namespace
if(pReadAcc)
{
- double* pWeights = 0;
- sal_uInt32* pPixels = 0;
- sal_uInt32* pCount = 0;
+ double* pWeights = nullptr;
+ sal_uInt32* pPixels = nullptr;
+ sal_uInt32* pCount = nullptr;
sal_uInt32 aNumberOfContributions(0);
const sal_uInt32 nWidth(rSource.GetSizePixel().Width());
ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, pWeights, pPixels, pCount, aKernel);
rTarget = Bitmap(Size(nWidth, nNewHeight), 24);
BitmapWriteAccess* pWriteAcc = rTarget.AcquireWriteAccess();
- bool bResult(0 != pWriteAcc);
+ bool bResult(nullptr != pWriteAcc);
if(pWriteAcc)
{
@@ -1916,7 +1916,7 @@ bool Bitmap::ImplDitherFloyd16()
std::unique_ptr<ImpErrorQuad[]> pErrQuad1(new ImpErrorQuad[ nWidth ]);
std::unique_ptr<ImpErrorQuad[]> pErrQuad2(new ImpErrorQuad[ nWidth ]);
ImpErrorQuad* pQLine1 = pErrQuad1.get();
- ImpErrorQuad* pQLine2 = 0;
+ ImpErrorQuad* pQLine2 = nullptr;
long nYTmp = 0L;
bool bQ1 = true;
diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx
index d669f8a563ee..3d56db313825 100644
--- a/vcl/source/gdi/bitmap4.cxx
+++ b/vcl/source/gdi/bitmap4.cxx
@@ -777,7 +777,7 @@ bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam )
if( GetBitCount() > 8 )
{
- pNewBmp = NULL;
+ pNewBmp = nullptr;
pReadAcc = pWriteAcc = AcquireWriteAccess();
}
else
diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 8fa1211498c5..5f836a20351b 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -95,7 +95,7 @@ BitmapEx::BitmapEx( const ResId& rResId ) :
eTransparent( TRANSPARENT_NONE ),
bAlpha ( false )
{
- ResMgr* pResMgr = NULL;
+ ResMgr* pResMgr = nullptr;
ResMgr::GetResourceSkipHeader( rResId.SetRT( RSC_BITMAP ), &pResMgr );
pResMgr->ReadLong();
diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 87bc60f1be46..74edb56856a4 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -28,14 +28,14 @@
#include <string.h>
BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
- mpBuffer ( NULL ),
+ mpBuffer ( nullptr ),
mnAccessMode ( nMode )
{
ImplCreate( rBitmap );
}
BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap ) :
- mpBuffer ( NULL ),
+ mpBuffer ( nullptr ),
mnAccessMode ( BITMAP_INFO_ACCESS )
{
ImplCreate( rBitmap );
@@ -93,7 +93,7 @@ void BitmapInfoAccess::ImplDestroy()
if( mpBuffer && pImpBmp )
{
pImpBmp->ImplReleaseBuffer( mpBuffer, mnAccessMode );
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
}
@@ -104,18 +104,18 @@ sal_uInt16 BitmapInfoAccess::GetBestPaletteIndex( const BitmapColor& rBitmapColo
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
BitmapInfoAccess( rBitmap, nMode ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL )
+ mpScanBuf ( nullptr ),
+ mFncGetPixel ( nullptr ),
+ mFncSetPixel ( nullptr )
{
ImplInitScanBuffer( rBitmap );
}
BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) :
BitmapInfoAccess( rBitmap, BITMAP_READ_ACCESS ),
- mpScanBuf ( NULL ),
- mFncGetPixel ( NULL ),
- mFncSetPixel ( NULL )
+ mpScanBuf ( nullptr ),
+ mFncGetPixel ( nullptr ),
+ mFncSetPixel ( nullptr )
{
ImplInitScanBuffer( rBitmap );
}
@@ -162,17 +162,17 @@ void BitmapReadAccess::ImplInitScanBuffer( Bitmap& rBitmap )
if (!bOk)
{
delete[] mpScanBuf;
- mpScanBuf = NULL;
+ mpScanBuf = nullptr;
pImpBmp->ImplReleaseBuffer( mpBuffer, mnAccessMode );
- mpBuffer = NULL;
+ mpBuffer = nullptr;
}
}
void BitmapReadAccess::ImplClearScanBuffer()
{
delete[] mpScanBuf;
- mpScanBuf = NULL;
+ mpScanBuf = nullptr;
}
bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat )
@@ -467,7 +467,7 @@ void BitmapWriteAccess::CopyScanline( long nY, ConstScanline aSrcScanline,
case( BMP_FORMAT_32BIT_TC_MASK ): pFncGetPixel = GetPixelFor_32BIT_TC_MASK; break;
default:
- pFncGetPixel = NULL;
+ pFncGetPixel = nullptr;
break;
}
diff --git a/vcl/source/gdi/bmpacc3.cxx b/vcl/source/gdi/bmpacc3.cxx
index c94fb0060631..5d680c76ba72 100644
--- a/vcl/source/gdi/bmpacc3.cxx
+++ b/vcl/source/gdi/bmpacc3.cxx
@@ -83,7 +83,7 @@ void BitmapWriteAccess::Erase( const Color& rColor )
return;
// use the canonical method to clear the bitmap
- BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : NULL;
+ BitmapColor* pOldFillColor = mpFillColor ? new BitmapColor(*mpFillColor) : nullptr;
const Point aPoint;
const Rectangle aRect(aPoint, maBitmap.GetSizePixel());
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index c5793b3e2578..76b2aa54d750 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -30,7 +30,7 @@ typedef unsigned char PIXBYTE;
class BasePixelPtr
{
public:
- explicit BasePixelPtr( PIXBYTE* p = NULL ) : mpPixel( p ) {}
+ explicit BasePixelPtr( PIXBYTE* p = nullptr ) : mpPixel( p ) {}
void SetRawPtr( PIXBYTE* pRawPtr ) { mpPixel = pRawPtr; }
PIXBYTE* GetRawPtr() const { return mpPixel; }
void AddByteOffset( int nByteOffset ) { mpPixel += nByteOffset; }
diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx
index 2d939bb5f66e..7452856e3d0c 100644
--- a/vcl/source/gdi/cvtsvm.cxx
+++ b/vcl/source/gdi/cvtsvm.cxx
@@ -1141,7 +1141,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
LineInfo* pLineInfo;
if (aLIStack.empty())
- pLineInfo = NULL;
+ pLineInfo = nullptr;
else
{
pLineInfo = aLIStack.top();
@@ -1332,7 +1332,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
rIStm.Read( pData, nDataSize );
}
else
- pData = NULL;
+ pData = nullptr;
rIStm.ReadInt32( nFollowingActionCount );
ImplSkipActions( rIStm, nFollowingActionCount );
@@ -2093,7 +2093,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
{
Color* pCol;
if (rLineColStack.empty())
- pCol = NULL;
+ pCol = nullptr;
else
{
pCol = rLineColStack.top();
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 05bb8f2353b1..e281498f3fc3 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -770,7 +770,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
return false;
}
Bitmap aNewBmpAlpha;
- BitmapWriteAccess* pAccAlpha = 0;
+ BitmapWriteAccess* pAccAlpha = nullptr;
bool bAlphaPossible(pBmpAlpha && aHeader.nBitCount == 32);
if (bAlphaPossible)
@@ -797,8 +797,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
sal_uInt16 nColors(0);
SvStream* pIStm;
- SvMemoryStream* pMemStm = NULL;
- sal_uInt8* pData = NULL;
+ SvMemoryStream* pMemStm = nullptr;
+ sal_uInt8* pData = nullptr;
if (aHeader.nBitCount <= 8)
{
@@ -1494,12 +1494,12 @@ bool ImplReadDIB(
{
if(ImplReadDIBFileHeader(rIStm, nOffset))
{
- bRet = ImplReadDIBBody(rIStm, rTarget, nOffset >= DIBV5HEADERSIZE ? pTargetAlpha : 0, nOffset);
+ bRet = ImplReadDIBBody(rIStm, rTarget, nOffset >= DIBV5HEADERSIZE ? pTargetAlpha : nullptr, nOffset);
}
}
else
{
- bRet = ImplReadDIBBody(rIStm, rTarget, 0, nOffset, bMSOFormat);
+ bRet = ImplReadDIBBody(rIStm, rTarget, nullptr, nOffset, bMSOFormat);
}
if(!bRet)
@@ -1530,7 +1530,7 @@ bool ImplWriteDIB(
if(aSizePix.Width() && aSizePix.Height())
{
BitmapReadAccess* pAcc = const_cast< Bitmap& >(rSource).AcquireReadAccess();
- BitmapReadAccess* pAccAlpha = 0;
+ BitmapReadAccess* pAccAlpha = nullptr;
const SvStreamEndian nOldFormat(rOStm.GetEndian());
const sal_uLong nOldPos(rOStm.Tell());
@@ -1554,7 +1554,7 @@ bool ImplWriteDIB(
{
if(bFileHeader)
{
- if(ImplWriteDIBFileHeader(rOStm, *pAcc, 0 != pSourceAlpha))
+ if(ImplWriteDIBFileHeader(rOStm, *pAcc, nullptr != pSourceAlpha))
{
bRet = ImplWriteDIBBody(rSource, rOStm, *pAcc, pAccAlpha, bCompressed);
}
@@ -1590,7 +1590,7 @@ bool ReadDIB(
bool bFileHeader,
bool bMSOFormat)
{
- return ImplReadDIB(rTarget, 0, rIStm, bFileHeader, bMSOFormat);
+ return ImplReadDIB(rTarget, nullptr, rIStm, bFileHeader, bMSOFormat);
}
bool ReadDIBBitmapEx(
@@ -1598,7 +1598,7 @@ bool ReadDIBBitmapEx(
SvStream& rIStm)
{
Bitmap aBmp;
- bool bRetval(ImplReadDIB(aBmp, 0, rIStm, true) && !rIStm.GetError());
+ bool bRetval(ImplReadDIB(aBmp, nullptr, rIStm, true) && !rIStm.GetError());
if(bRetval)
{
@@ -1626,7 +1626,7 @@ bool ReadDIBBitmapEx(
{
Bitmap aMask;
- bRetval = ImplReadDIB(aMask, 0, rIStm, true);
+ bRetval = ImplReadDIB(aMask, nullptr, rIStm, true);
if(bRetval)
{
@@ -1692,14 +1692,14 @@ bool WriteDIB(
bool bCompressed,
bool bFileHeader)
{
- return ImplWriteDIB(rSource, 0, rOStm, bCompressed, bFileHeader);
+ return ImplWriteDIB(rSource, nullptr, rOStm, bCompressed, bFileHeader);
}
bool WriteDIBBitmapEx(
const BitmapEx& rSource,
SvStream& rOStm)
{
- if(ImplWriteDIB(rSource.GetBitmap(), 0, rOStm, true, true))
+ if(ImplWriteDIB(rSource.GetBitmap(), nullptr, rOStm, true, true))
{
rOStm.WriteUInt32( 0x25091962 );
rOStm.WriteUInt32( 0xACB20201 );
@@ -1707,7 +1707,7 @@ bool WriteDIBBitmapEx(
if(TRANSPARENT_BITMAP == rSource.eTransparent)
{
- return ImplWriteDIB(rSource.aMask, 0, rOStm, true, true);
+ return ImplWriteDIB(rSource.aMask, nullptr, rOStm, true, true);
}
else if(TRANSPARENT_COLOR == rSource.eTransparent)
{
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx b/vcl/source/gdi/embeddedfontshelper.cxx
index 6a4f79260d99..fa7fb59eee5c 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -109,7 +109,7 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > st
if( eot )
{
unsigned uncompressedFontSize = 0;
- unsigned char *nakedPointerToUncompressedFont = NULL;
+ unsigned char *nakedPointerToUncompressedFont = nullptr;
libeot::EOTMetadata eotMetadata;
libeot::EOTError uncompressError =
libeot::EOT2ttf_buffer( reinterpret_cast<unsigned char *>(&fontData[0]), fontData.size(), &eotMetadata, &nakedPointerToUncompressedFont, &uncompressedFontSize );
@@ -231,7 +231,7 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
PhysicalFontCollection fonts;
graphics->GetDevFontList( &fonts );
std::unique_ptr< ImplGetDevFontList > fontInfo( fonts.GetDevFontList());
- PhysicalFontFace* selected = NULL;
+ PhysicalFontFace* selected = nullptr;
for( int i = 0;
i < fontInfo->Count();
++i )
@@ -261,11 +261,11 @@ OUString EmbeddedFontsHelper::fontFileUrl( const OUString& familyName, FontFamil
}
}
}
- if( selected != NULL )
+ if( selected != nullptr )
{
FontSubsetInfo info;
long size;
- if( const void* data = graphics->GetEmbedFontData( selected, NULL, NULL, 0, info, &size ))
+ if( const void* data = graphics->GetEmbedFontData( selected, nullptr, nullptr, 0, info, &size ))
{
if( sufficientTTFRights( data, size, rights ))
{
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e8ba5dfa28f9..827bfdb23b09 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -716,7 +716,7 @@ namespace
bool identifyTrueTypeFont( const void* i_pBuffer, sal_uInt32 i_nSize, Font& o_rResult )
{
bool bResult = false;
- TrueTypeFont* pTTF = NULL;
+ TrueTypeFont* pTTF = nullptr;
if( OpenTTFontBuffer( i_pBuffer, i_nSize, 0, &pTTF ) == SF_OK )
{
TTGlobalFontInfo aInfo;
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 37032f9295bb..c7b8e35657df 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -113,9 +113,9 @@ struct ImplBmpReplaceParam
GDIMetaFile::GDIMetaFile() :
nCurrentActionElement( 0 ),
aPrefSize ( 1, 1 ),
- pPrev ( NULL ),
- pNext ( NULL ),
- pOutDev ( NULL ),
+ pPrev ( nullptr ),
+ pNext ( nullptr ),
+ pOutDev ( nullptr ),
bPause ( false ),
bRecord ( false ),
bUseCanvas ( false )
@@ -128,7 +128,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) :
aPrefSize ( rMtf.aPrefSize ),
pPrev ( rMtf.pPrev ),
pNext ( rMtf.pNext ),
- pOutDev ( NULL ),
+ pOutDev ( nullptr ),
bPause ( false ),
bRecord ( false ),
bUseCanvas ( rMtf.bUseCanvas )
@@ -161,18 +161,18 @@ size_t GDIMetaFile::GetActionSize() const
MetaAction* GDIMetaFile::GetAction( size_t nAction ) const
{
- return (nAction < aList.size()) ? aList[ nAction ] : NULL;
+ return (nAction < aList.size()) ? aList[ nAction ] : nullptr;
}
MetaAction* GDIMetaFile::FirstAction()
{
nCurrentActionElement = 0;
- return aList.empty() ? NULL : aList[ 0 ];
+ return aList.empty() ? nullptr : aList[ 0 ];
}
MetaAction* GDIMetaFile::NextAction()
{
- return ( nCurrentActionElement + 1 < aList.size() ) ? aList[ ++nCurrentActionElement ] : NULL;
+ return ( nCurrentActionElement + 1 < aList.size() ) ? aList[ ++nCurrentActionElement ] : nullptr;
}
MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
@@ -182,7 +182,7 @@ MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
// this method takes ownership of pAction and is
// therefore responsible for deleting it
pAction->Delete();
- return NULL;
+ return nullptr;
}
//fdo#39995 This does't increment the incoming action ref-count nor does it
//decrement the outgoing action ref-count
@@ -207,7 +207,7 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
aPrefSize = rMtf.aPrefSize;
pPrev = rMtf.pPrev;
pNext = rMtf.pNext;
- pOutDev = NULL;
+ pOutDev = nullptr;
bPause = false;
bRecord = false;
bUseCanvas = rMtf.bUseCanvas;
@@ -264,7 +264,7 @@ void GDIMetaFile::Linker( OutputDevice* pOut, bool bLink )
{
if( bLink )
{
- pNext = NULL;
+ pNext = nullptr;
pPrev = pOut->GetConnectMetaFile();
pOut->SetConnectMetaFile( this );
@@ -283,13 +283,13 @@ void GDIMetaFile::Linker( OutputDevice* pOut, bool bLink )
else
{
if( pPrev )
- pPrev->pNext = NULL;
+ pPrev->pNext = nullptr;
pOut->SetConnectMetaFile( pPrev );
}
- pPrev = NULL;
- pNext = NULL;
+ pPrev = nullptr;
+ pNext = nullptr;
}
}
@@ -1412,7 +1412,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaAction* pAction = GetAction(a);
const MetaActionType nActionType = pAction->GetType();
- Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : 0;
+ Rectangle* pUseHairline = (pHairline && aMapVDev->IsLineColor()) ? pHairline : nullptr;
switch( nActionType )
{
@@ -1448,7 +1448,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
const LineInfo& rLineInfo = pAct->GetLineInfo();
if(0 != rLineInfo.GetWidth())
- pUseHairline = 0;
+ pUseHairline = nullptr;
}
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
@@ -1513,7 +1513,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
const LineInfo& rLineInfo = pAct->GetLineInfo();
if(0 != rLineInfo.GetWidth())
- pUseHairline = 0;
+ pUseHairline = nullptr;
}
ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, pUseHairline );
@@ -1544,7 +1544,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
aMapVDev->GetTextBoundRect( aRect, pAct->GetText(), pAct->GetIndex(), pAct->GetIndex(), pAct->GetLen() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1557,7 +1557,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
0, pAct->GetDXArray() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1570,7 +1570,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
pAct->GetWidth() );
Point aPt( pAct->GetPoint() );
aRect.Move( aPt.X(), aPt.Y() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1586,7 +1586,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
Point aPt( pAct->GetStartPoint() );
aRect.Move( aPt.X(), aPt.Y() );
aRect.Right() = aRect.Left() + pAct->GetWidth();
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1594,7 +1594,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpScaleAction* pAct = static_cast<MetaBmpScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1602,7 +1602,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpScalePartAction* pAct = static_cast<MetaBmpScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1610,7 +1610,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExScaleAction* pAct = static_cast<MetaBmpExScaleAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1618,7 +1618,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExScalePartAction* pAct = static_cast<MetaBmpExScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1626,7 +1626,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaGradientAction* pAct = static_cast<MetaGradientAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1634,7 +1634,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaGradientExAction* pAct = static_cast<MetaGradientExAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1648,7 +1648,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaHatchAction* pAct = static_cast<MetaHatchAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1656,7 +1656,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaTransparentAction* pAct = static_cast<MetaTransparentAction*>(pAction);
Rectangle aRect( pAct->GetPolyPolygon().GetBoundRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1666,7 +1666,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
// MetaFloatTransparentAction is defined limiting it's content Metafile
// to it's geometry definition(Point, Size), so use these directly
const Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1674,7 +1674,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaEPSAction* pAct = static_cast<MetaEPSAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), pAct->GetSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1714,7 +1714,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpAction* pAct = static_cast<MetaBmpAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1722,7 +1722,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaBmpExAction* pAct = static_cast<MetaBmpExAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmapEx().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1730,7 +1730,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskAction* pAct = static_cast<MetaMaskAction*>(pAction);
Rectangle aRect( pAct->GetPoint(), aMapVDev->PixelToLogic( pAct->GetBitmap().GetSizePixel() ) );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1738,7 +1738,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1746,7 +1746,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaMaskScalePartAction* pAct = static_cast<MetaMaskScalePartAction*>(pAction);
Rectangle aRect( pAct->GetDestPoint(), pAct->GetDestSize() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1754,7 +1754,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaWallpaperAction* pAct = static_cast<MetaWallpaperAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -1762,7 +1762,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai
{
MetaTextRectAction* pAct = static_cast<MetaTextRectAction*>(pAction);
Rectangle aRect( pAct->GetRect() );
- ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, 0 );
+ ImplActionBounds( aBound, OutputDevice::LogicToLogic( aRect, aMapVDev->GetMapMode(), GetPrefMapMode() ), aClipStack, nullptr );
}
break;
@@ -2813,7 +2813,7 @@ SvStream& WriteGDIMetaFile( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile )
if( !rOStm.GetError() )
{
static const char* pEnableSVM1 = getenv( "SAL_ENABLE_SVM1" );
- static const bool bNoSVM1 = (NULL == pEnableSVM1 ) || ( '0' == *pEnableSVM1 );
+ static const bool bNoSVM1 = (nullptr == pEnableSVM1 ) || ( '0' == *pEnableSVM1 );
if( bNoSVM1 || rOStm.GetVersion() >= SOFFICE_FILEFORMAT_50 )
{
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index 26a69d260493..cab29181f625 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -32,8 +32,8 @@
GfxLink::GfxLink() :
meType ( GFX_LINK_TYPE_NONE ),
- mpBuf ( NULL ),
- mpSwap ( NULL ),
+ mpBuf ( nullptr ),
+ mpSwap ( nullptr ),
mnBufSize ( 0 ),
mnUserId ( 0UL ),
mpImpData ( new ImpGfxLink )
@@ -49,12 +49,12 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) :
GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) :
mpImpData( new ImpGfxLink )
{
- DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0),
+ DBG_ASSERT( (pBuf != nullptr && nSize) || (!bOwns && nSize == 0),
"GfxLink::GfxLink(): empty/NULL buffer given" );
meType = nType;
mnBufSize = nSize;
- mpSwap = NULL;
+ mpSwap = nullptr;
mnUserId = 0UL;
if( bOwns )
@@ -65,7 +65,7 @@ GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOw
memcpy( mpBuf->mpBuffer, pBuf, nSize );
}
else
- mpBuf = NULL;
+ mpBuf = nullptr;
}
GfxLink::~GfxLink()
@@ -109,7 +109,7 @@ bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const
{
bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0;
}
- else if ( ( pSource == 0 ) && ( pDest == 0 ) )
+ else if ( ( pSource == nullptr ) && ( pDest == nullptr ) )
bIsEqual = true;
}
return bIsEqual;
@@ -143,7 +143,7 @@ const sal_uInt8* GfxLink::GetData() const
if( IsSwappedOut() )
const_cast<GfxLink*>(this)->SwapIn();
- return( mpBuf ? mpBuf->mpBuffer : NULL );
+ return( mpBuf ? mpBuf->mpBuffer : nullptr );
}
@@ -212,14 +212,14 @@ void GfxLink::SwapOut()
if( !mpSwap->IsSwapped() )
{
delete mpSwap;
- mpSwap = NULL;
+ mpSwap = nullptr;
}
else
{
if( !( --mpBuf->mnRefCount ) )
delete mpBuf;
- mpBuf = NULL;
+ mpBuf = nullptr;
}
}
}
@@ -233,7 +233,7 @@ void GfxLink::SwapIn()
if( !( --mpSwap->mnRefCount ) )
delete mpSwap;
- mpSwap = NULL;
+ mpSwap = nullptr;
}
}
@@ -366,13 +366,13 @@ sal_uInt8* ImpSwap::GetData() const
xIStm.reset();
if( bError )
- delete[] pData, pData = NULL;
+ delete[] pData, pData = nullptr;
}
else
- pData = NULL;
+ pData = nullptr;
}
else
- pData = NULL;
+ pData = nullptr;
return pData;
}
diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx
index 80fd0f53dd6d..3a1707100188 100644
--- a/vcl/source/gdi/graph.cxx
+++ b/vcl/source/gdi/graph.cxx
@@ -41,7 +41,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
sal_uInt16 nPixelWidth = nPixel;
Point aPoint( rDestPt.X() + nPixelWidth, rDestPt.Y() + nPixelWidth );
Size aSize( rDestSize.Width() - ( nPixelWidth << 1 ), rDestSize.Height() - ( nPixelWidth << 1 ) );
- bool bFilled = ( pBitmap != NULL || pBitmapEx != NULL || pFont != NULL );
+ bool bFilled = ( pBitmap != nullptr || pBitmapEx != nullptr || pFont != nullptr );
Rectangle aBorderRect( aPoint, aSize );
pOutDev->Push();
@@ -93,7 +93,7 @@ static void ImplDrawDefault( OutputDevice* pOutDev, const OUString* pText,
&& !(!pOutDev->IsOutputEnabled() /*&& pOutDev->GetConnectMetaFile() */) )
{
MapMode aMapMode( MAP_POINT );
- Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, NULL );
+ Size aSz = pOutDev->LogicToLogic( Size( 0, 12 ), &aMapMode, nullptr );
long nThreshold = aSz.Height() / 2;
long nStep = nThreshold / 3;
@@ -225,7 +225,7 @@ Graphic::Graphic( const ::com::sun::star::uno::Reference< ::com::sun::star::grap
uno::Reference< lang::XUnoTunnel > xTunnel( rxGraphic, uno::UNO_QUERY );
const ::Graphic* pGraphic = ( xTunnel.is() ?
reinterpret_cast< ::Graphic* >( xTunnel->getSomething( getUnoTunnelId() ) ) :
- NULL );
+ nullptr );
if( pGraphic )
{
@@ -433,7 +433,7 @@ void Graphic::Draw( OutputDevice* pOutDev,
const Point& rDestPt, const Size& rDestSz ) const
{
if( GRAPHIC_DEFAULT == mpImpGraphic->ImplGetType() )
- ImplDrawDefault( pOutDev, NULL, NULL, NULL, NULL, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, nullptr, nullptr, nullptr, nullptr, rDestPt, rDestSz );
else
mpImpGraphic->ImplDraw( pOutDev, rDestPt, rDestSz );
}
@@ -442,7 +442,7 @@ void Graphic::DrawEx( OutputDevice* pOutDev, const OUString& rText,
vcl::Font& rFont, const BitmapEx& rBitmap,
const Point& rDestPt, const Size& rDestSz )
{
- ImplDrawDefault( pOutDev, &rText, &rFont, NULL, &rBitmap, rDestPt, rDestSz );
+ ImplDrawDefault( pOutDev, &rText, &rFont, nullptr, &rBitmap, rDestPt, rDestSz );
}
void Graphic::StartAnimation( OutputDevice* pOutDev, const Point& rDestPt,
diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx
index f6e70cf78799..811fca530ca4 100644
--- a/vcl/source/gdi/image.cxx
+++ b/vcl/source/gdi/image.cxx
@@ -40,12 +40,12 @@
using namespace ::com::sun::star;
Image::Image() :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
}
Image::Image( const ResId& rResId ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
rResId.SetRT( RSC_IMAGE );
@@ -99,21 +99,21 @@ Image::Image( const Image& rImage ) :
}
Image::Image( const BitmapEx& rBitmapEx ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
ImplInit( rBitmapEx );
}
Image::Image( const Bitmap& rBitmap ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
ImplInit( rBitmap );
}
Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const BitmapEx aBmpEx( rBitmap, rMaskBitmap );
@@ -122,7 +122,7 @@ Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
}
Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const BitmapEx aBmpEx( rBitmap, rColor );
@@ -131,7 +131,7 @@ Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
}
Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
const Graphic aGraphic( rxGraphic );
@@ -139,7 +139,7 @@ Image::Image( const uno::Reference< graphic::XGraphic >& rxGraphic ) :
}
Image::Image( const OUString &rFileUrl ) :
- mpImplData( NULL )
+ mpImplData( nullptr )
{
OUString aTmp;
osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
@@ -275,14 +275,14 @@ bool Image::operator==( const Image& rImage ) const
}
ImageList::ImageList( sal_uInt16 nInit, sal_uInt16 nGrow ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( nInit ),
mnGrowSize( nGrow )
{
}
ImageList::ImageList( const ResId& rResId ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( 1 ),
mnGrowSize( 4 )
{
@@ -330,7 +330,7 @@ ImageList::ImageList( const ResId& rResId ) :
ImageList::ImageList( const ::std::vector< OUString >& rNameVector,
const OUString& rPrefix,
const Color* ) :
- mpImplData( NULL ),
+ mpImplData( nullptr ),
mnInitSize( 1 ),
mnGrowSize( 4 )
{
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 65c321685b54..f368132c5b65 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -165,7 +165,7 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
}
ScopedVclPtrInstance<VirtualDevice> aVDev;
- std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr);
aVDev->SetOutputSizePixel( maSzPix, false );
nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL );
@@ -283,7 +283,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
if( !pVDev )
{
- std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : NULL);
+ std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr);
if (xOldClip)
pRenderContext->SetClipRegion( maClip );
diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx
index d7eab0f89b22..d2c10d637ef3 100644
--- a/vcl/source/gdi/impanmvw.hxx
+++ b/vcl/source/gdi/impanmvw.hxx
@@ -57,12 +57,12 @@ private:
private:
ImplAnimView( Animation* pParent, OutputDevice* pOut,
const Point& rPt, const Size& rSz, sal_uLong nExtraData,
- OutputDevice* pFirstFrameOutDev = NULL );
+ OutputDevice* pFirstFrameOutDev = nullptr );
~ImplAnimView();
bool matches( OutputDevice* pOut, long nExtraData ) const;
void drawToPos( sal_uLong nPos );
- void draw( sal_uLong nPos, VirtualDevice* pVDev=NULL );
+ void draw( sal_uLong nPos, VirtualDevice* pVDev=nullptr );
void repaint();
AInfo* createAInfo() const;
diff --git a/vcl/source/gdi/impfont.cxx b/vcl/source/gdi/impfont.cxx
index 57e8b05e9bb4..e8c68fc3cb5d 100644
--- a/vcl/source/gdi/impfont.cxx
+++ b/vcl/source/gdi/impfont.cxx
@@ -92,9 +92,9 @@ static int GetSShort( const unsigned char* p ){ return static_cast<sal_Int16>((p
// TODO: move CMAP parsing directly into the ImplFontCharMap class
bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
{
- rResult.mpRangeCodes = NULL;
- rResult.mpStartGlyphs= NULL;
- rResult.mpGlyphIds = NULL;
+ rResult.mpRangeCodes = nullptr;
+ rResult.mpStartGlyphs= nullptr;
+ rResult.mpGlyphIds = nullptr;
rResult.mnRangeCount = 0;
rResult.mbRecoded = false;
rResult.mbSymbolic = false;
@@ -166,8 +166,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// parse the best CMAP subtable
int nRangeCount = 0;
- sal_UCS4* pCodePairs = NULL;
- int* pStartGlyphs = NULL;
+ sal_UCS4* pCodePairs = nullptr;
+ int* pStartGlyphs = nullptr;
typedef std::vector<sal_uInt16> U16Vector;
U16Vector aGlyphIdArray;
@@ -278,8 +278,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
}
// recode the code ranges to their unicode encoded ranges if needed
- rtl_TextToUnicodeConverter aConverter = NULL;
- rtl_UnicodeToTextContext aCvtContext = NULL;
+ rtl_TextToUnicodeConverter aConverter = nullptr;
+ rtl_UnicodeToTextContext aCvtContext = nullptr;
rResult.mbRecoded = ( eRecodeFrom != RTL_TEXTENCODING_UNICODE );
if( rResult.mbRecoded )
@@ -352,7 +352,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// glyph mapping for non-unicode fonts not implemented
delete[] pStartGlyphs;
- pStartGlyphs = NULL;
+ pStartGlyphs = nullptr;
aGlyphIdArray.clear();
// make a pCodePairs array using the vector from above
@@ -368,7 +368,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult )
// prepare the glyphid-array if needed
// TODO: merge ranges if they are close enough?
- sal_uInt16* pGlyphIds = NULL;
+ sal_uInt16* pGlyphIds = nullptr;
if( !aGlyphIdArray.empty())
{
pGlyphIds = new sal_uInt16[ aGlyphIdArray.size() ];
@@ -405,7 +405,7 @@ FontCharMap::FontCharMap( const CmapResult& rCR )
FontCharMap::~FontCharMap()
{
- mpImplFontCharMap = 0;
+ mpImplFontCharMap = nullptr;
}
FontCharMapPtr FontCharMap::GetDefaultMap( bool bSymbol )
@@ -453,7 +453,7 @@ bool FontCharMap::HasChar( sal_UCS4 cChar ) const
{
bool bHasChar = false;
- if( mpImplFontCharMap->mpStartGlyphs == NULL ) { // only the char-ranges are known
+ if( mpImplFontCharMap->mpStartGlyphs == nullptr ) { // only the char-ranges are known
const int nRange = findRangeIndex( cChar );
if( nRange==0 && cChar < mpImplFontCharMap->mpRangeCodes[0] )
return false;
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 31613aa22c78..4d3f9875b557 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -90,10 +90,10 @@ Size GraphicReader::GetPreviewSize() const
}
ImpGraphic::ImpGraphic() :
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -105,7 +105,7 @@ ImpGraphic::ImpGraphic() :
ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
maMetaFile ( rImpGraphic.maMetaFile ),
maEx ( rImpGraphic.maEx ),
- mpContext ( NULL ),
+ mpContext ( nullptr ),
mpSwapFile ( rImpGraphic.mpSwapFile ),
meType ( rImpGraphic.meType ),
mnSizeBytes ( rImpGraphic.mnSizeBytes ),
@@ -119,7 +119,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
if( rImpGraphic.mpGfxLink )
mpGfxLink = new GfxLink( *rImpGraphic.mpGfxLink );
else
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
if( rImpGraphic.mpAnimation )
{
@@ -127,17 +127,17 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
maEx = mpAnimation->GetBitmapEx();
}
else
- mpAnimation = NULL;
+ mpAnimation = nullptr;
maSvgData = rImpGraphic.maSvgData;
}
ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
maEx ( rBitmap ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( !rBitmap.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -148,10 +148,10 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) :
ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
maEx ( rBitmapEx ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( !rBitmapEx.IsEmpty() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -161,10 +161,10 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) :
}
ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr)
-: mpAnimation( NULL ),
- mpContext( NULL ),
- mpSwapFile( NULL ),
- mpGfxLink( NULL ),
+: mpAnimation( nullptr ),
+ mpContext( nullptr ),
+ mpSwapFile( nullptr ),
+ mpGfxLink( nullptr ),
meType( rSvgDataPtr.get() ? GRAPHIC_BITMAP : GRAPHIC_NONE ),
mnSizeBytes( 0UL ),
mnRefCount( 1UL ),
@@ -177,9 +177,9 @@ ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr)
ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
maEx ( rAnimation.GetBitmapEx() ),
mpAnimation ( new Animation( rAnimation ) ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_BITMAP ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -190,10 +190,10 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) :
maMetaFile ( rMtf ),
- mpAnimation ( NULL ),
- mpContext ( NULL ),
- mpSwapFile ( NULL ),
- mpGfxLink ( NULL ),
+ mpAnimation ( nullptr ),
+ mpContext ( nullptr ),
+ mpSwapFile ( nullptr ),
+ mpGfxLink ( nullptr ),
meType ( GRAPHIC_GDIMETAFILE ),
mnSizeBytes ( 0UL ),
mnRefCount ( 1UL ),
@@ -230,7 +230,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
}
else
{
- mpAnimation = NULL;
+ mpAnimation = nullptr;
maEx = rImpGraphic.maEx;
}
@@ -248,7 +248,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
if( rImpGraphic.mpGfxLink )
mpGfxLink = new GfxLink( *rImpGraphic.mpGfxLink );
else
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
maSvgData = rImpGraphic.maSvgData;
}
@@ -334,13 +334,13 @@ void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo )
{
mpAnimation->Clear();
delete mpAnimation;
- mpAnimation = NULL;
+ mpAnimation = nullptr;
}
if( mpGfxLink )
{
delete mpGfxLink;
- mpGfxLink = NULL;
+ mpGfxLink = nullptr;
}
maSvgData.reset();
@@ -379,7 +379,7 @@ void ImpGraphic::ImplClear()
delete mpSwapFile;
}
- mpSwapFile = NULL;
+ mpSwapFile = nullptr;
}
mbSwapOut = false;
@@ -424,7 +424,7 @@ bool ImpGraphic::ImplIsAlpha() const
}
else if( meType == GRAPHIC_BITMAP )
{
- bRet = ( NULL == mpAnimation ) && maEx.IsAlpha();
+ bRet = ( nullptr == mpAnimation ) && maEx.IsAlpha();
}
return bRet;
@@ -432,7 +432,7 @@ bool ImpGraphic::ImplIsAlpha() const
bool ImpGraphic::ImplIsAnimated() const
{
- return( mpAnimation != NULL );
+ return( mpAnimation != nullptr );
}
bool ImpGraphic::ImplIsEPS() const
@@ -1307,7 +1307,7 @@ bool ImpGraphic::ImplSwapIn()
delete mpSwapFile;
}
- mpSwapFile = NULL;
+ mpSwapFile = nullptr;
}
}
}
@@ -1357,7 +1357,7 @@ GfxLink ImpGraphic::ImplGetLink()
bool ImpGraphic::ImplIsLink() const
{
- return ( mpGfxLink != NULL );
+ return ( mpGfxLink != nullptr );
}
BitmapChecksum ImpGraphic::ImplGetChecksum() const
@@ -1461,7 +1461,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) )
{
// set link only, if no other link was set
- const bool bSetLink = ( rImpGraphic.mpGfxLink == NULL );
+ const bool bSetLink = ( rImpGraphic.mpGfxLink == nullptr );
// assign graphic
rImpGraphic = *aGraphic.ImplGetImpGraphic();
diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx
index 76e65a3a3bb1..813f05e5d108 100644
--- a/vcl/source/gdi/impimage.cxx
+++ b/vcl/source/gdi/impimage.cxx
@@ -102,7 +102,7 @@ void ImplImageList::RemoveImage( sal_uInt16 nPos )
}
ImplImageData::ImplImageData( const BitmapEx& rBmpEx ) :
- mpImageBitmap( NULL ),
+ mpImageBitmap( nullptr ),
maBmpEx( rBmpEx )
{
}
@@ -119,7 +119,7 @@ bool ImplImageData::IsEqual( const ImplImageData& rData )
ImplImage::ImplImage()
: mnRefCount(1)
- , mpData(NULL)
+ , mpData(nullptr)
, meType(IMAGETYPE_BITMAP)
{
}
@@ -158,7 +158,7 @@ void ImplImageBmp::Create( const BitmapEx& rBmpEx, long nItemWidth, long nItemHe
maDisabledBmpEx.SetEmpty();
delete mpDisplayBmp;
- mpDisplayBmp = NULL;
+ mpDisplayBmp = nullptr;
maSize = Size( nItemWidth, nItemHeight );
mnSize = nInitSize;
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 33dfccc3436d..1fce7910b23f 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -143,7 +143,7 @@ public:
};
ImplPointArray::ImplPointArray() :
- mpArray ( NULL ),
+ mpArray ( nullptr ),
mnSize ( 0UL ),
mnRealSize ( 0UL )
@@ -853,7 +853,7 @@ void ImplLimitPolyPoly( tools::PolyPolygon& rPolyPoly )
ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor )
{
- ImplVectMap* pMap = NULL;
+ ImplVectMap* pMap = nullptr;
if( pRAcc && pRAcc->Width() && pRAcc->Height() )
{
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 62049b5a823c..8c23aa3ce0a3 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -60,7 +60,7 @@ ImplJobSetup::ImplJobSetup()
mnPaperWidth = 0;
mnPaperHeight = 0;
mnDriverDataLen = 0;
- mpDriverData = NULL;
+ mpDriverData = nullptr;
mbPapersizeFromSetup = false;
}
@@ -83,7 +83,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen );
}
else
- mpDriverData = NULL;
+ mpDriverData = nullptr;
mbPapersizeFromSetup = rJobSetup.mbPapersizeFromSetup;
maValueMap = rJobSetup.maValueMap;
}
@@ -123,7 +123,7 @@ const ImplJobSetup* JobSetup::ImplGetConstData() const
JobSetup::JobSetup()
{
- mpData = NULL;
+ mpData = nullptr;
}
JobSetup::JobSetup( const JobSetup& rJobSetup )
diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx
index 0d1bb1ba831c..22fa9b6f4245 100644
--- a/vcl/source/gdi/metaact.cxx
+++ b/vcl/source/gdi/metaact.cxx
@@ -191,7 +191,7 @@ void MetaAction::Read( SvStream&, ImplMetaReadData* )
MetaAction* MetaAction::ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData )
{
- MetaAction* pAction = NULL;
+ MetaAction* pAction = nullptr;
sal_uInt16 nTmp = 0;
rIStm.ReadUInt16( nTmp );
MetaActionType nType = static_cast<MetaActionType>(nTmp);
@@ -1078,7 +1078,7 @@ void MetaTextAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
MetaTextArrayAction::MetaTextArrayAction() :
MetaAction ( MetaActionType::TEXTARRAY ),
- mpDXAry ( NULL ),
+ mpDXAry ( nullptr ),
mnIndex ( 0 ),
mnLen ( 0 )
{}
@@ -1098,7 +1098,7 @@ MetaTextArrayAction::MetaTextArrayAction( const MetaTextArrayAction& rAction ) :
memcpy( mpDXAry, rAction.mpDXAry, nAryLen * sizeof( long ) );
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
}
MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
@@ -1120,7 +1120,7 @@ MetaTextArrayAction::MetaTextArrayAction( const Point& rStartPt,
memcpy( mpDXAry, pDXAry, nAryLen * sizeof(long) );
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
}
MetaTextArrayAction::~MetaTextArrayAction()
@@ -1193,7 +1193,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
if (mnLen > maStr.getLength() - mnIndex)
{
mnIndex = 0;
- mpDXAry = 0;
+ mpDXAry = nullptr;
return;
}
@@ -1219,12 +1219,12 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
}
else
{
- mpDXAry = NULL;
+ mpDXAry = nullptr;
return;
}
}
else
- mpDXAry = NULL;
+ mpDXAry = nullptr;
if ( aCompat.GetVersion() >= 2 ) // Version 2
{
@@ -1233,7 +1233,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData )
if ( mnIndex + mnLen > maStr.getLength() )
{
mnIndex = 0;
- delete[] mpDXAry, mpDXAry = NULL;
+ delete[] mpDXAry, mpDXAry = nullptr;
}
}
}
@@ -3167,7 +3167,7 @@ MetaCommentAction::MetaCommentAction( sal_Int32 nValue ) :
MetaAction ( MetaActionType::COMMENT ),
mnValue ( nValue )
{
- ImplInitDynamicData( NULL, 0UL );
+ ImplInitDynamicData( nullptr, 0UL );
}
MetaCommentAction::MetaCommentAction( const MetaCommentAction& rAct ) :
@@ -3202,7 +3202,7 @@ void MetaCommentAction::ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32
else
{
mnDataSize = 0;
- mpData = NULL;
+ mpData = nullptr;
}
}
@@ -3366,7 +3366,7 @@ void MetaCommentAction::Read( SvStream& rIStm, ImplMetaReadData* )
rIStm.Read( mpData, mnDataSize );
}
else
- mpData = NULL;
+ mpData = nullptr;
}
MetaLayoutModeAction::MetaLayoutModeAction() :
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index 6a0d891910c8..72066869803b 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -32,7 +32,7 @@ static const sal_uInt8 pImplMask[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02
// - NodeCache -
ImpNodeCache::ImpNodeCache( const sal_uLong nInitSize ) :
- pActNode( NULL )
+ pActNode( nullptr )
{
const sal_uLong nSize = nInitSize + 4;
@@ -61,7 +61,7 @@ ImpNodeCache::~ImpNodeCache()
Octree::Octree( const BitmapReadAccess& rReadAcc, sal_uLong nColors ) :
nMax ( nColors ),
nLeafCount ( 0L ),
- pTree ( NULL ),
+ pTree ( nullptr ),
pAcc ( &rReadAcc )
{
pNodeCache = new ImpNodeCache( nColors );
@@ -128,7 +128,7 @@ void Octree::ImplDeleteOctree( NODE** ppNode )
}
pNodeCache->ImplReleaseNode( *ppNode );
- *ppNode = NULL;
+ *ppNode = nullptr;
}
void Octree::ImplAdd( NODE** ppNode )
@@ -194,7 +194,7 @@ void Octree::ImplReduce()
pNode->nCount += pChild->nCount;
pNodeCache->ImplReleaseNode( pNode->pChild[ i ] );
- pNode->pChild[ i ] = NULL;
+ pNode->pChild[ i ] = nullptr;
nChildren++;
}
}
diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx
index b71d9dd15654..46485b9ebde1 100644
--- a/vcl/source/gdi/oldprintadaptor.cxx
+++ b/vcl/source/gdi/oldprintadaptor.cxx
@@ -74,7 +74,7 @@ void OldStylePrintAdaptor::StartPage()
void OldStylePrintAdaptor::EndPage()
{
- getPrinter()->SetConnectMetaFile( NULL );
+ getPrinter()->SetConnectMetaFile( nullptr );
mpData->maPages.back().maPage.WindStart();
}
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index ca695480cbdb..5d4633146530 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -505,7 +505,7 @@ PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) :
mbExportNDests ( false ),
mnFormsFormat ( 0 ),
mnPage ( -1 ),
- mpPageSyncData ( NULL ),
+ mpPageSyncData ( nullptr ),
mpGlobalSyncData ( new GlobalSyncData() )
{
mpPageSyncData = new PageSyncData( mpGlobalSyncData );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 156dc694f456..9fd3a127ab47 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -971,7 +971,7 @@ public:
void translate( double tx, double ty );
bool invert();
- void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = NULL );
+ void append( PDFWriterImpl::PDFPage& rPage, OStringBuffer& rBuffer, Point* pBack = nullptr );
Point transform( const Point& rPoint ) const;
};
@@ -1288,7 +1288,7 @@ bool PDFWriterImpl::PDFPage::emit(sal_Int32 nParentObject )
aLine.append( "/Trans<</D " );
appendDouble( (double)m_nTransTime/1000.0, aLine, 3 );
aLine.append( "\n" );
- const char *pStyle = NULL, *pDm = NULL, *pM = NULL, *pDi = NULL;
+ const char *pStyle = nullptr, *pDm = nullptr, *pM = nullptr, *pDi = nullptr;
switch( m_eTransition )
{
case PDFWriter::SplitHorizontalInward:
@@ -1517,9 +1517,9 @@ void PDFWriterImpl::PDFPage::appendPolygon( const basegfx::B2DPolygon& rPoly, OS
basegfx::B2DPoint aBL( aRange.getMinX(), aRange.getMaxY() );
appendPixelPoint( aBL, rBuffer );
rBuffer.append( ' ' );
- appendMappedLength( aRange.getWidth(), rBuffer, false, NULL, nLog10Divisor );
+ appendMappedLength( aRange.getWidth(), rBuffer, false, nullptr, nLog10Divisor );
rBuffer.append( ' ' );
- appendMappedLength( aRange.getHeight(), rBuffer, true, NULL, nLog10Divisor );
+ appendMappedLength( aRange.getHeight(), rBuffer, true, nullptr, nLog10Divisor );
rBuffer.append( " re\n" );
return;
}
@@ -1737,7 +1737,7 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
const com::sun::star::uno::Reference< com::sun::star::beans::XMaterialHolder >& xEnc,
PDFWriter& i_rOuterFace)
:
- m_pReferenceDevice( NULL ),
+ m_pReferenceDevice( nullptr ),
m_aMapMode( MAP_POINT, Point(), Fraction( 1L, pointToPixel(1) ), Fraction( 1L, pointToPixel(1) ) ),
m_nCurrentStructElement( 0 ),
m_bEmitStructure( true ),
@@ -1756,16 +1756,16 @@ void PDFWriterImpl::PDFPage::appendWaveLine( sal_Int32 nWidth, sal_Int32 nY, sal
m_aContext(rContext),
m_aFile(m_aContext.URL),
m_bOpen(false),
- m_pCodec( NULL ),
- m_pMemStream(NULL),
+ m_pCodec( nullptr ),
+ m_pMemStream(nullptr),
m_aDocDigest( rtl_digest_createMD5() ),
m_aCipher( nullptr ),
- m_aDigest( NULL ),
+ m_aDigest( nullptr ),
m_nKeyLength(0),
m_nRC4KeyLength(0),
m_bEncryptThisStream( false ),
m_nAccessPermissions(0),
- m_pEncryptionBuffer( NULL ),
+ m_pEncryptionBuffer( nullptr ),
m_nEncryptionBufferSize( 0 ),
m_bIsPDF_A1( false ),
m_rOuterFace( i_rOuterFace )
@@ -2007,7 +2007,7 @@ void PDFWriterImpl::computeDocumentIdentifier( std::vector< sal_uInt8 >& o_rIden
o_rCString2 = aCreationMetaDateString.makeStringAndClear();
rtlDigest aDigest = rtl_digest_createMD5();
- OSL_ENSURE( aDigest != NULL, "PDFWriterImpl::computeDocumentIdentifier: cannot obtain a digest object !" );
+ OSL_ENSURE( aDigest != nullptr, "PDFWriterImpl::computeDocumentIdentifier: cannot obtain a digest object !" );
if( aDigest )
{
rtlDigestError nError = rtl_digest_updateMD5( aDigest, &aGMT, sizeof( aGMT ) );
@@ -2158,12 +2158,12 @@ void PDFWriterImpl::endCompression()
{
m_pCodec->EndCompression();
delete m_pCodec;
- m_pCodec = NULL;
+ m_pCodec = nullptr;
sal_uInt64 nLen = m_pMemStream->Tell();
m_pMemStream->Seek( 0 );
writeBuffer( m_pMemStream->GetData(), nLen );
delete m_pMemStream;
- m_pMemStream = NULL;
+ m_pMemStream = nullptr;
}
#endif
}
@@ -2257,7 +2257,7 @@ public:
inline const ImplPdfBuiltinFontData* GetPdfFontData( const PhysicalFontFace* pFontData )
{
- const ImplPdfBuiltinFontData* pFD = NULL;
+ const ImplPdfBuiltinFontData* pFD = nullptr;
if( pFontData && pFontData->CheckMagic( ImplPdfBuiltinFontData::PDF_FONT_MAGIC ) )
pFD = static_cast<const ImplPdfBuiltinFontData*>( pFontData );
return pFD;
@@ -2360,7 +2360,7 @@ void PDFWriterImpl::endPage()
{
writeJPG( *jpeg );
delete jpeg->m_pStream;
- jpeg->m_pStream = NULL;
+ jpeg->m_pStream = nullptr;
jpeg->m_aMask = Bitmap();
}
}
@@ -2371,7 +2371,7 @@ void PDFWriterImpl::endPage()
{
writeTransparentObject( *t );
delete t->m_pContentStream;
- t->m_pContentStream = NULL;
+ t->m_pContentStream = nullptr;
}
}
}
@@ -2928,7 +2928,7 @@ bool PDFWriterImpl::emitTilings()
checkAndEnableStreamEncryption( it->m_nObject );
bool written = writeBuffer( it->m_pTilingStream->GetData(), nTilingStreamSize );
delete it->m_pTilingStream;
- it->m_pTilingStream = NULL;
+ it->m_pTilingStream = nullptr;
if( !written )
return false;
disableStreamEncryption();
@@ -2985,7 +2985,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
if( pFont->IsEmbeddable() )
{
- const unsigned char* pFontData = NULL;
+ const unsigned char* pFontData = nullptr;
long nFontLen = 0;
sal_Ucs nEncodedCodes[256];
sal_Int32 pEncWidths[256];
@@ -3013,7 +3013,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
pGraphics->GetGlyphWidths( pFont, false, aGlyphWidths, aUnicodeMap );
OUString aTmpName;
- osl_createTempFile( NULL, NULL, &aTmpName.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpName.pData );
sal_GlyphId aGlyphIds[ 256 ];
sal_uInt8 pEncoding[ 256 ];
sal_Int32 pDuWidths[ 256 ];
@@ -3128,7 +3128,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
assert(pGraphics);
// prepare font encoding
- std::set<sal_Unicode> const * pPriority(0);
+ std::set<sal_Unicode> const * pPriority(nullptr);
const Ucs2SIntMap *const pEncoding =
pGraphics->GetFontEncodingVector( pFont, nullptr, &pPriority );
sal_Int32 nToUnicodeStream = 0;
@@ -3193,12 +3193,12 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
FontSubsetInfo aInfo;
sal_Int32 pWidths[256];
- const unsigned char* pFontData = NULL;
+ const unsigned char* pFontData = nullptr;
long nFontLen = 0;
sal_Int32 nLength1, nLength2;
try
{
- if( (pFontData = static_cast<const unsigned char*>(pGraphics->GetEmbedFontData(pFont, nEncodedCodes, pWidths, 256, aInfo, &nFontLen))) != NULL )
+ if( (pFontData = static_cast<const unsigned char*>(pGraphics->GetEmbedFontData(pFont, nEncodedCodes, pWidths, 256, aInfo, &nFontLen))) != nullptr )
{
if( (aInfo.m_nFontType & FontSubsetInfo::ANY_TYPE1) == 0 )
throw FontException();
@@ -3587,7 +3587,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
"<</Type/Font/Subtype/Type1/BaseFont/" );
appendName( aInfo.m_aPSName, aLine );
aLine.append( "\n" );
- if( !pFont->IsSymbolFont() && pEncoding == 0 )
+ if( !pFont->IsSymbolFont() && pEncoding == nullptr )
aLine.append( "/Encoding/WinAnsiEncoding\n" );
if( nToUnicodeStream )
{
@@ -3939,7 +3939,7 @@ bool PDFWriterImpl::emitFonts()
std::map< sal_Int32, sal_Int32 > aFontIDToObject;
OUString aTmpName;
- osl_createTempFile( NULL, NULL, &aTmpName.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpName.pData );
for( FontSubsetData::iterator it = m_aSubsets.begin(); it != m_aSubsets.end(); ++it )
{
for( FontEmitList::iterator lit = it->second.m_aSubsets.begin(); lit != it->second.m_aSubsets.end(); ++lit )
@@ -5262,7 +5262,7 @@ bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDi
stream_it != dict_it->second.end(); ++stream_it )
{
SvMemoryStream* pApppearanceStream = stream_it->second;
- dict_it->second[ stream_it->first ] = NULL;
+ dict_it->second[ stream_it->first ] = nullptr;
bool bDeflate = compressStream( pApppearanceStream );
@@ -6056,7 +6056,7 @@ class HashContextScope {
public:
explicit HashContextScope(HASHContext *pPtr) : mpPtr(pPtr) {}
~HashContextScope() { clear(); }
- void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = NULL; }
+ void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = nullptr; }
HASHContext *get() { return mpPtr; }
};
@@ -6304,19 +6304,19 @@ TimeStampResp ::= SEQUENCE {
const SEC_ASN1Template MessageImprint_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(MessageImprint) },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(MessageImprint) },
{ SEC_ASN1_INLINE, offsetof(MessageImprint, hashAlgorithm), SECOID_AlgorithmIDTemplate, 0 },
- { SEC_ASN1_OCTET_STRING, offsetof(MessageImprint, hashedMessage), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_OCTET_STRING, offsetof(MessageImprint, hashedMessage), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Extension_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(Extension) },
- { SEC_ASN1_OBJECT_ID, offsetof(Extension, extnID), 0, 0 },
- { SEC_ASN1_BOOLEAN, offsetof(Extension, critical), 0, 0 },
- { SEC_ASN1_OCTET_STRING, offsetof(Extension, extnValue), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(Extension) },
+ { SEC_ASN1_OBJECT_ID, offsetof(Extension, extnID), nullptr, 0 },
+ { SEC_ASN1_BOOLEAN, offsetof(Extension, critical), nullptr, 0 },
+ { SEC_ASN1_OCTET_STRING, offsetof(Extension, extnValue), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Extensions_Template[] =
@@ -6326,14 +6326,14 @@ const SEC_ASN1Template Extensions_Template[] =
const SEC_ASN1Template TimeStampReq_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(TimeStampReq) },
- { SEC_ASN1_INTEGER, offsetof(TimeStampReq, version), 0, 0 },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(TimeStampReq) },
+ { SEC_ASN1_INTEGER, offsetof(TimeStampReq, version), nullptr, 0 },
{ SEC_ASN1_INLINE, offsetof(TimeStampReq, messageImprint), MessageImprint_Template, 0 },
- { SEC_ASN1_OBJECT_ID | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, reqPolicy), 0, 0 },
- { SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, nonce), 0, 0 },
- { SEC_ASN1_BOOLEAN | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, certReq), 0, 0 },
+ { SEC_ASN1_OBJECT_ID | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, reqPolicy), nullptr, 0 },
+ { SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, nonce), nullptr, 0 },
+ { SEC_ASN1_BOOLEAN | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, certReq), nullptr, 0 },
{ SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | 0, offsetof(TimeStampReq, extensions), Extensions_Template, 0 },
- { 0, 0, 0, 0 }
+ { 0, 0, nullptr, 0 }
};
typedef struct {
@@ -6344,16 +6344,16 @@ typedef struct {
const SEC_ASN1Template PKIStatusInfo_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(PKIStatusInfo) },
- { SEC_ASN1_INTEGER, offsetof(PKIStatusInfo, status), 0, 0 },
- { SEC_ASN1_CONSTRUCTED | SEC_ASN1_SEQUENCE | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, statusString), 0, 0 },
- { SEC_ASN1_BIT_STRING | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, failInfo), 0, 0 },
- { 0, 0, 0, 0 }
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(PKIStatusInfo) },
+ { SEC_ASN1_INTEGER, offsetof(PKIStatusInfo, status), nullptr, 0 },
+ { SEC_ASN1_CONSTRUCTED | SEC_ASN1_SEQUENCE | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, statusString), nullptr, 0 },
+ { SEC_ASN1_BIT_STRING | SEC_ASN1_OPTIONAL, offsetof(PKIStatusInfo, failInfo), nullptr, 0 },
+ { 0, 0, nullptr, 0 }
};
const SEC_ASN1Template Any_Template[] =
{
- { SEC_ASN1_ANY, 0, NULL, sizeof(SECItem) }
+ { SEC_ASN1_ANY, 0, nullptr, sizeof(SECItem) }
};
typedef struct {
@@ -6363,10 +6363,10 @@ typedef struct {
const SEC_ASN1Template TimeStampResp_Template[] =
{
- { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(TimeStampResp) },
+ { SEC_ASN1_SEQUENCE, 0, nullptr, sizeof(TimeStampResp) },
{ SEC_ASN1_INLINE, offsetof(TimeStampResp, status), PKIStatusInfo_Template, 0 },
{ SEC_ASN1_ANY | SEC_ASN1_OPTIONAL, offsetof(TimeStampResp, timeStampToken), Any_Template, 0 },
- { 0, 0, 0, 0 }
+ { 0, 0, nullptr, 0 }
};
/* Will see if these are needed or not
@@ -6523,7 +6523,7 @@ bad_data:
PORT_Memcpy(to->data, result, to->len = result_bytes);
rv = SECSuccess;
} else {
- SECItem result_item = {siBuffer, NULL, 0 };
+ SECItem result_item = {siBuffer, nullptr, 0 };
result_item.data = result;
result_item.len = result_bytes;
rv = SECITEM_CopyItem(pool, to, &result_item);
@@ -6537,35 +6537,35 @@ my_NSS_CMSAttributeArray_FindAttrByOidTag(NSSCMSAttribute **attrs, SECOidTag oid
SECOidData *oid;
NSSCMSAttribute *attr1, *attr2;
- if (attrs == NULL)
- return NULL;
+ if (attrs == nullptr)
+ return nullptr;
oid = SECOID_FindOIDByTag(oidtag);
- if (oid == NULL)
- return NULL;
+ if (oid == nullptr)
+ return nullptr;
- while ((attr1 = *attrs++) != NULL) {
+ while ((attr1 = *attrs++) != nullptr) {
if (attr1->type.len == oid->oid.len && PORT_Memcmp (attr1->type.data,
oid->oid.data,
oid->oid.len) == 0)
break;
}
- if (attr1 == NULL)
- return NULL;
+ if (attr1 == nullptr)
+ return nullptr;
if (!only)
return attr1;
- while ((attr2 = *attrs++) != NULL) {
+ while ((attr2 = *attrs++) != nullptr) {
if (attr2->type.len == oid->oid.len && PORT_Memcmp (attr2->type.data,
oid->oid.data,
oid->oid.len) == 0)
break;
}
- if (attr2 != NULL)
- return NULL;
+ if (attr2 != nullptr)
+ return nullptr;
return attr1;
}
@@ -6577,10 +6577,10 @@ my_NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj)
void **dest;
PORT_Assert(array != NULL);
- if (array == NULL)
+ if (array == nullptr)
return SECFailure;
- if (*array == NULL) {
+ if (*array == nullptr) {
dest = static_cast<void **>(PORT_ArenaAlloc(poolp, 2 * sizeof(void *)));
} else {
void **p = *array;
@@ -6592,11 +6592,11 @@ my_NSS_CMSArray_Add(PLArenaPool *poolp, void ***array, void *obj)
(n + 2) * sizeof(void *)));
}
- if (dest == NULL)
+ if (dest == nullptr)
return SECFailure;
dest[n] = obj;
- dest[n+1] = NULL;
+ dest[n+1] = nullptr;
*array = dest;
return SECSuccess;
}
@@ -6607,7 +6607,7 @@ my_NSS_CMSAttribute_GetType(NSSCMSAttribute *attr)
SECOidData *typetag;
typetag = SECOID_FindOID(&(attr->type));
- if (typetag == NULL)
+ if (typetag == nullptr)
return SEC_OID_UNKNOWN;
return typetag->offset;
@@ -6628,7 +6628,7 @@ my_NSS_CMSAttributeArray_AddAttr(PLArenaPool *poolp, NSSCMSAttribute ***attrs, N
/* see if we have one already */
oattr = my_NSS_CMSAttributeArray_FindAttrByOidTag(*attrs, type, PR_FALSE);
PORT_Assert (oattr == NULL);
- if (oattr != NULL)
+ if (oattr != nullptr)
goto loser; /* XXX or would it be better to replace it? */
/* no, shove it in */
@@ -6655,11 +6655,11 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
CERTCertificate *cert,
SECItem *digest)
{
- NSSCMSMessage *result = NSS_CMSMessage_Create(NULL);
+ NSSCMSMessage *result = NSS_CMSMessage_Create(nullptr);
if (!result)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSMessage_Create failed");
- return NULL;
+ return nullptr;
}
*cms_sd = NSS_CMSSignedData_Create(result);
@@ -6667,7 +6667,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_Create failed");
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
NSSCMSContentInfo *cms_cinfo = NSS_CMSMessage_GetContentInfo(result);
@@ -6676,18 +6676,18 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSContentInfo_SetContent_SignedData failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
cms_cinfo = NSS_CMSSignedData_GetContentInfo(*cms_sd);
// Attach NULL data as detached data
- if (NSS_CMSContentInfo_SetContent_Data(result, cms_cinfo, NULL, PR_TRUE) != SECSuccess)
+ if (NSS_CMSContentInfo_SetContent_Data(result, cms_cinfo, nullptr, PR_TRUE) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "NSS_CMSContentInfo_SetContent_Data failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
*cms_signer = NSS_CMSSignerInfo_Create(result, cert, SEC_OID_SHA1);
@@ -6696,7 +6696,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_Create failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignerInfo_AddSigningTime(*cms_signer, time) != SECSuccess)
@@ -6704,7 +6704,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_AddSigningTime failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignerInfo_IncludeCerts(*cms_signer, NSSCMSCM_CertChain, certUsageEmailSigner) != SECSuccess)
@@ -6712,7 +6712,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignerInfo_IncludeCerts failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_AddCertificate(*cms_sd, cert) != SECSuccess)
@@ -6720,7 +6720,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_AddCertificate failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_AddSignerInfo(*cms_sd, *cms_signer) != SECSuccess)
@@ -6728,7 +6728,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_AddSignerInfo failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
if (NSS_CMSSignedData_SetDigestValue(*cms_sd, SEC_OID_SHA1, digest) != SECSuccess)
@@ -6736,7 +6736,7 @@ NSSCMSMessage *CreateCMSMessage(PRTime time,
SAL_WARN("vcl.pdfwriter", "NSS_CMSSignedData_SetDigestValue failed");
NSS_CMSSignedData_Destroy(*cms_sd);
NSS_CMSMessage_Destroy(result);
- return NULL;
+ return nullptr;
}
return result;
@@ -6869,7 +6869,7 @@ bool PDFWriterImpl::finalizeSignature()
SECItem values[2];
SECItem *valuesp[2];
valuesp[0] = values;
- valuesp[1] = NULL;
+ valuesp[1] = nullptr;
SECOidData typetag;
if( !m_aContext.SignTSA.isEmpty() )
@@ -6888,11 +6888,11 @@ bool PDFWriterImpl::finalizeSignature()
}
SECItem ts_cms_output;
- ts_cms_output.data = 0;
+ ts_cms_output.data = nullptr;
ts_cms_output.len = 0;
PLArenaPool *ts_arena = PORT_NewArena(10000);
NSSCMSEncoderContext *ts_cms_ecx;
- ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, NULL, NULL, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, pass, NULL, NULL, NULL, NULL);
+ ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, nullptr, nullptr, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
if (NSS_CMSEncoder_Finish(ts_cms_ecx) != SECSuccess)
{
@@ -6943,13 +6943,13 @@ bool PDFWriterImpl::finalizeSignature()
src.version.data = &cOne;
src.version.len = sizeof(cOne);
- src.messageImprint.hashAlgorithm.algorithm.data = NULL;
- src.messageImprint.hashAlgorithm.parameters.data = NULL;
- SECOID_SetAlgorithmID(NULL, &src.messageImprint.hashAlgorithm, SEC_OID_SHA1, NULL);
+ src.messageImprint.hashAlgorithm.algorithm.data = nullptr;
+ src.messageImprint.hashAlgorithm.parameters.data = nullptr;
+ SECOID_SetAlgorithmID(nullptr, &src.messageImprint.hashAlgorithm, SEC_OID_SHA1, nullptr);
src.messageImprint.hashedMessage = ts_digest;
src.reqPolicy.type = siBuffer;
- src.reqPolicy.data = NULL;
+ src.reqPolicy.data = nullptr;
src.reqPolicy.len = 0;
unsigned int nNonce = comphelper::rng::uniform_uint_distribution(0, SAL_MAX_UINT32);
@@ -6961,17 +6961,17 @@ bool PDFWriterImpl::finalizeSignature()
src.certReq.data = &cOne;
src.certReq.len = sizeof(cOne);
- src.extensions = NULL;
+ src.extensions = nullptr;
- SECItem* timestamp_request = SEC_ASN1EncodeItem(NULL, NULL, &src, TimeStampReq_Template);
- if (timestamp_request == NULL)
+ SECItem* timestamp_request = SEC_ASN1EncodeItem(nullptr, nullptr, &src, TimeStampReq_Template);
+ if (timestamp_request == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem failed");
free(pass);
return false;
}
- if (timestamp_request->data == NULL)
+ if (timestamp_request->data == nullptr)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1EncodeItem succeeded but got NULL data");
free(pass);
@@ -6993,7 +6993,7 @@ bool PDFWriterImpl::finalizeSignature()
CURL* curl = curl_easy_init();
CURLcode rc;
- struct curl_slist* slist = NULL;
+ struct curl_slist* slist = nullptr;
if (!curl)
{
@@ -7106,7 +7106,7 @@ bool PDFWriterImpl::finalizeSignature()
response_item.data = reinterpret_cast<unsigned char*>(const_cast<char*>(response_buffer.getStr()));
response_item.len = response_buffer.getLength();
- if (SEC_ASN1DecodeItem(NULL, &response, TimeStampResp_Template, &response_item) != SECSuccess)
+ if (SEC_ASN1DecodeItem(nullptr, &response, TimeStampResp_Template, &response_item) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_ASN1DecodeItem failed");
free(pass);
@@ -7130,16 +7130,16 @@ bool PDFWriterImpl::finalizeSignature()
// like experimenting.
values[0] = response.timeStampToken;
values[1].type = siBuffer;
- values[1].data = NULL;
+ values[1].data = nullptr;
values[1].len = 0;
timestamp.values = valuesp;
- typetag.oid.data = NULL;
+ typetag.oid.data = nullptr;
// id-aa-timeStampToken OBJECT IDENTIFIER ::= { iso(1)
// member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9)
// smime(16) aa(2) 14 }
- if (my_SEC_StringToOID(NULL, &typetag.oid, "1.2.840.113549.1.9.16.2.14", 0) != SECSuccess)
+ if (my_SEC_StringToOID(nullptr, &typetag.oid, "1.2.840.113549.1.9.16.2.14", 0) != SECSuccess)
{
SAL_WARN("vcl.pdfwriter", "SEC_StringToOID failed");
free(pass);
@@ -7169,7 +7169,7 @@ bool PDFWriterImpl::finalizeSignature()
}
SECItem cms_output;
- cms_output.data = 0;
+ cms_output.data = nullptr;
cms_output.len = 0;
PLArenaPool *arena = PORT_NewArena(10000);
NSSCMSEncoderContext *cms_ecx;
@@ -7179,7 +7179,7 @@ bool PDFWriterImpl::finalizeSignature()
// with, the software itself pops up a dialog asking for the PIN (password). But I am not going
// to test it and risk locking up my token...
- cms_ecx = NSS_CMSEncoder_Start(cms_msg, NULL, NULL, &cms_output, arena, PDFSigningPKCS7PasswordCallback, pass, NULL, NULL, NULL, NULL);
+ cms_ecx = NSS_CMSEncoder_Start(cms_msg, nullptr, nullptr, &cms_output, arena, PDFSigningPKCS7PasswordCallback, pass, nullptr, nullptr, nullptr, nullptr);
if (!cms_ecx)
{
@@ -7758,7 +7758,7 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
//force ICC profile version 2.1
cmsSetProfileVersion(hProfile, 2.1);
cmsUInt32Number nBytesNeeded = 0;
- cmsSaveProfileToMem(hProfile, NULL, &nBytesNeeded);
+ cmsSaveProfileToMem(hProfile, nullptr, &nBytesNeeded);
if (!nBytesNeeded)
return 0;
std::vector<unsigned char> xBuffer(nBytesNeeded);
@@ -8314,7 +8314,7 @@ bool PDFWriterImpl::emitAdditionalStreams()
rStream.m_pStream->write( xStream );
xStream.clear();
delete rStream.m_pStream;
- rStream.m_pStream = NULL;
+ rStream.m_pStream = nullptr;
disableStreamEncryption();
if( rStream.m_bCompress )
@@ -8501,11 +8501,11 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
}
EmbedFont& rEmbedFont = m_aEmbeddedFonts[pCurrentFont];
- const Ucs2SIntMap* pEncoding = NULL;
- const Ucs2OStrMap* pNonEncoded = NULL;
+ const Ucs2SIntMap* pEncoding = nullptr;
+ const Ucs2OStrMap* pNonEncoded = nullptr;
if (!getReferenceDevice()->AcquireGraphics())
return false;
- pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded, 0);
+ pEncoding = pGraphics->GetFontEncodingVector( pCurrentFont, &pNonEncoded, nullptr);
Ucs2SIntMap::const_iterator enc_it;
Ucs2OStrMap::const_iterator nonenc_it;
@@ -8552,7 +8552,7 @@ bool PDFWriterImpl::registerGlyphs( int nGlyphs,
}
}
else
- pEncoding = NULL;
+ pEncoding = nullptr;
}
if( ! pEncoding )
{
@@ -8864,7 +8864,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
sal_Int32 pUnicodesPerGlyph[nMaxGlyphs];
int pCharPosAry[nMaxGlyphs];
DeviceCoordinate nAdvanceWidths[nMaxGlyphs];
- const PhysicalFontFace* pFallbackFonts[nMaxGlyphs] = { NULL };
+ const PhysicalFontFace* pFallbackFonts[nMaxGlyphs] = { nullptr };
bool bVertical = m_aCurrentPDFState.m_aFont.IsVertical();
int nGlyphs;
int nIndex = 0;
@@ -10139,7 +10139,7 @@ void PDFWriterImpl::beginRedirect( SvStream* pStream, const Rectangle& rTargetRe
SvStream* PDFWriterImpl::endRedirect()
{
- SvStream* pStream = NULL;
+ SvStream* pStream = nullptr;
if( ! m_aOutputStreams.empty() )
{
pStream = m_aOutputStreams.front().m_pStream;
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index d5421cd7e603..23d27c54c526 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -138,7 +138,7 @@ public:
// to page (useful for transformation matrices
// if pOutPoint is set it will be updated to the emitted point
// (in PDF map mode, that is 10th of point)
- void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false, Point* pOutPoint = NULL ) const;
+ void appendPoint( const Point& rPoint, OStringBuffer& rBuffer, bool bNeg = false, Point* pOutPoint = nullptr ) const;
// appends a B2DPoint without further transformation
void appendPixelPoint( const basegfx::B2DPoint& rPoint, OStringBuffer& rBuffer ) const;
// appends a rectangle
@@ -158,9 +158,9 @@ public:
// symmetrical) to page length and appends it to the buffer
// if pOutLength is set it will be updated to the emitted length
// (in PDF map mode, that is 10th of point)
- void appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL ) const;
+ void appendMappedLength( sal_Int32 nLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = nullptr ) const;
// the same for double values
- void appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = NULL, sal_Int32 nPrecision = 5 ) const;
+ void appendMappedLength( double fLength, OStringBuffer& rBuffer, bool bVertical = true, sal_Int32* pOutLength = nullptr, sal_Int32 nPrecision = 5 ) const;
// appends LineInfo
// returns false if too many dash array entry were created for
// the implementation limits of some PDF readers
@@ -214,7 +214,7 @@ public:
bool m_bTrueColor;
JPGEmit()
- : m_pStream(NULL)
+ : m_pStream(nullptr)
, m_nObject(0)
, m_bTrueColor(false)
{
@@ -241,7 +241,7 @@ public:
TilingEmit()
: m_nObject( 0 ),
- m_pTilingStream( NULL )
+ m_pTilingStream( nullptr )
{}
};
@@ -259,8 +259,8 @@ public:
: m_nObject( 0 ),
m_nExtGStateObject( -1 ),
m_fAlpha( 0.0 ),
- m_pContentStream( NULL ),
- m_pSoftMaskStream( NULL )
+ m_pContentStream( nullptr ),
+ m_pSoftMaskStream( nullptr )
{}
~TransparencyEmit()
{
@@ -547,7 +547,7 @@ public:
sal_Int32 m_nStreamObject;
bool m_bCompress;
- PDFAddStream() : m_pStream( NULL ), m_nStreamObject( 0 ), m_bCompress( true ) {}
+ PDFAddStream() : m_pStream( nullptr ), m_nStreamObject( 0 ), m_bCompress( true ) {}
};
// helper structure for drawLayout and friends
@@ -1041,7 +1041,7 @@ public:
bool emit();
const std::set< PDFWriter::ErrorCode > & getErrors() const { return m_aErrors;}
void insertError( PDFWriter::ErrorCode eErr ) { m_aErrors.insert( eErr ); }
- void playMetafile( const GDIMetaFile&, vcl::PDFExtOutDevData*, const vcl::PDFWriter::PlayMetafileContext&, VirtualDevice* pDummyDev = NULL );
+ void playMetafile( const GDIMetaFile&, vcl::PDFExtOutDevData*, const vcl::PDFWriter::PlayMetafileContext&, VirtualDevice* pDummyDev = nullptr );
Size getCurPageSize() const
{
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index f7c3d2759d54..3477fa8ef56d 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -61,7 +61,7 @@ void PDFWriterImpl::implWriteGradient( const tools::PolyPolygon& i_rPolyPoly, co
m_rOuterFace.Push();
m_rOuterFace.IntersectClipRegion( i_rPolyPoly.getB2DPolyPolygon() );
- playMetafile( aTmpMtf, NULL, i_rContext, i_pDummyVDev );
+ playMetafile( aTmpMtf, nullptr, i_rContext, i_pDummyVDev );
m_rOuterFace.Pop();
}
@@ -411,7 +411,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
const Color aTransCol( rTransparenceGradient.GetStartColor() );
const sal_uInt16 nTransPercent = aTransCol.GetLuminance() * 100 / 255;
m_rOuterFace.BeginTransparencyGroup();
- playMetafile( aTmpMtf, NULL, i_rContext, pDummyVDev );
+ playMetafile( aTmpMtf, nullptr, i_rContext, pDummyVDev );
m_rOuterFace.EndTransparencyGroup( Rectangle( rPos, rSize ), nTransPercent );
}
else
@@ -505,7 +505,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
m_rOuterFace.SetMapMode( aMapMode );
pDummyVDev->SetMapMode( aMapMode );
- playMetafile( aSubstitute, NULL, i_rContext, pDummyVDev );
+ playMetafile( aSubstitute, nullptr, i_rContext, pDummyVDev );
pDummyVDev->Pop();
m_rOuterFace.Pop();
}
@@ -518,7 +518,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa
if( pA->GetComment().equalsIgnoreAsciiCase("XGRAD_SEQ_BEGIN"))
{
- const MetaGradientExAction* pGradAction = NULL;
+ const MetaGradientExAction* pGradAction = nullptr;
bool bDone = false;
while( !bDone && ( ++i < nCount ) )
@@ -1101,7 +1101,7 @@ public:
if( maUDigest )
{
rtl_digest_destroyMD5( maUDigest );
- maUDigest = NULL;
+ maUDigest = nullptr;
}
}
@@ -1119,7 +1119,7 @@ std::map< sal_IntPtr, EncHashTransporter* > EncHashTransporter::sTransporters;
EncHashTransporter* EncHashTransporter::getEncHashTransporter( const uno::Reference< beans::XMaterialHolder >& xRef )
{
- EncHashTransporter* pResult = NULL;
+ EncHashTransporter* pResult = nullptr;
if( xRef.is() )
{
uno::Any aMat( xRef->getMaterial() );
@@ -1165,7 +1165,7 @@ void PDFWriterImpl::checkAndEnableStreamEncryption( register sal_Int32 nObject )
rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key length: see algorithm 3.1, step 4: (N+5) max 16
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
+ rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, nullptr, 0 );
}
}
@@ -1184,7 +1184,7 @@ void PDFWriterImpl::enableStringEncryption( register sal_Int32 nObject )
rtl_digest_MD5( &m_aContext.Encryption.EncryptionKey[0], i+2, nMD5Sum, sizeof(nMD5Sum) );
// initialize the RC4 with the key
// key length: see algorithm 3.1, step 4: (N+5) max 16
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, NULL, 0 );
+ rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode, nMD5Sum, m_nRC4KeyLength, nullptr, 0 );
}
}
@@ -1431,7 +1431,7 @@ bool PDFWriterImpl::computeODictionaryValue( const sal_uInt8* i_pPaddedOwnerPass
//step 5 already done, data is in i_pPaddedUserPassword
//step 6
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- nMD5Sum, i_nKeyLength , NULL, 0 );
+ nMD5Sum, i_nKeyLength , nullptr, 0 );
// encrypt the user password using the key set above
rtl_cipher_encodeARCFOUR( aCipher, i_pPaddedUserPassword, ENCRYPTED_PWD_SIZE, // the data to be encrypted
&io_rOValue[0], sal_Int32(io_rOValue.size()) ); //encrypted data
@@ -1447,7 +1447,7 @@ bool PDFWriterImpl::computeODictionaryValue( const sal_uInt8* i_pPaddedOwnerPass
nLocalKey[y] = (sal_uInt8)( nMD5Sum[y] ^ i );
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- nLocalKey, SECUR_128BIT_KEY, NULL, 0 ); //destination data area, on init can be NULL
+ nLocalKey, SECUR_128BIT_KEY, nullptr, 0 ); //destination data area, on init can be NULL
rtl_cipher_encodeARCFOUR( aCipher, &io_rOValue[0], sal_Int32(io_rOValue.size()), // the data to be encrypted
&io_rOValue[0], sal_Int32(io_rOValue.size()) ); // encrypted data, can be the same as the input, encrypt "in place"
//step 8, store in class data member
@@ -1500,7 +1500,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
//step 2 and 3
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
&io_rProperties.EncryptionKey[0], 5 , // key and key length
- NULL, 0 ); //destination data area
+ nullptr, 0 ); //destination data area
// encrypt the user password using the key set above, save for later use
rtl_cipher_encodeARCFOUR( aCipher, s_nPadString, sizeof( s_nPadString ), // the data to be encrypted
&io_rProperties.UValue[0], sal_Int32(io_rProperties.UValue.size()) ); //encrypted data, stored in class data member
@@ -1522,7 +1522,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
rtl_digest_getMD5( aDigest, nMD5Sum, sizeof(nMD5Sum) );
//Step 4
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
- &io_rProperties.EncryptionKey[0], SECUR_128BIT_KEY, NULL, 0 ); //destination data area
+ &io_rProperties.EncryptionKey[0], SECUR_128BIT_KEY, nullptr, 0 ); //destination data area
rtl_cipher_encodeARCFOUR( aCipher, nMD5Sum, sizeof( nMD5Sum ), // the data to be encrypted
&io_rProperties.UValue[0], sizeof( nMD5Sum ) ); //encrypted data, stored in class data member
//step 5
@@ -1536,7 +1536,7 @@ bool PDFWriterImpl::computeUDictionaryValue( EncHashTransporter* i_pTransporter,
rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode,
nLocalKey, SECUR_128BIT_KEY, // key and key length
- NULL, 0 ); //destination data area, on init can be NULL
+ nullptr, 0 ); //destination data area, on init can be NULL
rtl_cipher_encodeARCFOUR( aCipher, &io_rProperties.UValue[0], SECUR_128BIT_KEY, // the data to be encrypted
&io_rProperties.UValue[0], SECUR_128BIT_KEY ); // encrypted data, can be the same as the input, encrypt "in place"
}
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index fd487c12a769..7996f46fe7c1 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -165,15 +165,15 @@ public:
PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
: mrPNGStream( rPNGStream ),
- mpBmp ( NULL ),
- mpAcc ( NULL ),
- mpMaskBmp ( NULL ),
- mpAlphaMask ( NULL ),
- mpMaskAcc ( NULL ),
- mpInflateInBuf ( NULL ),
- mpScanPrior ( NULL ),
- mpTransTab ( NULL ),
- mpScanCurrent ( NULL ),
+ mpBmp ( nullptr ),
+ mpAcc ( nullptr ),
+ mpMaskBmp ( nullptr ),
+ mpAlphaMask ( nullptr ),
+ mpMaskAcc ( nullptr ),
+ mpInflateInBuf ( nullptr ),
+ mpScanPrior ( nullptr ),
+ mpTransTab ( nullptr ),
+ mpScanCurrent ( nullptr ),
mpColorTable ( const_cast<sal_uInt8*>(mpDefaultColorTable) ),
mnChunkType ( 0 ),
mnChunkLen ( 0 ),
@@ -208,8 +208,8 @@ PNGReaderImpl::PNGReaderImpl( SvStream& rPNGStream )
mnAllocSizeScanline(0),
mnAllocSizeScanlineAlpha(0),
#endif
- mpScanline(0),
- mpScanlineAlpha(0)
+ mpScanline(nullptr),
+ mpScanlineAlpha(nullptr)
{
// prepare the PNG data stream
mnOrigStreamMode = mrPNGStream.GetEndian();
@@ -424,7 +424,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
// release write access of the bitmaps
if ( mpAcc )
- Bitmap::ReleaseAccess( mpAcc ), mpAcc = NULL;
+ Bitmap::ReleaseAccess( mpAcc ), mpAcc = nullptr;
if ( mpMaskAcc )
{
@@ -433,7 +433,7 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& rPreviewSizeHint )
else if ( mpMaskBmp )
Bitmap::ReleaseAccess( mpMaskAcc );
- mpMaskAcc = NULL;
+ mpMaskAcc = nullptr;
}
// return the resulting BitmapEx
@@ -729,7 +729,7 @@ bool PNGReaderImpl::ImplReadTransparent()
{
bool bNeedAlpha = false;
- if ( mpTransTab == NULL )
+ if ( mpTransTab == nullptr )
{
switch ( mnColorType )
{
@@ -793,7 +793,7 @@ bool PNGReaderImpl::ImplReadTransparent()
mpMaskBmp = new Bitmap( maTargetSize, 1 );
mpMaskAcc = mpMaskBmp->AcquireWriteAccess();
}
- mbTransparent = (mpMaskAcc != NULL);
+ mbTransparent = (mpMaskAcc != nullptr);
if( !mbTransparent )
return false;
mcOpaqueColor = BitmapColor( 0x00 );
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 88ddc059400a..f7c7ed8b6675 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -48,7 +48,7 @@ class PNGWriterImpl
public:
PNGWriterImpl(const BitmapEx& BmpEx,
- const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = NULL);
+ const css::uno::Sequence<css::beans::PropertyValue>* pFilterData = nullptr);
bool Write(SvStream& rOutStream);
@@ -102,11 +102,11 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
, mnInterlaced(0)
, mnMaxChunkSize(0)
, mbStatus(true)
- , mpAccess(NULL)
- , mpMaskAccess(NULL)
- , mpDeflateInBuf(NULL)
- , mpPreviousScan(NULL)
- , mpCurrentScan(NULL)
+ , mpAccess(nullptr)
+ , mpMaskAccess(nullptr)
+ , mpDeflateInBuf(nullptr)
+ , mpPreviousScan(nullptr)
+ , mpCurrentScan(nullptr)
, mnDeflateInSize(0)
, mnWidth(0)
, mnHeight(0)
@@ -168,7 +168,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
@@ -192,7 +192,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
aMask.ReleaseAccess(mpMaskAccess);
- mpMaskAccess = NULL;
+ mpMaskAccess = nullptr;
}
else
{
@@ -211,7 +211,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpMaskAccess);
- mpMaskAccess = NULL;
+ mpMaskAccess = nullptr;
}
else
{
@@ -219,7 +219,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
}
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
@@ -241,7 +241,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx,
ImplWriteIDAT();
}
Bitmap::ReleaseAccess(mpAccess);
- mpAccess = NULL;
+ mpAccess = nullptr;
}
else
{
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 6b02440f026e..ebe19e95b327 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -255,10 +255,10 @@ void Printer::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
// operation explicitly further below.
if( mpAlphaVDev )
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mpMetaFile = pOldMetaFile;
@@ -391,7 +391,7 @@ SalPrinterQueueInfo::SalPrinterQueueInfo()
{
mnStatus = PrintQueueFlags::NONE;
mnJobs = QUEUE_JOBS_DONTKNOW;
- mpSysData = NULL;
+ mpSysData = nullptr;
}
SalPrinterQueueInfo::~SalPrinterQueueInfo()
@@ -416,7 +416,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
{
m_aNameToIndex[ pData->maPrinterName ] = m_aQueueInfos.size();
m_aQueueInfos.push_back( ImplPrnQueueData() );
- m_aQueueInfos.back().mpQueueInfo = NULL;
+ m_aQueueInfos.back().mpQueueInfo = nullptr;
m_aQueueInfos.back().mpSalQueueInfo = pData;
m_aPrinterList.push_back( pData->maPrinterName );
}
@@ -424,7 +424,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
{
ImplPrnQueueData& rData = m_aQueueInfos[ it->second ];
delete rData.mpQueueInfo;
- rData.mpQueueInfo = NULL;
+ rData.mpQueueInfo = nullptr;
ImplGetSVData()->mpDefInst->DeletePrinterQueueInfo( rData.mpSalQueueInfo );
rData.mpSalQueueInfo = pData;
}
@@ -432,7 +432,7 @@ void ImplPrnQueueList::Add( SalPrinterQueueInfo* pData )
ImplPrnQueueData* ImplPrnQueueList::Get( const OUString& rPrinter )
{
- ImplPrnQueueData* pData = NULL;
+ ImplPrnQueueData* pData = nullptr;
std::unordered_map<OUString,sal_Int32,OUStringHash>::iterator it =
m_aNameToIndex.find( rPrinter );
if( it != m_aNameToIndex.end() )
@@ -459,7 +459,7 @@ void ImplDeletePrnQueueList()
if ( pPrnList )
{
delete pPrnList;
- pSVData->maGDIData.mpPrinterQueueList = NULL;
+ pSVData->maGDIData.mpPrinterQueueList = nullptr;
}
}
@@ -479,7 +479,7 @@ const QueueInfo* Printer::GetQueueInfo( const OUString& rPrinterName, bool bStat
ImplInitPrnQueueList();
if ( !pSVData->maGDIData.mpPrinterQueueList )
- return NULL;
+ return nullptr;
ImplPrnQueueData* pInfo = pSVData->maGDIData.mpPrinterQueueList->Get( rPrinterName );
if( pInfo )
@@ -498,7 +498,7 @@ const QueueInfo* Printer::GetQueueInfo( const OUString& rPrinterName, bool bStat
pInfo->mpQueueInfo->mnJobs = pInfo->mpSalQueueInfo->mnJobs;
return pInfo->mpQueueInfo;
}
- return NULL;
+ return nullptr;
}
OUString Printer::GetDefaultPrinterName()
@@ -529,16 +529,16 @@ void Printer::ImplInitData()
mbPrintFile = false;
mbInPrintPage = false;
mbNewJobSetup = false;
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpDisplayDev = NULL;
+ mpInfoPrinter = nullptr;
+ mpPrinter = nullptr;
+ mpDisplayDev = nullptr;
mbIsQueuePrinter = false;
mpPrinterOptions = new PrinterOptions;
// Add printer to the list
ImplSVData* pSVData = ImplGetSVData();
mpNext = pSVData->maGDIData.mpFirstPrinter;
- mpPrev = NULL;
+ mpPrev = nullptr;
if ( mpNext )
mpNext->mpPrev = this;
else
@@ -633,19 +633,19 @@ void Printer::ImplReleaseFonts()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
}
@@ -697,9 +697,9 @@ void Printer::ReleaseGraphics( bool bRelease )
}
}
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
@@ -717,7 +717,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
(pJobSetup->maDriver != pInfo->maDriver) )
{
rtl_freeMemory( pJobSetup->mpDriverData );
- pJobSetup->mpDriverData = NULL;
+ pJobSetup->mpDriverData = nullptr;
pJobSetup->mnDriverDataLen = 0;
}
}
@@ -731,20 +731,20 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
pJobSetup->maDriver = maDriver;
mpInfoPrinter = pSVData->mpDefInst->CreateInfoPrinter( pInfo, pJobSetup );
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpPrinter = nullptr;
+ mpJobGraphics = nullptr;
ImplUpdateJobSetupPaper( maJobSetup );
if ( !mpInfoPrinter )
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return;
}
// we need a graphics
if ( !AcquireGraphics() )
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return;
}
@@ -759,9 +759,9 @@ void Printer::ImplInitDisplay( const vcl::Window* pWindow )
{
ImplSVData* pSVData = ImplGetSVData();
- mpInfoPrinter = NULL;
- mpPrinter = NULL;
- mpJobGraphics = NULL;
+ mpInfoPrinter = nullptr;
+ mpPrinter = nullptr;
+ mpJobGraphics = nullptr;
if ( pWindow )
mpDisplayDev = VclPtr<VirtualDevice>::Create( *pWindow );
@@ -824,7 +824,7 @@ void Printer::DrawDeviceMask( const Bitmap& rMask, const Color& rMaskColor,
GDIMetaFile* pOldMetaFile = mpMetaFile;
const bool bOldMap = mbMap;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mbMap = false;
Push( PushFlags::FILLCOLOR | PushFlags::LINECOLOR );
SetLineColor( rMaskColor );
@@ -903,7 +903,7 @@ SalPrinterQueueInfo* Printer::ImplGetQueueInfo( const OUString& rPrinterName,
return pPrnList->m_aQueueInfos[0].mpSalQueueInfo;
}
- return NULL;
+ return nullptr;
}
void Printer::ImplUpdatePageData()
@@ -935,7 +935,7 @@ long Printer::GetGradientStepCount( long nMinRect )
Printer::Printer()
{
ImplInitData();
- SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( GetDefaultPrinterName(), NULL );
+ SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( GetDefaultPrinterName(), nullptr );
if ( pInfo )
{
ImplInit( pInfo );
@@ -943,7 +943,7 @@ Printer::Printer()
mbDefPrinter = true;
}
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::Printer( const JobSetup& rJobSetup ) :
@@ -959,7 +959,7 @@ Printer::Printer( const JobSetup& rJobSetup ) :
}
else
{
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
maJobSetup = JobSetup();
}
}
@@ -972,17 +972,17 @@ Printer::Printer( const QueueInfo& rQueueInfo )
if ( pInfo )
ImplInit( pInfo );
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::Printer( const OUString& rPrinterName )
{
ImplInitData();
- SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, NULL );
+ SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, nullptr );
if ( pInfo )
ImplInit( pInfo );
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
Printer::~Printer()
@@ -996,7 +996,7 @@ void Printer::dispose()
DBG_ASSERT( !IsJobActive(), "Printer::~Printer() - Job is active" );
delete mpPrinterOptions;
- mpPrinterOptions = NULL;
+ mpPrinterOptions = nullptr;
ReleaseGraphics();
if ( mpInfoPrinter )
@@ -1011,20 +1011,20 @@ void Printer::dispose()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
delete mpFontCache;
- mpFontCache = NULL;
+ mpFontCache = nullptr;
// font list deleted by OutputDevice dtor
}
@@ -1165,31 +1165,31 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// clean up font list
delete mpFontCache;
delete mpFontCollection;
- mpFontCache = NULL;
- mpFontCollection = NULL;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
mbInitFont = true;
mbNewFont = true;
- mpInfoPrinter = NULL;
+ mpInfoPrinter = nullptr;
}
// Construct new printer
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
return true;
}
@@ -1208,25 +1208,25 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
delete mpFontCache;
delete mpFontCollection;
- mpFontCache = NULL;
- mpFontCollection = NULL;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
mbInitFont = true;
mbNewFont = true;
- mpInfoPrinter = NULL;
+ mpInfoPrinter = nullptr;
}
// Construct new printer
@@ -1238,7 +1238,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
SetJobSetup( pPrinter->GetJobSetup() );
}
else
- ImplInitDisplay( NULL );
+ ImplInitDisplay( nullptr );
}
else
SetJobSetup( pPrinter->GetJobSetup() );
@@ -1698,7 +1698,7 @@ bool Printer::EndJob()
// can't handle destroying a printer object and printing
// at the same time
ImplGetSVData()->mpDefInst->DestroyPrinter( mpPrinter );
- mpPrinter = NULL;
+ mpPrinter = nullptr;
}
return bRet;
@@ -1742,7 +1742,7 @@ void Printer::ImplEndPage()
ReleaseGraphics();
mbDevOutput = false;
- mpJobGraphics = NULL;
+ mpJobGraphics = nullptr;
mbNewJobSetup = false;
}
}
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index 1bb93c90e353..84acd47b3036 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -1124,7 +1124,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf,
aTmpSize = pThis->GetPaperSizePixel();
}
const Rectangle aOutputRect( aPageOffset, aTmpSize );
- bool bTiling = dynamic_cast<Printer*>(this) != NULL;
+ bool bTiling = dynamic_cast<Printer*>(this) != nullptr;
// iterate over all aCCList members and generate bitmaps for the special ones
for( aCurr = aCCList.begin(); aCurr != aLast; ++aCurr )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 9a1fbf187115..b434ac4fd242 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -188,7 +188,7 @@ public:
mbPapersizeFromSetup( false ),
mbPrinterModified( false ),
meJobState( view::PrintableState_JOB_STARTED ),
- mpProgress( NULL ),
+ mpProgress( nullptr ),
mnDefaultPaperBin( -1 ),
mnFixedPaperBin( -1 )
{}
@@ -589,7 +589,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
}
}
- OUString* pPrintFile = NULL;
+ OUString* pPrintFile = nullptr;
if ( mbPrintFile )
pPrintFile = &maPrintFile;
mpPrinterOptions->ReadFromConfig( mbPrintFile );
@@ -622,7 +622,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
mnCurPage = 0;
mnCurPrintPage = 0;
mbPrinting = false;
- mpPrinter = NULL;
+ mpPrinter = nullptr;
mbJobActive = false;
GDIMetaFile aDummyFile;
@@ -737,7 +737,7 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
mnCurPage = 0;
mnCurPrintPage = 0;
mbPrinting = false;
- mpPrinter = NULL;
+ mpPrinter = nullptr;
return false;
}
@@ -1434,14 +1434,14 @@ PropertyValue* PrinterController::getValue( const OUString& i_rProperty )
{
std::unordered_map< OUString, size_t, OUStringHash >::const_iterator it =
mpImplData->maPropertyToIndex.find( i_rProperty );
- return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : nullptr;
}
const PropertyValue* PrinterController::getValue( const OUString& i_rProperty ) const
{
std::unordered_map< OUString, size_t, OUStringHash >::const_iterator it =
mpImplData->maPropertyToIndex.find( i_rProperty );
- return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : NULL;
+ return it != mpImplData->maPropertyToIndex.end() ? &mpImplData->maUIProperties[it->second] : nullptr;
}
void PrinterController::setValue( const OUString& i_rName, const Any& i_rValue )
@@ -1956,7 +1956,7 @@ Any PrinterOptionsHelper::setSubgroupControlOpt(const OUString& i_rID,
}
Sequence< OUString > aIds(1);
aIds[0] = i_rID;
- return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", NULL, i_rControlOptions);
+ return setUIControlOpt(aIds, i_rTitle, aHelpId, "Subgroup", nullptr, i_rControlOptions);
}
Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID,
diff --git a/vcl/source/gdi/regband.cxx b/vcl/source/gdi/regband.cxx
index ecf55c860fb4..a729fa94d574 100644
--- a/vcl/source/gdi/regband.cxx
+++ b/vcl/source/gdi/regband.cxx
@@ -46,10 +46,10 @@ ImplRegionBand::ImplRegionBand( long nTop, long nBottom )
mnYBottom = nBottom;
// initialize lists
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = nullptr;
+ mpPrevBand = nullptr;
+ mpFirstSep = nullptr;
+ mpFirstBandPoint = nullptr;
mbTouched = false;
}
@@ -63,14 +63,14 @@ ImplRegionBand::ImplRegionBand(
mbTouched = rRegionBand.mbTouched;
// initialisation
- mpNextBand = NULL;
- mpPrevBand = NULL;
- mpFirstSep = NULL;
- mpFirstBandPoint = NULL;
+ mpNextBand = nullptr;
+ mpPrevBand = nullptr;
+ mpFirstSep = nullptr;
+ mpFirstBandPoint = nullptr;
// copy all elements of the list with separations
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = rRegionBand.mpFirstSep;
while ( pSep )
{
@@ -79,7 +79,7 @@ ImplRegionBand::ImplRegionBand(
pNewSep->mnXLeft = pSep->mnXLeft;
pNewSep->mnXRight = pSep->mnXRight;
pNewSep->mbRemoved = pSep->mbRemoved;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
if ( pSep == rRegionBand.mpFirstSep )
mpFirstSep = pNewSep;
else
@@ -93,8 +93,8 @@ ImplRegionBand::ImplRegionBand(
{
// Copy points.
ImplRegionBandPoint* pPoint = rRegionBand.mpFirstBandPoint;
- ImplRegionBandPoint* pPrevPointCopy = NULL;
- while (pPoint != NULL)
+ ImplRegionBandPoint* pPrevPointCopy = nullptr;
+ while (pPoint != nullptr)
{
ImplRegionBandPoint* pPointCopy = new ImplRegionBandPoint();
pPointCopy->mnX = pPoint->mnX;
@@ -102,7 +102,7 @@ ImplRegionBand::ImplRegionBand(
pPointCopy->mbEndPoint = pPoint->mbEndPoint;
pPointCopy->meLineType = pPoint->meLineType;
- if (pPrevPointCopy != NULL)
+ if (pPrevPointCopy != nullptr)
pPrevPointCopy->mpNextBandPoint = pPointCopy;
else
mpFirstBandPoint = pPointCopy;
@@ -115,7 +115,7 @@ ImplRegionBand::ImplRegionBand(
ImplRegionBand::~ImplRegionBand()
{
- DBG_ASSERT( mpFirstBandPoint == NULL, "ImplRegionBand::~ImplRegionBand -> pointlist not empty" );
+ DBG_ASSERT( mpFirstBandPoint == nullptr, "ImplRegionBand::~ImplRegionBand -> pointlist not empty" );
// delete elements of the list
ImplRegionBandSep* pSep = mpFirstSep;
@@ -184,7 +184,7 @@ void ImplRegionBand::ProcessPoints()
delete pRegionBandPoint;
// list is now empty
- mpFirstBandPoint = NULL;
+ mpFirstBandPoint = nullptr;
}
// generate separations from lines and process union with existing
@@ -200,13 +200,13 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
mpFirstBandPoint->mnLineId = nLineId;
mpFirstBandPoint->mbEndPoint = bEndPoint;
mpFirstBandPoint->meLineType = eLineType;
- mpFirstBandPoint->mpNextBandPoint = NULL;
+ mpFirstBandPoint->mpNextBandPoint = nullptr;
return true;
}
// look if line already touched the band
ImplRegionBandPoint* pRegionBandPoint = mpFirstBandPoint;
- ImplRegionBandPoint* pLastTestedRegionBandPoint = NULL;
+ ImplRegionBandPoint* pLastTestedRegionBandPoint = nullptr;
while( pRegionBandPoint )
{
if ( pRegionBandPoint->mnLineId == nLineId )
@@ -257,7 +257,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
ImplRegionBandPoint* pNewRegionBandPoint;
pRegionBandPoint = mpFirstBandPoint;
- pLastTestedRegionBandPoint = NULL;
+ pLastTestedRegionBandPoint = nullptr;
while ( pRegionBandPoint )
{
// new point completely left? -> insert as first point
@@ -290,7 +290,7 @@ bool ImplRegionBand::InsertPoint( long nX, long nLineId,
pNewRegionBandPoint->mnLineId = nLineId;
pNewRegionBandPoint->mbEndPoint = bEndPoint;
pNewRegionBandPoint->meLineType = eLineType;
- pNewRegionBandPoint->mpNextBandPoint = NULL;
+ pNewRegionBandPoint->mpNextBandPoint = nullptr;
// connections to the new point
pLastTestedRegionBandPoint->mpNextBandPoint = pNewRegionBandPoint;
@@ -325,7 +325,7 @@ void ImplRegionBand::ScaleX( double fHorzScale )
bool ImplRegionBand::OptimizeBand()
{
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -375,13 +375,13 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
mpFirstSep->mbRemoved = false;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep->mpNextSep = nullptr;
return;
}
// process real union
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -425,7 +425,7 @@ void ImplRegionBand::Union( long nXLeft, long nXRight )
pNewSep->mbRemoved = false;
pSep->mpNextSep = pNewSep;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
break;
}
@@ -494,7 +494,7 @@ void ImplRegionBand::Exclude( long nXLeft, long nXRight )
// process real exclusion
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
{
@@ -614,13 +614,13 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep->mnXLeft = nXLeft;
mpFirstSep->mnXRight = nXRight;
mpFirstSep->mbRemoved = false;
- mpFirstSep->mpNextSep = NULL;
+ mpFirstSep->mpNextSep = nullptr;
return;
}
// process real xor
ImplRegionBandSep* pNewSep;
- ImplRegionBandSep* pPrevSep = 0;
+ ImplRegionBandSep* pPrevSep = nullptr;
ImplRegionBandSep* pSep = mpFirstSep;
while ( pSep )
@@ -652,14 +652,14 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
mpFirstSep = pNewSep;
else
pPrevSep->mpNextSep = pNewSep;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft == nOldLeft && nXRight == nOldRight )
{
// #3
pSep->mbRemoved = true;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft != nOldLeft && nXRight == nOldRight )
@@ -678,7 +678,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pSep->mnXLeft = nXLeft;
pSep->mnXRight = nXRight-1;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
else if( nXLeft == nOldLeft && nXRight != nOldRight )
@@ -697,7 +697,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
{
pSep->mnXLeft = nXRight+1; // 9
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
@@ -776,7 +776,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
// connections from the new separation
pSep->mpNextSep = pNewSep;
- pPrevSep = NULL; // do not run accidentally into the "right" case when breaking the loop
+ pPrevSep = nullptr; // do not run accidentally into the "right" case when breaking the loop
break;
}
}
@@ -792,7 +792,7 @@ void ImplRegionBand::XOr( long nXLeft, long nXRight )
pNewSep = new ImplRegionBandSep;
pNewSep->mnXLeft = nXLeft;
pNewSep->mnXRight = nXRight;
- pNewSep->mpNextSep = NULL;
+ pNewSep->mpNextSep = nullptr;
pNewSep->mbRemoved = false;
// connections from the new separation
@@ -825,7 +825,7 @@ long ImplRegionBand::GetXLeftBoundary() const
long ImplRegionBand::GetXRightBoundary() const
{
- DBG_ASSERT( mpFirstSep != NULL, "ImplRegionBand::XRightBoundary -> no separation in band!" );
+ DBG_ASSERT( mpFirstSep != nullptr, "ImplRegionBand::XRightBoundary -> no separation in band!" );
// search last separation
ImplRegionBandSep* pSep = mpFirstSep;
@@ -882,7 +882,7 @@ ImplRegionBand* ImplRegionBand::SplitBand (const sal_Int32 nY)
pLowerBand->mpNextBand = mpNextBand;
mpNextBand = pLowerBand;
pLowerBand->mpPrevBand = this;
- if (pLowerBand->mpNextBand != NULL)
+ if (pLowerBand->mpNextBand != nullptr)
pLowerBand->mpNextBand->mpPrevBand = pLowerBand;
return pLowerBand;
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx
index 243c53033c24..c77e9cd7b374 100644
--- a/vcl/source/gdi/region.cxx
+++ b/vcl/source/gdi/region.cxx
@@ -132,12 +132,12 @@ namespace
// Find top-most band that may contain nTop.
ImplRegionBand* pBand = pRegionBand->ImplGetFirstRegionBand();
- while (pBand!=NULL && pBand->mnYBottom < nTop)
+ while (pBand!=nullptr && pBand->mnYBottom < nTop)
pBand = pBand->mpNextBand;
ImplRegionBand* pTopBand = pBand;
// If necessary split the band at nTop so that nTop is contained
// in the lower band.
- if (pBand!=NULL
+ if (pBand!=nullptr
// Prevent the current band from becoming 0 pixel high
&& pBand->mnYTop<nTop
// this allows the lowest pixel of the band to be split off
@@ -150,11 +150,11 @@ namespace
}
// Advance to band that may contain nBottom.
- while (pBand!=NULL && pBand->mnYBottom < nBottom)
+ while (pBand!=nullptr && pBand->mnYBottom < nBottom)
pBand = pBand->mpNextBand;
// The lowest band may have to be split at nBottom so that
// nBottom itself remains in the upper band.
- if (pBand!=NULL
+ if (pBand!=nullptr
// allow the current band becoming 1 pixel high
&& pBand->mnYTop<=nBottom
// prevent splitting off a band that is 0 pixel high
@@ -171,7 +171,7 @@ namespace
// coordinates.
// Add the x-value as point to all bands in the nTop->nBottom range.
- for (pBand=pTopBand; pBand!=NULL&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
+ for (pBand=pTopBand; pBand!=nullptr&&pBand->mnYTop<=nBottom; pBand=pBand->mpNextBand)
pBand->InsertPoint(aStart.X(), nLineId++, true, eLineType);
}
}
@@ -233,7 +233,7 @@ bool vcl::Region::IsEmpty() const
RegionBand* ImplCreateRegionBandFromPolyPolygon(const tools::PolyPolygon& rPolyPolygon)
{
- RegionBand* pRetval = 0;
+ RegionBand* pRetval = nullptr;
if(rPolyPolygon.Count())
{
@@ -269,7 +269,7 @@ RegionBand* ImplCreateRegionBandFromPolyPolygon(const tools::PolyPolygon& rPolyP
if(!pRetval->OptimizeBandList())
{
delete pRetval;
- pRetval = 0;
+ pRetval = nullptr;
}
}
}
@@ -322,7 +322,7 @@ Region::Region(const Rectangle& rRect)
mpRegionBand(),
mbIsNull(false)
{
- mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
+ mpRegionBand.reset(rRect.IsEmpty() ? nullptr : new RegionBand(rRect));
}
Region::Region(const tools::Polygon& rPolygon)
@@ -430,7 +430,7 @@ void vcl::Region::Move( long nHorzMove, long nVertMove )
basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon());
aPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(nHorzMove, nVertMove));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -440,7 +440,7 @@ void vcl::Region::Move( long nHorzMove, long nVertMove )
aPoly.Move(nHorzMove, nVertMove);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
else if(getRegionBand())
@@ -477,7 +477,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
basegfx::B2DPolyPolygon aPoly(*getB2DPolyPolygon());
aPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fScaleX, fScaleY));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -487,7 +487,7 @@ void vcl::Region::Scale( double fScaleX, double fScaleY )
aPoly.Scale(fScaleX, fScaleY);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
else if(getRegionBand())
@@ -580,7 +580,7 @@ bool vcl::Region::Union( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -625,7 +625,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
true,
false));
- mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : 0);
+ mpB2DPolyPolygon.reset(aPoly.count() ? new basegfx::B2DPolyPolygon(aPoly) : nullptr);
mpPolyPolygon.reset();
mpRegionBand.reset();
}
@@ -639,7 +639,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
aPoly.Clip(rRect);
mpB2DPolyPolygon.reset();
- mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : 0);
+ mpPolyPolygon.reset(aPoly.Count() ? new tools::PolyPolygon(aPoly) : nullptr);
mpRegionBand.reset();
}
@@ -673,7 +673,7 @@ bool vcl::Region::Intersect( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -754,7 +754,7 @@ bool vcl::Region::Exclude( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -839,7 +839,7 @@ bool vcl::Region::XOr( const Rectangle& rRect )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -927,7 +927,7 @@ bool vcl::Region::Union( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1047,7 +1047,7 @@ bool vcl::Region::Intersect( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1134,7 +1134,7 @@ bool vcl::Region::Exclude( const vcl::Region& rRegion )
if(!bSuccess)
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1223,7 +1223,7 @@ bool vcl::Region::XOr( const vcl::Region& rRegion )
if(!pNew->OptimizeBandList())
{
delete pNew;
- pNew = 0;
+ pNew = nullptr;
}
mpRegionBand.reset(pNew);
@@ -1458,7 +1458,7 @@ Region& vcl::Region::operator=( const Rectangle& rRect )
{
mpB2DPolyPolygon.reset();
mpPolyPolygon.reset();
- mpRegionBand.reset(rRect.IsEmpty() ? 0 : new RegionBand(rRect));
+ mpRegionBand.reset(rRect.IsEmpty() ? nullptr : new RegionBand(rRect));
mbIsNull = false;
return *this;
@@ -1683,7 +1683,7 @@ void vcl::Region::GetRegionRectangles(RectangleVector& rTarget) const
}
}
-static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = NULL )
+static inline bool ImplPolygonRectTest( const tools::Polygon& rPoly, Rectangle* pRectOut = nullptr )
{
bool bIsRect = false;
const Point* pPoints = rPoly.GetConstPointAry();
diff --git a/vcl/source/gdi/regionband.cxx b/vcl/source/gdi/regionband.cxx
index 32cf3269d56b..55f49040523a 100644
--- a/vcl/source/gdi/regionband.cxx
+++ b/vcl/source/gdi/regionband.cxx
@@ -23,21 +23,21 @@
#include <osl/diagnose.h>
RegionBand::RegionBand()
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
}
RegionBand::RegionBand(const RegionBand& rRef)
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
*this = rRef;
}
RegionBand& RegionBand::operator=(const RegionBand& rRef)
{
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = rRef.mpFirstBand;
while(pBand)
@@ -62,8 +62,8 @@ RegionBand& RegionBand::operator=(const RegionBand& rRef)
}
RegionBand::RegionBand(const Rectangle& rRect)
-: mpFirstBand(0),
- mpLastCheckedBand(0)
+: mpFirstBand(nullptr),
+ mpLastCheckedBand(nullptr)
{
const long nTop(std::min(rRect.Top(), rRect.Bottom()));
const long nBottom(std::max(rRect.Top(), rRect.Bottom()));
@@ -89,8 +89,8 @@ void RegionBand::implReset()
pBand = pTempBand;
}
- mpLastCheckedBand = 0;
- mpFirstBand = 0;
+ mpLastCheckedBand = nullptr;
+ mpFirstBand = nullptr;
}
RegionBand::~RegionBand()
@@ -196,7 +196,7 @@ void RegionBand::load(SvStream& rIStrm)
implReset();
// get all bands
- ImplRegionBand* pCurrBand = 0;
+ ImplRegionBand* pCurrBand = nullptr;
// get header from first element
sal_uInt16 nTmp16(STREAMENTRY_END);
@@ -317,7 +317,7 @@ bool RegionBand::isSingleRectangle() const
void RegionBand::InsertBand(ImplRegionBand* pPreviousBand, ImplRegionBand* pBandToInsert)
{
- OSL_ASSERT(pBandToInsert!=NULL);
+ OSL_ASSERT(pBandToInsert!=nullptr);
if(!pPreviousBand)
{
@@ -361,11 +361,11 @@ void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
{
// Iterate over already existing bands and add missing bands atop the
// first and between two bands.
- ImplRegionBand* pPreviousBand = NULL;
+ ImplRegionBand* pPreviousBand = nullptr;
ImplRegionBand* pBand = ImplGetFirstRegionBand();
long nCurrentTop (nTop);
- while (pBand != NULL && nCurrentTop<nBottom)
+ while (pBand != nullptr && nCurrentTop<nBottom)
{
if (nCurrentTop < pBand->mnYTop)
{
@@ -388,7 +388,7 @@ void RegionBand::ImplAddMissingBands(const long nTop, const long nBottom)
// 1. The region does not yet contain any bands.
// 2. The intervall nTop->nBottom extends past the bottom most band.
if (nCurrentTop <= nBottom
- && (pBand==NULL || nBottom>pBand->mnYBottom))
+ && (pBand==nullptr || nBottom>pBand->mnYBottom))
{
// When there is no previous band then the new one will be the
// first. Otherwise the new band is inserted behind the last band.
@@ -519,7 +519,7 @@ bool RegionBand::InsertLine(const Point& rStartPt, const Point& rEndPt, long nLi
bool RegionBand::InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint, LineType eLineType)
{
- DBG_ASSERT( mpFirstBand != NULL, "RegionBand::InsertPoint - no bands available!" );
+ DBG_ASSERT( mpFirstBand != nullptr, "RegionBand::InsertPoint - no bands available!" );
if ( rPoint.Y() == mpLastCheckedBand->mnYTop )
{
@@ -572,7 +572,7 @@ bool RegionBand::InsertPoint(const Point &rPoint, long nLineID, bool bEndPoint,
bool RegionBand::OptimizeBandList()
{
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = mpFirstBand;
while ( pBand )
@@ -634,7 +634,7 @@ bool RegionBand::OptimizeBandList()
pBand = mpFirstBand;
while ( pBand )
{
- DBG_ASSERT( pBand->mpFirstSep != NULL, "Exiting RegionBand::OptimizeBandList(): empty band in region!" );
+ DBG_ASSERT( pBand->mpFirstSep != nullptr, "Exiting RegionBand::OptimizeBandList(): empty band in region!" );
if ( pBand->mnYBottom < pBand->mnYTop )
OSL_ENSURE(false, "RegionBand::OptimizeBandList(): YBottomBoundary < YTopBoundary" );
@@ -649,7 +649,7 @@ bool RegionBand::OptimizeBandList()
}
#endif
- return (0 != mpFirstBand);
+ return (nullptr != mpFirstBand);
}
void RegionBand::Move(long nHorzMove, long nVertMove)
@@ -902,7 +902,7 @@ void RegionBand::Union(long nLeft, long nTop, long nRight, long nBottom)
void RegionBand::Intersect(long nLeft, long nTop, long nRight, long nBottom)
{
// process intersections
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
ImplRegionBand* pBand = mpFirstBand;
while(pBand)
@@ -1072,7 +1072,7 @@ void RegionBand::Intersect(const RegionBand& rSource)
}
// right boundary?
- if ( pSep->mpNextSep == NULL )
+ if ( pSep->mpNextSep == nullptr )
{
// process intersection and do not remove untouched bands
Exclude( pSep->mnXRight+1, pBand->mnYTop, LONG_MAX-1, pBand->mnYBottom );
@@ -1090,7 +1090,7 @@ void RegionBand::Intersect(const RegionBand& rSource)
}
// remove all untouched bands if bands already left
- ImplRegionBand* pPrevBand = 0;
+ ImplRegionBand* pPrevBand = nullptr;
pBand = mpFirstBand;
while ( pBand )
@@ -1332,7 +1332,7 @@ const char* ImplDbgTestRegionBand(const void* pObj)
}
}
- return 0;
+ return nullptr;
}
#endif
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 945f7ae9f687..6c7490798905 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -82,7 +82,7 @@ rtl::Reference<OpenGLContext> SalGraphics::GetOpenGLContext() const
if (pImpl)
return pImpl->GetOpenGLContext();
- return NULL;
+ return nullptr;
}
bool SalGraphics::drawTransformedBitmap(
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index e351deb77eee..505b55862060 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -464,7 +464,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr,
mnMinCharPos( nMinCharPos ),
mnEndCharPos( nEndCharPos ),
m_pTextLayoutCache(pLayoutCache),
- mpDXArray( NULL ),
+ mpDXArray( nullptr ),
mnLayoutWidth( 0 ),
mnOrientation( 0 )
{
@@ -493,7 +493,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr,
UBiDi* pParaBidi = ubidi_openSized(nLength, 0, &rcI18n);
if( !pParaBidi )
return;
- ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, NULL, &rcI18n); // UChar != sal_Unicode in MinGW
+ ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, nullptr, &rcI18n); // UChar != sal_Unicode in MinGW
UBiDi* pLineBidi = pParaBidi;
int nSubLength = mnEndCharPos - mnMinCharPos;
@@ -2069,7 +2069,7 @@ bool MultiSalLayout::GetOutline( SalGraphics& rGraphics,
std::shared_ptr<vcl::TextLayoutCache> SalLayout::CreateTextLayoutCache(
OUString const&) const
{
- return 0; // by default, nothing to cache
+ return nullptr; // by default, nothing to cache
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 43e450398f5f..a28c4b0fd51b 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -185,7 +185,7 @@ static void ImplTCToTC( const BitmapBuffer& rSrcBuffer, BitmapBuffer& rDstBuffer
if( BMP_SCANLINE_FORMAT( rSrcBuffer.mnFormat ) == BMP_FORMAT_24BIT_TC_BGR )
{
BitmapColor aCol;
- sal_uInt8* pPixel = NULL;
+ sal_uInt8* pPixel = nullptr;
for (long nActY = 0; nActY < rDstBuffer.mnHeight; ++nActY)
{
@@ -338,9 +338,9 @@ BitmapBuffer* StretchAndConvert(
catch( const std::bad_alloc& )
{
// memory exception, clean up
- pDstBuffer->mpBits = NULL;
+ pDstBuffer->mpBits = nullptr;
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
// do we need a destination palette or color mask?
@@ -354,7 +354,7 @@ BitmapBuffer* StretchAndConvert(
if (!pDstPal)
{
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
pDstBuffer->maPalette = *pDstPal;
}
@@ -368,7 +368,7 @@ BitmapBuffer* StretchAndConvert(
if (!pDstMask)
{
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
pDstBuffer->maColorMask = *pDstMask;
}
@@ -378,10 +378,10 @@ BitmapBuffer* StretchAndConvert(
if( bFastConvert )
return pDstBuffer;
- Scanline* pSrcScan = NULL;
- Scanline* pDstScan = NULL;
- long* pMapX = NULL;
- long* pMapY = NULL;
+ Scanline* pSrcScan = nullptr;
+ Scanline* pDstScan = nullptr;
+ long* pMapX = nullptr;
+ long* pMapY = nullptr;
try
{
@@ -400,7 +400,7 @@ BitmapBuffer* StretchAndConvert(
delete[] pMapX;
delete[] pMapY;
delete pDstBuffer;
- return NULL;
+ return nullptr;
}
// horizontal mapping table
diff --git a/vcl/source/gdi/textlayout.cxx b/vcl/source/gdi/textlayout.cxx
index 0f03e6723b45..2138c0d11599 100644
--- a/vcl/source/gdi/textlayout.cxx
+++ b/vcl/source/gdi/textlayout.cxx
@@ -205,7 +205,7 @@ namespace vcl
long ReferenceDeviceTextLayout::GetTextWidth( const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength ) const
{
- return GetTextArray( _rText, NULL, _nStartIndex, _nLength );
+ return GetTextArray( _rText, nullptr, _nStartIndex, _nLength );
}
void ReferenceDeviceTextLayout::DrawText( const Point& _rStartPoint, const OUString& _rText, sal_Int32 _nStartIndex, sal_Int32 _nLength, MetricVector* _pVector, OUString* _pDisplayText )
@@ -286,7 +286,7 @@ namespace vcl
// the disadvantage of less accuracy, compared with the approach to calculate the rect from the
// single "DrawText( Point, ... )" calls, since more intermediate arithmetic will translate
// from ref- to target-units.
- aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, NULL, this );
+ aTextRect = m_rTargetDevice.GetTextRect( aRect, _rText, _nStyle, nullptr, this );
}
// similar to above, the text rect now contains TWIPs (or whatever unit the ref device has), but the caller
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 5cdb7066bddd..bc28605cba0e 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -119,9 +119,9 @@ void VirtualDevice::ReleaseGraphics( bool bRelease )
else
pSVData->maGDIData.mpLastVirGraphics = mpPrevGraphics;
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
@@ -151,7 +151,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
if ( pGraphics )
mpVirDev = pSVData->mpDefInst->CreateVirtualDevice( pGraphics, nDX, nDY, nBitCount, pData );
else
- mpVirDev = NULL;
+ mpVirDev = nullptr;
if ( !mpVirDev )
{
// do not abort but throw an exception, may be the current thread terminates anyway (plugin-scenario)
@@ -198,7 +198,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
// register VirDev in the list
mpNext = pSVData->maGDIData.mpFirstVirDev;
- mpPrev = NULL;
+ mpPrev = nullptr;
if ( mpNext )
mpNext->mpPrev = this;
else
@@ -207,7 +207,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
}
VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
-: mpVirDev( NULL ),
+: mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8, "vcl.gdi",
@@ -218,7 +218,7 @@ VirtualDevice::VirtualDevice( sal_uInt16 nBitCount )
}
VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount )
- : mpVirDev( NULL ),
+ : mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8 && nBitCount != rCompDev.GetBitCount(), "vcl.gdi",
@@ -229,7 +229,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount
}
VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount, sal_uInt16 nAlphaBitCount )
- : mpVirDev( NULL ),
+ : mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_WARN_IF( nBitCount > 1 && nBitCount != 8, "vcl.gdi",
@@ -245,7 +245,7 @@ VirtualDevice::VirtualDevice( const OutputDevice& rCompDev, sal_uInt16 nBitCount
VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
sal_uInt16 nBitCount)
-: mpVirDev( NULL ),
+: mpVirDev( nullptr ),
meRefDevMode( REFDEV_NONE )
{
SAL_INFO( "vcl.gdi", "VirtualDevice::VirtualDevice( " << nBitCount << " )" );
@@ -516,17 +516,17 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// preserve global font lists
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 7fa5f23cccec..4065877b56da 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -32,10 +32,10 @@ ImplWallpaper::ImplWallpaper() :
maColor( COL_TRANSPARENT )
{
mnRefCount = 1;
- mpBitmap = NULL;
- mpCache = NULL;
- mpGradient = NULL;
- mpRect = NULL;
+ mpBitmap = nullptr;
+ mpCache = nullptr;
+ mpGradient = nullptr;
+ mpRect = nullptr;
meStyle = WallpaperStyle::NONE;
}
@@ -48,19 +48,19 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) :
if ( rImplWallpaper.mpBitmap )
mpBitmap = new BitmapEx( *rImplWallpaper.mpBitmap );
else
- mpBitmap = NULL;
+ mpBitmap = nullptr;
if( rImplWallpaper.mpCache )
mpCache = new BitmapEx( *rImplWallpaper.mpCache );
else
- mpCache = NULL;
+ mpCache = nullptr;
if ( rImplWallpaper.mpGradient )
mpGradient = new Gradient( *rImplWallpaper.mpGradient );
else
- mpGradient = NULL;
+ mpGradient = nullptr;
if ( rImplWallpaper.mpRect )
mpRect = new Rectangle( *rImplWallpaper.mpRect );
else
- mpRect = NULL;
+ mpRect = nullptr;
}
ImplWallpaper::~ImplWallpaper()
@@ -82,7 +82,7 @@ void ImplWallpaper::ImplSetCachedBitmap( BitmapEx& rBmp )
void ImplWallpaper::ImplReleaseCachedBitmap()
{
delete mpCache;
- mpCache = NULL;
+ mpCache = nullptr;
}
SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
@@ -91,13 +91,13 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
sal_uInt16 nTmp16;
delete rImplWallpaper.mpRect;
- rImplWallpaper.mpRect = NULL;
+ rImplWallpaper.mpRect = nullptr;
delete rImplWallpaper.mpGradient;
- rImplWallpaper.mpGradient = NULL;
+ rImplWallpaper.mpGradient = nullptr;
delete rImplWallpaper.mpBitmap;
- rImplWallpaper.mpBitmap = NULL;
+ rImplWallpaper.mpBitmap = nullptr;
// version 1
ReadColor( rIStm, rImplWallpaper.maColor );
@@ -141,9 +141,9 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rOStm, StreamMode::WRITE, 3 );
- bool bRect = ( rImplWallpaper.mpRect != NULL );
- bool bGrad = ( rImplWallpaper.mpGradient != NULL );
- bool bBmp = ( rImplWallpaper.mpBitmap != NULL );
+ bool bRect = ( rImplWallpaper.mpRect != nullptr );
+ bool bGrad = ( rImplWallpaper.mpGradient != nullptr );
+ bool bBmp = ( rImplWallpaper.mpBitmap != nullptr );
bool bDummy = false;
// version 1
@@ -283,7 +283,7 @@ void Wallpaper::SetBitmap( const BitmapEx& rBitmap )
{
ImplMakeUnique();
delete mpImplWallpaper->mpBitmap;
- mpImplWallpaper->mpBitmap = NULL;
+ mpImplWallpaper->mpBitmap = nullptr;
}
}
else
@@ -314,7 +314,7 @@ BitmapEx Wallpaper::GetBitmap() const
bool Wallpaper::IsBitmap() const
{
- return (mpImplWallpaper->mpBitmap != 0);
+ return (mpImplWallpaper->mpBitmap != nullptr);
}
void Wallpaper::SetGradient( const Gradient& rGradient )
@@ -348,7 +348,7 @@ Gradient Wallpaper::GetGradient() const
bool Wallpaper::IsGradient() const
{
- return (mpImplWallpaper->mpGradient != 0);
+ return (mpImplWallpaper->mpGradient != nullptr);
}
Gradient Wallpaper::ImplGetApplicationGradient() const
@@ -375,7 +375,7 @@ void Wallpaper::SetRect( const Rectangle& rRect )
if ( mpImplWallpaper->mpRect )
{
delete mpImplWallpaper->mpRect;
- mpImplWallpaper->mpRect = NULL;
+ mpImplWallpaper->mpRect = nullptr;
}
}
else
@@ -402,7 +402,7 @@ Rectangle Wallpaper::GetRect() const
bool Wallpaper::IsRect() const
{
- return (mpImplWallpaper->mpRect != 0);
+ return (mpImplWallpaper->mpRect != nullptr);
}
bool Wallpaper::IsFixed() const
diff --git a/vcl/source/glyphs/graphite_features.cxx b/vcl/source/glyphs/graphite_features.cxx
index 83a240508e46..f190b523cefc 100644
--- a/vcl/source/glyphs/graphite_features.cxx
+++ b/vcl/source/glyphs/graphite_features.cxx
@@ -38,14 +38,14 @@ const char GrFeatureParser::FEAT_SEPARATOR = '&';
const char GrFeatureParser::FEAT_ID_VALUE_SEPARATOR = '=';
GrFeatureParser::GrFeatureParser(const gr_face * pFace, const OString& lang)
- : mnNumSettings(0), mbErrors(false), mpSettings(NULL)
+ : mnNumSettings(0), mbErrors(false), mpSettings(nullptr)
{
maLang.label[0] = maLang.label[1] = maLang.label[2] = maLang.label[3] = '\0';
setLang(pFace, lang);
}
GrFeatureParser::GrFeatureParser(const gr_face * pFace, const OString& features, const OString& lang)
- : mnNumSettings(0), mbErrors(false), mpSettings(NULL)
+ : mnNumSettings(0), mbErrors(false), mpSettings(nullptr)
{
sal_Int32 nEquals = 0;
sal_Int32 nFeatEnd = 0;
@@ -196,7 +196,7 @@ GrFeatureParser::~GrFeatureParser()
if (mpSettings)
{
gr_featureval_destroy(mpSettings);
- mpSettings = NULL;
+ mpSettings = nullptr;
}
}
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index eaff9713d316..d10538abcd9a 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -148,7 +148,7 @@ GraphiteLayout::fillFrom(gr_segment * pSegment, ImplLayoutArgs &rArgs, float fSc
if (!nGlyphs || lastCharPos - mnSegCharOffset == 0) return;
const gr_slot* baseSlot = bRtl ? gr_seg_last_slot(pSegment) : gr_seg_first_slot(pSegment);
// find first base
- while (baseSlot && gr_slot_attached_to(baseSlot) != NULL && !gr_slot_can_insert_before(baseSlot))
+ while (baseSlot && gr_slot_attached_to(baseSlot) != nullptr && !gr_slot_can_insert_before(baseSlot))
baseSlot = bRtl ? gr_slot_prev_in_segment(baseSlot) : gr_slot_next_in_segment(baseSlot);
assert(baseSlot);
int nextChar = gr_cinfo_base(gr_seg_cinfo(pSegment, gr_slot_before(baseSlot))) + mnSegCharOffset;
@@ -354,7 +354,7 @@ GraphiteLayout::append(gr_segment *pSeg, ImplLayoutArgs &rArgs,
// Recursively append all the attached glyphs.
float cOrigin = nextGlyphOrigin;
- for (const gr_slot * agi = gr_slot_first_attachment(gi); agi != NULL; agi = gr_slot_next_sibling_attachment(agi))
+ for (const gr_slot * agi = gr_slot_first_attachment(gi); agi != nullptr; agi = gr_slot_next_sibling_attachment(agi))
if (!gr_slot_can_insert_before(agi))
cOrigin = append(pSeg, rArgs, agi, cOrigin, nextGlyphOrigin, scaling, rDXOffset, false, baseChar, baseGlyph, bRtl);
@@ -379,8 +379,8 @@ GraphiteLayout::~GraphiteLayout() throw()
{
clear();
// the features and font are owned by the platform layers
- mpFeatures = NULL;
- mpFont = NULL;
+ mpFeatures = nullptr;
+ mpFont = nullptr;
}
void GraphiteLayout::clear()
@@ -436,11 +436,11 @@ bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
nBidiEndRunPos = minimum<int>(nLength, nBidiEndRunPos + EXTRA_CONTEXT_LENGTH);
const sal_Unicode *pStr = rArgs.mrStr.getStr();
size_t numchars = gr_count_unicode_characters(gr_utf16, pStr + nBidiMinRunPos,
- pStr + nBidiEndRunPos, NULL);
- gr_segment * pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures ? mpFeatures->values() : NULL,
+ pStr + nBidiEndRunPos, nullptr);
+ gr_segment * pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures ? mpFeatures->values() : nullptr,
gr_utf16, pStr + nBidiMinRunPos, numchars, 2 | int(bRightToLeft));
- if (pSegment != NULL)
+ if (pSegment != nullptr)
{
success = true;
mnSegCharOffset = nBidiMinRunPos;
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index 3efff8ca265d..bd09b4c41346 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -99,7 +99,7 @@ VclCanvasBitmap::VclCanvasBitmap( const BitmapEx& rBitmap ) :
m_aBitmap( rBitmap.GetBitmap() ),
m_aAlpha(),
m_pBmpAcc( m_aBitmap.AcquireReadAccess() ),
- m_pAlphaAcc( NULL ),
+ m_pAlphaAcc( nullptr ),
m_aComponentTags(),
m_aComponentBitCounts(),
m_aLayout(),
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index f632b16900b1..55a25df62cda 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -290,7 +290,7 @@ namespace vcl
::Bitmap aBitmap( aPixelSize,
sal::static_int_cast<sal_uInt16>(nDepth),
- aLayout.Palette.is() ? &aPalette : NULL );
+ aLayout.Palette.is() ? &aPalette : nullptr );
::Bitmap aAlpha;
if( nAlphaDepth )
aAlpha = ::Bitmap( aPixelSize,
@@ -300,10 +300,10 @@ namespace vcl
{ // limit scoped access
Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );
- Bitmap::ScopedWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : NULL,
+ Bitmap::ScopedWriteAccess pAlphaWriteAccess( nAlphaDepth ? aAlpha.AcquireWriteAccess() : nullptr,
aAlpha );
- ENSURE_OR_THROW(pWriteAccess.get() != NULL,
+ ENSURE_OR_THROW(pWriteAccess.get() != nullptr,
"Cannot get write access to bitmap");
const sal_Int32 nWidth(aPixelSize.Width());
diff --git a/vcl/source/helper/evntpost.cxx b/vcl/source/helper/evntpost.cxx
index abc9bbb8f01b..cccb8443057a 100644
--- a/vcl/source/helper/evntpost.cxx
+++ b/vcl/source/helper/evntpost.cxx
@@ -29,7 +29,7 @@ namespace vcl
EventPoster::EventPoster( const Link<LinkParamNone*,void>& rLink )
: m_aLink(rLink)
{
- m_nId = 0;
+ m_nId = nullptr;
}
EventPoster::~EventPoster()
@@ -48,7 +48,7 @@ void EventPoster::Post()
IMPL_LINK_TYPED( EventPoster, DoEvent_Impl, void*, /*p*/, void )
{
DBG_TESTSOLARMUTEX();
- m_nId = 0;
+ m_nId = nullptr;
m_aLink.Call( nullptr );
}
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 3b79b5f87565..6ca54bbeab99 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -33,7 +33,7 @@ LazyDeletorBase::~LazyDeletorBase()
}
// instantiate instance pointer for LazyDeletor<Window>
-LazyDeletor* LazyDeletor::s_pOneInstance = NULL;
+LazyDeletor* LazyDeletor::s_pOneInstance = nullptr;
// a list for all LazyeDeletor<T> singletons
static std::vector< LazyDeletorBase* > lcl_aDeletors;
@@ -62,7 +62,7 @@ bool LazyDeletor::is_less( vcl::Window* left, vcl::Window* right )
DeleteOnDeinitBase::~DeleteOnDeinitBase()
{
ImplSVData* pSVData = ImplGetSVData();
- if( pSVData && pSVData->mpDeinitDeleteList != NULL )
+ if( pSVData && pSVData->mpDeinitDeleteList != nullptr )
pSVData->mpDeinitDeleteList->remove( this );
}
@@ -74,7 +74,7 @@ void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
if( pSVData->mbDeInit )
return;
- if( pSVData->mpDeinitDeleteList == NULL )
+ if( pSVData->mpDeinitDeleteList == nullptr )
pSVData->mpDeinitDeleteList = new std::list< DeleteOnDeinitBase* >();
pSVData->mpDeinitDeleteList->push_back( i_pContainer );
}
@@ -90,7 +90,7 @@ void DeleteOnDeinitBase::ImplDeleteOnDeInit()
(*it)->doCleanup();
}
delete pSVData->mpDeinitDeleteList;
- pSVData->mpDeinitDeleteList = NULL;
+ pSVData->mpDeinitDeleteList = nullptr;
}
}
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index ea08f22b8317..65271087f024 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -106,7 +106,7 @@ OUString GetCommandLineToken( int nToken, const OUString& rLine )
int nActualToken = 0;
sal_Unicode* pBuffer = static_cast<sal_Unicode*>(alloca( sizeof(sal_Unicode)*( nLen + 1 ) ));
const sal_Unicode* pRun = rLine.getStr();
- sal_Unicode* pLeap = NULL;
+ sal_Unicode* pLeap = nullptr;
while( *pRun && nActualToken <= nToken )
{
@@ -156,7 +156,7 @@ OString GetCommandLineToken(int nToken, const OString& rLine)
int nActualToken = 0;
char* pBuffer = static_cast<char*>(alloca( nLen + 1 ));
const char* pRun = rLine.getStr();
- char* pLeap = NULL;
+ char* pLeap = nullptr;
while( *pRun && nActualToken <= nToken )
{
diff --git a/vcl/source/helper/threadex.cxx b/vcl/source/helper/threadex.cxx
index 5fe7376c6556..628a216c3a68 100644
--- a/vcl/source/helper/threadex.cxx
+++ b/vcl/source/helper/threadex.cxx
@@ -66,7 +66,7 @@ long SolarThreadExecutor::impl_execute( const TimeValue* _pTimeout )
Application::RemoveUserEvent( nEvent );
}
else
- osl_waitCondition( m_aFinish, NULL );
+ osl_waitCondition( m_aFinish, nullptr );
}
return m_nReturn;
}
diff --git a/vcl/source/helper/xconnection.cxx b/vcl/source/helper/xconnection.cxx
index 1d7741077445..ad420d303221 100644
--- a/vcl/source/helper/xconnection.cxx
+++ b/vcl/source/helper/xconnection.cxx
@@ -61,7 +61,7 @@ void DisplayConnection::terminate()
if( pSVData )
{
- pSVData->mpDefInst->SetEventCallback( NULL );
+ pSVData->mpDefInst->SetEventCallback( nullptr );
}
SolarMutexReleaser aRel;
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 695a2259c2ec..bf5b5d7c79e6 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -54,20 +54,20 @@ GLWindow::~GLWindow()
}
OpenGLContext::OpenGLContext():
- mpWindow(NULL),
- m_pChildWindow(NULL),
+ mpWindow(nullptr),
+ m_pChildWindow(nullptr),
mbInitialized(false),
mnRefCount(0),
mbRequestLegacyContext(false),
mbUseDoubleBufferedRendering(true),
mnFramebufferCount(0),
- mpCurrentFramebuffer(NULL),
- mpFirstFramebuffer(NULL),
- mpLastFramebuffer(NULL),
- mpCurrentProgram(NULL),
+ mpCurrentFramebuffer(nullptr),
+ mpFirstFramebuffer(nullptr),
+ mpLastFramebuffer(nullptr),
+ mpCurrentProgram(nullptr),
mnPainting(0),
- mpPrevContext(NULL),
- mpNextContext(NULL)
+ mpPrevContext(nullptr),
+ mpNextContext(nullptr)
{
VCL_GL_INFO("vcl.opengl", "new context: " << this);
@@ -477,7 +477,7 @@ private:
public:
TempErrorHandler(Display* dpy, errorHandler newErrorHandler)
- : oldErrorHandler(0)
+ : oldErrorHandler(nullptr)
, mdpy(dpy)
{
if (mdpy)
@@ -513,8 +513,8 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
{
OpenGLZone aZone;
- if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
- return NULL;
+ if( dpy == nullptr || !glXQueryExtension( dpy, nullptr, nullptr ) )
+ return nullptr;
VCL_GL_INFO("vcl.opengl", "window: " << win);
@@ -522,8 +522,8 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
if( !XGetWindowAttributes( dpy, win, &xattr ) )
{
SAL_WARN("vcl.opengl", "Failed to get window attributes for fbconfig " << win);
- xattr.screen = 0;
- xattr.visual = NULL;
+ xattr.screen = nullptr;
+ xattr.visual = nullptr;
}
int screen = XScreenNumberOfScreen( xattr.screen );
@@ -553,7 +553,7 @@ GLXFBConfig* getFBConfig(Display* dpy, Window win, int& nBestFBC, bool bUseDoubl
if(!pFBC)
{
SAL_WARN("vcl.opengl", "no suitable fb format found");
- return NULL;
+ return nullptr;
}
int best_num_samp = -1;
@@ -601,7 +601,7 @@ Visual* getVisual(Display* dpy, Window win)
if( !XGetWindowAttributes( dpy, win, &xattr ) )
{
SAL_WARN("vcl.opengl", "Failed to get window attributes for getVisual " << win);
- xattr.visual = NULL;
+ xattr.visual = nullptr;
}
VCL_GL_INFO("vcl.opengl", "using VisualID " << xattr.visual);
return xattr.visual;
@@ -622,7 +622,7 @@ bool OpenGLContext::init( vcl::Window* pParent )
mpWindow = pParent ? pParent : m_xWindow.get();
if(m_xWindow)
m_xWindow->setPosSizePixel(0,0,0,0);
- m_pChildWindow = 0;
+ m_pChildWindow = nullptr;
initWindow();
return ImplInit();
}
@@ -676,7 +676,7 @@ bool OpenGLContext::ImplInit()
OpenGLZone aZone;
- GLXContext pSharedCtx( NULL );
+ GLXContext pSharedCtx( nullptr );
#ifdef DBG_UTIL
TempErrorHandler aErrorHandler(m_aGLWin.dpy, unxErrorHandler);
#endif
@@ -1007,12 +1007,12 @@ void OpenGLContext::InitGLEWDebugging()
if (glDebugMessageCallbackARB)
{
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
- glDebugMessageCallbackARB(&debug_callback, NULL);
+ glDebugMessageCallbackARB(&debug_callback, nullptr);
}
else if ( glDebugMessageCallback )
{
glEnable(GL_DEBUG_OUTPUT);
- glDebugMessageCallback(&debug_callback, NULL);
+ glDebugMessageCallback(&debug_callback, nullptr);
}
}
@@ -1107,7 +1107,7 @@ bool OpenGLContext::initWindow()
bool OpenGLContext::initWindow()
{
- const SystemEnvData* pChildSysData = 0;
+ const SystemEnvData* pChildSysData = nullptr;
SystemWindowData winData = generateWinData(mpWindow, false);
if( winData.pVisual )
{
@@ -1191,8 +1191,8 @@ void OpenGLContext::reset()
delete pFramebuffer;
pFramebuffer = pPrevFramebuffer;
}
- mpFirstFramebuffer = NULL;
- mpLastFramebuffer = NULL;
+ mpFirstFramebuffer = nullptr;
+ mpLastFramebuffer = nullptr;
}
// destroy all programs
@@ -1232,7 +1232,7 @@ void OpenGLContext::reset()
if (itr != g_vShareList.end())
g_vShareList.erase(itr);
- glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+ glXMakeCurrent(m_aGLWin.dpy, None, nullptr);
if( glGetError() != GL_NO_ERROR )
{
SAL_WARN("vcl.opengl", "glError: " << glGetError());
@@ -1241,7 +1241,7 @@ void OpenGLContext::reset()
if (mbPixmap && m_aGLWin.glPix != None)
glXDestroyPixmap(m_aGLWin.dpy, m_aGLWin.glPix);
- m_aGLWin.ctx = 0;
+ m_aGLWin.ctx = nullptr;
}
#endif
}
@@ -1268,7 +1268,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
SystemWindowData aWinData;
aWinData.nSize = sizeof(aWinData);
- aWinData.pVisual = NULL;
+ aWinData.pVisual = nullptr;
#if !defined(LIBO_HEADLESS)
const SystemEnvData* sysData(pParent->GetSystemData());
@@ -1276,7 +1276,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
Display *dpy = static_cast<Display*>(sysData->pDisplay);
Window win = sysData->aWindow;
- if( dpy == 0 || !glXQueryExtension( dpy, NULL, NULL ) )
+ if( dpy == nullptr || !glXQueryExtension( dpy, nullptr, nullptr ) )
return aWinData;
initOpenGLFunctionPointers();
@@ -1287,7 +1287,7 @@ SystemWindowData OpenGLContext::generateWinData(vcl::Window* pParent, bool)
if (!pFBC)
return aWinData;
- XVisualInfo* vi = 0;
+ XVisualInfo* vi = nullptr;
if( best_fbc != -1 )
vi = glXGetVisualFromFBConfig( dpy, pFBC[best_fbc] );
@@ -1420,7 +1420,7 @@ void OpenGLContext::registerAsCurrent()
mpNextContext->mpPrevContext = mpPrevContext;
mpPrevContext = pSVData->maGDIData.mpLastContext;
- mpNextContext = NULL;
+ mpNextContext = nullptr;
pSVData->maGDIData.mpLastContext->mpNextContext = this;
pSVData->maGDIData.mpLastContext = this;
}
@@ -1441,7 +1441,7 @@ void OpenGLContext::resetCurrent()
// nothing
#elif defined( UNX )
if (m_aGLWin.dpy)
- glXMakeCurrent(m_aGLWin.dpy, None, NULL);
+ glXMakeCurrent(m_aGLWin.dpy, None, nullptr);
#endif
}
@@ -1524,16 +1524,16 @@ bool OpenGLContext::BindFramebuffer( OpenGLFramebuffer* pFramebuffer )
bool OpenGLContext::AcquireDefaultFramebuffer()
{
- return BindFramebuffer( NULL );
+ return BindFramebuffer( nullptr );
}
OpenGLFramebuffer* OpenGLContext::AcquireFramebuffer( const OpenGLTexture& rTexture )
{
OpenGLZone aZone;
- OpenGLFramebuffer* pFramebuffer = NULL;
- OpenGLFramebuffer* pFreeFbo = NULL;
- OpenGLFramebuffer* pSameSizeFbo = NULL;
+ OpenGLFramebuffer* pFramebuffer = nullptr;
+ OpenGLFramebuffer* pFreeFbo = nullptr;
+ OpenGLFramebuffer* pSameSizeFbo = nullptr;
// check if there is already a framebuffer attached to that texture
pFramebuffer = mpLastFramebuffer;
@@ -1631,7 +1631,7 @@ void OpenGLContext::ReleaseFramebuffer( const OpenGLTexture& rTexture )
BindFramebuffer( pFramebuffer );
pFramebuffer->DetachTexture();
if (mpCurrentFramebuffer == pFramebuffer)
- BindFramebuffer( NULL );
+ BindFramebuffer( nullptr );
}
pFramebuffer = pFramebuffer->mpPrevFramebuffer;
}
@@ -1651,7 +1651,7 @@ void OpenGLContext::ReleaseFramebuffers()
}
pFramebuffer = pFramebuffer->mpPrevFramebuffer;
}
- BindFramebuffer( NULL );
+ BindFramebuffer( nullptr );
}
OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const OUString& rFragmentShader, const rtl::OString& preamble )
@@ -1677,7 +1677,7 @@ OpenGLProgram* OpenGLContext::GetProgram( const OUString& rVertexShader, const O
rtl::OString aPersistentKey = OpenGLHelper::GetDigest( rVertexShader, rFragmentShader, preamble );
std::shared_ptr<OpenGLProgram> pProgram = std::make_shared<OpenGLProgram>();
if( !pProgram->Load( rVertexShader, rFragmentShader, preamble, aPersistentKey ) )
- return NULL;
+ return nullptr;
maPrograms.insert(std::make_pair(aNameBasedKey, pProgram));
return pProgram.get();
@@ -1697,7 +1697,7 @@ OpenGLProgram* OpenGLContext::UseProgram( const OUString& rVertexShader, const O
if (!mpCurrentProgram)
{
SAL_WARN("vcl.opengl", "OpenGLContext::UseProgram: mpCurrentProgram is 0");
- return 0;
+ return nullptr;
}
mpCurrentProgram->Use();
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index a051245d411f..f16f217b7628 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -121,9 +121,9 @@ namespace {
{
std::vector<char> ErrorMessage(InfoLogLength+1);
if (bShaderNotProgram)
- glGetShaderInfoLog (nId, InfoLogLength, NULL, &ErrorMessage[0]);
+ glGetShaderInfoLog (nId, InfoLogLength, nullptr, &ErrorMessage[0]);
else
- glGetProgramInfoLog(nId, InfoLogLength, NULL, &ErrorMessage[0]);
+ glGetProgramInfoLog(nId, InfoLogLength, nullptr, &ErrorMessage[0]);
CHECK_GL_ERROR();
ErrorMessage.push_back('\0');
@@ -351,7 +351,7 @@ namespace
std::vector<sal_uInt8> aBinary( nBinaryLength + GLenumSize );
- glGetProgramBinary( nProgramID, nBinaryLength, NULL, &nBinaryFormat, aBinary.data() );
+ glGetProgramBinary( nProgramID, nBinaryLength, nullptr, &nBinaryFormat, aBinary.data() );
const sal_uInt8* pBF = reinterpret_cast<const sal_uInt8*>(&nBinaryFormat);
aBinary.insert( aBinary.end(), pBF, pBF + GLenumSize );
@@ -414,7 +414,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if( !preamble.isEmpty())
addPreamble( aVertexShaderSource, preamble );
char const * VertexSourcePointer = aVertexShaderSource.getStr();
- glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);
+ glShaderSource(VertexShaderID, 1, &VertexSourcePointer , nullptr);
glCompileShader(VertexShaderID);
// Check Vertex Shader
@@ -427,7 +427,7 @@ GLint OpenGLHelper::LoadShaders(const OUString& rVertexShaderName,
if( !preamble.isEmpty())
addPreamble( aFragmentShaderSource, preamble );
char const * FragmentSourcePointer = aFragmentShaderSource.getStr();
- glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);
+ glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , nullptr);
glCompileShader(FragmentShaderID);
// Check Fragment Shader
@@ -488,7 +488,7 @@ void OpenGLHelper::ConvertBitmapExToRGBATextureBuffer(const BitmapEx& rBitmapEx,
size_t i = 0;
for (long ny = (bFlip ? nBmpHeight - 1 : 0); (bFlip ? ny >= 0 : ny < nBmpHeight); (bFlip ? ny-- : ny++))
{
- Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : 0;
+ Scanline pAScan = pAlphaReadAccess ? pAlphaReadAccess->GetScanline(ny) : nullptr;
for(long nx = 0; nx < nBmpWidth; nx++)
{
BitmapColor aCol = pReadAccces->GetColor( ny, nx );
@@ -565,7 +565,7 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode)
{GL_OUT_OF_MEMORY, "out of memory"},
{GL_INVALID_FRAMEBUFFER_OPERATION, "invalid framebuffer operation"},
- {0, NULL }
+ {0, nullptr }
};
int i;
@@ -578,7 +578,7 @@ const char* OpenGLHelper::GLErrorString(GLenum errorCode)
}
}
- return NULL;
+ return nullptr;
}
std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos)
@@ -636,7 +636,7 @@ void OpenGLHelper::createFramebuffer(long nWidth, long nHeight, GLuint& nFramebu
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, nWidth, nHeight, 0,
- GL_RGBA, GL_UNSIGNED_BYTE, 0);
+ GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
glBindTexture(GL_TEXTURE_2D, 0);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
@@ -750,7 +750,7 @@ void OpenGLZone::leave() { gnLeaveCount++; }
namespace {
static volatile bool gbWatchdogFiring = false;
- static oslCondition gpWatchdogExit = NULL;
+ static oslCondition gpWatchdogExit = nullptr;
static rtl::Reference<OpenGLWatchdogThread> gxWatchdog;
}
@@ -835,7 +835,7 @@ void OpenGLWatchdogThread::execute()
void OpenGLWatchdogThread::start()
{
- assert (gxWatchdog == NULL);
+ assert (gxWatchdog == nullptr);
gpWatchdogExit = osl_createCondition();
gxWatchdog.set(new OpenGLWatchdogThread());
gxWatchdog->launch();
@@ -857,7 +857,7 @@ void OpenGLWatchdogThread::stop()
if (gpWatchdogExit)
osl_destroyCondition(gpWatchdogExit);
- gpWatchdogExit = NULL;
+ gpWatchdogExit = nullptr;
}
/**
@@ -1072,7 +1072,7 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
if( i == nFbConfigs )
{
SAL_WARN( "vcl.opengl", "Unable to find FBconfig for pixmap texturing" );
- return 0;
+ return nullptr;
}
CHECK_GL_ERROR();
@@ -1082,7 +1082,7 @@ GLXFBConfig OpenGLHelper::GetPixmapFBConfig( Display* pDisplay, bool& bInverted
#endif
OutputDevice::PaintScope::PaintScope(OutputDevice *pDev)
- : pHandle( NULL )
+ : pHandle( nullptr )
{
if( pDev->mpGraphics || pDev->AcquireGraphics() )
{
@@ -1105,7 +1105,7 @@ void OutputDevice::PaintScope::flush()
if( pHandle )
{
OpenGLContext *pContext = static_cast<OpenGLContext *>( pHandle );
- pHandle = NULL;
+ pHandle = nullptr;
pContext->mnPainting--;
assert( pContext->mnPainting >= 0 );
if( pContext->mnPainting == 0 )
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index adddcaa84dfd..c48f653c8526 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -937,7 +937,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al
GDIMetaFile* pOldMetaFile = mpMetaFile;
const bool bOldMap = mbMap;
- mpMetaFile = NULL; // fdo#55044 reset before GetBitmap!
+ mpMetaFile = nullptr; // fdo#55044 reset before GetBitmap!
mbMap = false;
Bitmap aBmp(GetBitmap(aDstRect.TopLeft(), aDstRect.GetSize()));
@@ -1013,7 +1013,7 @@ void OutputDevice::DrawDeviceAlphaBitmapSlowPath(const Bitmap& rBitmap, const Al
// #110958# Disable alpha VDev, we're doing the necessary
// stuff explicitly further below
if (mpAlphaVDev)
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
DrawBitmap(aDstRect.TopLeft(), aNewBitmap);
@@ -1052,7 +1052,7 @@ bool OutputDevice::DrawTransformBitmapExDirect(
const basegfx::B2DPoint aTopX(aFullTransform * basegfx::B2DPoint(1.0, 0.0));
const basegfx::B2DPoint aTopY(aFullTransform * basegfx::B2DPoint(0.0, 1.0));
SalBitmap* pSalSrcBmp = rBitmapEx.GetBitmap().ImplGetImpBitmap()->ImplGetSalBitmap();
- SalBitmap* pSalAlphaBmp = 0;
+ SalBitmap* pSalAlphaBmp = nullptr;
if(rBitmapEx.IsTransparent())
{
diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index fbd26785b4b2..9396f262362b 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -43,7 +43,7 @@ void OutputDevice::SetClipRegion()
if ( mpMetaFile )
mpMetaFile->AddAction( new MetaClipRegionAction( vcl::Region(), false ) );
- SetDeviceClipRegion( NULL );
+ SetDeviceClipRegion( nullptr );
if( mpAlphaVDev )
mpAlphaVDev->SetClipRegion();
@@ -57,7 +57,7 @@ void OutputDevice::SetClipRegion( const vcl::Region& rRegion )
if ( rRegion.IsNull() )
{
- SetDeviceClipRegion( NULL );
+ SetDeviceClipRegion( nullptr );
}
else
{
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index 22567deaf993..3686d71ed76c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -103,7 +103,7 @@ int OutputDevice::GetDevFontCount() const
bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const
{
PhysicalFontFamily* pFound = mpFontCollection->FindFontFamily( rFontName );
- return (pFound != NULL);
+ return (pFound != nullptr);
}
int OutputDevice::GetDevFontSizeCount( const vcl::Font& rFont ) const
@@ -494,7 +494,7 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
mbInitFont = true;
@@ -505,12 +505,12 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
// release all physically selected fonts on this device
@@ -539,8 +539,8 @@ void OutputDevice::ImplClearFontData( const bool bNewFontLists )
delete mpFontCollection;
if( mpFontCache && mpFontCache != pSVData->maGDIData.mpScreenFontCache )
delete mpFontCache;
- mpFontCollection = 0;
- mpFontCache = 0;
+ mpFontCollection = nullptr;
+ mpFontCache = nullptr;
}
}
}
@@ -985,14 +985,14 @@ ImplFontEntry::ImplFontEntry( const FontSelectPattern& rFontSelData )
: m_pFontCache(nullptr)
, maFontSelData( rFontSelData )
, maMetric( rFontSelData )
- , mpConversion( NULL )
+ , mpConversion( nullptr )
, mnLineHeight( 0 )
, mnRefCount( 1 )
, mnSetFontFlags( 0 )
, mnOwnOrientation( 0 )
, mnOrientation( 0 )
, mbInit( false )
- , mpUnicodeFallbackList( NULL )
+ , mpUnicodeFallbackList( nullptr )
{
maFontSelData.mpFontEntry = this;
}
@@ -1076,8 +1076,8 @@ FontSelectPatternAttributes::FontSelectPatternAttributes( const vcl::Font& rFont
FontSelectPattern::FontSelectPattern( const vcl::Font& rFont,
const OUString& rSearchName, const Size& rSize, float fExactHeight)
: FontSelectPatternAttributes(rFont, rSearchName, rSize, fExactHeight)
- , mpFontData( NULL )
- , mpFontEntry( NULL )
+ , mpFontData( nullptr )
+ , mpFontEntry( nullptr )
{
}
@@ -1243,7 +1243,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo
}
ImplFontCache::ImplFontCache()
-: mpFirstEntry( NULL ),
+: mpFirstEntry( nullptr ),
mnRef0Count( 0 )
{}
@@ -1272,8 +1272,8 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
{
// check if a directly matching logical font instance is already cached,
// the most recently used font usually has a hit rate of >50%
- ImplFontEntry *pEntry = NULL;
- PhysicalFontFamily* pFontFamily = NULL;
+ ImplFontEntry *pEntry = nullptr;
+ PhysicalFontFamily* pFontFamily = nullptr;
IFSD_Equal aIFSD_Equal;
if( mpFirstEntry && aIFSD_Equal( aFontSelData, mpFirstEntry->maFontSelData ) )
pEntry = mpFirstEntry;
@@ -1288,7 +1288,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
{
// find the best matching logical font family and update font selector accordingly
pFontFamily = pFontList->ImplFindByFont( aFontSelData );
- DBG_ASSERT( (pFontFamily != NULL), "ImplFontCache::Get() No logical font found!" );
+ DBG_ASSERT( (pFontFamily != nullptr), "ImplFontCache::Get() No logical font found!" );
if( pFontFamily )
aFontSelData.maSearchName = pFontFamily->GetSearchName();
@@ -1301,7 +1301,7 @@ ImplFontEntry* ImplFontCache::GetFontEntry( PhysicalFontCollection* pFontList,
}
}
- PhysicalFontFace* pFontData = NULL;
+ PhysicalFontFace* pFontData = nullptr;
if (!pEntry && pFontFamily)// no cache hit => find the best matching physical font face
{
@@ -1372,7 +1372,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon
// e.g. PsPrint Arial->Helvetica for udiaeresis when Helvetica doesn't support it
if( nFallbackLevel >= 1)
{
- PhysicalFontFamily* pFallbackData = NULL;
+ PhysicalFontFamily* pFallbackData = nullptr;
//fdo#33898 If someone has EUDC installed then they really want that to
//be used as the first-choice glyph fallback seeing as it's filled with
@@ -1388,7 +1388,7 @@ ImplFontEntry* ImplFontCache::GetGlyphFallbackFont( PhysicalFontCollection* pFon
pFallbackData = pFontCollection->GetGlyphFallbackFont(rFontSelData, rMissingCodes, nFallbackLevel-1);
// escape when there are no font candidates
if( !pFallbackData )
- return NULL;
+ return nullptr;
// override the font name
rFontSelData.SetFamilyName( pFallbackData->GetFamilyName() );
// clear the cached normalized name
@@ -1435,7 +1435,7 @@ void ImplFontCache::Release(ImplFontEntry* pEntry)
assert(mnRef0Count>=0 && "ImplFontCache::Release() - refcount0 underflow");
if( mpFirstEntry == pFontEntry )
- mpFirstEntry = NULL;
+ mpFirstEntry = nullptr;
}
assert(mnRef0Count==0 && "ImplFontCache::Release() - refcount0 mismatch");
@@ -1473,7 +1473,7 @@ void ImplFontCache::Invalidate()
}
// #112304# make sure the font cache is really clean
- mpFirstEntry = NULL;
+ mpFirstEntry = nullptr;
maFontInstanceList.clear();
assert(mnRef0Count==0 && "ImplFontCache::Invalidate() - mnRef0Count non-zero");
@@ -1990,7 +1990,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout )
Color aOldFillColor = GetFillColor();
bool bOldMap = mbMap;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont );
@@ -2084,13 +2084,13 @@ SalLayout* OutputDevice::getFallbackFont(ImplFontEntry &rFallbackFont,
SalLayout* pFallback = mpGraphics->GetTextLayout( rLayoutArgs, nFallbackLevel );
if (!pFallback)
- return NULL;
+ return nullptr;
if (!pFallback->LayoutText(rLayoutArgs))
{
// there is no need for a font that couldn't resolve anything
pFallback->Release();
- return NULL;
+ return nullptr;
}
pFallback->AdjustLayout( rLayoutArgs );
@@ -2107,11 +2107,11 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
{
SAL_WARN ("vcl.gdi", "No font entry set in OutputDevice");
assert(mpFontEntry);
- return NULL;
+ return nullptr;
}
// prepare multi level glyph fallback
- MultiSalLayout* pMultiSalLayout = NULL;
+ MultiSalLayout* pMultiSalLayout = nullptr;
ImplLayoutRuns aLayoutRuns = rLayoutArgs.maRuns;
rLayoutArgs.PrepareFallback();
rLayoutArgs.mnFlags |= SalLayoutFlags::ForFallback;
@@ -2280,7 +2280,7 @@ sal_Int32 OutputDevice::HasGlyphs( const vcl::Font& rTempFont, const OUString& r
if( ! pFontCharMap->HasChar( rStr[i] ) )
return nIndex;
- pFontCharMap = 0;
+ pFontCharMap = nullptr;
return -1;
}
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 847cce31089d..fdf6d33ba53c 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -139,9 +139,9 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the
// polypolygon, so pass in a NULL for the clipping parameter
if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
- DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
+ DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
else
- DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? NULL : &aClixPolyPoly );
+ DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
}
Pop();
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 484ba61dd3e4..ca8ccd1b4240 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -104,7 +104,7 @@ void OutputDevice::DrawHatch( const tools::PolyPolygon& rPolyPoly, const Hatch&
aPolyPoly.Optimize( PolyOptimizeFlags::NO_SAME );
aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::LINECOLOR );
SetLineColor( aHatch.GetColor() );
diff --git a/vcl/source/outdev/line.cxx b/vcl/source/outdev/line.cxx
index 2e76acf2ef7d..bf4f2f6a3c8f 100644
--- a/vcl/source/outdev/line.cxx
+++ b/vcl/source/outdev/line.cxx
@@ -225,7 +225,7 @@ void OutputDevice::drawLine( basegfx::B2DPolyPolygon aLinePolyPolygon, const Lin
}
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
if(aLinePolyPolygon.count())
{
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index 70de3fb248e7..1a0b2799ab66 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -349,13 +349,13 @@ void OutputDevice::ImplInvalidateViewTransform()
if(mpOutDevData->mpViewTransform)
{
delete mpOutDevData->mpViewTransform;
- mpOutDevData->mpViewTransform = NULL;
+ mpOutDevData->mpViewTransform = nullptr;
}
if(mpOutDevData->mpInverseViewTransform)
{
delete mpOutDevData->mpInverseViewTransform;
- mpOutDevData->mpInverseViewTransform = NULL;
+ mpOutDevData->mpInverseViewTransform = nullptr;
}
}
@@ -821,7 +821,7 @@ void OutputDevice::SetRelativeMapMode( const MapMode& rNewMapMode )
rNewMapMode.GetScaleY().GetDenominator(),
maMapMode.GetScaleY().GetNumerator() );
- Point aPt( LogicToLogic( Point(), NULL, &rNewMapMode ) );
+ Point aPt( LogicToLogic( Point(), nullptr, &rNewMapMode ) );
if ( eNew != eOld )
{
if ( eOld > MAP_PIXEL )
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index ae036d6d0193..650d08af2cc5 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -53,7 +53,7 @@ static bool EnableNativeWidget( const OutputDevice& i_rDevice )
{
const vcl::ExtOutDevData* pOutDevData( i_rDevice.GetExtOutDevData() );
const vcl::PDFExtOutDevData* pPDFData( dynamic_cast< const vcl::PDFExtOutDevData* >( pOutDevData ) );
- if ( pPDFData != NULL )
+ if ( pPDFData != nullptr )
return false;
return true;
}
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index 4f13a3d86902..b343f502e0fe 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -88,20 +88,20 @@ OutputDevice::OutputDevice() :
maTextLineColor( COL_TRANSPARENT ),
mxSettings( new AllSettings(Application::GetSettings()) )
{
- mpGraphics = NULL;
- mpUnoGraphicsList = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
- mpMetaFile = NULL;
- mpFontEntry = NULL;
- mpFontCache = NULL;
- mpFontCollection = NULL;
- mpGetDevFontList = NULL;
- mpGetDevSizeList = NULL;
+ mpGraphics = nullptr;
+ mpUnoGraphicsList = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
+ mpMetaFile = nullptr;
+ mpFontEntry = nullptr;
+ mpFontCache = nullptr;
+ mpFontCollection = nullptr;
+ mpGetDevFontList = nullptr;
+ mpGetDevSizeList = nullptr;
mpOutDevStateStack = new OutDevStateStack;
- mpPDFWriter = NULL;
- mpAlphaVDev = NULL;
- mpExtOutDevData = NULL;
+ mpPDFWriter = nullptr;
+ mpAlphaVDev = nullptr;
+ mpExtOutDevData = nullptr;
mnOutOffX = 0;
mnOutOffY = 0;
mnOutWidth = 0;
@@ -172,12 +172,12 @@ OutputDevice::OutputDevice() :
// struct ImplOutDevData- see #i82615#
mpOutDevData = new ImplOutDevData;
- mpOutDevData->mpRotateDev = NULL;
- mpOutDevData->mpRecordLayout = NULL;
+ mpOutDevData->mpRotateDev = nullptr;
+ mpOutDevData->mpRecordLayout = nullptr;
// #i75163#
- mpOutDevData->mpViewTransform = NULL;
- mpOutDevData->mpInverseViewTransform = NULL;
+ mpOutDevData->mpViewTransform = nullptr;
+ mpOutDevData->mpInverseViewTransform = nullptr;
mbDisposed = false;
}
@@ -210,7 +210,7 @@ void OutputDevice::dispose()
if ( pWrapper )
pWrapper->ReleaseAllGraphics( this );
delete mpUnoGraphicsList;
- mpUnoGraphicsList = NULL;
+ mpUnoGraphicsList = nullptr;
}
mpOutDevData->mpRotateDev.disposeAndClear();
@@ -219,7 +219,7 @@ void OutputDevice::dispose()
ImplInvalidateViewTransform();
delete mpOutDevData;
- mpOutDevData = NULL;
+ mpOutDevData = nullptr;
// for some reason, we haven't removed state from the stack properly
if ( !mpOutDevStateStack->empty() )
@@ -231,7 +231,7 @@ void OutputDevice::dispose()
}
}
delete mpOutDevStateStack;
- mpOutDevStateStack = NULL;
+ mpOutDevStateStack = nullptr;
// release the active font instance
if( mpFontEntry )
@@ -240,30 +240,30 @@ void OutputDevice::dispose()
// remove cached results of GetDevFontList/GetDevSizeList
// TODO: use smart pointers for them
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
// release ImplFontCache specific to this OutputDevice
// TODO: refcount ImplFontCache
if( mpFontCache
&& (mpFontCache != ImplGetSVData()->maGDIData.mpScreenFontCache)
- && (ImplGetSVData()->maGDIData.mpScreenFontCache != NULL) )
+ && (ImplGetSVData()->maGDIData.mpScreenFontCache != nullptr) )
{
delete mpFontCache;
- mpFontCache = NULL;
+ mpFontCache = nullptr;
}
// release ImplFontList specific to this OutputDevice
// TODO: refcount ImplFontList
if( mpFontCollection
&& (mpFontCollection != ImplGetSVData()->maGDIData.mpScreenFontList)
- && (ImplGetSVData()->maGDIData.mpScreenFontList != NULL) )
+ && (ImplGetSVData()->maGDIData.mpScreenFontList != nullptr) )
{
mpFontCollection->Clear();
delete mpFontCollection;
- mpFontCollection = NULL;
+ mpFontCollection = nullptr;
}
mpAlphaVDev.disposeAndClear();
@@ -516,7 +516,7 @@ void OutputDevice::DrawOutDev( const Point& rDestPt, const Size& rDestSize,
AdjustTwoRect( aPosAry, aSrcOutRect );
if ( aPosAry.mnSrcWidth && aPosAry.mnSrcHeight && aPosAry.mnDestWidth && aPosAry.mnDestHeight )
- mpGraphics->CopyBits( aPosAry, NULL, this, NULL );
+ mpGraphics->CopyBits( aPosAry, nullptr, this, nullptr );
}
if( mpAlphaVDev )
@@ -649,7 +649,7 @@ void OutputDevice::CopyDeviceArea( SalTwoRect& aPosAry, bool /*bWindowInvalidate
aPosAry.mnDestWidth = aPosAry.mnSrcWidth;
aPosAry.mnDestHeight = aPosAry.mnSrcHeight;
- mpGraphics->CopyBits(aPosAry, NULL, this, NULL);
+ mpGraphics->CopyBits(aPosAry, nullptr, this, nullptr);
}
// Direct OutputDevice drawing private function
@@ -659,7 +659,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP
SalGraphics* pSrcGraphics;
if ( this == pSrcDev )
- pSrcGraphics = NULL;
+ pSrcGraphics = nullptr;
else
{
if ( (GetOutDevType() != pSrcDev->GetOutDevType()) ||
@@ -675,7 +675,7 @@ void OutputDevice::drawOutDevDirect( const OutputDevice* pSrcDev, SalTwoRect& rP
else
{
if ( static_cast<vcl::Window*>(this)->mpWindowImpl->mpFrameWindow == static_cast<const vcl::Window*>(pSrcDev)->mpWindowImpl->mpFrameWindow )
- pSrcGraphics = NULL;
+ pSrcGraphics = nullptr;
else
{
if ( !pSrcDev->mpGraphics )
@@ -833,7 +833,7 @@ bool OutputDevice::DrawEPS( const Point& rPoint, const Size& rSize,
{
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
Graphic( *pSubst ).Draw( this, rPoint, rSize );
mpMetaFile = pOldMetaFile;
}
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index ad8e8aef9f1d..aa3de62f881d 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -40,17 +40,17 @@
#include "sallayout.hxx"
OutDevState::OutDevState()
- : mpMapMode(0)
+ : mpMapMode(nullptr)
, mbMapActive(false)
- , mpClipRegion(0)
- , mpLineColor(0)
- , mpFillColor(0)
- , mpFont(0)
- , mpTextColor(0)
- , mpTextFillColor(0)
- , mpTextLineColor(0)
- , mpOverlineColor(0)
- , mpRefPoint(0)
+ , mpClipRegion(nullptr)
+ , mpLineColor(nullptr)
+ , mpFillColor(nullptr)
+ , mpFont(nullptr)
+ , mpTextColor(nullptr)
+ , mpTextFillColor(nullptr)
+ , mpTextLineColor(nullptr)
+ , mpOverlineColor(nullptr)
+ , mpRefPoint(nullptr)
, meTextAlign(ALIGN_TOP)
, meRasterOp(ROP_OVERPAINT)
, mnTextLayoutMode(TEXT_LAYOUT_DEFAULT)
@@ -142,7 +142,7 @@ void OutputDevice::Pop()
mpMetaFile->AddAction( new MetaPopAction() );
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
if ( mpOutDevStateStack->empty() )
{
@@ -636,19 +636,19 @@ void OutputDevice::ImplReleaseFonts()
if ( mpFontEntry )
{
mpFontCache->Release( mpFontEntry );
- mpFontEntry = NULL;
+ mpFontEntry = nullptr;
}
if ( mpGetDevFontList )
{
delete mpGetDevFontList;
- mpGetDevFontList = NULL;
+ mpGetDevFontList = nullptr;
}
if ( mpGetDevSizeList )
{
delete mpGetDevSizeList;
- mpGetDevSizeList = NULL;
+ mpGetDevSizeList = nullptr;
}
}
diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index dca527b004ee..563a4b2454da 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -114,7 +114,7 @@ void OutputDevice::DrawPolyPolygon( const tools::PolyPolygon& rPolyPoly )
if( aPoly.GetSize() >= 2 )
{
GDIMetaFile* pOldMF = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
DrawPolygon( aPoly );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index dc1bcfcbacb1..9a745bea0db5 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -275,7 +275,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout )
mnOutOffX = 0L;
mnOutOffY = 0L;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
DrawMask( aPoint, aBmp, GetTextColor() );
@@ -929,7 +929,7 @@ long OutputDevice::GetTextWidth( const OUString& rStr, sal_Int32 nIndex, sal_Int
vcl::TextLayoutCache const*const pLayoutCache) const
{
- long nWidth = GetTextArray( rStr, NULL, nIndex, nLen, pLayoutCache );
+ long nWidth = GetTextArray( rStr, nullptr, nIndex, nLen, pLayoutCache );
return nWidth;
}
@@ -1318,12 +1318,12 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
// we need a graphics
if( !mpGraphics )
if( !AcquireGraphics() )
- return NULL;
+ return nullptr;
// initialize font if needed
if( mbNewFont )
if( !ImplNewFont() )
- return NULL;
+ return nullptr;
if( mbInitFont )
InitFont();
@@ -1332,7 +1332,7 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
{
const sal_Int32 nNewLen = rOrigStr.getLength() - nMinIndex;
if( nNewLen <= 0 )
- return NULL;
+ return nullptr;
nLen = nNewLen;
}
@@ -1391,11 +1391,11 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr,
if( pSalLayout && !pSalLayout->LayoutText( aLayoutArgs ) )
{
pSalLayout->Release();
- pSalLayout = NULL;
+ pSalLayout = nullptr;
}
if( !pSalLayout )
- return NULL;
+ return nullptr;
// do glyph fallback if needed
// #105768# avoid fallback for very small font sizes
@@ -1442,7 +1442,7 @@ std::shared_ptr<vcl::TextLayoutCache> OutputDevice::CreateTextLayoutCache(
bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const
{
OUString aStr( rString );
- ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL );
+ ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, nullptr );
bool bRTL = false;
int nCharPos = -1;
if (!aArgs.GetNextPos(&nCharPos, &bRTL))
@@ -1832,7 +1832,7 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect,
// #i47157# Factored out to ImplDrawTextRect(), to be shared
// between us and DrawText()
vcl::DefaultTextLayout aLayout( *this );
- ImplDrawText( *this, rRect, rOrigStr, nStyle, NULL, NULL, aLayout );
+ ImplDrawText( *this, rRect, rOrigStr, nStyle, nullptr, nullptr, aLayout );
// and restore again
EnableOutput( bOutputEnabled );
@@ -1851,7 +1851,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
pDisplayText = &mpOutDevData->mpRecordLayout->m_aDisplayText;
}
- bool bDecomposeTextRectAction = ( _pTextLayout != NULL ) && _pTextLayout->DecomposeTextRectAction();
+ bool bDecomposeTextRectAction = ( _pTextLayout != nullptr ) && _pTextLayout->DecomposeTextRectAction();
if ( mpMetaFile && !bDecomposeTextRectAction )
mpMetaFile->AddAction( new MetaTextRectAction( rRect, rOrigStr, nStyle ) );
@@ -1870,7 +1870,7 @@ void OutputDevice::DrawText( const Rectangle& rRect, const OUString& rOrigStr, D
// create MetaActionType::TEXTs otherwise)
GDIMetaFile* pMtf = mpMetaFile;
if ( !bDecomposeTextRectAction )
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
// #i47157# Factored out to ImplDrawText(), to be used also
// from AddTextRectActions()
@@ -2063,7 +2063,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
{
OUString aPath( rOrigStr );
OUString aAbbreviatedPath;
- osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, NULL );
+ osl_abbreviateSystemPath( aPath.pData, &aAbbreviatedPath.pData, nIndex, nullptr );
aStr = aAbbreviatedPath;
}
else if ( nStyle & DrawTextFlags::NewsEllipsis )
@@ -2449,7 +2449,7 @@ bool OutputDevice::GetTextBoundRect( Rectangle& rRect,
bool bRet = false;
rRect.SetEmpty();
- SalLayout* pSalLayout = NULL;
+ SalLayout* pSalLayout = nullptr;
const Point aPoint;
// calculate offset when nBase!=nIndex
long nXOffset = 0;
@@ -2653,7 +2653,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
const_cast<OutputDevice&>(*this).mbNewFont = true;
}
- SalLayout* pSalLayout = NULL;
+ SalLayout* pSalLayout = nullptr;
// calculate offset when nBase!=nIndex
long nXOffset = 0;
@@ -2725,7 +2725,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
// fall back to bitmap method to get the bounding rectangle,
// so we need a monochrome virtual device with matching font
pSalLayout = ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nOrgWidth = pSalLayout->GetTextWidth();
long nOrgHeight = mpFontEntry->mnLineHeight + mnEmphasisAscent
@@ -2750,7 +2750,7 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
aVDev->SetTextFillColor();
pSalLayout = aVDev->ImplLayout( rStr, nIndex, nLen, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nWidth = pSalLayout->GetTextWidth();
long nHeight = aVDev->mpFontEntry->mnLineHeight + aVDev->mnEmphasisAscent +
@@ -2784,14 +2784,14 @@ bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector,
OUString aStr( rStr ); // prepare for e.g. localized digits
sal_Int32 nIndex2 = nIndex; // only needed until nIndex is sal_Int32
sal_Int32 nLen2 = nLen; // only needed until nLen is sal_Int32
- ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, NULL );
+ ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nIndex2, nLen2, 0, nullptr );
for( int nCharPos = -1; aLayoutArgs.GetNextPos( &nCharPos, &bRTL);)
{
bool bSuccess = false;
// draw character into virtual device
pSalLayout = aVDev->ImplLayout( rStr, nCharPos, 1, Point(0,0), nLayoutWidth, pDXArray );
- if (pSalLayout == 0)
+ if (pSalLayout == nullptr)
return false;
long nCharWidth = pSalLayout->GetTextWidth();
diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx
index 38df3311f885..cbe7cd1833b4 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -374,10 +374,10 @@ void OutputDevice::EmulateDrawTransparent ( const tools::PolyPolygon& rPolyPoly,
// operation explicitly further below.
if( mpAlphaVDev )
- mpAlphaVDev = NULL;
+ mpAlphaVDev = nullptr;
GDIMetaFile* pOldMetaFile = mpMetaFile;
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
tools::PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) );
Rectangle aPolyRect( aPolyPoly.GetBoundRect() );
@@ -678,7 +678,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos,
Point aPoint;
Rectangle aDstRect( aPoint, GetOutputSizePixel() );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
aDstRect.Intersection( aOutRect );
ClipToPaintRegion( aDstRect );
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index 175f0d199eda..d2c01dbeb25e 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -180,7 +180,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
aSize = Size( nWidth, nHeight );
}
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
@@ -355,7 +355,7 @@ void OutputDevice::DrawGradientWallpaper( long nX, long nY,
aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) );
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
EnableMapMode( false );
Push( PushFlags::CLIPREGION );
IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) );
diff --git a/vcl/source/window/abstdlg.cxx b/vcl/source/window/abstdlg.cxx
index 3ae9e30fafc7..d12d4d47d451 100644
--- a/vcl/source/window/abstdlg.cxx
+++ b/vcl/source/window/abstdlg.cxx
@@ -33,7 +33,7 @@ extern "C" VclAbstractDialogFactory* CreateDialogFactory();
VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
{
- FuncPtrCreateDialogFactory fp = 0;
+ FuncPtrCreateDialogFactory fp = nullptr;
#if HAVE_FEATURE_DESKTOP
#ifndef DISABLE_DYNLOADING
static ::osl::Module aDialogLibrary;
@@ -50,7 +50,7 @@ VclAbstractDialogFactory* VclAbstractDialogFactory::Create()
#endif
if ( fp )
return fp();
- return 0;
+ return nullptr;
}
VclAbstractDialog::~VclAbstractDialog()
diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx
index a8ce0a4ecfc5..d06e6a28ebd8 100644
--- a/vcl/source/window/accel.cxx
+++ b/vcl/source/window/accel.cxx
@@ -40,7 +40,7 @@ public:
};
sal_uInt16 ImplAccelEntryGetIndex( ImplAccelList* pList, sal_uInt16 nId,
- sal_uInt16* pIndex = NULL )
+ sal_uInt16* pIndex = nullptr )
{
size_t nLow;
size_t nHigh;
@@ -96,7 +96,7 @@ static void ImplAccelEntryInsert( ImplAccelList* pList, ImplAccelEntry* pEntry )
do
{
nIndex++;
- ImplAccelEntry* pTempEntry = NULL;
+ ImplAccelEntry* pTempEntry = nullptr;
if ( nIndex < pList->size() )
pTempEntry = (*pList)[ nIndex ];
if ( !pTempEntry || (pTempEntry->mnId != pEntry->mnId) )
@@ -147,7 +147,7 @@ void Accelerator::ImplInit()
mnCurId = 0;
mnCurRepeat = 0;
mbIsCancel = false;
- mpDel = NULL;
+ mpDel = nullptr;
}
ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) const
@@ -156,7 +156,7 @@ ImplAccelEntry* Accelerator::ImplGetAccelData( const vcl::KeyCode& rKeyCode ) co
if( it != mpData->maKeyMap.end() )
return it->second;
else
- return NULL;
+ return nullptr;
}
void Accelerator::ImplCopyData( ImplAccelData& rAccelData )
@@ -173,7 +173,7 @@ void Accelerator::ImplCopyData( ImplAccelData& rAccelData )
pEntry->mpAutoAccel = pEntry->mpAccel;
}
else
- pEntry->mpAutoAccel = NULL;
+ pEntry->mpAutoAccel = nullptr;
mpData->maKeyMap.insert( std::make_pair( pEntry->maKeyCode.GetFullCode(), pEntry ) );
mpData->maIdList.push_back( pEntry );
@@ -310,7 +310,7 @@ void Accelerator::Select()
void Accelerator::InsertItem( sal_uInt16 nItemId, const vcl::KeyCode& rKeyCode )
{
- ImplInsertAccel( nItemId, rKeyCode, true, NULL );
+ ImplInsertAccel( nItemId, rKeyCode, true, nullptr );
}
void Accelerator::InsertItem( const ResId& rResId )
@@ -320,7 +320,7 @@ void Accelerator::InsertItem( const ResId& rResId )
sal_uInt16 nAccelKeyId;
sal_uInt16 bDisable;
vcl::KeyCode aKeyCode;
- Accelerator* pAutoAccel = NULL;
+ Accelerator* pAutoAccel = nullptr;
GetRes( rResId.SetRT( RSC_ACCELITEM ) );
nObjMask = ReadLongRes();
@@ -364,7 +364,7 @@ vcl::KeyCode Accelerator::GetKeyCode( sal_uInt16 nItemId ) const
sal_uInt16 Accelerator::GetItemId( sal_uInt16 nPos ) const
{
- ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : NULL;
+ ImplAccelEntry* pEntry = ( nPos < mpData->maIdList.size() ) ? mpData->maIdList[ nPos ] : nullptr;
if ( pEntry )
return pEntry->mnId;
else
@@ -378,7 +378,7 @@ Accelerator* Accelerator::GetAccel( sal_uInt16 nItemId ) const
if ( nIndex != ACCELENTRY_NOTFOUND )
return mpData->maIdList[ nIndex ]->mpAccel;
else
- return NULL;
+ return nullptr;
}
Accelerator& Accelerator::operator=( const Accelerator& rAccel )
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index 5b79b92e82cd..e0a708f78ff9 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -109,11 +109,11 @@ using ::com::sun::star::awt::XTopWindow;
ImplAccessibleInfos::ImplAccessibleInfos()
{
nAccessibleRole = 0xFFFF;
- pAccessibleName = NULL;
- pAccessibleDescription = NULL;
- pLabeledByWindow = NULL;
- pLabelForWindow = NULL;
- pMemberOfWindow = NULL;
+ pAccessibleName = nullptr;
+ pAccessibleDescription = nullptr;
+ pLabeledByWindow = nullptr;
+ pLabelForWindow = nullptr;
+ pMemberOfWindow = nullptr;
}
ImplAccessibleInfos::~ImplAccessibleInfos()
@@ -215,13 +215,13 @@ vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uIn
rChildCount++;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleParentWindow() const
{
if ( ImplIsAccessibleNativeFrame() )
- return NULL;
+ return nullptr;
vcl::Window* pParent = mpWindowImpl->mpParent;
if( GetType() == WINDOW_MENUBARWINDOW )
@@ -620,7 +620,7 @@ vcl::Window* Window::GetAccessibleRelationMemberOf() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationMemberOf();
- return NULL;
+ return nullptr;
}
vcl::Window* Window::getAccessibleRelationLabelFor() const
@@ -628,7 +628,7 @@ vcl::Window* Window::getAccessibleRelationLabelFor() const
if (mpWindowImpl->mpAccessibleInfos && mpWindowImpl->mpAccessibleInfos->pLabelForWindow)
return mpWindowImpl->mpAccessibleInfos->pLabelForWindow;
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleRelationLabelFor() const
@@ -641,7 +641,7 @@ vcl::Window* Window::GetAccessibleRelationLabelFor() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationLabelFor();
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetAccessibleRelationLabeledBy() const
@@ -665,7 +665,7 @@ vcl::Window* Window::GetAccessibleRelationLabeledBy() const
if (!isContainerWindow(this) && !isContainerWindow(GetParent()))
return getLegacyNonLayoutAccessibleRelationLabeledBy();
- return NULL;
+ return nullptr;
}
bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath )
diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx
index b94e8c062414..295a1681d40a 100644
--- a/vcl/source/window/accmgr.cxx
+++ b/vcl/source/window/accmgr.cxx
@@ -90,12 +90,12 @@ void ImplAccelManager::EndSequence()
{
Accelerator* pTempAccel = (*mpSequenceList)[ i ];
pTempAccel->mbIsCancel = false;
- pTempAccel->mpDel = NULL;
+ pTempAccel->mpDel = nullptr;
}
// delete sequence-list
delete mpSequenceList;
- mpSequenceList = NULL;
+ mpSequenceList = nullptr;
}
bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRepeat )
@@ -111,7 +111,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
// are we in a sequence ?
if ( mpSequenceList )
{
- pAccel = mpSequenceList->empty() ? NULL : (*mpSequenceList)[ 0 ];
+ pAccel = mpSequenceList->empty() ? nullptr : (*mpSequenceList)[ 0 ];
// not found ?
if ( !pAccel )
@@ -160,7 +160,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
pAccel->maCurKeyCode = vcl::KeyCode();
pAccel->mnCurId = 0;
pAccel->mnCurRepeat = 0;
- pAccel->mpDel = NULL;
+ pAccel->mpDel = nullptr;
}
return true;
@@ -230,7 +230,7 @@ bool ImplAccelManager::IsAccelKey( const vcl::KeyCode& rKeyCode, sal_uInt16 nRep
pAccel->maCurKeyCode = vcl::KeyCode();
pAccel->mnCurId = 0;
pAccel->mnCurRepeat = 0;
- pAccel->mpDel = NULL;
+ pAccel->mpDel = nullptr;
}
return true;
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index adb0621ab66b..f65e69ec26d7 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -442,7 +442,7 @@ void ImplNoBorderWindowView::DrawWindow(vcl::RenderContext&, sal_uInt16, const P
// - ImplSmallBorderWindowView -
ImplSmallBorderWindowView::ImplSmallBorderWindowView( ImplBorderWindow* pBorderWindow )
: mpBorderWindow(pBorderWindow)
- , mpOutDev(NULL)
+ , mpOutDev(nullptr)
, mnWidth(0)
, mnHeight(0)
, mnLeftBorder(0)
@@ -460,7 +460,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mnHeight = nHeight;
mbNWFBorder = false;
- vcl::Window *pWin = NULL, *pCtrl = NULL;
+ vcl::Window *pWin = nullptr, *pCtrl = nullptr;
if (mpOutDev->GetOutDevType() == OUTDEV_WINDOW)
pWin = static_cast<vcl::Window*>(mpOutDev.get());
@@ -552,7 +552,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
mpBorderWindow->SetBackground();
pCtrl->SetPaintTransparent( true );
- vcl::Window* pCompoundParent = NULL;
+ vcl::Window* pCompoundParent = nullptr;
if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() )
pCompoundParent = pWin->GetParent();
@@ -805,8 +805,8 @@ ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindo
maFrameData.mnHelpState = DrawButtonFlags::NONE;
maFrameData.mbTitleClipped = false;
- mpATitleVirDev = NULL;
- mpDTitleVirDev = NULL;
+ mpATitleVirDev = nullptr;
+ mpDTitleVirDev = nullptr;
}
ImplStdBorderWindowView::~ImplStdBorderWindowView()
@@ -1728,7 +1728,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
WinBits nStyle, sal_uInt16 nTypeStyle,
const ::com::sun::star::uno::Any& )
{
- ImplInit( pParent, nStyle, nTypeStyle, NULL );
+ ImplInit( pParent, nStyle, nTypeStyle, nullptr );
}
void ImplBorderWindow::ImplInit( vcl::Window* pParent,
@@ -1786,7 +1786,7 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
SetBackground();
SetTextFillColor();
- mpMenuBarWindow = NULL;
+ mpMenuBarWindow = nullptr;
mnMinWidth = 0;
mnMinHeight = 0;
mnMaxWidth = SHRT_MAX;
@@ -1832,7 +1832,7 @@ ImplBorderWindow::~ImplBorderWindow()
void ImplBorderWindow::dispose()
{
delete mpBorderView;
- mpBorderView = NULL;
+ mpBorderView = nullptr;
mpMenuBarWindow.clear();
mpNotebookBarWindow.disposeAndClear();
vcl::Window::dispose();
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index ec9589aea781..6ad603ab1a76 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -101,7 +101,7 @@ ImplBtnDlgItem* ButtonDialog::ImplGetItem( sal_uInt16 nId ) const
return &(*it);
}
- return NULL;
+ return nullptr;
}
long ButtonDialog::ImplGetButtonSize()
@@ -236,7 +236,7 @@ void ButtonDialog::StateChanged( StateChangedType nType )
for (auto & it : m_ItemList)
{
if ( it->mpPushButton && it->mbOwnButton )
- it->mpPushButton->SetZOrder(0, ZOrderFlags::Last);
+ it->mpPushButton->SetZOrder(nullptr, ZOrderFlags::Last);
}
// Set focus on default button.
@@ -366,7 +366,7 @@ PushButton* ButtonDialog::GetPushButton( sal_uInt16 nId ) const
if ( pItem )
return pItem->mpPushButton;
else
- return NULL;
+ return nullptr;
}
void ButtonDialog::SetButtonText( sal_uInt16 nId, const OUString& rText )
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index f16d439f1bb5..e39eb6f8435f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -376,9 +376,9 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
for (std::vector<ButtonImageWidgetMap>::iterator aI = m_pParserState->m_aButtonImageWidgetMaps.begin(),
aEnd = m_pParserState->m_aButtonImageWidgetMaps.end(); aI != aEnd; ++aI)
{
- PushButton *pTargetButton = NULL;
- RadioButton *pTargetRadio = NULL;
- Button *pTarget = NULL;
+ PushButton *pTargetButton = nullptr;
+ RadioButton *pTargetRadio = nullptr;
+ Button *pTarget = nullptr;
if (!aI->m_bRadio)
{
@@ -1851,7 +1851,7 @@ VclPtr<vcl::Window> VclBuilder::insertObject(vcl::Window *pParent, const OString
//deferred due to waiting to encounter it in this .ui, and it hasn't
//been seen yet, then make unattached widgets parent-less toplevels
if (pParent == m_pParent.get() && m_bToplevelHasDeferredInit)
- pParent = NULL;
+ pParent = nullptr;
pCurrentChild = makeObject(pParent, rClass, rID, rProps);
}
@@ -2029,7 +2029,7 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const vcl::Window *pA
void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
{
- vcl::Window *pCurrentChild = NULL;
+ vcl::Window *pCurrentChild = nullptr;
xmlreader::Span name;
int nsId;
@@ -2102,7 +2102,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
else if (sInternalChild.startsWith("action_area") || sInternalChild.startsWith("messagedialog-action_area"))
{
vcl::Window *pContentArea = pCurrentChild->GetParent();
- if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : NULL))
+ if (Dialog *pBoxParent = dynamic_cast<Dialog*>(pContentArea ? pContentArea->GetParent() : nullptr))
{
pBoxParent->set_action_area(static_cast<VclButtonBox*>(pCurrentChild)); // FIXME-VCLPTR
}
@@ -2117,7 +2117,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
aChilds.push_back(pChild);
}
- bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != NULL;
+ bool bIsButtonBox = dynamic_cast<VclButtonBox*>(pCurrentChild) != nullptr;
//sort child order within parent so that tabbing
//between controls goes in a visually sensible sequence
@@ -2945,12 +2945,12 @@ VclPtr<vcl::Window> VclBuilder::handleObject(vcl::Window *pParent, xmlreader::Xm
if (sClass == "GtkAdjustment")
{
handleAdjustment(sID, aProperties);
- return NULL;
+ return nullptr;
}
else if (sClass == "GtkTextBuffer")
{
handleTextBuffer(sID, aProperties);
- return NULL;
+ return nullptr;
}
if (!pCurrentChild)
@@ -3010,7 +3010,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
//ToolBoxItems are not true widgets just elements
//of the ToolBox itself
- ToolBox *pToolBoxParent = NULL;
+ ToolBox *pToolBoxParent = nullptr;
if (pCurrent == pParent)
pToolBoxParent = dynamic_cast<ToolBox*>(pParent);
@@ -3217,7 +3217,7 @@ void VclBuilder::collectAccelerator(xmlreader::XmlReader &reader, stringmap &rMa
vcl::Window *VclBuilder::get_widget_root()
{
- return m_aChildren.empty() ? NULL : m_aChildren[0].m_pWindow.get();
+ return m_aChildren.empty() ? nullptr : m_aChildren[0].m_pWindow.get();
}
vcl::Window *VclBuilder::get_by_name(const OString& sID)
@@ -3229,7 +3229,7 @@ vcl::Window *VclBuilder::get_by_name(const OString& sID)
return aI->m_pWindow;
}
- return NULL;
+ return nullptr;
}
PopupMenu *VclBuilder::get_menu(const OString& sID)
@@ -3241,7 +3241,7 @@ PopupMenu *VclBuilder::get_menu(const OString& sID)
return aI->m_pMenu;
}
- return NULL;
+ return nullptr;
}
short VclBuilder::get_response(const vcl::Window *pWindow) const
@@ -3355,7 +3355,7 @@ const VclBuilder::ListStore *VclBuilder::get_model_by_name(const OString& sID) c
std::map<OString, ListStore>::const_iterator aI = m_pParserState->m_aModels.find(sID);
if (aI != m_pParserState->m_aModels.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
const VclBuilder::TextBuffer *VclBuilder::get_buffer_by_name(const OString& sID) const
@@ -3363,7 +3363,7 @@ const VclBuilder::TextBuffer *VclBuilder::get_buffer_by_name(const OString& sID)
std::map<OString, TextBuffer>::const_iterator aI = m_pParserState->m_aTextBuffers.find(sID);
if (aI != m_pParserState->m_aTextBuffers.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
const VclBuilder::Adjustment *VclBuilder::get_adjustment_by_name(const OString& sID) const
@@ -3371,7 +3371,7 @@ const VclBuilder::Adjustment *VclBuilder::get_adjustment_by_name(const OString&
std::map<OString, Adjustment>::const_iterator aI = m_pParserState->m_aAdjustments.find(sID);
if (aI != m_pParserState->m_aAdjustments.end())
return &(aI->second);
- return NULL;
+ return nullptr;
}
void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt16 nActiveId)
diff --git a/vcl/source/window/cairo_cairo.cxx b/vcl/source/window/cairo_cairo.cxx
index a722c2e8d073..54b27dc98cf7 100644
--- a/vcl/source/window/cairo_cairo.cxx
+++ b/vcl/source/window/cairo_cairo.cxx
@@ -35,7 +35,7 @@ namespace cairo
const SystemEnvData* GetSysData(const vcl::Window *pOutputWindow)
{
- const SystemEnvData* pSysData = NULL;
+ const SystemEnvData* pSysData = nullptr;
// check whether we're a SysChild: have to fetch system data
// directly from SystemChildWindow, because the GetSystemData
// method is unfortunately not virtual
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index 9b088c3fa868..41ed2cb6d786 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -274,7 +274,7 @@ void Window::ImplInitWinChildClipRegion()
if ( mpWindowImpl->mpChildClipRegion )
{
delete mpWindowImpl->mpChildClipRegion;
- mpWindowImpl->mpChildClipRegion = NULL;
+ mpWindowImpl->mpChildClipRegion = nullptr;
}
}
else
@@ -375,7 +375,7 @@ bool Window::ImplSysObjClip( const vcl::Region* pOldRegion )
void Window::ImplUpdateSysObjChildrenClip()
{
if ( mpWindowImpl->mpSysObj && mpWindowImpl->mbInitWinClipRegion )
- ImplSysObjClip( NULL );
+ ImplSysObjClip( nullptr );
vcl::Window* pWindow = mpWindowImpl->mpFirstChild;
while ( pWindow )
@@ -423,7 +423,7 @@ bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller )
bool bUpdate = true;
if ( mpWindowImpl->mpSysObj )
{
- vcl::Region* pOldRegion = NULL;
+ vcl::Region* pOldRegion = nullptr;
if ( bSysObjOnlySmaller && !mpWindowImpl->mbInitWinClipRegion )
pOldRegion = new vcl::Region( mpWindowImpl->maWinClipRegion );
@@ -898,7 +898,7 @@ void Window::ImplDeleteOverlapBackground()
if ( mpWindowImpl->mpOverlapData->mpSaveBackRgn )
{
delete mpWindowImpl->mpOverlapData->mpSaveBackRgn;
- mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
+ mpWindowImpl->mpOverlapData->mpSaveBackRgn = nullptr;
}
// remove window from the list
@@ -911,7 +911,7 @@ void Window::ImplDeleteOverlapBackground()
pTemp = pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin;
pTemp->mpWindowImpl->mpOverlapData->mpNextBackWin = mpWindowImpl->mpOverlapData->mpNextBackWin;
}
- mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
+ mpWindowImpl->mpOverlapData->mpNextBackWin = nullptr;
}
}
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 803d7e24f64a..1af5431a5c66 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -32,7 +32,7 @@ CommandExtTextInputData::CommandExtTextInputData( const OUString& rText,
memcpy( mpTextAttr, pTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
- mpTextAttr = NULL;
+ mpTextAttr = nullptr;
mnCursorPos = nCursorPos;
mnCursorFlags = nCursorFlags;
mbOnlyCursor = bOnlyCursor;
@@ -47,7 +47,7 @@ CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData&
memcpy( mpTextAttr, rData.mpTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
- mpTextAttr = NULL;
+ mpTextAttr = nullptr;
mnCursorPos = rData.mnCursorPos;
mnCursorFlags = rData.mnCursorFlags;
mbOnlyCursor = rData.mbOnlyCursor;
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 5a01d10e676a..738ff0d3418c 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -175,7 +175,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
pWindow = Application::GetFocusWindow();
if ( !pWindow || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint
|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus )
- pWindow = NULL;
+ pWindow = nullptr;
}
if ( pWindow )
@@ -216,7 +216,7 @@ bool vcl::Cursor::ImplDoHide( bool bSuspend )
if ( !bSuspend )
{
mpData->maTimer.Stop();
- mpData->mpWindow = NULL;
+ mpData->mpWindow = nullptr;
}
}
return bWasCurVisible;
@@ -269,8 +269,8 @@ IMPL_LINK_NOARG_TYPED(vcl::Cursor, ImplTimerHdl, Timer *, void)
vcl::Cursor::Cursor()
{
- mpData = NULL;
- mpWindow = NULL;
+ mpData = nullptr;
+ mpWindow = nullptr;
mnSlant = 0;
mnOrientation = 0;
mnDirection = CursorDirection::NONE;
@@ -282,8 +282,8 @@ vcl::Cursor::Cursor( const Cursor& rCursor ) :
maSize( rCursor.maSize ),
maPos( rCursor.maPos )
{
- mpData = NULL;
- mpWindow = NULL;
+ mpData = nullptr;
+ mpWindow = nullptr;
mnSlant = rCursor.mnSlant;
mnOrientation = rCursor.mnOrientation;
mnDirection = rCursor.mnDirection;
diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx
index e1d48fc876e7..baa370027022 100644
--- a/vcl/source/window/debug.cxx
+++ b/vcl/source/window/debug.cxx
@@ -41,7 +41,7 @@ const char* ImplDbgCheckWindow( const void* pObj )
pChild = pChild->mpWindowImpl->mpNext;
}
- return NULL;
+ return nullptr;
}
#endif
diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx
index 11d17daa8f2a..e57b06b35db8 100644
--- a/vcl/source/window/debugevent.cxx
+++ b/vcl/source/window/debugevent.cxx
@@ -49,7 +49,7 @@ vcl::Window *DebugEventInjector::ChooseWindow()
if (!(pParent = Application::GetTopWindow( nIdx )))
pParent = static_cast<vcl::Window *>(Application::GetAppWindow());
}
- assert (pParent != NULL);
+ assert (pParent != nullptr);
std::vector< vcl::Window *> aChildren;
pParent->CollectChildren( aChildren );
@@ -104,7 +104,7 @@ void DebugEventInjector::InjectMenuEvent()
sal_uInt16 nEvent = nEvents[ (int)(getRandom() * SAL_N_ELEMENTS( nEvents )) ];
SalMenuEvent aEvent = aIds[ getRandom() * aIds.size() ];
- bool bHandled = ImplWindowFrameProc( pSysWin, NULL, nEvent, &aEvent);
+ bool bHandled = ImplWindowFrameProc( pSysWin, nullptr, nEvent, &aEvent);
SAL_INFO( "vcl.debugevent",
"Injected menu event " << aEvent.mpMenu
@@ -160,14 +160,14 @@ void DebugEventInjector::InjectTextEvent()
if( getRandom() < 0.05 ) // modifier
aKeyEvent.mnCode |= (sal_uInt16)( getRandom() * KEY_MODIFIERS_MASK ) & KEY_MODIFIERS_MASK;
- bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent);
+ bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent);
SAL_INFO( "vcl.debugevent",
"Injected key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled
<< " win " << pWindow );
- ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
+ ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent );
}
/*
@@ -242,13 +242,13 @@ void DebugEventInjector::InjectKeyNavEdit()
aKeyEvent.mnCharCode = 0x0; // hopefully unused.
- bool bHandled = ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYINPUT, &aKeyEvent );
+ bool bHandled = ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYINPUT, &aKeyEvent );
SAL_INFO( "vcl.debugevent",
"Injected edit / move key 0x" << std::hex << (int) aKeyEvent.mnCode << std::dec
<< " -> " << bHandled
<< " win " << pWindow );
- ImplWindowFrameProc( pWindow, NULL, SALEVENT_KEYUP, &aKeyEvent );
+ ImplWindowFrameProc( pWindow, nullptr, SALEVENT_KEYUP, &aKeyEvent );
}
void DebugEventInjector::Invoke()
@@ -269,12 +269,12 @@ DebugEventInjector *DebugEventInjector::getCreate()
sal_uInt32 nEvents;
const char *pEvents = getenv("VCL_EVENT_INJECTION");
if (!pEvents)
- return NULL;
+ return nullptr;
nEvents = OString( pEvents ).toUInt32();
if (nEvents > 0)
return new DebugEventInjector( nEvents );
else
- return NULL;
+ return nullptr;
}
#endif // OSL_DEBUG_LEVEL > 0
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 376c7bf2bb4e..538c6b1d9573 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -623,7 +623,7 @@ void ImplDrawButton( OutputDevice *const pDev, Rectangle aFillRect,
void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
const StyleSettings& rStyleSettings, DrawFrameStyle nStyle, DrawFrameFlags nFlags )
{
- vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : NULL;
+ vcl::Window *const pWin = (pDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(pDev) : nullptr;
const bool bMenuStyle(nFlags & DrawFrameFlags::Menu);
@@ -683,7 +683,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
if ( bNoDraw )
{
- ImplDrawDPILineRect( pDev, rRect, NULL, bRound );
+ ImplDrawDPILineRect( pDev, rRect, nullptr, bRound );
}
else
{
@@ -1055,7 +1055,7 @@ void DecorationView::DrawSeparator( const Point& rStart, const Point& rStop, boo
{
Point aStart( rStart ), aStop( rStop );
const StyleSettings& rStyleSettings = mpOutDev->GetSettings().GetStyleSettings();
- vcl::Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(mpOutDev.get()) : NULL;
+ vcl::Window *const pWin = (mpOutDev->GetOutDevType()==OUTDEV_WINDOW) ? static_cast<vcl::Window*>(mpOutDev.get()) : nullptr;
if(pWin)
{
ControlPart nPart = ( bVertical ? PART_SEPARATOR_VERT : PART_SEPARATOR_HORZ );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index ea24882f7bba..c98270cf38e8 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -135,9 +135,9 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi
{
vcl::Window *pParent = pLastChild->GetParent();
if (!pParent)
- return NULL;
+ return nullptr;
if (pParent == pTopLevel)
- return NULL;
+ return nullptr;
pLastChild = pParent;
pChild = pParent->GetWindow(GetWindowType::Next);
}
@@ -161,9 +161,9 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi
{
vcl::Window *pParent = pLastChild->GetParent();
if (!pParent)
- return NULL;
+ return nullptr;
if (pParent == pTopLevel)
- return NULL;
+ return nullptr;
pLastChild = pParent;
pChild = pParent->GetWindow(GetWindowType::Prev);
}
@@ -237,7 +237,7 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow )
static VclButtonBox* getActionArea(Dialog *pDialog)
{
- VclButtonBox *pButtonBox = NULL;
+ VclButtonBox *pButtonBox = nullptr;
if (pDialog->isLayoutEnabled())
{
vcl::Window *pBox = pDialog->GetWindow(GetWindowType::FirstChild);
@@ -276,7 +276,7 @@ static PushButton* ImplGetDefaultButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static PushButton* ImplGetOKButton( Dialog* pDialog )
@@ -290,7 +290,7 @@ static PushButton* ImplGetOKButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static PushButton* ImplGetCancelButton( Dialog* pDialog )
@@ -305,7 +305,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog )
pChild = pChild->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
static void ImplMouseAutoPos( Dialog* pDialog )
@@ -342,7 +342,7 @@ struct DialogImpl
void Dialog::ImplInitDialogData()
{
mpWindowImpl->mbDialog = true;
- mpPrevExecuteDlg = NULL;
+ mpPrevExecuteDlg = nullptr;
mbInExecute = false;
mbOldSaveBack = false;
mbInClose = false;
@@ -365,7 +365,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
nStyle |= WB_SYSTEMWINDOW;
if (eFlag == InitFlag::NoParent)
- pParent = NULL;
+ pParent = nullptr;
else if (!pParent) // parent is NULL: get the default Dialog parent
{
pParent = Application::GetDefDialogParent();
@@ -402,7 +402,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
if ( (nStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE)) == WB_BORDER )
{
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle, BORDERWINDOW_STYLE_FRAME );
- SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL );
+ SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -412,7 +412,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
{
mpWindowImpl->mbFrame = true;
mpWindowImpl->mbOverlapWin = true;
- SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, NULL );
+ SystemWindow::ImplInit( pParent, (nStyle & (WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_CLOSEABLE | WB_STANDALONE)) | WB_CLOSEABLE, nullptr );
// Now set all style bits
mpWindowImpl->mnStyle = nStyle;
}
@@ -420,7 +420,7 @@ void Dialog::ImplInit( vcl::Window* pParent, WinBits nStyle, InitFlag eFlag )
else
{
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, nStyle, BORDERWINDOW_STYLE_OVERLAP | BORDERWINDOW_STYLE_BORDER );
- SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL );
+ SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -508,7 +508,7 @@ OUString VclBuilderContainer::getUIRootDir()
void Dialog::doDeferredInit(WinBits nBits)
{
VclPtr<vcl::Window> pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits, mnInitFlag);
mbIsDefferedInit = false;
}
@@ -572,7 +572,7 @@ Dialog::~Dialog()
void Dialog::dispose()
{
delete mpDialogImpl;
- mpDialogImpl = NULL;
+ mpDialogImpl = nullptr;
mpPrevExecuteDlg.clear();
mpActionArea.clear();
mpContentArea.clear();
@@ -955,7 +955,7 @@ void Dialog::EndDialog( long nResult )
mpPrevExecuteDlg->GrabFocus();
}
}
- mpPrevExecuteDlg = NULL;
+ mpPrevExecuteDlg = nullptr;
Hide();
EnableSaveBackground( mbOldSaveBack );
@@ -1092,7 +1092,7 @@ void Dialog::GrabFocusToFirstControl()
// find focus control, even if the dialog has focus
if ( HasFocus() )
- pFocusControl = NULL;
+ pFocusControl = nullptr;
else
{
// prefer a child window which had focus before
@@ -1174,7 +1174,7 @@ bool Dialog::set_property(const OString &rKey, const OString &rValue)
}
VclBuilderContainer::VclBuilderContainer()
- : m_pUIBuilder(NULL)
+ : m_pUIBuilder(nullptr)
{
}
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 097f3ef95e8e..11f3c3c96fbd 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -70,8 +70,8 @@ static vcl::Window* ImplGetTopParentOfTabHierarchy( vcl::Window* pParent )
static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, sal_uInt16& nIndex )
{
- vcl::Window* pTabPage = NULL;
- vcl::Window* pFoundWindow = NULL;
+ vcl::Window* pTabPage = nullptr;
+ vcl::Window* pFoundWindow = nullptr;
vcl::Window* pWindow = firstLogicalChildOfParent(pParent);
vcl::Window* pNextWindow = pWindow;
@@ -86,7 +86,7 @@ static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, s
if ( pTabPage )
{
pFoundWindow = ImplGetSubChildWindow( pTabPage, n, nIndex );
- pTabPage = NULL;
+ pTabPage = nullptr;
}
else
{
@@ -189,7 +189,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
DBG_ASSERT( (nIndex >= nFormStart) && (nIndex <= nFormEnd),
"Window::ImplGetDlgWindow() - nIndex not in Form" );
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
sal_uInt16 i;
sal_uInt16 nTemp;
sal_uInt16 nStartIndex;
@@ -275,7 +275,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
}
if ( !(pWindow->GetStyle() & WB_TABSTOP) )
- pWindow = NULL;
+ pWindow = nullptr;
}
}
}
@@ -292,8 +292,8 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
sal_uInt16& rFormStart, sal_uInt16& rFormEnd )
{
vcl::Window* pSWindow;
- vcl::Window* pSecondWindow = NULL;
- vcl::Window* pTempWindow = NULL;
+ vcl::Window* pSecondWindow = nullptr;
+ vcl::Window* pTempWindow = nullptr;
sal_uInt16 i;
sal_uInt16 nSecond_i = 0;
sal_uInt16 nFormStart = 0;
@@ -303,7 +303,7 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
// find focus window in the child list
vcl::Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false );
- if( pWindow == NULL )
+ if( pWindow == nullptr )
pWindow = pSWindow;
while ( pSWindow )
@@ -325,14 +325,14 @@ vcl::Window* ImplFindDlgCtrlWindow( vcl::Window* pParent, vcl::Window* pWindow,
pSWindow = ImplGetNextWindow( pParent, i, i, false );
if ( !i )
- pSWindow = NULL;
+ pSWindow = nullptr;
}
if ( !pSWindow )
{
// Window not found; we cannot handle it
if ( !pSecondWindow )
- return NULL;
+ return nullptr;
else
{
pSWindow = pSecondWindow;
@@ -445,7 +445,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
sal_uInt16 nChildFormEnd;
// get form start and end
- ::ImplFindDlgCtrlWindow( pWindow, NULL,
+ ::ImplFindDlgCtrlWindow( pWindow, nullptr,
nChildIndex, nChildFormStart, nChildFormEnd );
vcl::Window* pAccelWin = ImplFindAccelWindow( pWindow, nChildIndex, cCharCode,
nChildFormStart, nChildFormEnd,
@@ -467,7 +467,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
pWindow = ImplGetChildWindow( pParent, nFormStart, i, bCheckEnable );
}
- return NULL;
+ return nullptr;
}
namespace vcl {
@@ -619,7 +619,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
while ( pTempWindow );
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
if ( nKeyCode == KEY_RETURN )
{
@@ -634,7 +634,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
}
if ( bKeyInput && !pButtonWindow && (nDlgCtrlFlags & DialogControlFlags::Return) )
@@ -679,7 +679,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pTempWindow = ImplGetDlgWindow( i, nType, nFormStart, nFormEnd, &nNewIndex );
}
if ( (i <= iStart) || (i > nFormEnd) )
- pTempWindow = NULL;
+ pTempWindow = nullptr;
}
// if this is the same window, simulate a Get/LoseFocus,
// in case AROUND is being processed
@@ -709,7 +709,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true );
if ( (iButton <= iButtonStart) || (iButton > nFormEnd) )
- pButtonWindow = NULL;
+ pButtonWindow = nullptr;
}
if ( bKeyInput && mpWindowImpl->mpDlgCtrlDownWindow )
@@ -717,7 +717,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
return true;
}
}
@@ -738,10 +738,10 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( aKeyCode.IsMod1() )
{
// search group
- vcl::Window* pFormularFirstWindow = NULL;
- vcl::Window* pLastFormularFirstWindow = NULL;
+ vcl::Window* pFormularFirstWindow = nullptr;
+ vcl::Window* pLastFormularFirstWindow = nullptr;
pTempWindow = ImplGetChildWindow( this, 0, iTemp, false );
- vcl::Window* pPrevFirstFormularFirstWindow = NULL;
+ vcl::Window* pPrevFirstFormularFirstWindow = nullptr;
vcl::Window* pFirstFormularFirstWindow = pTempWindow;
while ( pTempWindow )
{
@@ -765,7 +765,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, false );
if ( !iTemp )
- pTempWindow = NULL;
+ pTempWindow = nullptr;
}
if ( bFormular )
@@ -929,7 +929,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow.get() != pButtonWindow) )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
}
static_cast<PushButton*>(pButtonWindow)->SetPressed( true );
@@ -937,7 +937,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
else if ( mpWindowImpl->mpDlgCtrlDownWindow.get() == pButtonWindow )
{
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
static_cast<PushButton*>(pButtonWindow)->SetPressed( false );
static_cast<PushButton*>(pButtonWindow)->Click();
}
@@ -1000,8 +1000,8 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G
static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocusWindow,
bool bGetFocus )
{
- PushButton* pOldDefButton = NULL;
- PushButton* pNewDefButton = NULL;
+ PushButton* pOldDefButton = nullptr;
+ PushButton* pNewDefButton = nullptr;
vcl::Window* pSWindow;
sal_uInt16 i;
sal_uInt16 nFormStart;
@@ -1031,7 +1031,7 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu
pSWindow = ImplGetNextWindow( pParent, i, i, false );
if ( !i || (i > nFormEnd) )
- pSWindow = NULL;
+ pSWindow = nullptr;
}
if ( !bGetFocus )
@@ -1039,10 +1039,10 @@ static void ImplDlgCtrlUpdateDefButton( vcl::Window* pParent, vcl::Window* pFocu
sal_uInt16 nDummy;
vcl::Window* pNewFocusWindow = Application::GetFocusWindow();
if ( !pNewFocusWindow || !pParent->ImplIsWindowOrChild( pNewFocusWindow ) )
- pNewDefButton = NULL;
+ pNewDefButton = nullptr;
else if ( !::ImplFindDlgCtrlWindow( pParent, pNewFocusWindow, i, nDummy, nDummy ) ||
(i < nFormStart) || (i > nFormEnd) )
- pNewDefButton = NULL;
+ pNewDefButton = nullptr;
}
if ( pOldDefButton != pNewDefButton )
@@ -1059,7 +1059,7 @@ void Window::ImplDlgCtrlFocusChanged( vcl::Window* pWindow, bool bGetFocus )
if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus )
{
static_cast<PushButton*>(mpWindowImpl->mpDlgCtrlDownWindow.get())->SetPressed( false );
- mpWindowImpl->mpDlgCtrlDownWindow = NULL;
+ mpWindowImpl->mpDlgCtrlDownWindow = nullptr;
}
ImplDlgCtrlUpdateDefButton( this, pWindow, bGetFocus );
@@ -1077,12 +1077,12 @@ vcl::Window* Window::ImplFindDlgCtrlWindow( vcl::Window* pWindow )
vcl::Window* Window::GetParentLabelFor( const vcl::Window* ) const
{
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetParentLabeledBy( const vcl::Window* ) const
{
- return NULL;
+ return nullptr;
}
KeyEvent Window::GetActivationKey() const
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx
index 33dfbc44366c..a436bdefa002 100644
--- a/vcl/source/window/dndevdis.cxx
+++ b/vcl/source/window/dndevdis.cxx
@@ -35,14 +35,14 @@ using namespace ::com::sun::star::datatransfer::dnd;
// DNDEventDispatcher::DNDEventDispatcher
DNDEventDispatcher::DNDEventDispatcher( vcl::Window * pTopWindow ):
m_pTopWindow( pTopWindow ),
- m_pCurrentWindow( NULL )
+ m_pCurrentWindow( nullptr )
{
}
// DNDEventDispatcher::~DNDEventDispatcher
DNDEventDispatcher::~DNDEventDispatcher()
{
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
}
vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location)
@@ -55,7 +55,7 @@ vcl::Window* DNDEventDispatcher::findTopLevelWindow(Point location)
m_pTopWindow->ImplMirrorFramePos( location );
vcl::Window * pChildWindow = m_pTopWindow->ImplFindWindow( location );
- if( NULL == pChildWindow )
+ if( nullptr == pChildWindow )
pChildWindow = m_pTopWindow;
while( pChildWindow->ImplGetClientWindow() )
@@ -74,7 +74,7 @@ IMPL_LINK_TYPED(DNDEventDispatcher, WindowEventListener, VclWindowEvent&, rEvent
{
if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
{
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
}
}
@@ -120,7 +120,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde )
}
// this is a drop -> no further drag overs
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
m_aDataFlavorList.realloc( 0 );
}
@@ -160,7 +160,7 @@ void SAL_CALL DNDEventDispatcher::dragExit( const DropTargetEvent& /*dte*/ )
fireDragExitEvent( m_pCurrentWindow );
// reset member values
- designate_currentwindow(NULL);
+ designate_currentwindow(nullptr);
m_aDataFlavorList.realloc( 0 );
}
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index 41330fb1326e..6ea846de11f3 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -47,7 +47,7 @@ DockingAreaWindow::ImplData::~ImplData()
DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) :
Window( WINDOW_DOCKINGAREA )
{
- ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, NULL );
+ ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, nullptr );
mpImplData = new ImplData;
}
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 05a08f599ca7..b3fc00522b08 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -75,7 +75,7 @@ ImplDockFloatWin2::ImplDockFloatWin2( vcl::Window* pParent, WinBits nWinBits,
mpDockWin( pDockingWin ),
mnLastTicks( tools::Time::GetSystemTicks() ),
mbInMove( false ),
- mnLastUserEvent( 0 )
+ mnLastUserEvent( nullptr )
{
// copy state of DockingWindow
if ( pDockingWin )
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, EndDockTimerHdl, Idle *, void)
IMPL_LINK_NOARG_TYPED(ImplDockFloatWin2, DockingHdl, void*, void)
{
// called during move of a floating window
- mnLastUserEvent = 0;
+ mnLastUserEvent = nullptr;
vcl::Window *pDockingArea = mpDockWin->GetWindow()->GetParent();
PointerState aState = pDockingArea->GetPointerState();
@@ -242,7 +242,7 @@ void ImplDockFloatWin2::Move()
* last Move message.
*/
if( ! mnLastUserEvent )
- mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin2, DockingHdl ), NULL, true );
+ mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin2, DockingHdl ), nullptr, true );
}
void ImplDockFloatWin2::Resize()
@@ -314,7 +314,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const vcl::Wi
else
++p;
}
- return NULL;
+ return nullptr;
}
bool DockingManager::IsDockable( const vcl::Window *pWindow )
@@ -325,7 +325,7 @@ bool DockingManager::IsDockable( const vcl::Window *pWindow )
if( pWindow->HasDockingHandler() )
return true;
*/
- return (pWrapper != NULL);
+ return (pWrapper != nullptr);
}
bool DockingManager::IsFloating( const vcl::Window *pWindow )
@@ -521,7 +521,7 @@ ImplPopupFloatWin::~ImplPopupFloatWin()
void ImplPopupFloatWin::dispose()
{
- mpDockingWin = NULL;
+ mpDockingWin = nullptr;
FloatingWindow::dispose();
}
@@ -794,8 +794,8 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt )
ImplDockingWindowWrapper::ImplDockingWindowWrapper( const vcl::Window *pWindow )
: mpDockingWindow(const_cast<vcl::Window*>(pWindow))
- , mpFloatWin(NULL)
- , mpOldBorderWin(NULL)
+ , mpFloatWin(nullptr)
+ , mpOldBorderWin(nullptr)
, mpParent(pWindow->GetParent())
, maMaxOutSize( SHRT_MAX, SHRT_MAX )
, mnTrackX(0)
@@ -1109,7 +1109,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border );
if( mpOldBorderWin.get() == GetWindow() )
- mpOldBorderWin = NULL; // no border window found
+ mpOldBorderWin = nullptr; // no border window found
// the new parent for popup mode
VclPtrInstance<ImplPopupFloatWin> pWin( mpParent, this, bool(nFlags & FloatWinPopupFlags::AllowTearOff) );
@@ -1119,7 +1119,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
pWin->SetOutputSizePixel( GetWindow()->GetSizePixel() );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
GetWindow()->mpWindowImpl->mnLeftBorder = 0;
GetWindow()->mpWindowImpl->mnTopBorder = 0;
GetWindow()->mpWindowImpl->mnRightBorder = 0;
@@ -1168,7 +1168,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockingWindowWrapper, PopupModeEnd, FloatingWindow*, v
// before deleting change parent back, so we can delete the floating window alone
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
@@ -1216,7 +1216,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent );
mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border );
if( mpOldBorderWin == mpDockingWindow )
- mpOldBorderWin = NULL; // no border window found
+ mpOldBorderWin = nullptr; // no border window found
ImplDockFloatWin2* pWin =
VclPtr<ImplDockFloatWin2>::Create(
@@ -1228,7 +1228,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
: mnFloatBits,
this );
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
GetWindow()->mpWindowImpl->mnLeftBorder = 0;
GetWindow()->mpWindowImpl->mnTopBorder = 0;
GetWindow()->mpWindowImpl->mnRightBorder = 0;
@@ -1281,7 +1281,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode )
maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent;
- GetWindow()->mpWindowImpl->mpBorderWindow = NULL;
+ GetWindow()->mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
GetWindow()->SetParent( mpOldBorderWin );
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 083fd0e9a4bf..2f0fc5b57d9f 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -48,7 +48,7 @@ public:
DockingWindow::ImplData::ImplData()
{
- mpParent = NULL;
+ mpParent = nullptr;
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
}
@@ -91,7 +91,7 @@ ImplDockFloatWin::ImplDockFloatWin( vcl::Window* pParent, WinBits nWinBits,
mpDockWin( pDockingWin ),
mnLastTicks( tools::Time::GetSystemTicks() ),
mbInMove( false ),
- mnLastUserEvent( 0 )
+ mnLastUserEvent( nullptr )
{
// copy settings of DockingWindow
if ( pDockingWin )
@@ -157,7 +157,7 @@ IMPL_LINK_NOARG_TYPED(ImplDockFloatWin, DockingHdl, void*, void)
{
PointerState aState = mpDockWin->GetParent()->GetPointerState();
- mnLastUserEvent = 0;
+ mnLastUserEvent = nullptr;
if( mpDockWin->IsDockable() &&
(tools::Time::GetSystemTicks() - mnLastTicks > 500) &&
( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) &&
@@ -208,7 +208,7 @@ void ImplDockFloatWin::Move()
* last Move message.
*/
if( ! mnLastUserEvent )
- mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin, DockingHdl ), NULL, true );
+ mnLastUserEvent = Application::PostUserEvent( LINK( this, ImplDockFloatWin, DockingHdl ), nullptr, true );
}
void ImplDockFloatWin::Resize()
@@ -305,8 +305,8 @@ bool DockingWindow::ImplStartDocking( const Point& rPos )
void DockingWindow::ImplInitDockingWindowData()
{
mpWindowImpl->mbDockWin = true;
- mpFloatWin = NULL;
- mpOldBorderWin = NULL;
+ mpFloatWin = nullptr;
+ mpOldBorderWin = nullptr;
mpImplData = new ImplData;
mnTrackX = 0;
mnTrackY = 0;
@@ -333,7 +333,7 @@ void DockingWindow::ImplInitDockingWindowData()
mbIsDefferedInit = false;
mbIsCalculatingInitialLayoutSize = false;
mbInitialLayoutDone = false;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
//To-Do, reuse maResizeTimer
maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
@@ -352,7 +352,7 @@ void DockingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( nStyle & WB_DOCKBORDER )
nStyle |= WB_BORDER;
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
}
@@ -444,7 +444,7 @@ DockingWindow::DockingWindow( vcl::Window* pParent, const ResId& rResId ) :
void DockingWindow::doDeferredInit(WinBits nBits)
{
vcl::Window *pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits);
mbIsDefferedInit = false;
}
@@ -479,7 +479,7 @@ void DockingWindow::dispose()
SetFloatingMode(false);
}
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
mpFloatWin.clear();
mpOldBorderWin.clear();
mpDialogParent.clear();
@@ -805,7 +805,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ? mnFloatBits | WB_SYSTEMWINDOW : mnFloatBits,
this );
mpFloatWin = pWin;
- mpWindowImpl->mpBorderWindow = NULL;
+ mpWindowImpl->mpBorderWindow = nullptr;
mpWindowImpl->mnLeftBorder = 0;
mpWindowImpl->mnTopBorder = 0;
mpWindowImpl->mnRightBorder = 0;
@@ -866,7 +866,7 @@ void DockingWindow::SetFloatingMode( bool bFloatMode )
mpImplData->maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel();
vcl::Window* pRealParent = mpWindowImpl->mpRealParent;
- mpWindowImpl->mpBorderWindow = NULL;
+ mpWindowImpl->mpBorderWindow = nullptr;
if ( mpOldBorderWin )
{
SetParent( mpOldBorderWin );
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 548e8704054c..c31aa63e1fe4 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -316,7 +316,7 @@ ImplSVEvent * Window::PostUserEvent( const Link<void*,void>& rLink, void* pCalle
{
ImplRemoveDel( &(pSVEvent->maDelData) );
delete pSVEvent;
- pSVEvent = 0;
+ pSVEvent = nullptr;
}
return pSVEvent;
}
@@ -331,7 +331,7 @@ void Window::RemoveUserEvent( ImplSVEvent * nUserEvent )
if ( nUserEvent->mpWindow )
{
nUserEvent->mpWindow->ImplRemoveDel( &(nUserEvent->maDelData) );
- nUserEvent->mpWindow = NULL;
+ nUserEvent->mpWindow = nullptr;
}
nUserEvent->mbCall = false;
@@ -507,7 +507,7 @@ void Window::ImplCallMove()
if( mpWindowImpl->mbFrame )
{
// update frame position
- SalFrame *pParentFrame = NULL;
+ SalFrame *pParentFrame = nullptr;
vcl::Window *pParent = ImplGetParent();
while( pParent )
{
@@ -581,7 +581,7 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
pLastRealWindow->Activate();
}
}
- pSVData->maWinData.mpLastDeacWin = NULL;
+ pSVData->maWinData.mpLastDeacWin = nullptr;
}
}
@@ -623,8 +623,8 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
NotifyEvent::NotifyEvent()
{
- mpWindow = NULL;
- mpData = NULL;
+ mpWindow = nullptr;
+ mpData = nullptr;
mnEventType = MouseNotifyEvent::NONE;
mnRetValue = 0;
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index c470f754d004..b5c038ccdb53 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -45,7 +45,7 @@ public:
FloatingWindow::ImplData::ImplData()
{
- mpBox = NULL;
+ mpBox = nullptr;
}
FloatingWindow::ImplData::~ImplData()
@@ -77,7 +77,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
{
mpWindowImpl->mbOverlapWin = true;
nStyle |= WB_DIALOGCONTROL;
- SystemWindow::ImplInit(pParent, nStyle, NULL);
+ SystemWindow::ImplInit(pParent, nStyle, nullptr);
}
else
{
@@ -92,7 +92,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
// nFloatWinStyle |= WB_CLOSEABLE;
mpWindowImpl->mbFrame = true;
mpWindowImpl->mbOverlapWin = true;
- SystemWindow::ImplInit(pParent, nFloatWinStyle & ~WB_BORDER, NULL);
+ SystemWindow::ImplInit(pParent, nFloatWinStyle & ~WB_BORDER, nullptr);
}
else
{
@@ -110,7 +110,7 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
nStyle |= WB_CLOSEABLE; // make undecorated floaters closeable
}
pBorderWin = VclPtr<ImplBorderWindow>::Create(pParent, nStyle, nBorderStyle);
- SystemWindow::ImplInit(pBorderWin, nStyle & ~WB_BORDER, NULL);
+ SystemWindow::ImplInit(pBorderWin, nStyle & ~WB_BORDER, nullptr);
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder(mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder,
mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder);
@@ -121,9 +121,9 @@ void FloatingWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
SetActivateMode( ActivateModeFlags::NONE );
- mpNextFloat = NULL;
- mpFirstPopupModeWin = NULL;
- mnPostId = 0;
+ mpNextFloat = nullptr;
+ mpFirstPopupModeWin = nullptr;
+ mnPostId = nullptr;
mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FloatWinTitleType::Normal : FloatWinTitleType::NONE;
mnOldTitle = mnTitle;
mnPopupModeFlags = FloatWinPopupFlags::NONE;
@@ -158,10 +158,10 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, WinBits nStyle) :
FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
: SystemWindow(WINDOW_FLOATINGWINDOW)
- , mpNextFloat(0)
- , mpFirstPopupModeWin(0)
- , mpImplData(0)
- , mnPostId(0)
+ , mpNextFloat(nullptr)
+ , mpFirstPopupModeWin(nullptr)
+ , mpImplData(nullptr)
+ , mnPostId(nullptr)
, mnPopupModeFlags(FloatWinPopupFlags::NONE)
, mnTitle(FloatWinTitleType::Unknown)
, mnOldTitle(FloatWinTitleType::Unknown)
@@ -181,7 +181,7 @@ FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const O
void FloatingWindow::doDeferredInit(WinBits nBits)
{
vcl::Window *pParent = mpDialogParent;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
ImplInit(pParent, nBits);
mbIsDefferedInit = false;
}
@@ -223,11 +223,11 @@ void FloatingWindow::dispose()
if ( mnPostId )
Application::RemoveUserEvent( mnPostId );
- mnPostId = 0;
+ mnPostId = nullptr;
}
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
mpNextFloat.clear();
mpFirstPopupModeWin.clear();
@@ -503,7 +503,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
while ( pWin );
rHitTest = HITTEST_OUTSIDE;
- return NULL;
+ return nullptr;
}
FloatingWindow* FloatingWindow::ImplFindLastLevelFloat()
@@ -542,7 +542,7 @@ bool FloatingWindow::ImplIsFloatPopupModeWindow( const vcl::Window* pWindow )
IMPL_LINK_NOARG_TYPED(FloatingWindow, ImplEndPopupModeHdl, void*, void)
{
VclPtr<FloatingWindow> pThis(this);
- mnPostId = 0;
+ mnPostId = nullptr;
mnPopupModeFlags = FloatWinPopupFlags::NONE;
mbPopupMode = false;
PopupModeEnd();
@@ -606,7 +606,7 @@ void FloatingWindow::ImplCallPopupModeEnd()
// call Handler asynchronously.
if ( mpImplData && !mnPostId )
- mnPostId = Application::PostUserEvent( LINK( this, FloatingWindow, ImplEndPopupModeHdl ), NULL, true );
+ mnPostId = Application::PostUserEvent( LINK( this, FloatingWindow, ImplEndPopupModeHdl ), nullptr, true );
}
void FloatingWindow::PopupModeEnd()
@@ -771,7 +771,7 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, sal_uLong n
// delete window from the list
pSVData->maWinData.mpFirstFloat = mpNextFloat;
- mpNextFloat = NULL;
+ mpNextFloat = nullptr;
FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags;
@@ -806,7 +806,7 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, sal_uLong n
if ( mpImplData->mpBox )
{
mpImplData->mpBox->ImplFloatControl( false, this );
- mpImplData->mpBox = NULL;
+ mpImplData->mpBox = nullptr;
}
// call PopupModeEnd-Handler depending on parameter
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index b7bd49bba6a9..50c871203e90 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -35,7 +35,7 @@ IntroWindow::IntroWindow( ) :
WorkWindow( WINDOW_INTROWINDOW )
{
ImplInitIntroWindowData();
- WorkWindow::ImplInit( 0, WB_INTROWIN );
+ WorkWindow::ImplInit( nullptr, WB_INTROWIN );
}
IntroWindow::~IntroWindow()
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index aa8f6518161a..62e9e4fd7682 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -20,7 +20,7 @@ VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
: Window(WINDOW_CONTAINER)
, m_bLayoutDirty(true)
{
- ImplInit(pParent, nStyle, NULL);
+ ImplInit(pParent, nStyle, nullptr);
EnableChildTransparentMode();
SetPaintTransparent(true);
SetBackground();
@@ -757,7 +757,7 @@ struct GridEntry
int x;
int y;
GridEntry()
- : pChild(0)
+ : pChild(nullptr)
, nSpanWidth(0)
, nSpanHeight(0)
, x(-1)
@@ -1370,7 +1370,7 @@ void VclFrame::setAllocation(const Size &rAllocation)
IMPL_LINK_TYPED(VclFrame, WindowEventListener, VclWindowEvent&, rEvent, void)
{
if (rEvent.GetId() == VCLEVENT_OBJECT_DYING)
- designate_label(NULL);
+ designate_label(nullptr);
}
void VclFrame::designate_label(vcl::Window *pWindow)
@@ -1391,7 +1391,7 @@ const vcl::Window *VclFrame::get_label_widget() const
//The label widget is normally the first (of two) children
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label exists
- return NULL;
+ return nullptr;
return pWindowImpl->mpFirstChild;
}
@@ -1408,7 +1408,7 @@ const vcl::Window *VclFrame::get_child() const
if (!m_pLabel)
return pWindowImpl->mpLastChild;
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //only label exists
- return NULL;
+ return nullptr;
return pWindowImpl->mpLastChild;
}
@@ -1520,7 +1520,7 @@ Size VclExpander::calculateRequisition() const
WindowImpl* pWindowImpl = ImplGetWindowImpl();
const vcl::Window *pChild = get_child();
- const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild.get() : NULL;
+ const vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild ? pWindowImpl->mpLastChild.get() : nullptr;
if (pChild && pChild->IsVisible() && m_pDisclosureButton->IsChecked())
aRet = getLayoutRequisition(*pChild);
@@ -1557,7 +1557,7 @@ void VclExpander::setAllocation(const Size &rAllocation)
//The label widget is the last (of two) children
vcl::Window *pChild = get_child();
- vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild.get() ? pWindowImpl->mpLastChild.get() : NULL;
+ vcl::Window *pLabel = pChild != pWindowImpl->mpLastChild.get() ? pWindowImpl->mpLastChild.get() : nullptr;
Size aButtonSize = getLayoutRequisition(*m_pDisclosureButton);
Size aLabelSize;
@@ -1631,7 +1631,7 @@ IMPL_LINK_TYPED( VclExpander, ClickHdl, CheckBox&, rBtn, void )
{
pChild->Show(rBtn.IsChecked());
queue_resize();
- Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() : NULL;
+ Dialog* pResizeDialog = m_bResizeTopLevel ? GetParentDialog() : nullptr;
if (pResizeDialog)
pResizeDialog->setOptimalLayoutSize();
}
@@ -1999,12 +1999,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle)
: Dialog(pParent, nStyle)
, m_eButtonsType(VCL_BUTTONS_NONE)
, m_eMessageType(VCL_MESSAGE_INFO)
- , m_pOwnedContentArea(NULL)
- , m_pOwnedActionArea(NULL)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pOwnedContentArea(nullptr)
+ , m_pOwnedActionArea(nullptr)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
{
SetType(WINDOW_MESSBOX);
}
@@ -2017,10 +2017,10 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
: Dialog(pParent, nStyle)
, m_eButtonsType(eButtonsType)
, m_eMessageType(eMessageType)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
, m_sPrimaryString(rMessage)
{
SetType(WINDOW_MESSBOX);
@@ -2031,12 +2031,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUS
: Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WINDOW_MESSBOX)
, m_eButtonsType(VCL_BUTTONS_NONE)
, m_eMessageType(VCL_MESSAGE_INFO)
- , m_pOwnedContentArea(NULL)
- , m_pOwnedActionArea(NULL)
- , m_pGrid(NULL)
- , m_pImage(NULL)
- , m_pPrimaryMessage(NULL)
- , m_pSecondaryMessage(NULL)
+ , m_pOwnedContentArea(nullptr)
+ , m_pOwnedActionArea(nullptr)
+ , m_pGrid(nullptr)
+ , m_pImage(nullptr)
+ , m_pPrimaryMessage(nullptr)
+ , m_pSecondaryMessage(nullptr)
{
}
@@ -2194,7 +2194,7 @@ short MessageDialog::Execute()
m_pSecondaryMessage->SetText(m_sSecondaryString);
m_pSecondaryMessage->Show(bHasSecondaryText);
- MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage.get() : NULL);
+ MessageDialog::SetMessagesWidths(this, m_pPrimaryMessage, bHasSecondaryText ? m_pSecondaryMessage.get() : nullptr);
VclButtonBox *pButtonBox = get_action_area();
assert(pButtonBox);
@@ -2417,13 +2417,13 @@ bool isEnabledInLayout(const vcl::Window *pWindow)
bool isLayoutEnabled(const vcl::Window *pWindow)
{
//Child is a container => we're layout enabled
- const vcl::Window *pChild = pWindow ? pWindow->GetWindow(GetWindowType::FirstChild) : NULL;
+ const vcl::Window *pChild = pWindow ? pWindow->GetWindow(GetWindowType::FirstChild) : nullptr;
return pChild && isContainerWindow(*pChild) && !pChild->GetWindow(GetWindowType::Next);
}
bool isInitialLayout(const vcl::Window *pWindow)
{
- Dialog *pParentDialog = pWindow ? pWindow->GetParentDialog() : NULL;
+ Dialog *pParentDialog = pWindow ? pWindow->GetParentDialog() : nullptr;
return pParentDialog && pParentDialog->isCalculatingInitialLayoutSize();
}
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index aa0cf67ad3f3..1cddcab06201 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -40,7 +40,7 @@ using namespace ::com::sun::star;
static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyType, vcl::Window* pLabel, sal_Unicode nAccel )
{
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if( nMyType == WINDOW_FIXEDTEXT ||
nMyType == WINDOW_FIXEDLINE ||
@@ -103,14 +103,14 @@ namespace vcl {
Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = ImplGetFrameWindow();
WinBits nFrameStyle = pFrameWindow->GetStyle();
if( ! ( nFrameStyle & WB_DIALOGCONTROL )
|| ( nFrameStyle & WB_NODIALOGCONTROL )
)
- return NULL;
+ return nullptr;
if ( mpWindowImpl->mpRealParent )
pWindow = mpWindowImpl->mpRealParent->GetParentLabelFor( this );
@@ -128,7 +128,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled )
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) )
{
// search for a control that labels this window
@@ -183,7 +183,7 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = ImplGetFrameWindow();
if ( mpWindowImpl->mpRealParent )
@@ -196,7 +196,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
// #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels
if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
- return NULL;
+ return nullptr;
// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
// GetType() == WINDOW_FIXEDLINE ||
@@ -213,7 +213,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const
{
- Window* pWindow = NULL;
+ Window* pWindow = nullptr;
Window* pFrameWindow = GetParent();
if ( !pFrameWindow )
{
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 6ca2bd38b9bd..49acb2e0c10c 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -114,13 +114,13 @@ static void ImplSetMenuItemData( MenuItemData* pData )
}
Menu::Menu()
- : mpFirstDel(NULL),
+ : mpFirstDel(nullptr),
pItemList(new MenuItemList),
- pLogo(NULL),
- pStartedFrom(NULL),
- pWindow(NULL),
+ pLogo(nullptr),
+ pStartedFrom(nullptr),
+ pWindow(nullptr),
nTitleHeight(0),
- nEventId(0),
+ nEventId(nullptr),
mnHighlightedItemPos(ITEMPOS_INVALID),
nMenuFlags(MenuFlags::NONE),
nDefaultItem(0),
@@ -130,8 +130,8 @@ Menu::Menu()
bCanceled(false),
bInCallback(false),
bKilled(false),
- mpLayoutData(NULL),
- mpSalMenu(NULL)
+ mpLayoutData(nullptr),
+ mpSalMenu(nullptr)
{
}
@@ -145,7 +145,7 @@ Menu::~Menu()
{
MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
if( pFloat->pMenu == this )
- pFloat->pMenu = NULL;
+ pFloat->pMenu = nullptr;
pWindow->SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >() );
}
@@ -164,7 +164,7 @@ Menu::~Menu()
ImplMenuDelData* pDelData = mpFirstDel;
while ( pDelData )
{
- pDelData->mpMenu = NULL;
+ pDelData->mpMenu = nullptr;
pDelData = pDelData->mpNext;
}
@@ -175,7 +175,7 @@ Menu::~Menu()
delete mpLayoutData;
// Native-support: destroy SalMenu
- ImplSetSalMenu( NULL );
+ ImplSetSalMenu( nullptr );
}
void Menu::CreateAutoMnemonics()
@@ -291,7 +291,7 @@ void Menu::ImplSelect()
// call select
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maAppData.mpActivePopupMenu = NULL; // if new execute in select()
+ pSVData->maAppData.mpActivePopupMenu = nullptr; // if new execute in select()
nEventId = Application::PostUserEvent( LINK( this, Menu, ImplCallSelect ) );
}
@@ -395,7 +395,7 @@ void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nIt
NbcInsertItem(nItemId, nItemBits, rStr, this, nPos, rIdent);
vcl::Window* pWin = ImplGetWindow();
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if ( pWin )
{
ImplCalcSize( pWin );
@@ -522,7 +522,7 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos )
}
IncrementRes( GetObjSizeRes( static_cast<RSHEADER_TYPE*>(GetClassRes()) ) );
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos)
@@ -544,7 +544,7 @@ void Menu::InsertSeparator(const OString &rIdent, sal_uInt16 nPos)
if( ImplGetSalMenu() && pData && pData->pSalMenuItem )
ImplGetSalMenu()->InsertItem( pData->pSalMenuItem, nPos );
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
ImplCallEventListeners( VCLEVENT_MENU_INSERTITEM, nPos );
}
@@ -570,7 +570,7 @@ void Menu::RemoveItem( sal_uInt16 nPos )
if ( pWin->IsVisible() )
pWin->Invalidate();
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if ( bRemove )
ImplCallEventListeners( VCLEVENT_MENU_REMOVEITEM, nPos );
@@ -793,7 +793,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
// #112023# Make sure pStartedFrom does not point to invalid (old) data
if ( pData->pSubMenu )
- pData->pSubMenu->pStartedFrom = 0;
+ pData->pSubMenu->pStartedFrom = nullptr;
// set native submenu
if( ImplGetSalMenu() && pData->pSalMenuItem )
@@ -801,7 +801,7 @@ void Menu::SetPopupMenu( sal_uInt16 nItemId, PopupMenu* pMenu )
if( pMenu )
ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, pMenu->ImplGetSalMenu(), nPos );
else
- ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, NULL, nPos );
+ ImplGetSalMenu()->SetSubMenu( pData->pSalMenuItem, nullptr, nPos );
}
ImplCallEventListeners( VCLEVENT_MENU_SUBMENUCHANGED, nPos );
@@ -814,7 +814,7 @@ PopupMenu* Menu::GetPopupMenu( sal_uInt16 nItemId ) const
if ( pData )
return static_cast<PopupMenu*>(pData->pSubMenu);
else
- return NULL;
+ return nullptr;
}
void Menu::SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode )
@@ -1030,7 +1030,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr )
ImplGetSalMenu()->SetItemText( nPos, pData->pSalMenuItem, rStr );
vcl::Window* pWin = ImplGetWindow();
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
if (pWin && IsMenuBar())
{
ImplCalcSize( pWin );
@@ -1190,9 +1190,9 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
if ( pHelp )
{
if (!pData->aCommandStr.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
+ pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, nullptr );
if (pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty())
- pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), nullptr );
}
}
@@ -1286,7 +1286,7 @@ bool Menu::ImplIsVisible( sal_uInt16 nPos ) const
// always avoid adjacent separators
size_t nCount = pItemList->size();
size_t n;
- MenuItemData* pNextData = NULL;
+ MenuItemData* pNextData = nullptr;
// search next visible item
for( n = nPos + 1; n < nCount; n++ )
{
@@ -1470,7 +1470,7 @@ void Menu::ImplAddDel( ImplMenuDelData& rDel )
void Menu::ImplRemoveDel( ImplMenuDelData& rDel )
{
- rDel.mpMenu = NULL;
+ rDel.mpMenu = nullptr;
if ( mpFirstDel == &rDel )
{
mpFirstDel = rDel.mpNext;
@@ -1740,7 +1740,7 @@ static void ImplPaintCheckBackground(vcl::RenderContext& rRenderContext, vcl::Wi
{
const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() );
- RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, NULL, 2, &aColor);
+ RenderTools::DrawSelectionBackground(rRenderContext, rWindow, i_rRect, 0, i_bHighlight, true, false, nullptr, 2, &aColor);
}
}
@@ -2028,8 +2028,8 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
if (pData->bIsTemporary)
nStyle |= DrawTextFlags::Disable;
- MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpLayoutData->m_aDisplayText : nullptr;
if (bLayout)
{
mpLayoutData->m_aLineIndices.push_back(mpLayoutData->m_aDisplayText.getLength());
@@ -2204,13 +2204,13 @@ void Menu::ImplCallHighlight(sal_uInt16 nItem)
IMPL_LINK_NOARG_TYPED(Menu, ImplCallSelect, void*, void)
{
- nEventId = 0;
+ nEventId = nullptr;
Select();
}
Menu* Menu::ImplFindSelectMenu()
{
- Menu* pSelMenu = nEventId ? this : NULL;
+ Menu* pSelMenu = nEventId ? this : nullptr;
for ( size_t n = GetItemList()->size(); n && !pSelMenu; )
{
@@ -2225,7 +2225,7 @@ Menu* Menu::ImplFindSelectMenu()
Menu* Menu::ImplFindMenu( sal_uInt16 nItemId )
{
- Menu* pSelMenu = NULL;
+ Menu* pSelMenu = nullptr;
for ( size_t n = GetItemList()->size(); n && !pSelMenu; )
{
@@ -2272,7 +2272,7 @@ void Menu::RemoveDisabledEntries( bool bCheckPopups, bool bRemoveEmptyPopups )
if ( pItem->eType == MenuItemType::SEPARATOR )
RemoveItem( nLast );
}
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
bool Menu::HasValidEntries( bool bCheckPopups )
@@ -2304,7 +2304,7 @@ void Menu::MenuBarKeyInput(const KeyEvent&)
void Menu::ImplKillLayoutData() const
{
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
}
void Menu::ImplFillLayoutData() const
@@ -2314,12 +2314,12 @@ void Menu::ImplFillLayoutData() const
mpLayoutData = new MenuLayoutData();
if (IsMenuBar())
{
- ImplPaint(*pWindow, 0, 0, 0, false, true); // FIXME
+ ImplPaint(*pWindow, 0, 0, nullptr, false, true); // FIXME
}
else
{
MenuFloatingWindow* pFloat = static_cast<MenuFloatingWindow*>(pWindow.get());
- ImplPaint(*pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, false, true); //FIXME
+ ImplPaint(*pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), nullptr, false, true); //FIXME
}
}
}
@@ -2557,7 +2557,7 @@ vcl::Window* MenuBar::ImplCreate(vcl::Window* pParent, vcl::Window* pWindow, Men
pWindow = pMenuBarWindow = VclPtr<MenuBarWindow>::Create( pParent );
}
- pMenu->pStartedFrom = 0;
+ pMenu->pStartedFrom = nullptr;
pMenu->pWindow = pWindow;
pMenuBarWindow->SetMenu(pMenu);
long nHeight = pWindow ? pMenu->ImplCalcSize(pWindow).Height() : 0;
@@ -2583,7 +2583,7 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete )
pMenuWin->KillActivePopup();
pWindow->disposeOnce();
}
- pMenu->pWindow = NULL;
+ pMenu->pWindow = nullptr;
}
bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu )
@@ -2769,13 +2769,13 @@ MenuFloatingWindow * PopupMenu::ImplGetFloatingWindow() const {
}
PopupMenu::PopupMenu()
- : pRefAutoSubMenu(NULL)
+ : pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
}
PopupMenu::PopupMenu( const ResId& rResId )
- : pRefAutoSubMenu(NULL)
+ : pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
@@ -2809,7 +2809,7 @@ PopupMenu::PopupMenu( const ResId& rResId )
PopupMenu::PopupMenu( const PopupMenu& rMenu )
: Menu(),
- pRefAutoSubMenu(NULL)
+ pRefAutoSubMenu(nullptr)
{
mpSalMenu = ImplGetSVData()->mpDefInst->CreateMenu(false, this);
*this = rMenu;
@@ -2818,7 +2818,7 @@ PopupMenu::PopupMenu( const PopupMenu& rMenu )
PopupMenu::~PopupMenu()
{
if( pRefAutoSubMenu && *pRefAutoSubMenu == this )
- *pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData
+ *pRefAutoSubMenu = nullptr; // #111060# avoid second delete in ~MenuItemData
}
void PopupMenu::ClosePopup(Menu* pMenu)
@@ -2909,7 +2909,7 @@ sal_uInt16 PopupMenu::Execute( vcl::Window* pExecWindow, const Rectangle& rRect,
if (nFlags & PopupMenuFlags::NoHorzPlacement)
nPopupModeFlags |= FloatWinPopupFlags::NoHorzPlacement;
- return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, false );
+ return ImplExecute( pExecWindow, rRect, nPopupModeFlags, nullptr, false );
}
sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, FloatWinPopupFlags nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst )
@@ -2921,7 +2921,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
if( pSFrom && pSFrom->IsMenuBar())
((static_cast<MenuBarWindow*>(pSFrom->pWindow.get())))->SetMBWHideAccel(!(static_cast<MenuBarWindow*>(pSFrom->pWindow.get())->GetMBWMenuKey()));
- delete mpLayoutData, mpLayoutData = NULL;
+ delete mpLayoutData, mpLayoutData = nullptr;
ImplSVData* pSVData = ImplGetSVData();
@@ -2994,7 +2994,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
{
OUString aTmpEntryText( ResId( SV_RESID_STRING_NOSELECTIONPOSSIBLE, *pResMgr ) );
- MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, NULL, 0xFFFF, OString());
+ MenuItemData* pData = NbcInsertItem(0xFFFF, MenuItemBits::NONE, aTmpEntryText, nullptr, 0xFFFF, OString());
size_t nPos = 0;
pData = pItemList->GetData( pData->nId, nPos );
assert(pData);
@@ -3079,7 +3079,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
pWin->StopExecute();
pWin->doShutdown();
pWindow->doLazyDelete();
- pWindow = NULL;
+ pWindow = nullptr;
return nSelectedId;
}
else
@@ -3157,7 +3157,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
}
pWin->doShutdown();
pWindow->doLazyDelete();
- pWindow = NULL;
+ pWindow = nullptr;
// is there still Select?
Menu* pSelect = ImplFindSelectMenu();
@@ -3165,7 +3165,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa
{
// Select should be called prior to leaving execute in a popup menu!
Application::RemoveUserEvent( pSelect->nEventId );
- pSelect->nEventId = 0;
+ pSelect->nEventId = nullptr;
pSelect->Select();
}
}
@@ -3222,8 +3222,8 @@ long PopupMenu::ImplCalcHeight( sal_uInt16 nEntries ) const
}
ImplMenuDelData::ImplMenuDelData( const Menu* pMenu )
-: mpNext( 0 )
-, mpMenu( 0 )
+: mpNext( nullptr )
+, mpMenu( nullptr )
{
if( pMenu )
const_cast< Menu* >( pMenu )->ImplAddDel( *this );
@@ -3242,7 +3242,7 @@ struct MenuInvalidateListeners : public vcl::DeletionNotifier
std::vector<Link<LinkParamNone*,void>> m_aListeners;
};
-static MenuInvalidateListeners* pMenuInvalidateListeners = NULL;
+static MenuInvalidateListeners* pMenuInvalidateListeners = nullptr;
void AddMenuInvalidateListener(const Link<LinkParamNone*,void>& rLink)
{
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 67eba4eed45f..32093142d5b6 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -124,8 +124,8 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aHideBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE))
{
SetType(WINDOW_MENUBARWINDOW);
- pMenu = NULL;
- pActivePopup = NULL;
+ pMenu = nullptr;
+ pActivePopup = nullptr;
nSaveFocusId = 0;
nHighlightedItem = ITEMPOS_INVALID;
nRolloveredItem = ITEMPOS_INVALID;
@@ -287,7 +287,7 @@ IMPL_LINK_TYPED( MenuBarWindow, ShowHideListener, VclWindowEvent&, rEvent, void
void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
{
- MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : nullptr;
if ( pItemData )
{
bIgnoreFirstMove = true;
@@ -300,7 +300,7 @@ void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst )
{
pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu);
long nX = 0;
- MenuItemData* pData = 0;
+ MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->GetItemList()->GetDataFromPos( n );
@@ -353,9 +353,9 @@ void MenuBarWindow::KillActivePopup()
pActivePopup->ImplGetFloatingWindow()->StopExecute();
pActivePopup->ImplGetFloatingWindow()->doShutdown();
pActivePopup->pWindow->doLazyDelete();
- pActivePopup->pWindow = NULL;
+ pActivePopup->pWindow = nullptr;
}
- pActivePopup = 0;
+ pActivePopup = nullptr;
}
}
@@ -544,7 +544,7 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow )
vcl::Window *pChildWin = pWin->GetWindow( GetWindowType::FirstChild ); //mpWindowImpl->mpFirstChild;
while( pChildWin )
{
- DockingAreaWindow *pDockingArea = NULL;
+ DockingAreaWindow *pDockingArea = nullptr;
if ( pChildWin->GetType() == WINDOW_DOCKINGAREA )
pDockingArea = static_cast< DockingAreaWindow* >( pChildWin );
diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 0fff6618d878..327af121ba1d 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -31,7 +31,7 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBit
{
mpWindowImpl->mbMenuFloatingWindow= true;
pMenu = pMen;
- pActivePopup = 0;
+ pActivePopup = nullptr;
nSaveFocusId = 0;
bInExecute = false;
bScrollMenu = false;
@@ -98,7 +98,7 @@ void MenuFloatingWindow::doShutdown()
Rectangle aInvRect( GetWindowExtentsRelative( GetParent() ) );
GetParent()->Invalidate( aInvRect );
}
- pMenu = NULL;
+ pMenu = nullptr;
RemoveEventListener( LINK( this, MenuFloatingWindow, ShowHideListener ) );
}
}
@@ -231,7 +231,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
if ( bPopupArea && bAllowNewPopup )
{
- HighlightChanged( NULL );
+ HighlightChanged( nullptr );
}
}
else
@@ -243,7 +243,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDow
else if ( pItemData->nBits & MenuItemBits::POPUPSELECT )
{
if ( bPopupArea && ( pActivePopup != pItemData->pSubMenu ) )
- HighlightChanged( NULL );
+ HighlightChanged( nullptr );
}
}
bHighlighted = true;
@@ -284,7 +284,7 @@ IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, PopupEnd, FloatingWindow*, void)
}
if ( pM )
- pM->pStartedFrom = 0;
+ pM->pStartedFrom = nullptr;
}
IMPL_LINK_NOARG_TYPED(MenuFloatingWindow, AutoScroll, Timer *, void)
@@ -311,7 +311,7 @@ IMPL_LINK_TYPED( MenuFloatingWindow, HighlightChanged, Timer*, pTimer, void )
{
pActivePopup = static_cast<PopupMenu*>(pItemData->pSubMenu);
long nY = nScrollerHeight+ImplGetStartY();
- MenuItemData* pData = 0;
+ MenuItemData* pData = nullptr;
for ( sal_uLong n = 0; n < nHighlightedItem; n++ )
{
pData = pMenu->pItemList->GetDataFromPos( n );
@@ -394,7 +394,7 @@ void MenuFloatingWindow::Execute()
while ( bInExecute )
Application::Yield();
- pSVData->maAppData.mpActivePopupMenu = NULL;
+ pSVData->maAppData.mpActivePopupMenu = nullptr;
}
void MenuFloatingWindow::StopExecute( sal_uLong nFocusId )
@@ -437,7 +437,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
// For all actions pActivePopup = 0, if e.g.
// PopupModeEndHdl the popups to destroy were called synchronous
PopupMenu* pPopup = pActivePopup;
- pActivePopup = NULL;
+ pActivePopup = nullptr;
pPopup->bInCallback = true;
pPopup->Deactivate();
pPopup->bInCallback = false;
@@ -446,7 +446,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
pPopup->ImplGetFloatingWindow()->StopExecute();
pPopup->ImplGetFloatingWindow()->doShutdown();
pPopup->pWindow->doLazyDelete();
- pPopup->pWindow = NULL;
+ pPopup->pWindow = nullptr;
Update();
}
@@ -455,7 +455,7 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly )
void MenuFloatingWindow::EndExecute()
{
- Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : NULL;
+ Menu* pStart = pMenu ? pMenu->ImplGetStartMenu() : nullptr;
sal_uLong nFocusId = 0;
if (pStart)
nFocusId = pStart->DeactivateMenuBar(nFocusId);
@@ -517,7 +517,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt )
void MenuFloatingWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
- MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : nullptr;
// nMBDownPos store in local variable and reset immediately,
// as it will be too late after EndExecute
sal_uInt16 _nMBDownPos = nMBDownPos;
@@ -548,7 +548,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt )
if ( rMEvt.IsLeaveWindow() )
{
// #102461# do not remove highlight if a popup menu is open at this position
- MenuItemData* pData = pMenu ? pMenu->pItemList->GetDataFromPos( nHighlightedItem ) : NULL;
+ MenuItemData* pData = pMenu ? pMenu->pItemList->GetDataFromPos( nHighlightedItem ) : nullptr;
// close popup with some delayed if we leave somewhere else
if( pActivePopup && pData && pData->pSubMenu != pActivePopup )
pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start();
@@ -1055,7 +1055,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
MenuItemData* pData = pMenu->GetItemList()->GetDataFromPos( nHighlightedItem );
if ( pData && pData->pSubMenu )
{
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
bDone = true;
}
}
@@ -1079,7 +1079,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( pData && pData->bEnabled )
{
if ( pData->pSubMenu )
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
else
EndExecute();
}
@@ -1107,7 +1107,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
sal_uInt16 nPos = 0;
sal_uInt16 nDuplicates = 0;
MenuItemData* pData = (nCharCode && pMenu) ?
- pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : NULL;
+ pMenu->GetItemList()->SearchItem(nCharCode, rKEvent.GetKeyCode(), nPos, nDuplicates, nHighlightedItem) : nullptr;
bool bConsume = false;
bool accel = ImplGetSVData()->maNWFData.mbEnableAccel;
if (pData && accel)
@@ -1122,7 +1122,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent )
if ( pData->pSubMenu || nDuplicates > 1 )
{
ChangeHighlightItem( nPos, false );
- HighlightChanged( 0 );
+ HighlightChanged( nullptr );
}
else
{
@@ -1212,7 +1212,7 @@ void MenuFloatingWindow::RequestHelp( const HelpEvent& rHEvt )
{
nHighlightedItem = ITEMPOS_INVALID;
EndExecute();
- pW = NULL;
+ pW = nullptr;
}
if( !ImplHandleHelpEvent( pW, pM, nId, rHEvt, aHighlightRect ) )
diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx
index 8797d4ba9361..6fe08e4f8572 100644
--- a/vcl/source/window/menufloatingwindow.hxx
+++ b/vcl/source/window/menufloatingwindow.hxx
@@ -79,7 +79,7 @@ protected:
long ImplGetStartY() const;
Rectangle ImplGetItemRect( sal_uInt16 nPos );
void RenderHighlightItem( vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHighlight );
- long GetInitialItemY( long *pOptStartY = NULL ) const;
+ long GetInitialItemY( long *pOptStartY = nullptr ) const;
void InvalidateItem( sal_uInt16 nPos );
public:
@@ -113,7 +113,7 @@ public:
void EndExecute( sal_uInt16 nSelectId );
PopupMenu* GetActivePopup() const { return pActivePopup; }
- void KillActivePopup( PopupMenu* pThisOnly = NULL );
+ void KillActivePopup( PopupMenu* pThisOnly = nullptr );
void ChangeHighlightItem(sal_uInt16 n, bool bStartPopupTimer);
sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; }
diff --git a/vcl/source/window/menuitemlist.cxx b/vcl/source/window/menuitemlist.cxx
index c104ba8a1ef8..d1042b4fb30b 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -36,9 +36,9 @@ MenuItemData::~MenuItemData()
aUserValueReleaseFunc(nUserValue);
if( pAutoSubMenu )
{
- static_cast<PopupMenu*>(pAutoSubMenu)->pRefAutoSubMenu = NULL;
+ static_cast<PopupMenu*>(pAutoSubMenu)->pRefAutoSubMenu = nullptr;
delete pAutoSubMenu;
- pAutoSubMenu = NULL;
+ pAutoSubMenu = nullptr;
}
if( pSalMenuItem )
ImplGetSVData()->mpDefInst->DestroyMenuItem( pSalMenuItem );
@@ -66,8 +66,8 @@ MenuItemData* MenuItemList::Insert(
pData->sIdent = rIdent;
pData->eType = eType;
pData->nBits = nBits;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
+ pData->pSubMenu = nullptr;
+ pData->pAutoSubMenu = nullptr;
pData->nUserValue = 0;
pData->bChecked = false;
pData->bEnabled = true;
@@ -102,8 +102,8 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
pData->sIdent = rIdent;
pData->eType = MenuItemType::SEPARATOR;
pData->nBits = MenuItemBits::NONE;
- pData->pSubMenu = NULL;
- pData->pAutoSubMenu = NULL;
+ pData->pSubMenu = nullptr;
+ pData->pAutoSubMenu = nullptr;
pData->nUserValue = 0;
pData->bChecked = false;
pData->bEnabled = true;
@@ -116,7 +116,7 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
aSalMIData.nId = 0;
aSalMIData.eType = MenuItemType::SEPARATOR;
aSalMIData.nBits = MenuItemBits::NONE;
- aSalMIData.pMenu = NULL;
+ aSalMIData.pMenu = nullptr;
aSalMIData.aText.clear();
aSalMIData.aImage = Image();
@@ -149,7 +149,7 @@ MenuItemData* MenuItemList::GetData( sal_uInt16 nSVId, size_t& rPos ) const
return maItemList[ i ];
}
}
- return NULL;
+ return nullptr;
}
MenuItemData* MenuItemList::SearchItem(
@@ -221,7 +221,7 @@ MenuItemData* MenuItemList::SearchItem(
}
}
- return NULL;
+ return nullptr;
}
size_t MenuItemList::GetItemCount( sal_Unicode cSelectChar ) const
diff --git a/vcl/source/window/menuitemlist.hxx b/vcl/source/window/menuitemlist.hxx
index 6f2b2631bdef..3f7f8d2d6166 100644
--- a/vcl/source/window/menuitemlist.hxx
+++ b/vcl/source/window/menuitemlist.hxx
@@ -62,28 +62,28 @@ struct MenuItemData
: nId(0)
, eType(MenuItemType::DONTKNOW)
, nBits(MenuItemBits::NONE)
- , pSubMenu(NULL)
- , pAutoSubMenu(NULL)
+ , pSubMenu(nullptr)
+ , pAutoSubMenu(nullptr)
, nUserValue(0)
- , aUserValueReleaseFunc(0)
+ , aUserValueReleaseFunc(nullptr)
, bChecked(false)
, bEnabled(false)
, bVisible(false)
, bIsTemporary(false)
, bMirrorMode(false)
, nItemImageAngle(0)
- , pSalMenuItem(NULL)
+ , pSalMenuItem(nullptr)
{
}
MenuItemData( const OUString& rStr, const Image& rImage )
: nId(0)
, eType(MenuItemType::DONTKNOW)
, nBits(MenuItemBits::NONE)
- , pSubMenu(NULL)
- , pAutoSubMenu(NULL)
+ , pSubMenu(nullptr)
+ , pAutoSubMenu(nullptr)
, aText(rStr)
, nUserValue(0)
- , aUserValueReleaseFunc(0)
+ , aUserValueReleaseFunc(nullptr)
, aImage(rImage)
, bChecked(false)
, bEnabled(false)
@@ -91,7 +91,7 @@ struct MenuItemData
, bIsTemporary(false)
, bMirrorMode(false)
, nItemImageAngle(0)
- , pSalMenuItem(NULL)
+ , pSalMenuItem(nullptr)
{
}
~MenuItemData();
@@ -134,7 +134,7 @@ public:
}
MenuItemData* GetDataFromPos( size_t nPos ) const
{
- return ( nPos < maItemList.size() ) ? maItemList[ nPos ] : NULL;
+ return ( nPos < maItemList.size() ) ? maItemList[ nPos ] : nullptr;
}
MenuItemData* SearchItem(
diff --git a/vcl/source/window/menuwindow.cxx b/vcl/source/window/menuwindow.cxx
index e915c33e4c07..72a1baecbb3f 100644
--- a/vcl/source/window/menuwindow.cxx
+++ b/vcl/source/window/menuwindow.cxx
@@ -99,9 +99,9 @@ bool MenuWindow::ImplHandleHelpEvent(vcl::Window* pMenuWindow, Menu* pMenu, sal_
aHelpId = OOO_HELP_INDEX;
if ( !aCommand.isEmpty() )
- pHelp->Start( aCommand, NULL );
+ pHelp->Start( aCommand, nullptr );
else
- pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
+ pHelp->Start( OStringToOUString( aHelpId, RTL_TEXTENCODING_UTF8 ), nullptr );
}
bDone = true;
}
diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx
index f9f74398e172..6901d1aa4ed1 100644
--- a/vcl/source/window/mnemonicengine.cxx
+++ b/vcl/source/window/mnemonicengine.cxx
@@ -47,7 +47,7 @@ namespace vcl
OUString sEntryText;
const void* pSearchEntry = _rEntryList.FirstSearchEntry( sEntryText );
- const void* pFirstFoundEntry = NULL;
+ const void* pFirstFoundEntry = nullptr;
bool bCheckingAmbiguity = false;
const void* pStartedWith = pSearchEntry;
while ( pSearchEntry )
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index ad6c460d6d91..198e4cde7460 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -160,12 +160,12 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged )
void Window::ImplGenerateMouseMove()
{
if ( !mpWindowImpl->mpFrameData->mnMouseMoveId )
- mpWindowImpl->mpFrameData->mnMouseMoveId = Application::PostUserEvent( LINK( mpWindowImpl->mpFrameWindow, Window, ImplGenerateMouseMoveHdl ), NULL, true );
+ mpWindowImpl->mpFrameData->mnMouseMoveId = Application::PostUserEvent( LINK( mpWindowImpl->mpFrameWindow, Window, ImplGenerateMouseMoveHdl ), nullptr, true );
}
IMPL_LINK_NOARG_TYPED(Window, ImplGenerateMouseMoveHdl, void*, void)
{
- mpWindowImpl->mpFrameData->mnMouseMoveId = 0;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
vcl::Window* pCaptureWin = ImplGetSVData()->maWinData.mpCaptureWin;
if( ! pCaptureWin ||
(pCaptureWin->mpWindowImpl && pCaptureWin->mpWindowImpl->mpFrame == mpWindowImpl->mpFrame)
@@ -384,7 +384,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
if ( !ImplCallPreNotify( aNEvt ) && !aDogTag.IsDead() )
CompatGetFocus();
if( !aDogTag.IsDead() )
- ImplCallActivateListeners( (pOldFocusWindow && ! aOldFocusDel.IsDead()) ? pOldFocusWindow : NULL );
+ ImplCallActivateListeners( (pOldFocusWindow && ! aOldFocusDel.IsDead()) ? pOldFocusWindow : nullptr );
if( !aDogTag.IsDead() )
{
mpWindowImpl->mnGetFocusFlags = GetFocusFlags::NONE;
@@ -473,7 +473,7 @@ void Window::ReleaseMouse()
if ( pSVData->maWinData.mpCaptureWin.get() == this )
{
- pSVData->maWinData.mpCaptureWin = NULL;
+ pSVData->maWinData.mpCaptureWin = nullptr;
mpWindowImpl->mpFrame->CaptureMouse( false );
ImplGenerateMouseMove();
}
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 659c3fe33449..e892c1d3c7be 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -52,10 +52,10 @@ static void ImplInitMsgBoxImageList()
void MessBox::ImplInitMessBoxData()
{
- mpVCLMultiLineEdit = NULL;
- mpFixedImage = NULL;
+ mpVCLMultiLineEdit = nullptr;
+ mpFixedImage = nullptr;
mbHelpBtn = false;
- mpCheckBox = NULL;
+ mpCheckBox = nullptr;
mbCheck = false;
}
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 9af4c0ff399b..3f95894181d1 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -42,7 +42,7 @@ OpenGLWindowImpl::~OpenGLWindowImpl()
OpenGLWindow::OpenGLWindow(vcl::Window* pParent):
Window(pParent, 0),
mxImpl(new OpenGLWindowImpl(this)),
- mpRenderer(NULL)
+ mpRenderer(nullptr)
{
}
@@ -55,7 +55,7 @@ void OpenGLWindow::dispose()
{
if(mpRenderer)
mpRenderer->contextDestroyed();
- mpRenderer = NULL;
+ mpRenderer = nullptr;
mxImpl.reset();
Window::dispose();
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index ade79ba0d77d..6dd4da85a2ba 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -215,7 +215,7 @@ public:
PaintHelper::PaintHelper(vcl::Window *pWindow, sal_uInt16 nPaintFlags)
: m_pWindow(pWindow)
- , m_pChildRegion(NULL)
+ , m_pChildRegion(nullptr)
, m_nPaintFlags(nPaintFlags)
, m_bPop(false)
, m_bRestoreCursor(false)
@@ -519,7 +519,7 @@ void Window::PopPaintHelper(PaintHelper *pHelper)
}
mpWindowImpl->mbInPaint = false;
mbInitClipRegion = true;
- mpWindowImpl->mpPaintRegion = NULL;
+ mpWindowImpl->mpPaintRegion = nullptr;
if (mpWindowImpl->mpCursor)
mpWindowImpl->mpCursor->ImplResume(pHelper->GetRestoreCursor());
}
@@ -628,7 +628,7 @@ void Window::ImplCallOverlapPaint()
// - RTL - notify ImplCallPaint to check for re-mirroring (CHECKRTL)
// because we were called from the Sal layer
OutputDevice::PaintScope aScope( GetOutDev() );
- ImplCallPaint(NULL, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
+ ImplCallPaint(nullptr, mpWindowImpl->mnPaintFlags /*| IMPL_PAINT_CHECKRTL */);
}
}
@@ -671,12 +671,12 @@ IMPL_LINK_NOARG_TYPED(Window, ImplHandleResizeTimerHdl, Idle *, void)
ImplCallResize();
if( ImplDoTiledRendering() )
{
- ImplHandlePaintHdl(NULL);
+ ImplHandlePaintHdl(nullptr);
}
else if( mpWindowImpl->mpFrameData->maPaintIdle.IsActive() )
{
mpWindowImpl->mpFrameData->maPaintIdle.Stop();
- mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( NULL );
+ mpWindowImpl->mpFrameData->maPaintIdle.GetIdleHdl().Call( nullptr );
}
}
}
@@ -811,7 +811,7 @@ void Window::ImplInvalidate( const vcl::Region* pRegion, InvalidateFlags nFlags
if ( (nFlags & InvalidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bInvalidateAll = false;
if ( bInvalidateAll )
- ImplInvalidateFrameRegion( NULL, nFlags );
+ ImplInvalidateFrameRegion( nullptr, nFlags );
else
{
Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
@@ -970,7 +970,7 @@ void Window::ImplValidate( const vcl::Region* pRegion, ValidateFlags nFlags )
if ( (nFlags & ValidateFlags::NoChildren) && mpWindowImpl->mpFirstChild )
bValidateAll = false;
if ( bValidateAll )
- ImplValidateFrameRegion( NULL, nFlags );
+ ImplValidateFrameRegion( nullptr, nFlags );
else
{
Rectangle aRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
@@ -1017,7 +1017,7 @@ void Window::ImplUpdateAll( bool bOverlapWindows )
else
{
if (pWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTCHILDREN))
- pWindow->ImplCallPaint(NULL, pWindow->mpWindowImpl->mnPaintFlags);
+ pWindow->ImplCallPaint(nullptr, pWindow->mpWindowImpl->mnPaintFlags);
}
if ( bFlush )
@@ -1208,8 +1208,8 @@ void Window::Invalidate( InvalidateFlags nFlags )
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplInvalidate( NULL, nFlags );
- LogicInvalidate(0);
+ ImplInvalidate( nullptr, nFlags );
+ LogicInvalidate(nullptr);
}
void Window::Invalidate( const Rectangle& rRect, InvalidateFlags nFlags )
@@ -1235,8 +1235,8 @@ void Window::Invalidate( const vcl::Region& rRegion, InvalidateFlags nFlags )
if ( rRegion.IsNull() )
{
- ImplInvalidate( NULL, nFlags );
- LogicInvalidate(0);
+ ImplInvalidate( nullptr, nFlags );
+ LogicInvalidate(nullptr);
}
else
{
@@ -1255,7 +1255,7 @@ void Window::Validate( ValidateFlags nFlags )
if ( !comphelper::LibreOfficeKit::isActive() && (!IsDeviceOutputNecessary() || !mnOutWidth || !mnOutHeight) )
return;
- ImplValidate( NULL, nFlags );
+ ImplValidate( nullptr, nFlags );
}
bool Window::HasPaintEvent() const
@@ -1345,7 +1345,7 @@ void Window::Update()
pUpdateOverlapWindow = pUpdateOverlapWindow->mpWindowImpl->mpNext;
}
- pUpdateWindow->ImplCallPaint(NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags);
+ pUpdateWindow->ImplCallPaint(nullptr, pUpdateWindow->mpWindowImpl->mnPaintFlags);
if (aDogTag.IsDead())
return;
@@ -1485,7 +1485,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /
DBG_ASSERT( ! pDev->HasMirroredGraphics(), "PaintToDevice to mirroring graphics" );
DBG_ASSERT( ! pDev->IsRTLEnabled(), "PaintToDevice to mirroring device" );
- vcl::Window* pRealParent = NULL;
+ vcl::Window* pRealParent = nullptr;
if( ! mpWindowImpl->mbVisible )
{
vcl::Window* pTempParent = ImplGetDefaultWindow();
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ef58f37eea17..71c175b52dfc 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -571,7 +571,7 @@ void PrintDialog::OutputOptPage::storeToSettings()
PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterController>& i_rController )
: ModalDialog(i_pParent, "PrintDialog", "vcl/ui/printdialog.ui")
- , mpCustomOptionsUIBuilder(NULL)
+ , mpCustomOptionsUIBuilder(nullptr)
, maPController( i_rController )
, maNUpPage(m_pUIBuilder)
, maJobPage(m_pUIBuilder)
@@ -1002,7 +1002,7 @@ void PrintDialog::setupOptionalUI()
if( pVal )
pVal->Value >>= bVal;
maNUpPage.mpBrochureBtn->Check( bVal );
- maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != NULL );
+ maNUpPage.mpBrochureBtn->Enable( maPController->isUIOptionEnabled( aPropertyName ) && pVal != nullptr );
maNUpPage.mpBrochureBtn->SetToggleHdl( LINK( this, PrintDialog, ToggleRadioHdl ) );
maPropertyToWindowMap[ aPropertyName ].push_back( maNUpPage.mpBrochureBtn );
@@ -1671,7 +1671,7 @@ IMPL_LINK_TYPED( PrintDialog, ModifyHdl, Edit&, rEdit, void )
PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
{
- PropertyValue* pVal = NULL;
+ PropertyValue* pVal = nullptr;
auto it = maControlToPropertyMap.find( i_pWindow );
if( it != maControlToPropertyMap.end() )
{
diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx
index 88e1cf1106d7..b438d1e6c009 100644
--- a/vcl/source/window/scrwnd.cxx
+++ b/vcl/source/window/scrwnd.cxx
@@ -91,7 +91,7 @@ void ImplWheelWindow::dispose()
{
ImplStop();
delete mpTimer;
- mpTimer = NULL;
+ mpTimer = nullptr;
FloatingWindow::dispose();
}
@@ -123,7 +123,7 @@ void ImplWheelWindow::ImplCreateImageList()
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
maImgList.InsertFromHorizontalBitmap
- ( ResId( SV_RESID_BITMAP_SCROLLBMP, *pResMgr ), 6, NULL );
+ ( ResId( SV_RESID_BITMAP_SCROLLBMP, *pResMgr ), 6, nullptr );
}
void ImplWheelWindow::ImplSetWheelMode( sal_uLong nWheelMode )
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 115ec625e159..de21f161c778 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -52,7 +52,7 @@ namespace
void Splitter::ImplInitSplitterData()
{
ImplGetWindowImpl()->mbSplitter = true;
- mpRefWin = NULL;
+ mpRefWin = nullptr;
mnSplitPos = 0;
mnLastSplitPos = 0;
mnStartSplitPos = 0;
@@ -88,7 +88,7 @@ void Splitter::ImplInitHorVer(bool bNew)
void Splitter::ImplInit( vcl::Window* pParent, WinBits nWinStyle )
{
- Window::ImplInit( pParent, nWinStyle, NULL );
+ Window::ImplInit( pParent, nWinStyle, nullptr );
mpRefWin = pParent;
@@ -183,7 +183,7 @@ Splitter* Splitter::ImplFindSibling()
{
// look for another splitter with the same parent but different orientation
vcl::Window *pWin = GetParent()->GetWindow( GetWindowType::FirstChild );
- Splitter *pSplitter = NULL;
+ Splitter *pSplitter = nullptr;
while( pWin )
{
if( pWin->ImplIsSplitter() )
@@ -194,7 +194,7 @@ Splitter* Splitter::ImplFindSibling()
}
pWin = pWin->GetWindow( GetWindowType::Next );
}
- return NULL;
+ return nullptr;
}
bool Splitter::ImplSplitterActive()
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 572a9a4b6966..e6d62d305580 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -111,7 +111,7 @@ ImplSplitItem::ImplSplitItem()
, mnOldSplitSize(0)
, mnOldWidth(0)
, mnOldHeight(0)
- , mpSet(0)
+ , mpSet(nullptr)
, mnId(0)
, mnBits(SplitWindowItemFlags::NONE)
, mbFixed(false)
@@ -130,15 +130,15 @@ void ImplSplitItem::dispose()
{
if (mpSet) {
delete mpSet ;
- mpSet = NULL;
+ mpSet = nullptr;
}
mpWindow.clear();
mpOrgParent.clear();
}
ImplSplitSet::ImplSplitSet() :
- mpWallpaper( NULL ),
- mpBitmap( NULL ),
+ mpWallpaper( nullptr ),
+ mpBitmap( nullptr ),
mnLastSize( 0 ),
mnSplitSize( SPLITWIN_SPLITSIZE ),
mnId( 0 ),
@@ -161,12 +161,12 @@ void ImplSplitSet::dispose()
if ( mpWallpaper ) {
delete mpWallpaper;
- mpWallpaper = NULL;
+ mpWallpaper = nullptr;
}
if ( mpBitmap ) {
delete mpBitmap;
- mpBitmap = NULL;
+ mpBitmap = nullptr;
}
}
@@ -359,7 +359,7 @@ static ImplSplitSet* ImplFindSet( ImplSplitSet* pSet, sal_uInt16 nId )
}
}
- return NULL;
+ return nullptr;
}
static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt16& rPos )
@@ -387,7 +387,7 @@ static ImplSplitSet* ImplFindItem( ImplSplitSet* pSet, sal_uInt16 nId, sal_uInt1
}
}
- return NULL;
+ return nullptr;
}
static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, vcl::Window* pWindow )
@@ -1304,8 +1304,8 @@ void SplitWindow::ImplInit( vcl::Window* pParent, WinBits nStyle )
mpMainSet = pNewSet;
mpBaseSet = pNewSet;
- mpSplitSet = NULL;
- mpLastSizes = NULL;
+ mpSplitSet = nullptr;
+ mpLastSizes = nullptr;
mnDX = 0;
mnDY = 0;
mnLeftBorder = 0;
@@ -1404,7 +1404,7 @@ void SplitWindow::dispose()
// delete Sets
if (mpMainSet) {
delete mpMainSet ;
- mpMainSet = NULL; //NULL for base-class callbacks during destruction
+ mpMainSet = nullptr; //NULL for base-class callbacks during destruction
}
DockingWindow::dispose();
}
@@ -2487,8 +2487,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
if ( rTEvt.IsTrackingEnded() )
{
delete [] mpLastSizes;
- mpLastSizes = NULL;
- mpSplitSet = NULL;
+ mpLastSizes = nullptr;
+ mpSplitSet = nullptr;
mnMouseOff = 0;
mnMStartPos = 0;
mnMSplitPos = 0;
@@ -2501,9 +2501,9 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt )
bool SplitWindow::PreNotify( NotifyEvent& rNEvt )
{
- const MouseEvent* pMouseEvt = NULL;
+ const MouseEvent* pMouseEvt = nullptr;
- if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != NULL )
+ if( (rNEvt.GetType() == MouseNotifyEvent::MOUSEMOVE) && (pMouseEvt = rNEvt.GetMouseEvent()) != nullptr )
{
if( !pMouseEvt->GetButtons() && !pMouseEvt->IsSynthetic() && !pMouseEvt->IsModifierChanged() )
{
@@ -2719,7 +2719,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, long nSize,
sal_uInt16 nPos, sal_uInt16 nIntoSetId,
SplitWindowItemFlags nBits )
{
- InsertItem( nId, NULL, nSize, nPos, nIntoSetId, nBits );
+ InsertItem( nId, nullptr, nSize, nPos, nIntoSetId, nBits );
}
void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide )
@@ -2743,7 +2743,7 @@ void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide )
// delete set if required
if ( !pWindow ) {
delete pItem->mpSet ;
- pItem->mpSet = NULL;
+ pItem->mpSet = nullptr;
}
// remove item
@@ -3100,7 +3100,7 @@ void SplitWindow::SetItemSizeRange (sal_uInt16 nId, const Range& rRange)
sal_uInt16 nPos;
ImplSplitSet* pSet = ImplFindItem(mpBaseSet, nId, nPos);
- if (pSet != NULL)
+ if (pSet != nullptr)
{
pSet->mpItems[nPos]->mnMinSize = rRange.Min();
pSet->mpItems[nPos]->mnMaxSize = rRange.Max();
@@ -3121,7 +3121,7 @@ sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const
bool SplitWindow::IsItemValid( sal_uInt16 nId ) const
{
sal_uInt16 nPos;
- ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : NULL;
+ ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : nullptr;
if ( pSet )
return true;
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 3a3e8730565f..cb5f316b94aa 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -148,8 +148,8 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData )
mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = mpWindowImpl->mpPrev;
}
- mpWindowImpl->mpPrev = NULL;
- mpWindowImpl->mpNext = NULL;
+ mpWindowImpl->mpPrev = nullptr;
+ mpWindowImpl->mpNext = nullptr;
}
if ( bRemoveFrameData )
@@ -205,7 +205,7 @@ void Window::ImplToBottomChild()
mpWindowImpl->mpPrev = mpWindowImpl->mpParent->mpWindowImpl->mpLastChild;
mpWindowImpl->mpParent->mpWindowImpl->mpLastChild = this;
mpWindowImpl->mpPrev->mpWindowImpl->mpNext = this;
- mpWindowImpl->mpNext = NULL;
+ mpWindowImpl->mpNext = nullptr;
}
}
@@ -228,7 +228,7 @@ void Window::ImplCalcToTop( ImplCalcToTopData* pPrevData )
{
ImplCalcToTopData* pData = new ImplCalcToTopData;
pPrevData->mpNext = pData;
- pData->mpNext = NULL;
+ pData->mpNext = nullptr;
pData->mpWindow = this;
pData->mpInvalidateRegion = new vcl::Region( aInvalidateRegion );
}
@@ -339,7 +339,7 @@ void Window::ImplStartToTop( ToTopFlags nFlags )
// first calculate paint areas
vcl::Window* pTempOverlapWindow = pOverlapWindow;
- aStartData.mpNext = NULL;
+ aStartData.mpNext = nullptr;
pCurData = &aStartData;
do
{
@@ -577,7 +577,7 @@ void Window::SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags )
// Invalidate all windows which are next to each other
// Is INCOMPLETE !!!
Rectangle aWinRect( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) );
- vcl::Window* pWindow = NULL;
+ vcl::Window* pWindow = nullptr;
if ( ImplIsOverlapWindow() )
{
if ( mpWindowImpl->mpOverlapWindow )
@@ -676,7 +676,7 @@ vcl::Window* Window::ImplFindWindow( const Point& rFramePos )
// then we check our window
if ( !mpWindowImpl->mbVisible )
- return NULL;
+ return nullptr;
sal_uInt16 nHitTest = ImplHitTest( rFramePos );
if ( nHitTest & WINDOW_HITTEST_INSIDE )
@@ -692,12 +692,12 @@ vcl::Window* Window::ImplFindWindow( const Point& rFramePos )
}
if ( nHitTest & WINDOW_HITTEST_TRANSPARENT )
- return NULL;
+ return nullptr;
else
return this;
}
- return NULL;
+ return nullptr;
}
bool Window::ImplIsRealParentPath( const vcl::Window* pWindow ) const
@@ -844,7 +844,7 @@ SystemWindow* Window::GetSystemWindow() const
static SystemWindow *ImplGetLastSystemWindow( vcl::Window *pWin )
{
// get the most top-level system window, the one that contains the taskpanelist
- SystemWindow *pSysWin = NULL;
+ SystemWindow *pSysWin = nullptr;
if( !pWin )
return pSysWin;
vcl::Window *pMyParent = pWin;
@@ -867,7 +867,7 @@ void Window::SetParent( vcl::Window* pNewParent )
// check if the taskpanelist would change and move the window pointer accordingly
SystemWindow *pSysWin = ImplGetLastSystemWindow(this);
- SystemWindow *pNewSysWin = NULL;
+ SystemWindow *pNewSysWin = nullptr;
bool bChangeTaskPaneList = false;
if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) )
{
@@ -907,16 +907,16 @@ void Window::SetParent( vcl::Window* pNewParent )
// check if the overlap window changes
vcl::Window* pOldOverlapWindow;
- vcl::Window* pNewOverlapWindow = NULL;
+ vcl::Window* pNewOverlapWindow = nullptr;
if ( ImplIsOverlapWindow() )
- pOldOverlapWindow = NULL;
+ pOldOverlapWindow = nullptr;
else
{
pNewOverlapWindow = pNewParent->ImplGetFirstOverlapWindow();
if ( mpWindowImpl->mpOverlapWindow.get() != pNewOverlapWindow )
pOldOverlapWindow = mpWindowImpl->mpOverlapWindow;
else
- pOldOverlapWindow = NULL;
+ pOldOverlapWindow = nullptr;
}
// convert windows in the hierarchy
@@ -928,17 +928,17 @@ void Window::SetParent( vcl::Window* pNewParent )
if ( mpWindowImpl->mpFrameData->mpFocusWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpFocusWin ) )
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
}
if ( mpWindowImpl->mpFrameData->mpMouseMoveWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseMoveWin ) )
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
}
if ( mpWindowImpl->mpFrameData->mpMouseDownWin )
{
if ( IsWindowOrChild( mpWindowImpl->mpFrameData->mpMouseDownWin ) )
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
}
}
ImplRemoveWindow( bNewFrame );
@@ -971,7 +971,7 @@ void Window::SetParent( vcl::Window* pNewParent )
if ( bFocusWin ||
(pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow &&
IsWindowOrChild( pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow )) )
- pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pOldOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
vcl::Window* pOverlapWindow = pOldOverlapWindow->mpWindowImpl->mpFirstOverlap;
while ( pOverlapWindow )
@@ -1041,7 +1041,7 @@ sal_uInt16 Window::GetChildCount() const
vcl::Window* Window::GetChild( sal_uInt16 nChild ) const
{
if (!mpWindowImpl)
- return NULL;
+ return nullptr;
sal_uInt16 nChildCount = 0;
vcl::Window* pChild = mpWindowImpl->mpFirstChild;
@@ -1053,13 +1053,13 @@ vcl::Window* Window::GetChild( sal_uInt16 nChild ) const
nChildCount++;
}
- return NULL;
+ return nullptr;
}
vcl::Window* Window::GetWindow( GetWindowType nType ) const
{
if (!mpWindowImpl)
- return 0;
+ return nullptr;
switch ( nType )
{
@@ -1111,40 +1111,40 @@ vcl::Window* Window::GetWindow( GetWindowType nType ) const
return const_cast<vcl::Window*>(this);
case GetWindowType::FirstTopWindowChild:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? nullptr : (*ImplGetWinData()->maTopWindowChildren.begin()).get();
case GetWindowType::LastTopWindowChild:
- return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get();
+ return ImplGetWinData()->maTopWindowChildren.empty() ? nullptr : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get();
case GetWindowType::PrevTopWindowSibling:
{
if ( !mpWindowImpl->mpRealParent )
- return NULL;
+ return nullptr;
const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( myPos == rTopWindows.end() )
- return NULL;
+ return nullptr;
if ( myPos == rTopWindows.begin() )
- return NULL;
+ return nullptr;
return *--myPos;
}
case GetWindowType::NextTopWindowSibling:
{
if ( !mpWindowImpl->mpRealParent )
- return NULL;
+ return nullptr;
const ::std::list< VclPtr<vcl::Window> >& rTopWindows( mpWindowImpl->mpRealParent->ImplGetWinData()->maTopWindowChildren );
::std::list< VclPtr<vcl::Window> >::const_iterator myPos =
::std::find( rTopWindows.begin(), rTopWindows.end(), this );
if ( ( myPos == rTopWindows.end() ) || ( ++myPos == rTopWindows.end() ) )
- return NULL;
+ return nullptr;
return *myPos;
}
}
- return NULL;
+ return nullptr;
}
bool Window::IsChild( const vcl::Window* pWindow, bool bSystemWindow ) const
@@ -1183,7 +1183,7 @@ void Window::ImplSetFrameParent( const vcl::Window* pParent )
{
DBG_ASSERT( mpWindowImpl->mpFrame != pFrameWindow->mpWindowImpl->mpFrame, "SetFrameParent to own" );
DBG_ASSERT( mpWindowImpl->mpFrame, "no frame" );
- SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
+ SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : nullptr;
pFrameWindow->mpWindowImpl->mpFrame->SetParent( pParentFrame );
}
pFrameWindow = pFrameWindow->mpWindowImpl->mpFrameData->mpNextFrame;
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c4a349012faf..c9649aaa8e77 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -53,7 +53,7 @@ public:
StatusBar::ImplData::ImplData()
{
- mpVirDev = NULL;
+ mpVirDev = nullptr;
mbDrawItemFrames = false;
mnItemBorderWidth = 0;
}
@@ -120,7 +120,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & (WB_LEFT | WB_RIGHT)) )
nStyle |= WB_RIGHT;
- Window::ImplInit( pParent, nStyle & ~WB_BORDER, NULL );
+ Window::ImplInit( pParent, nStyle & ~WB_BORDER, nullptr );
// remember WinBits
mpItemList = new ImplStatusItemList;
@@ -300,7 +300,7 @@ Rectangle StatusBar::ImplGetItemRectPos( sal_uInt16 nPos ) const
{
Rectangle aRect;
ImplStatusItem* pItem;
- pItem = ( nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : NULL;
+ pItem = ( nPos < mpItemList->size() ) ? (*mpItemList)[ nPos ] : nullptr;
if ( pItem )
{
if ( pItem->mbVisible )
@@ -940,7 +940,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth,
pItem->mnBits = nBits;
pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET;
pItem->mnOffset = nOffset;
- pItem->mpUserData = 0;
+ pItem->mpUserData = nullptr;
pItem->mbVisible = true;
// add item to list
@@ -1255,7 +1255,7 @@ void* StatusBar::GetItemData( sal_uInt16 nItemId ) const
if ( nPos != STATUSBAR_ITEM_NOTFOUND )
return (*mpItemList)[ nPos ]->mpUserData;
- return NULL;
+ return nullptr;
}
void StatusBar::RedrawItem(sal_uInt16 nItemId)
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index 0f16a49d717f..0615cf5f69e1 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -82,7 +82,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */,
if ( !pWindow->ImplGetFrameData()->mnFocusId )
{
pWindow->ImplGetFrameData()->mbStartFocusState = true;
- pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ), NULL, true );
+ pWindow->ImplGetFrameData()->mnFocusId = Application::PostUserEvent( LINK( pWindow->ImplGetFrameWindow(), vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
}
break;
@@ -108,7 +108,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
{
mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow );
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
// we do not paint if it is the right SysChild
if ( GetSystemData() )
@@ -122,7 +122,7 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle ) :
Window( WINDOW_SYSTEMCHILDWINDOW )
{
- ImplInitSysChild( pParent, nStyle, NULL );
+ ImplInitSysChild( pParent, nStyle, nullptr );
}
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) :
@@ -142,7 +142,7 @@ void SystemChildWindow::dispose()
if ( mpWindowImpl && mpWindowImpl->mpSysObj )
{
ImplGetSVData()->mpDefInst->DestroyObject( mpWindowImpl->mpSysObj );
- mpWindowImpl->mpSysObj = NULL;
+ mpWindowImpl->mpSysObj = nullptr;
}
Window::dispose();
}
@@ -152,7 +152,7 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const
if ( mpWindowImpl->mpSysObj )
return mpWindowImpl->mpSysObj->GetSystemData();
else
- return NULL;
+ return nullptr;
}
void SystemChildWindow::EnableEraseBackground( bool bEnable )
@@ -181,7 +181,7 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv )
if(jsMessage)
{
- const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, NULL);
+ const jchar * jcMessage = pJavaEnv->GetStringChars(jsMessage, nullptr);
ouMessage = OUString(jcMessage);
pJavaEnv->ReleaseStringChars(jsMessage, jcMessage);
}
@@ -234,7 +234,7 @@ sal_IntPtr SystemChildWindow::GetParentWindowHandle( bool bUseJava )
rtl_getGlobalProcessId( reinterpret_cast<sal_uInt8*>(aProcessID.getArray()) );
aProcessID[ 16 ] = 0;
OSL_ENSURE(sizeof (sal_Int64) >= sizeof (jvmaccess::VirtualMachine *), "Pointer cannot be represented as sal_Int64");
- sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(0));
+ sal_Int64 nPointer = reinterpret_cast< sal_Int64 >( static_cast< jvmaccess::VirtualMachine * >(nullptr));
xJavaVM->getJavaVM(aProcessID) >>= nPointer;
xVM = reinterpret_cast< jvmaccess::VirtualMachine * >(nPointer);
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a8f753800f0c..d353f4607d7d 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -58,7 +58,7 @@ public:
SystemWindow::ImplData::ImplData()
{
- mpTaskPaneList = NULL;
+ mpTaskPaneList = nullptr;
maMaxOutSize = Size( SHRT_MAX, SHRT_MAX );
}
@@ -73,7 +73,7 @@ void SystemWindow::Init()
mpWindowImpl->mbSysWin = true;
mpWindowImpl->mnActivateMode = ActivateModeFlags::GrabFocus;
- mpMenuBar = NULL;
+ mpMenuBar = nullptr;
mbPinned = false;
mbRollUp = false;
mbRollFunc = false;
@@ -84,7 +84,7 @@ void SystemWindow::Init()
mbInitialLayoutDone = false;
mnMenuBarMode = MenuBarMode::Normal;
mnIcon = 0;
- mpDialogParent = NULL;
+ mpDialogParent = nullptr;
//To-Do, reuse maResizeTimer
maLayoutIdle.SetPriority(SchedulerPriority::RESIZE);
@@ -115,7 +115,7 @@ void SystemWindow::dispose()
{
maLayoutIdle.Stop();
delete mpImplData;
- mpImplData = NULL;
+ mpImplData = nullptr;
// Hack to make sure code called from base ~Window does not interpret this
// as a SystemWindow (which it no longer is by then):
@@ -198,7 +198,7 @@ bool SystemWindow::PreNotify( NotifyEvent& rNEvt )
TaskPaneList* SystemWindow::GetTaskPaneList()
{
if( !mpImplData )
- return NULL;
+ return nullptr;
if( mpImplData->mpTaskPaneList )
return mpImplData->mpTaskPaneList ;
else
@@ -909,8 +909,8 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
if ( mpMenuBar != pMenuBar )
{
MenuBar* pOldMenuBar = mpMenuBar;
- vcl::Window* pOldWindow = NULL;
- vcl::Window* pNewWindow=NULL;
+ vcl::Window* pOldWindow = nullptr;
+ vcl::Window* pNewWindow=nullptr;
mpMenuBar = pMenuBar;
if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
@@ -918,7 +918,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
if ( pOldMenuBar )
pOldWindow = pOldMenuBar->ImplGetWindow();
else
- pOldWindow = NULL;
+ pOldWindow = nullptr;
if ( pOldWindow )
{
CallEventListeners( VCLEVENT_WINDOW_MENUBARREMOVED, static_cast<void*>(pOldMenuBar) );
@@ -934,11 +934,11 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
CallEventListeners( VCLEVENT_WINDOW_MENUBARADDED, static_cast<void*>(pMenuBar) );
}
else
- static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( NULL );
+ static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarWindow( nullptr );
ImplToBottomChild();
if ( pOldMenuBar )
{
- bool bDelete = (pMenuBar == 0);
+ bool bDelete = (pMenuBar == nullptr);
if( bDelete && pOldWindow )
{
if( mpImplData->mpTaskPaneList )
@@ -946,7 +946,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
}
MenuBar::ImplDestroy( pOldMenuBar, bDelete );
if( bDelete )
- pOldWindow = NULL; // will be deleted in MenuBar::ImplDestroy,
+ pOldWindow = nullptr; // will be deleted in MenuBar::ImplDestroy,
}
}
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index c5bea40f1278..3e8531b43cc2 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -25,8 +25,8 @@
void TabDialog::ImplInitTabDialogData()
{
- mpFixedLine = NULL;
- mpViewWindow = NULL;
+ mpFixedLine = nullptr;
+ mpViewWindow = nullptr;
meViewAlign = WindowAlign::Left;
mbPosControls = true;
}
@@ -39,7 +39,7 @@ void TabDialog::ImplPosControls()
Size aCtrlSize( IMPL_MINSIZE_BUTTON_WIDTH, IMPL_MINSIZE_BUTTON_HEIGHT );
long nDownCtrl = 0;
long nOffY = 0;
- vcl::Window* pTabControl = NULL;
+ vcl::Window* pTabControl = nullptr;
vcl::Window* pChild = GetWindow( GetWindowType::FirstChild );
while ( pChild )
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index e5c4c6c4d9f2..e22f91d9402c 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -36,7 +36,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
if ( !(nStyle & WB_NODIALOGCONTROL) )
nStyle |= WB_DIALOGCONTROL;
- Window::ImplInit( pParent, nStyle, NULL );
+ Window::ImplInit( pParent, nStyle, nullptr );
ImplInitSettings();
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 081947c538e3..e12f8d4ba418 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -180,7 +180,7 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
}
// activate next task pane
- vcl::Window *pNextWin = NULL;
+ vcl::Window *pNextWin = nullptr;
if( bSplitterOnly )
pNextWin = FindNextSplitter( *p );
@@ -213,9 +213,9 @@ bool TaskPaneList::HandleKeyEvent(const KeyEvent& rKeyEvent)
// the focus is not in the list: activate first float if F6 was pressed
vcl::Window *pWin;
if( bSplitterOnly )
- pWin = FindNextSplitter( NULL );
+ pWin = FindNextSplitter( nullptr );
else
- pWin = FindNextFloat( NULL, bForward );
+ pWin = FindNextFloat( nullptr, bForward );
if( pWin )
{
ImplTaskPaneListGrabFocus( pWin, bForward );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index cfcf37e8849b..3f414c759056 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -124,7 +124,7 @@ public:
void StartDragging( ToolBox* pDragBox,
const Point& rPos, const Rectangle& rRect,
sal_uInt16 nLineMode, bool bResizeItem,
- void* pData = NULL );
+ void* pData = nullptr );
void Dragging( const Point& rPos );
void EndDragging( bool bOK = true );
void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); }
@@ -658,7 +658,7 @@ const ImplToolItem *ToolBox::ImplGetFirstClippedItem( const ToolBox* pThis )
return &(*it);
++it;
}
- return NULL;
+ return nullptr;
}
Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode )
@@ -1128,12 +1128,12 @@ sal_uInt16 ToolBox::ImplFindItemPos( ToolBox* pBox, const Point& rPos )
ImplTBDragMgr::ImplTBDragMgr()
: mpBoxList(new ImplTBList())
- , mpDragBox(NULL)
+ , mpDragBox(nullptr)
, mnMinWidth(0)
, mnMaxWidth(0)
, mnLineMode(0)
, mnStartLines(0)
- , mpCustomizeData(NULL)
+ , mpCustomizeData(nullptr)
, mbResizeMode(false)
, mbShowDragRect(false)
{
@@ -1173,7 +1173,7 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect )
}
}
- return NULL;
+ return nullptr;
}
void ImplTBDragMgr::StartDragging( ToolBox* pToolBox,
@@ -1319,12 +1319,12 @@ void ImplTBDragMgr::EndDragging( bool bOK )
}
}
}
- mpCustomizeData = NULL;
+ mpCustomizeData = nullptr;
mbResizeMode = false;
mpDragBox->Deactivate();
}
- mpDragBox = NULL;
+ mpDragBox = nullptr;
}
void ImplTBDragMgr::UpdateDragRect()
@@ -1349,7 +1349,7 @@ void ToolBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
// initialize variables
ImplGetWindowImpl()->mbToolBox = true;
mpData = new ImplToolBoxPrivateData;
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
mnDX = 0;
mnDY = 0;
mnMaxItemWidth = 0;
@@ -1642,11 +1642,11 @@ void ToolBox::dispose()
// still connected
if ( mpFloatWin )
mpFloatWin->EndPopupMode( FloatWinPopupEndFlags::Cancel );
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
// delete private data
delete mpData;
- mpData = NULL;
+ mpData = nullptr;
// remove the lists when there are no more toolbox references to
// the lists
@@ -1660,7 +1660,7 @@ void ToolBox::dispose()
if ( !pSVData->maCtrlData.mpTBDragMgr->size() )
{
delete pSVData->maCtrlData.mpTBDragMgr;
- pSVData->maCtrlData.mpTBDragMgr = NULL;
+ pSVData->maCtrlData.mpTBDragMgr = nullptr;
}
}
mpFloatWin.clear();
@@ -1670,7 +1670,7 @@ void ToolBox::dispose()
ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
{
if (!mpData)
- return NULL;
+ return nullptr;
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin();
while ( it != mpData->m_aItems.end() )
@@ -1680,7 +1680,7 @@ ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const
++it;
}
- return NULL;
+ return nullptr;
}
static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButtons )
@@ -2399,7 +2399,7 @@ void ToolBox::ImplFormat( bool bResize )
// compute line breaks and visible lines give the current window width (nMax)
// the break indicators will be stored within each item (it->mbBreak)
- mnCurLines = ImplCalcBreaks( nMax, NULL, mbHorz );
+ mnCurLines = ImplCalcBreaks( nMax, nullptr, mbHorz );
// check for scrollbar buttons or dropdown menu
// (if a menu is enabled, this will be used to store clipped
@@ -2411,7 +2411,7 @@ void ToolBox::ImplFormat( bool bResize )
if( !IsMenuEnabled() )
{
nMax -= TB_SPIN_SIZE+TB_SPIN_OFFSET;
- mnCurLines = ImplCalcBreaks( nMax, NULL, mbHorz );
+ mnCurLines = ImplCalcBreaks( nMax, nullptr, mbHorz );
}
// compute scroll rectangles or menu button
@@ -2972,7 +2972,7 @@ void ToolBox::ImplDrawButton(vcl::RenderContext& rRenderContext, const Rectangle
}
if (!bNativeOk)
- vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, NULL, 2);
+ vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, nullptr, 2);
}
void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout)
@@ -2988,8 +2988,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
rRenderContext.SetFillColor();
ImplToolItem* pItem = &mpData->m_aItems[nPos];
- MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : NULL;
- OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : NULL;
+ MetricVector* pVector = bLayout ? &mpData->m_pLayoutData->m_aUnicodeBoundRects : nullptr;
+ OUString* pDisplayText = bLayout ? &mpData->m_pLayoutData->m_aDisplayText : nullptr;
if (!pItem->mbEnabled)
nHighlight = 0;
@@ -3057,7 +3057,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
pMgr->HideDragRect();
}
else
- pMgr = NULL;
+ pMgr = nullptr;
// during configuration mode visible windows will be drawn in a special way
if ( mbCustomizeMode && pItem->mbShowWindow )
@@ -3346,7 +3346,7 @@ void ToolBox::ImplFloatControl( bool bStart, FloatingWindow* pFloatWindow )
}
else
{
- mpFloatWin = NULL;
+ mpFloatWin = nullptr;
// if focus is still in this toolbox, then the floater was opened by keyboard
// draw current item with highlight and keep old state
@@ -4953,7 +4953,7 @@ void ToolBox::GetFocus()
void ToolBox::LoseFocus()
{
- ImplChangeHighlight( NULL, true );
+ ImplChangeHighlight( nullptr, true );
DockingWindow::LoseFocus();
}
@@ -5069,7 +5069,7 @@ bool ToolBox::ImplOpenItem( vcl::KeyCode aKeyCode )
return bRet;
UpdateCustomMenu();
- mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), NULL, true );
+ mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), nullptr, true );
}
else if( mnHighItemId && ImplGetItem( mnHighItemId ) &&
(ImplGetItem( mnHighItemId )->mnBits & ToolBoxItemBits::DROPDOWN) )
@@ -5186,13 +5186,13 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
break;
case KEY_END:
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
ImplChangeHighlightUpDn( false );
}
break;
case KEY_HOME:
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
ImplChangeHighlightUpDn( true );
}
break;
@@ -5235,7 +5235,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt )
default:
{
sal_uInt16 aKeyGroup = aKeyCode.GetGroup();
- ImplToolItem *pItem = NULL;
+ ImplToolItem *pItem = nullptr;
if( mnHighItemId )
pItem = ImplGetItem( mnHighItemId );
// #i13931# forward alphanum keyinput into embedded control
@@ -5306,7 +5306,7 @@ sal_uInt16 ToolBox::ImplGetItemLine( ImplToolItem* pCurrentItem )
ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine )
{
if( !nLine || nLine > mnCurLines )
- return NULL;
+ return nullptr;
nLine--;
@@ -5324,14 +5324,14 @@ ImplToolItem* ToolBox::ImplGetFirstValidItem( sal_uInt16 nLine )
{
++it;
if( it == mpData->m_aItems.end() || it->mbBreak )
- return NULL; // no valid items in this line
+ return nullptr; // no valid items in this line
}
return &(*it);
}
++it;
}
- return (it == mpData->m_aItems.end()) ? NULL : &(*it);
+ return (it == mpData->m_aItems.end()) ? nullptr : &(*it);
}
sal_uInt16 ToolBox::ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList )
@@ -5362,7 +5362,7 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus )
mbChangingHighlight = true;
- ImplToolItem* pOldItem = NULL;
+ ImplToolItem* pOldItem = nullptr;
if ( mnHighItemId )
{
@@ -5452,7 +5452,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
{
// select last valid non-clipped item
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.end();
- ImplToolItem* pItem = NULL;
+ ImplToolItem* pItem = nullptr;
while( it != mpData->m_aItems.begin() )
{
--it;
@@ -5498,11 +5498,11 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// select the menu button if a clipped item would be selected
if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else
- ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL );
+ ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : nullptr );
return true;
}
else
@@ -5512,13 +5512,13 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// docked toolbars have the menubutton as last item - if this button is enabled
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else
{
std::vector< ImplToolItem >::iterator it = mpData->m_aItems.end();
- ImplToolItem* pItem = NULL;
+ ImplToolItem* pItem = nullptr;
while( it != mpData->m_aItems.begin() )
{
--it;
@@ -5552,7 +5552,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
return true;
}
@@ -5570,7 +5570,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
// highlight the menu button if it is the last item
if( IsMenuEnabled() && !ImplIsFloatingMode() )
{
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
return true;
}
@@ -5589,7 +5589,7 @@ bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle )
if( pToolItem->IsClipped() && IsMenuEnabled() )
{
// select the menu button if a clipped item would be selected
- ImplChangeHighlight( NULL );
+ ImplChangeHighlight( nullptr );
InvalidateMenuButton();
}
else if( i != nCount )
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index f8dd351fab23..b2b6adf2e969 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -51,11 +51,11 @@ using namespace com::sun::star;
#define TB_SEP_SIZE 8
ImplToolBoxPrivateData::ImplToolBoxPrivateData() :
- m_pLayoutData( NULL )
+ m_pLayoutData( nullptr )
{
meButtonSize = TOOLBOX_BUTTONSIZE_DONTCARE;
mpMenu = new PopupMenu();
- mnEventId = 0;
+ mnEventId = nullptr;
maMenuType = TOOLBOX_MENUTYPE_NONE;
maMenubuttonItem.maItemSize = Size( TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET, TB_MENUBUTTON_SIZE+TB_MENUBUTTON_OFFSET );
@@ -85,8 +85,8 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits,
bool bEmptyBtn)
{
mnId = nItemId;
- mpWindow = NULL;
- mpUserData = NULL;
+ mpWindow = nullptr;
+ mpUserData = nullptr;
meType = ToolBoxItemType::BUTTON;
mnBits = nItemBits;
meState = TRISTATE_FALSE;
@@ -744,7 +744,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId,
// push ToolBox item onto the list
ImplToolItem aNewItem = rToolBox.mpData->m_aItems[nPos];
// reset state
- aNewItem.mpWindow = NULL;
+ aNewItem.mpWindow = nullptr;
aNewItem.mbShowWindow = false;
mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem );
@@ -1110,7 +1110,7 @@ void* ToolBox::GetItemData( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->mpUserData;
else
- return NULL;
+ return nullptr;
}
void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
@@ -1315,7 +1315,7 @@ vcl::Window* ToolBox::GetItemWindow( sal_uInt16 nItemId ) const
if ( pItem )
return pItem->mpWindow;
else
- return NULL;
+ return nullptr;
}
void ToolBox::StartSelection()
@@ -1863,7 +1863,7 @@ IMPL_LINK_TYPED( ToolBox, ImplCustomMenuListener, VclMenuEvent&, rEvent, void )
IMPL_LINK_NOARG_TYPED(ToolBox, ImplCallExecuteCustomMenu, void*, void)
{
- mpData->mnEventId = 0;
+ mpData->mnEventId = nullptr;
ImplExecuteCustomMenu();
}
@@ -1939,7 +1939,7 @@ void ToolBox::ExecuteCustomMenu()
// handle custom menu asynchronously
// to avoid problems if the toolbox is closed during menu execute
UpdateCustomMenu();
- mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), NULL, true );
+ mpData->mnEventId = Application::PostUserEvent( LINK( this, ToolBox, ImplCallExecuteCustomMenu ), nullptr, true );
}
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index c7f4fd615fd9..48be7171a994 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -93,16 +93,16 @@ Window::Window( vcl::Window* pParent, WinBits nStyle )
{
ImplInitWindowData( WINDOW_WINDOW );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
}
Window::Window( vcl::Window* pParent, const ResId& rResId )
- : mpWindowImpl(NULL)
+ : mpWindowImpl(nullptr)
{
rResId.SetRT( RSC_WINDOW );
WinBits nStyle = ImplInitRes( rResId );
ImplInitWindowData( WINDOW_WINDOW );
- ImplInit( pParent, nStyle, NULL );
+ ImplInit( pParent, nStyle, nullptr );
ImplLoadRes( rResId );
if ( !(nStyle & WB_HIDE) )
@@ -258,7 +258,7 @@ void Window::dispose()
if ( pSVData->maWinData.mpCaptureWin == this )
ReleaseMouse();
if ( pSVData->maWinData.mpDefDialogParent == this )
- pSVData->maWinData.mpDefDialogParent = NULL;
+ pSVData->maWinData.mpDefDialogParent = nullptr;
#if OSL_DEBUG_LEVEL > 0
if ( true ) // always perform these tests in debug builds
@@ -282,7 +282,7 @@ void Window::dispose()
Application::Abort(OStringToOUString(aTempStr.makeStringAndClear(), RTL_TEXTENCODING_UTF8)); // abort in debug builds, this must be fixed!
}
- if (mpWindowImpl->mpFrameData != 0)
+ if (mpWindowImpl->mpFrameData != nullptr)
{
pTempWin = mpWindowImpl->mpFrameData->mpFirstOverlap;
while ( pTempWin )
@@ -345,7 +345,7 @@ void Window::dispose()
}
vcl::Window* pMyParent = GetParent();
- SystemWindow* pMySysWin = NULL;
+ SystemWindow* pMySysWin = nullptr;
while ( pMyParent )
{
@@ -369,7 +369,7 @@ void Window::dispose()
if( mpWindowImpl->mbIsInTaskPaneList )
{
vcl::Window* pMyParent = GetParent();
- SystemWindow* pMySysWin = NULL;
+ SystemWindow* pMySysWin = nullptr;
while ( pMyParent )
{
@@ -416,7 +416,7 @@ void Window::dispose()
{
EndExtTextInput( EndExtTextInputFlags::Complete );
if ( pSVData->maWinData.mpExtTextInputWin == this )
- pSVData->maWinData.mpExtTextInputWin = NULL;
+ pSVData->maWinData.mpExtTextInputWin = nullptr;
}
// check if the focus window is our child
@@ -442,8 +442,8 @@ void Window::dispose()
{
if ( mpWindowImpl->mbFrame )
{
- pSVData->maWinData.mpFocusWin = NULL;
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
}
else
{
@@ -467,43 +467,43 @@ void Window::dispose()
// If the focus was set back to 'this' set it to nothing
if ( pSVData->maWinData.mpFocusWin == this )
{
- pSVData->maWinData.mpFocusWin = NULL;
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
}
}
}
- if ( pOverlapWindow != 0 &&
+ if ( pOverlapWindow != nullptr &&
pOverlapWindow->mpWindowImpl->mpLastFocusWindow == this )
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = NULL;
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = nullptr;
// reset hint for DefModalDialogParent
if( pSVData->maWinData.mpActiveApplicationFrame == this )
- pSVData->maWinData.mpActiveApplicationFrame = NULL;
+ pSVData->maWinData.mpActiveApplicationFrame = nullptr;
// reset marked windows
- if ( mpWindowImpl->mpFrameData != 0 )
+ if ( mpWindowImpl->mpFrameData != nullptr )
{
if ( mpWindowImpl->mpFrameData->mpFocusWin == this )
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
if ( mpWindowImpl->mpFrameData->mpMouseMoveWin == this )
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
if ( mpWindowImpl->mpFrameData->mpMouseDownWin == this )
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
}
// reset Deactivate-Window
if ( pSVData->maWinData.mpLastDeacWin == this )
- pSVData->maWinData.mpLastDeacWin = NULL;
+ pSVData->maWinData.mpLastDeacWin = nullptr;
if ( mpWindowImpl->mpFrameData )
{
if ( mpWindowImpl->mpFrameData->mnFocusId )
Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnFocusId );
- mpWindowImpl->mpFrameData->mnFocusId = NULL;
+ mpWindowImpl->mpFrameData->mnFocusId = nullptr;
if ( mpWindowImpl->mpFrameData->mnMouseMoveId )
Application::RemoveUserEvent( mpWindowImpl->mpFrameData->mnMouseMoveId );
- mpWindowImpl->mpFrameData->mnMouseMoveId = NULL;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
}
// release SalGraphics
@@ -568,15 +568,15 @@ void Window::dispose()
assert (mpWindowImpl->mpFrameData->mpNextFrame.get() != pSysWin);
pSysWin->mpWindowImpl->mpFrameData->mpNextFrame = mpWindowImpl->mpFrameData->mpNextFrame;
}
- mpWindowImpl->mpFrame->SetCallback( NULL, NULL );
+ mpWindowImpl->mpFrame->SetCallback( nullptr, nullptr );
pSVData->mpDefInst->DestroyFrame( mpWindowImpl->mpFrame );
- assert (mpWindowImpl->mpFrameData->mnFocusId == NULL);
- assert (mpWindowImpl->mpFrameData->mnMouseMoveId == NULL);
+ assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr);
+ assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr);
delete mpWindowImpl->mpFrameData;
}
// should be the last statements
- delete mpWindowImpl; mpWindowImpl = NULL;
+ delete mpWindowImpl; mpWindowImpl = nullptr;
OutputDevice::dispose();
}
@@ -611,32 +611,32 @@ WindowImpl::WindowImpl( WindowType nType )
maZoom = Fraction( 1, 1 );
maWinRegion = vcl::Region(true);
maWinClipRegion = vcl::Region(true);
- mpWinData = NULL; // Extra Window Data, that we don't need for all windows
- mpOverlapData = NULL; // Overlap Data
- mpFrameData = NULL; // Frame Data
- mpFrame = NULL; // Pointer to frame window
- mpSysObj = NULL;
- mpFrameWindow = NULL; // window to top level parent (same as frame window)
- mpOverlapWindow = NULL; // first overlap parent
- mpBorderWindow = NULL; // Border-Window
- mpClientWindow = NULL; // Client-Window of a FrameWindow
- mpParent = NULL; // parent (incl. BorderWindow)
- mpRealParent = NULL; // real parent (excl. BorderWindow)
- mpFirstChild = NULL; // first child window
- mpLastChild = NULL; // last child window
- mpFirstOverlap = NULL; // first overlap window (only set in overlap windows)
- mpLastOverlap = NULL; // last overlap window (only set in overlap windows)
- mpPrev = NULL; // prev window
- mpNext = NULL; // next window
- mpNextOverlap = NULL; // next overlap window of frame
- mpLastFocusWindow = NULL; // window for focus restore
- mpDlgCtrlDownWindow = NULL; // window for dialog control
- mpFirstDel = NULL; // Dtor notification list
- mpUserData = NULL; // user data
- mpCursor = NULL; // cursor
- mpControlFont = NULL; // font properties
- mpVCLXWindow = NULL;
- mpAccessibleInfos = NULL;
+ mpWinData = nullptr; // Extra Window Data, that we don't need for all windows
+ mpOverlapData = nullptr; // Overlap Data
+ mpFrameData = nullptr; // Frame Data
+ mpFrame = nullptr; // Pointer to frame window
+ mpSysObj = nullptr;
+ mpFrameWindow = nullptr; // window to top level parent (same as frame window)
+ mpOverlapWindow = nullptr; // first overlap parent
+ mpBorderWindow = nullptr; // Border-Window
+ mpClientWindow = nullptr; // Client-Window of a FrameWindow
+ mpParent = nullptr; // parent (incl. BorderWindow)
+ mpRealParent = nullptr; // real parent (excl. BorderWindow)
+ mpFirstChild = nullptr; // first child window
+ mpLastChild = nullptr; // last child window
+ mpFirstOverlap = nullptr; // first overlap window (only set in overlap windows)
+ mpLastOverlap = nullptr; // last overlap window (only set in overlap windows)
+ mpPrev = nullptr; // prev window
+ mpNext = nullptr; // next window
+ mpNextOverlap = nullptr; // next overlap window of frame
+ mpLastFocusWindow = nullptr; // window for focus restore
+ mpDlgCtrlDownWindow = nullptr; // window for dialog control
+ mpFirstDel = nullptr; // Dtor notification list
+ mpUserData = nullptr; // user data
+ mpCursor = nullptr; // cursor
+ mpControlFont = nullptr; // font properties
+ mpVCLXWindow = nullptr;
+ mpAccessibleInfos = nullptr;
maControlForeground = Color( COL_TRANSPARENT ); // no foreground set
maControlBackground = Color( COL_TRANSPARENT ); // no background set
mnLeftBorder = 0; // left border
@@ -650,8 +650,8 @@ WindowImpl::WindowImpl( WindowType nType )
mnX = 0; // X-Position to Parent
mnY = 0; // Y-Position to Parent
mnAbsScreenX = 0; // absolute X-position on screen, used for RTL window positioning
- mpChildClipRegion = NULL; // Child-Clip-Region when ClipChildren
- mpPaintRegion = NULL; // Paint-ClipRegion
+ mpChildClipRegion = nullptr; // Child-Clip-Region when ClipChildren
+ mpPaintRegion = nullptr; // Paint-ClipRegion
mnStyle = 0; // style (init in ImplInitWindow)
mnPrevStyle = 0; // prevstyle (set in SetStyle)
mnExtendedStyle = 0; // extended style (init in ImplInitWindow)
@@ -863,9 +863,9 @@ void Window::ReleaseGraphics( bool bRelease )
else
pSVData->maGDIData.mpLastWinGraphics = mpPrevGraphics;
- mpGraphics = NULL;
- mpPrevGraphics = NULL;
- mpNextGraphics = NULL;
+ mpGraphics = nullptr;
+ mpPrevGraphics = nullptr;
+ mpNextGraphics = nullptr;
}
static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
@@ -933,9 +933,9 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
if ( mpWindowImpl->mbOverlapWin )
{
mpWindowImpl->mpOverlapData = new ImplOverlapData;
- mpWindowImpl->mpOverlapData->mpSaveBackDev = NULL;
- mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL;
- mpWindowImpl->mpOverlapData->mpNextBackWin = NULL;
+ mpWindowImpl->mpOverlapData->mpSaveBackDev = nullptr;
+ mpWindowImpl->mpOverlapData->mpSaveBackRgn = nullptr;
+ mpWindowImpl->mpOverlapData->mpNextBackWin = nullptr;
mpWindowImpl->mpOverlapData->mnSaveBackSize = 0;
mpWindowImpl->mpOverlapData->mbSaveBack = false;
mpWindowImpl->mpOverlapData->mnTopLevel = 1;
@@ -1001,7 +1001,7 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
break;
}
- SalFrame* pParentFrame = NULL;
+ SalFrame* pParentFrame = nullptr;
if ( pParent )
pParentFrame = pParent->mpWindowImpl->mpFrame;
SalFrame* pFrame;
@@ -1029,16 +1029,16 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
assert (pSVData->maWinData.mpFirstFrame.get() != this);
mpWindowImpl->mpFrameData->mpNextFrame = pSVData->maWinData.mpFirstFrame;
pSVData->maWinData.mpFirstFrame = this;
- mpWindowImpl->mpFrameData->mpFirstOverlap = NULL;
- mpWindowImpl->mpFrameData->mpFocusWin = NULL;
- mpWindowImpl->mpFrameData->mpMouseMoveWin = NULL;
- mpWindowImpl->mpFrameData->mpMouseDownWin = NULL;
- mpWindowImpl->mpFrameData->mpFirstBackWin = NULL;
+ mpWindowImpl->mpFrameData->mpFirstOverlap = nullptr;
+ mpWindowImpl->mpFrameData->mpFocusWin = nullptr;
+ mpWindowImpl->mpFrameData->mpMouseMoveWin = nullptr;
+ mpWindowImpl->mpFrameData->mpMouseDownWin = nullptr;
+ mpWindowImpl->mpFrameData->mpFirstBackWin = nullptr;
mpWindowImpl->mpFrameData->mpFontCollection = pSVData->maGDIData.mpScreenFontList;
mpWindowImpl->mpFrameData->mpFontCache = pSVData->maGDIData.mpScreenFontCache;
mpWindowImpl->mpFrameData->mnAllSaveBackSize = 0;
- mpWindowImpl->mpFrameData->mnFocusId = 0;
- mpWindowImpl->mpFrameData->mnMouseMoveId = 0;
+ mpWindowImpl->mpFrameData->mnFocusId = nullptr;
+ mpWindowImpl->mpFrameData->mnMouseMoveId = nullptr;
mpWindowImpl->mpFrameData->mnLastMouseX = -1;
mpWindowImpl->mpFrameData->mnLastMouseY = -1;
mpWindowImpl->mpFrameData->mnBeforeLastMouseX = -1;
@@ -1259,7 +1259,7 @@ void Window::drawFrameDev( const Point& rPt, const Point& rDevPt, const Size& rD
GDIMetaFile* pOldMetaFile = mpMetaFile;
bool bOldMap = mbMap;
RasterOp eOldROP = GetRasterOp();
- mpMetaFile = NULL;
+ mpMetaFile = nullptr;
mbMap = false;
SetRasterOp( ROP_OVERPAINT );
@@ -1297,14 +1297,14 @@ ImplWinData* Window::ImplGetWinData() const
static const char* pNoNWF = getenv( "SAL_NO_NWF" );
const_cast<vcl::Window*>(this)->mpWindowImpl->mpWinData = new ImplWinData;
- mpWindowImpl->mpWinData->mpExtOldText = NULL;
- mpWindowImpl->mpWinData->mpExtOldAttrAry = NULL;
- mpWindowImpl->mpWinData->mpCursorRect = NULL;
+ mpWindowImpl->mpWinData->mpExtOldText = nullptr;
+ mpWindowImpl->mpWinData->mpExtOldAttrAry = nullptr;
+ mpWindowImpl->mpWinData->mpCursorRect = nullptr;
mpWindowImpl->mpWinData->mnCursorExtWidth = 0;
- mpWindowImpl->mpWinData->mpCompositionCharRects = NULL;
+ mpWindowImpl->mpWinData->mpCompositionCharRects = nullptr;
mpWindowImpl->mpWinData->mnCompositionCharRects = 0;
- mpWindowImpl->mpWinData->mpFocusRect = NULL;
- mpWindowImpl->mpWinData->mpTrackRect = NULL;
+ mpWindowImpl->mpWinData->mpFocusRect = nullptr;
+ mpWindowImpl->mpWinData->mpTrackRect = nullptr;
mpWindowImpl->mpWinData->mnTrackFlags = 0;
mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow())
mpWindowImpl->mpWinData->mbMouseOver = false;
@@ -1352,7 +1352,7 @@ SalGraphics* Window::ImplGetFrameGraphics() const
OutputDevice* pFrameWinOutDev = mpWindowImpl->mpFrameWindow;
if ( ! pFrameWinOutDev->AcquireGraphics() )
{
- return NULL;
+ return nullptr;
}
}
mpWindowImpl->mpFrameWindow->mpGraphics->ResetClipRegion();
@@ -1418,7 +1418,7 @@ void Window::ImplAddDel( ImplDelData* pDel ) // TODO: make "const" when incompat
void Window::ImplRemoveDel( ImplDelData* pDel ) // TODO: make "const" when incompatibility ok
{
- pDel->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore
+ pDel->mpWindow = nullptr; // #112873# pDel is not associated with a Window anymore
if ( IsDisposed() )
return;
@@ -1577,8 +1577,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
long nOldOutOffY = mnOutOffY;
long nOldOutWidth = mnOutWidth;
long nOldOutHeight = mnOutHeight;
- vcl::Region* pOverlapRegion = NULL;
- vcl::Region* pOldRegion = NULL;
+ vcl::Region* pOverlapRegion = nullptr;
+ vcl::Region* pOldRegion = nullptr;
if ( IsReallyVisible() )
{
@@ -1829,7 +1829,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
else
bInvalidate = true;
if ( bInvalidate )
- ImplInvalidateFrameRegion( NULL, InvalidateFlags::Children );
+ ImplInvalidateFrameRegion( nullptr, InvalidateFlags::Children );
}
else
{
@@ -1888,8 +1888,8 @@ void Window::ImplNewInputContext()
SalInputContext aNewContext;
const vcl::Font& rFont = rInputContext.GetFont();
const OUString& rFontName = rFont.GetName();
- ImplFontEntry* pFontEntry = NULL;
- aNewContext.mpFont = NULL;
+ ImplFontEntry* pFontEntry = nullptr;
+ aNewContext.mpFont = nullptr;
if (!rFontName.isEmpty())
{
OutputDevice *pFocusWinOutDev = pFocusWin->GetOutDev();
@@ -2153,8 +2153,8 @@ void Window::SetBorderStyle( WindowBorderStyle nBorderStyle )
// borders in case of NWF drawing. So they need a method to remove their border window
VclPtr<vcl::Window> pBorderWin = mpWindowImpl->mpBorderWindow;
// remove us as border window's client
- pBorderWin->mpWindowImpl->mpClientWindow = NULL;
- mpWindowImpl->mpBorderWindow = NULL;
+ pBorderWin->mpWindowImpl->mpClientWindow = nullptr;
+ mpWindowImpl->mpBorderWindow = nullptr;
mpWindowImpl->mpRealParent = pBorderWin->mpWindowImpl->mpParent;
// reparent us above the border window
SetParent( pBorderWin->mpWindowImpl->mpParent );
@@ -2246,7 +2246,7 @@ void Window::SetCursorRect( const Rectangle* pRect, long nExtTextInputWidth )
else
{
delete pWinData->mpCursorRect;
- pWinData->mpCursorRect = NULL;
+ pWinData->mpCursorRect = nullptr;
}
}
else
@@ -2278,7 +2278,7 @@ void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLe
ImplWinData* pWinData = ImplGetWinData();
delete[] pWinData->mpCompositionCharRects;
pWinData->mbVertical = bVertical;
- pWinData->mpCompositionCharRects = NULL;
+ pWinData->mpCompositionCharRects = nullptr;
pWinData->mnCompositionCharRects = nCompositionLength;
if ( pRect && (nCompositionLength > 0) )
{
@@ -2468,7 +2468,7 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
InvalidateFlags nInvalidateFlags = InvalidateFlags::Children;
if( ! IsPaintTransparent() )
nInvalidateFlags |= InvalidateFlags::NoTransparent;
- ImplInvalidate( NULL, nInvalidateFlags );
+ ImplInvalidate( nullptr, nInvalidateFlags );
ImplGenerateMouseMove();
}
}
@@ -2555,7 +2555,7 @@ Size Window::GetSizePixel() const
{
ImplDelData aDogtag( const_cast<Window*>(this) );
mpWindowImpl->mpFrameData->maResizeIdle.Stop();
- mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( NULL );
+ mpWindowImpl->mpFrameData->maResizeIdle.GetIdleHdl().Call( nullptr );
if( aDogtag.IsDead() )
return Size(0,0);
}
@@ -3400,7 +3400,7 @@ Reference< XClipboard > Window::GetClipboard()
return mpWindowImpl->mpFrameData->mxClipboard;
}
- return static_cast < XClipboard * > (0);
+ return static_cast < XClipboard * > (nullptr);
}
Reference< XClipboard > Window::GetPrimarySelection()
@@ -3443,7 +3443,7 @@ Reference< XClipboard > Window::GetPrimarySelection()
return mpWindowImpl->mpFrameData->mxSelection;
}
- return static_cast < XClipboard * > (0);
+ return static_cast < XClipboard * > (nullptr);
}
void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& rRect )
@@ -3452,12 +3452,12 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle&
mpOutDevData->mpRecordLayout = pLayout;
mpOutDevData->maRecordRect = rRect;
Paint(*this, rRect);
- mpOutDevData->mpRecordLayout = NULL;
+ mpOutDevData->mpRecordLayout = nullptr;
}
void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly )
{
- DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL );
+ DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, nullptr, nullptr );
}
void Window::DrawSelectionBackground( const Rectangle& rRect,
@@ -3662,7 +3662,7 @@ void Window::ImplIncModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : nullptr;
}
}
void Window::ImplDecModalCount()
@@ -3676,7 +3676,7 @@ void Window::ImplDecModalCount()
{
pParent = pParent->GetParent();
}
- pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : NULL;
+ pFrameWindow = pParent ? pParent->mpWindowImpl->mpFrameWindow.get() : nullptr;
}
}
@@ -3897,7 +3897,7 @@ void Window::ApplySettings(vcl::RenderContext& /*rRenderContext*/)
const SystemEnvData* Window::GetSystemData() const
{
- return mpWindowImpl->mpFrame ? mpWindowImpl->mpFrame->GetSystemData() : NULL;
+ return mpWindowImpl->mpFrame ? mpWindowImpl->mpFrame->GetSystemData() : nullptr;
}
Any Window::GetSystemDataAny() const
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 5eaaf6f0eabe..d39810a8f44a 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -341,10 +341,10 @@ void Window::EndTracking( TrackingEventFlags nFlags )
if ( pSVData->maWinData.mpTrackTimer )
{
delete pSVData->maWinData.mpTrackTimer;
- pSVData->maWinData.mpTrackTimer = NULL;
+ pSVData->maWinData.mpTrackTimer = nullptr;
}
- pSVData->maWinData.mpTrackWin = NULL;
+ pSVData->maWinData.mpTrackWin = nullptr;
pSVData->maWinData.mnTrackFlags = StartTrackingFlags::NONE;
ReleaseMouse();
}
@@ -396,11 +396,11 @@ void Window::EndAutoScroll()
if ( pSVData->maWinData.mpAutoScrollWin.get() == this )
{
- pSVData->maWinData.mpAutoScrollWin = NULL;
+ pSVData->maWinData.mpAutoScrollWin = nullptr;
pSVData->maWinData.mnAutoScrollFlags = StartAutoScrollFlags::NONE;
pSVData->maAppData.mpWheelWindow->ImplStop();
pSVData->maAppData.mpWheelWindow->doLazyDelete();
- pSVData->maAppData.mpWheelWindow = NULL;
+ pSVData->maAppData.mpWheelWindow = nullptr;
}
}
@@ -512,7 +512,7 @@ void Window::SetControlFont()
if (mpWindowImpl && mpWindowImpl->mpControlFont)
{
delete mpWindowImpl->mpControlFont;
- mpWindowImpl->mpControlFont = NULL;
+ mpWindowImpl->mpControlFont = nullptr;
CompatStateChanged(StateChangedType::ControlFont);
}
}
@@ -762,7 +762,7 @@ bool Window::HandleScrollCommand( const CommandEvent& rCmd,
nLines = pData->GetNotchDelta() * (long)nScrollLines;
if ( nLines )
{
- ImplHandleScroll( NULL,
+ ImplHandleScroll( nullptr,
0L,
pData->IsHorz() ? pHScrl : pVScrl,
nLines );
@@ -931,27 +931,27 @@ vcl::Window* Window::ImplGetWindow()
ImplFrameData* Window::ImplGetFrameData()
{
- return mpWindowImpl ? mpWindowImpl->mpFrameData : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrameData : nullptr;
}
SalFrame* Window::ImplGetFrame() const
{
- return mpWindowImpl ? mpWindowImpl->mpFrame : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrame : nullptr;
}
vcl::Window* Window::ImplGetParent() const
{
- return mpWindowImpl ? mpWindowImpl->mpParent.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpParent.get() : nullptr;
}
vcl::Window* Window::ImplGetClientWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpClientWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpClientWindow.get() : nullptr;
}
vcl::Window* Window::ImplGetBorderWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpBorderWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpBorderWindow.get() : nullptr;
}
vcl::Window* Window::ImplGetFirstOverlapWindow()
@@ -972,7 +972,7 @@ const vcl::Window* Window::ImplGetFirstOverlapWindow() const
vcl::Window* Window::ImplGetFrameWindow() const
{
- return mpWindowImpl ? mpWindowImpl->mpFrameWindow.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpFrameWindow.get() : nullptr;
}
bool Window::IsDockingWindow() const
@@ -1148,7 +1148,7 @@ const InputContext& Window::GetInputContext() const
bool Window::IsControlFont() const
{
- return (mpWindowImpl->mpControlFont != 0);
+ return (mpWindowImpl->mpControlFont != nullptr);
}
Color Window::GetControlForeground() const
@@ -1178,7 +1178,7 @@ bool Window::IsInPaint() const
vcl::Window* Window::GetParent() const
{
- return mpWindowImpl ? mpWindowImpl->mpRealParent.get() : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpRealParent.get() : nullptr;
}
bool Window::IsVisible() const
@@ -1280,7 +1280,7 @@ bool Window::IsWait() const
vcl::Cursor* Window::GetCursor() const
{
if (!mpWindowImpl)
- return NULL;
+ return nullptr;
return mpWindowImpl->mpCursor;
}
@@ -1338,7 +1338,7 @@ const Pointer& Window::GetPointer() const
VCLXWindow* Window::GetWindowPeer() const
{
- return mpWindowImpl ? mpWindowImpl->mpVCLXWindow : NULL;
+ return mpWindowImpl ? mpWindowImpl->mpVCLXWindow : nullptr;
}
void Window::SetPosPixel( const Point& rNewPos )
@@ -2012,7 +2012,7 @@ void Window::remove_mnemonic_label(FixedText *pLabel)
if (aFind == v.end())
return;
v.erase(aFind);
- pLabel->set_mnemonic_widget(NULL);
+ pLabel->set_mnemonic_widget(nullptr);
}
std::vector<VclPtr<FixedText> > Window::list_mnemonic_labels() const
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index ae7272735451..544ea6e95d3a 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -196,8 +196,8 @@ static void ImplSetMousePointer( vcl::Window* pChild )
pChild->ImplGetFrame()->SetPointer( pChild->ImplGetMousePointer() );
}
-static bool ImplCallCommand( vcl::Window* pChild, CommandEventId nEvt, void* pData = NULL,
- bool bMouse = false, Point* pPos = NULL )
+static bool ImplCallCommand( vcl::Window* pChild, CommandEventId nEvt, void* pData = nullptr,
+ bool bMouse = false, Point* pPos = nullptr )
{
Point aPos;
if ( pPos )
@@ -255,7 +255,7 @@ static void ContextMenuEventLink( void* pCEvent, void* )
if( ! pEv->aDelData.IsDead() )
{
pEv->pWindow->ImplRemoveDel( &pEv->aDelData );
- ImplCallCommand( pEv->pWindow, CommandEventId::ContextMenu, NULL, true, &pEv->aChildPos );
+ ImplCallCommand( pEv->pWindow, CommandEventId::ContextMenu, nullptr, true, &pEv->aChildPos );
}
delete pEv;
}
@@ -266,7 +266,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
ImplSVData* pSVData = ImplGetSVData();
Point aMousePos( nX, nY );
- vcl::Window* pChild(NULL);
+ vcl::Window* pChild(nullptr);
bool bRet(false);
sal_uInt16 nClicks(0);
ImplFrameData* pWinFrameData = pWindow->ImplGetFrameData();
@@ -349,7 +349,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
else
{
if ( bMouseLeave )
- pChild = NULL;
+ pChild = nullptr;
else
pChild = pWindow->ImplFindWindow( aMousePos );
}
@@ -488,7 +488,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
// create a uno mouse event out of the available data
::com::sun::star::awt::MouseEvent aMouseEvent(
- static_cast < ::com::sun::star::uno::XInterface * > ( 0 ),
+ static_cast < ::com::sun::star::uno::XInterface * > ( nullptr ),
#ifdef MACOSX
nCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_MOD3),
#else
@@ -544,13 +544,13 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
aNLeaveEvt.GetWindow()->ImplNotifyKeyMouseCommandEventListeners( aNLeaveEvt );
}
- pWinFrameData->mpMouseMoveWin = NULL;
+ pWinFrameData->mpMouseMoveWin = nullptr;
pWinFrameData->mbInMouseMove = false;
if ( pChild )
{
if ( aDelData2.IsDead() )
- pChild = NULL;
+ pChild = nullptr;
else
pChild->ImplRemoveDel( &aDelData2 );
}
@@ -787,9 +787,9 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
{
MouseMiddleButtonAction nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction();
if ( nMiddleAction == MouseMiddleButtonAction::AutoScroll )
- bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::StartAutoScroll, nullptr, true, &aChildPos );
else if ( nMiddleAction == MouseMiddleButtonAction::PasteSelection )
- bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, NULL, true, &aChildPos );
+ bRet = !ImplCallCommand( pChild, CommandEventId::PasteSelection, nullptr, true, &aChildPos );
}
else
{
@@ -818,7 +818,7 @@ bool ImplHandleMouseEvent( vcl::Window* pWindow, MouseNotifyEvent nSVEvent, bool
Application::PostUserEvent( Link<void*,void>( pEv, ContextMenuEventLink ) );
}
else
- bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, NULL, true, &aChildPos );
+ bRet = ! ImplCallCommand( pChild, CommandEventId::ContextMenu, nullptr, true, &aChildPos );
}
}
}
@@ -836,8 +836,8 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
pSVData->maAppData.mnLastInputTime = tools::Time::GetSystemTicks();
// #127104# workaround for destroyed windows
- if( pWindow->ImplGetWindowImpl() == NULL )
- return 0;
+ if( pWindow->ImplGetWindowImpl() == nullptr )
+ return nullptr;
// find window - is every time the window which has currently the
// focus or the last time the focus.
@@ -853,7 +853,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
// no child - than no input
if ( !pChild )
- return 0;
+ return nullptr;
// We call also KeyInput if we haven't the focus, because on Unix
// system this is often the case when a Lookup Choice Window has
@@ -864,7 +864,7 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow )
// no keyinput to disabled windows
if ( !pChild->IsEnabled() || !pChild->IsInputEnabled() || pChild->IsInModalMode() )
- return 0;
+ return nullptr;
return pChild;
}
@@ -1153,7 +1153,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
sal_Int32 nCursorPos, sal_uInt16 nCursorFlags )
{
ImplSVData* pSVData = ImplGetSVData();
- vcl::Window* pChild = NULL;
+ vcl::Window* pChild = nullptr;
int nTries = 200;
while( nTries-- )
@@ -1180,7 +1180,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
pSVData->maWinData.mpExtTextInputWin = pChild;
ImplCallCommand( pChild, CommandEventId::StartExtTextInput );
@@ -1230,7 +1230,7 @@ static bool ImplHandleExtTextInput( vcl::Window* pWindow,
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
if ( pTextAttr )
{
@@ -1249,17 +1249,17 @@ static bool ImplHandleEndExtTextInput( vcl::Window* /* pWindow */ )
if ( pChild )
{
pChild->ImplGetWindowImpl()->mbExtTextInput = false;
- pSVData->maWinData.mpExtTextInputWin = NULL;
+ pSVData->maWinData.mpExtTextInputWin = nullptr;
ImplWinData* pWinData = pChild->ImplGetWinData();
if ( pWinData->mpExtOldText )
{
delete pWinData->mpExtOldText;
- pWinData->mpExtOldText = NULL;
+ pWinData->mpExtOldText = nullptr;
}
if ( pWinData->mpExtOldAttrAry )
{
delete [] pWinData->mpExtOldAttrAry;
- pWinData->mpExtOldAttrAry = NULL;
+ pWinData->mpExtOldAttrAry = nullptr;
}
nRet = !ImplCallCommand( pChild, CommandEventId::EndExtTextInput );
}
@@ -1308,9 +1308,9 @@ static void ImplHandleExtTextInputPos( vcl::Window* pWindow,
if ( !rInputWidth )
rInputWidth = rRect.GetWidth();
}
- if (pVertical != 0)
+ if (pVertical != nullptr)
*pVertical
- = pChild != 0 && pChild->GetInputContext().GetFont().IsVertical();
+ = pChild != nullptr && pChild->GetInputContext().GetFont().IsVertical();
}
static bool ImplHandleInputContextChange( vcl::Window* pWindow, LanguageType eNewLang )
@@ -1395,7 +1395,7 @@ bool HandleGestureEventBase::Setup()
vcl::Window* HandleGestureEventBase::FindTarget()
{
// first check any floating window ( eg. drop down listboxes)
- vcl::Window *pMouseWindow = NULL;
+ vcl::Window *pMouseWindow = nullptr;
if (m_pSVData->maWinData.mpFirstFloat && !m_pSVData->maWinData.mpCaptureWin &&
!m_pSVData->maWinData.mpFirstFloat->ImplIsFloatPopupModeWindow( m_pWindow ) )
@@ -1433,7 +1433,7 @@ vcl::Window* HandleGestureEventBase::FindTarget()
vcl::Window *HandleGestureEventBase::Dispatch(vcl::Window* pMouseWindow)
{
- vcl::Window *pDispatchedTo = NULL;
+ vcl::Window *pDispatchedTo = nullptr;
if (acceptableWheelScrollTarget(pMouseWindow) && pMouseWindow->IsEnabled())
{
@@ -1529,7 +1529,7 @@ bool HandleWheelEvent::HandleEvent(const SalWheelMouseEvent& rEvt)
pPreviousWindow = Dispatch(pMouseWindow);
- return pPreviousWindow != NULL;
+ return pPreviousWindow != nullptr;
}
class HandleGestureEvent : public HandleGestureEventBase
@@ -1549,7 +1549,7 @@ bool HandleGestureEvent::HandleEvent()
vcl::Window *pTarget = FindTarget();
- bool bHandled = Dispatch(pTarget) != NULL;
+ bool bHandled = Dispatch(pTarget) != nullptr;
return bHandled;
}
@@ -1771,7 +1771,7 @@ static void ImplActivateFloatingWindows( vcl::Window* pWindow, bool bActive )
IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
{
- ImplGetWindowImpl()->mpFrameData->mnFocusId = 0;
+ ImplGetWindowImpl()->mpFrameData->mnFocusId = nullptr;
// If the status has been preserved, because we got back the focus
// in the meantime, we do nothing
@@ -1829,7 +1829,7 @@ IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
// FocusWindow umsetzen
vcl::Window* pOverlapWindow = pFocusWin->ImplGetFirstOverlapWindow();
pOverlapWindow->ImplGetWindowImpl()->mpLastFocusWindow = pFocusWin;
- pSVData->maWinData.mpFocusWin = NULL;
+ pSVData->maWinData.mpFocusWin = nullptr;
if ( pFocusWin->ImplGetWindowImpl()->mpCursor )
pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide( true );
@@ -1864,7 +1864,7 @@ IMPL_LINK_NOARG_TYPED(vcl::Window, ImplAsyncFocusHdl, void*, void)
NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pFocusWin );
if ( !ImplCallPreNotify( aNEvt ) )
pFocusWin->CompatLoseFocus();
- pFocusWin->ImplCallDeactivateListeners( NULL );
+ pFocusWin->ImplCallDeactivateListeners( nullptr );
}
// XXX
}
@@ -1885,7 +1885,7 @@ static void ImplHandleGetFocus( vcl::Window* pWindow )
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
- pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), NULL, true);
+ pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true);
vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
pFocusWin->ImplGetWindowImpl()->mpCursor->ImplShow();
@@ -1914,7 +1914,7 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
- pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), NULL, true );
+ pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
}
vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
@@ -2379,7 +2379,7 @@ bool ImplWindowFrameProc( vcl::Window* _pWindow, SalFrame* /*pFrame*/,
// #119709# for some unknown reason it is possible to receive events (in this case key events)
// although the corresponding VCL window must have been destroyed already
// at least ImplGetWindowImpl() was NULL in these cases, so check this here
- if( pWindow->ImplGetWindowImpl() == NULL )
+ if( pWindow->ImplGetWindowImpl() == nullptr )
return false;
switch ( nEvent )
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 3881f15009d5..78dc4bb06e0d 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -50,7 +50,7 @@ void WorkWindow::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentDat
nFrameStyle |= BORDERWINDOW_STYLE_APP;
VclPtrInstance<ImplBorderWindow> pBorderWin( pParent, pSystemParentData, nStyle, nFrameStyle );
- Window::ImplInit( pBorderWin, nStyle & (WB_3DLOOK | WB_CLIPCHILDREN | WB_DIALOGCONTROL | WB_SYSTEMFLOATWIN), NULL );
+ Window::ImplInit( pBorderWin, nStyle & (WB_3DLOOK | WB_CLIPCHILDREN | WB_DIALOGCONTROL | WB_SYSTEMFLOATWIN), nullptr );
pBorderWin->mpWindowImpl->mpClientWindow = this;
pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder );
mpWindowImpl->mpBorderWindow = pBorderWin;
@@ -108,7 +108,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) :
{
ImplInitWorkWindowData();
mbSysChild = true;
- ImplInit( NULL, 0, pParent );
+ ImplInit( nullptr, 0, pParent );
}
WorkWindow::~WorkWindow()
@@ -121,7 +121,7 @@ void WorkWindow::dispose()
ImplSVData* pSVData = ImplGetSVData();
if ( pSVData->maWinData.mpAppWin == this )
{
- pSVData->maWinData.mpAppWin = NULL;
+ pSVData->maWinData.mpAppWin = nullptr;
Application::Quit();
}
SystemWindow::dispose();
diff --git a/vcl/unx/generic/app/i18n_cb.cxx b/vcl/unx/generic/app/i18n_cb.cxx
index 9f267a36ea87..b18f7ef72aa8 100644
--- a/vcl/unx/generic/app/i18n_cb.cxx
+++ b/vcl/unx/generic/app/i18n_cb.cxx
@@ -151,7 +151,7 @@ Preedit_InsertText(preedit_text_t *pText, XIMText *pInsertText, int where)
if (pInsertText->encoding_is_wchar)
{
wchar_t *pWCString = pInsertText->string.wide_char;
- size_t nBytes = wcstombs ( NULL, pWCString, 1024 /* don't care */);
+ size_t nBytes = wcstombs ( nullptr, pWCString, 1024 /* don't care */);
pMBString = static_cast<char*>(alloca( nBytes + 1 ));
nMBLength = wcstombs ( pMBString, pWCString, nBytes + 1);
}
@@ -306,8 +306,8 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
preedit_data_t* pPreeditData = reinterpret_cast<preedit_data_t*>(client_data);
// if there's nothing to change then change nothing
- if ( ( (call_data->text == NULL) && (call_data->chg_length == 0) )
- || pPreeditData->pFrame == NULL )
+ if ( ( (call_data->text == nullptr) && (call_data->chg_length == 0) )
+ || pPreeditData->pFrame == nullptr )
return;
// Solaris 7 deletes the preedit buffer after commit
@@ -317,13 +317,13 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
if ( pPreeditData->eState == ePreeditStatusStartPending )
pPreeditData->eState = ePreeditStatusActivationRequired;
- PreeditStartCallback( ic, client_data, NULL );
+ PreeditStartCallback( ic, client_data, nullptr );
// Edit the internal textbuffer as indicated by the call_data,
// chg_first and chg_length are guaranteed to be nonnegative
// handle text deletion
- if (call_data->text == NULL)
+ if (call_data->text == nullptr)
{
Preedit_DeleteText(&(pPreeditData->aText),
call_data->chg_first, call_data->chg_length );
@@ -332,13 +332,13 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
{
// handle text insertion
if ( (call_data->chg_length == 0)
- && (call_data->text->string.wide_char != NULL))
+ && (call_data->text->string.wide_char != nullptr))
{
Preedit_InsertText(&(pPreeditData->aText), call_data->text,
call_data->chg_first);
}
else if ( (call_data->chg_length != 0)
- && (call_data->text->string.wide_char != NULL))
+ && (call_data->text->string.wide_char != nullptr))
{
// handle text replacement by deletion and insertion of text,
// not smart, just good enough
@@ -349,7 +349,7 @@ PreeditDrawCallback(XIC ic, XPointer client_data,
call_data->chg_first);
}
else if ( (call_data->chg_length != 0)
- && (call_data->text->string.wide_char == NULL))
+ && (call_data->text->string.wide_char == nullptr))
{
// not really a text update, only attributes are concerned
Preedit_UpdateAttributes(&(pPreeditData->aText),
@@ -484,14 +484,14 @@ StatusDrawCallback (XIC, XPointer, XIMStatusDrawCallbackStruct *call_data)
if( call_data->data.text )
{
// XIM with text
- sal_Char* pMBString = NULL;
+ sal_Char* pMBString = nullptr;
size_t nLength = 0;
if( call_data->data.text->encoding_is_wchar )
{
if( call_data->data.text->string.wide_char )
{
wchar_t* pWString = call_data->data.text->string.wide_char;
- size_t nBytes = wcstombs( NULL, pWString, 1024 );
+ size_t nBytes = wcstombs( nullptr, pWString, 1024 );
pMBString = static_cast<sal_Char*>(alloca( nBytes+1 ));
nLength = wcstombs( pMBString, pWString, nBytes+1 );
}
@@ -525,7 +525,7 @@ void
IC_IMDestroyCallback (XIM, XPointer client_data, XPointer)
{
SalI18N_InputContext *pContext = reinterpret_cast<SalI18N_InputContext*>(client_data);
- if (pContext != NULL)
+ if (pContext != nullptr)
pContext->HandleDestroyIM();
}
@@ -533,7 +533,7 @@ void
IM_IMDestroyCallback (XIM, XPointer client_data, XPointer)
{
SalI18N_InputMethod *pMethod = reinterpret_cast<SalI18N_InputMethod*>(client_data);
- if (pMethod != NULL)
+ if (pMethod != nullptr)
pMethod->HandleDestroyIM();
}
diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index e9ddd68de972..c160612550b4 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -44,14 +44,14 @@ static void sendEmptyCommit( SalFrame* pFrame )
SalExtTextInputEvent aEmptyEv;
aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.mpTextAttr = nullptr;
aEmptyEv.maText.clear();
aEmptyEv.mnCursorPos = 0;
aEmptyEv.mnCursorFlags = 0;
aEmptyEv.mbOnlyCursor = False;
pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, static_cast<void*>(&aEmptyEv) );
if( ! aDel.isDeleted() )
- pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
// Constructor / Destructor, the InputContext is bound to the SalFrame, as it
@@ -59,18 +59,18 @@ static void sendEmptyCommit( SalFrame* pFrame )
SalI18N_InputContext::~SalI18N_InputContext()
{
- if ( maContext != NULL )
+ if ( maContext != nullptr )
XDestroyIC( maContext );
- if ( mpAttributes != NULL )
+ if ( mpAttributes != nullptr )
XFree( mpAttributes );
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
XFree( mpStatusAttributes );
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
XFree( mpPreeditAttributes );
- if (maClientData.aText.pUnicodeBuffer != NULL)
+ if (maClientData.aText.pUnicodeBuffer != nullptr)
free(maClientData.aText.pUnicodeBuffer);
- if (maClientData.aText.pCharStyle != NULL)
+ if (maClientData.aText.pCharStyle != nullptr)
free(maClientData.aText.pCharStyle);
}
@@ -84,7 +84,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
// if ( value == NULL )
// return a_srclist;
- if ( a_srclist == NULL )
+ if ( a_srclist == nullptr )
{
a_dstlist = XVaCreateNestedList(
0,
@@ -100,7 +100,7 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
NULL );
}
- return a_dstlist != NULL ? a_dstlist : a_srclist ;
+ return a_dstlist != nullptr ? a_dstlist : a_srclist ;
}
// convenience routine to create a fontset
@@ -108,9 +108,9 @@ XVaAddToNestedList( XVaNestedList a_srclist, char* name, XPointer value )
static XFontSet
get_font_set( Display *p_display )
{
- static XFontSet p_font_set = NULL;
+ static XFontSet p_font_set = nullptr;
- if (p_font_set == NULL)
+ if (p_font_set == nullptr)
{
char **pp_missing_list;
int n_missing_count;
@@ -140,9 +140,9 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
),
mnStatusStyle( 0 ),
mnPreeditStyle( 0 ),
- mpAttributes( NULL ),
- mpStatusAttributes( NULL ),
- mpPreeditAttributes( NULL )
+ mpAttributes( nullptr ),
+ mpStatusAttributes( nullptr ),
+ mpPreeditAttributes( nullptr )
{
#ifdef SOLARIS
static const char* pIIIMPEnable = getenv( "SAL_DISABLE_OWN_IM_STATUS" );
@@ -158,10 +158,10 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
memset(&maSwitchIMCallback, 0, sizeof(maSwitchIMCallback));
memset(&maDestroyCallback, 0, sizeof(maDestroyCallback));
- maClientData.aText.pUnicodeBuffer = NULL;
- maClientData.aText.pCharStyle = NULL;
+ maClientData.aText.pUnicodeBuffer = nullptr;
+ maClientData.aText.pCharStyle = nullptr;
maClientData.aInputEv.mnTime = 0;
- maClientData.aInputEv.mpTextAttr = NULL;
+ maClientData.aInputEv.mpTextAttr = nullptr;
maClientData.aInputEv.mnCursorPos = 0;
maClientData.aInputEv.mnCursorFlags = 0;
maClientData.aInputEv.mbOnlyCursor = false;
@@ -279,7 +279,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
Display* pDisplay = vcl_sal::getSalDisplay(GetGenericData())->GetDisplay();
XFontSet pFontSet = get_font_set(pDisplay);
- if (pFontSet != NULL)
+ if (pFontSet != nullptr)
{
mpPreeditAttributes = XVaAddToNestedList( mpPreeditAttributes,
const_cast<char*>(XNFontSet), reinterpret_cast<XPointer>(pFontSet));
@@ -309,7 +309,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
if ( mnPreeditStyle != XIMPreeditNone )
{
#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
const_cast<char*>(XNPreeditAttributes), static_cast<XPointer>(mpPreeditAttributes) );
@@ -317,7 +317,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
if ( mnStatusStyle != XIMStatusNone )
{
#if defined LINUX || defined FREEBSD || defined NETBSD || defined OPENBSD || defined DRAGONFLY
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
#endif
mpAttributes = XVaAddToNestedList( mpAttributes,
const_cast<char*>(XNStatusAttributes), static_cast<XPointer>(mpStatusAttributes) );
@@ -327,7 +327,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
NULL );
}
- if ( maContext == NULL )
+ if ( maContext == nullptr )
{
#if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "input context creation failed\n");
@@ -335,25 +335,25 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
mbUseable = False;
- if ( mpAttributes != NULL )
+ if ( mpAttributes != nullptr )
XFree( mpAttributes );
- if ( mpStatusAttributes != NULL )
+ if ( mpStatusAttributes != nullptr )
XFree( mpStatusAttributes );
- if ( mpPreeditAttributes != NULL )
+ if ( mpPreeditAttributes != nullptr )
XFree( mpPreeditAttributes );
- if ( maClientData.aText.pUnicodeBuffer != NULL )
+ if ( maClientData.aText.pUnicodeBuffer != nullptr )
free ( maClientData.aText.pUnicodeBuffer );
- if ( maClientData.aText.pCharStyle != NULL )
+ if ( maClientData.aText.pCharStyle != nullptr )
free ( maClientData.aText.pCharStyle );
- mpAttributes = NULL;
- mpStatusAttributes = NULL;
- mpPreeditAttributes = NULL;
- maClientData.aText.pUnicodeBuffer = NULL;
- maClientData.aText.pCharStyle = NULL;
+ mpAttributes = nullptr;
+ mpStatusAttributes = nullptr;
+ mpPreeditAttributes = nullptr;
+ maClientData.aText.pUnicodeBuffer = nullptr;
+ maClientData.aText.pCharStyle = nullptr;
}
- if ( maContext != NULL)
+ if ( maContext != nullptr)
{
maDestroyCallback.callback = static_cast<XIMProc>(IC_IMDestroyCallback);
maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
@@ -369,7 +369,7 @@ SalI18N_InputContext::SalI18N_InputContext ( SalFrame *pFrame ) :
void
SalI18N_InputContext::Unmap( SalFrame* pFrame )
{
- if ( maContext != NULL )
+ if ( maContext != nullptr )
{
I18NStatus& rStatus( I18NStatus::get() );
if( rStatus.getParent() == pFrame )
@@ -377,7 +377,7 @@ SalI18N_InputContext::Unmap( SalFrame* pFrame )
}
UnsetICFocus( pFrame );
- maClientData.pFrame = NULL;
+ maClientData.pFrame = nullptr;
}
void
@@ -390,7 +390,7 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
if( pFrame )
{
rStatus.show( true, I18NStatus::contextmap );
- if ( maContext == NULL )
+ if ( maContext == nullptr )
{
SalI18N_InputMethod *pInputMethod;
pInputMethod = vcl_sal::getSalDisplay(GetGenericData())->GetInputMethod();
@@ -411,7 +411,7 @@ SalI18N_InputContext::Map( SalFrame *pFrame )
void
SalI18N_InputContext::HandleDestroyIM()
{
- maContext = 0; // don't change
+ maContext = nullptr; // don't change
mbUseable = False;
}
@@ -488,7 +488,7 @@ SalI18N_InputContext::SupportInputMethodStyle( XIMStyles *pIMStyles )
mnPreeditStyle = 0;
mnStatusStyle = 0;
- if ( pIMStyles != NULL )
+ if ( pIMStyles != nullptr )
{
int nBestScore = 0;
int nActualScore = 0;
@@ -534,7 +534,7 @@ SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength)
SalExtTextInputEvent aTextEvent;
aTextEvent.mnTime = 0;
- aTextEvent.mpTextAttr = 0;
+ aTextEvent.mpTextAttr = nullptr;
aTextEvent.mnCursorPos = nLength;
aTextEvent.maText = OUString(pText, nLength);
aTextEvent.mnCursorFlags = 0;
@@ -554,7 +554,7 @@ SalI18N_InputContext::CommitKeyEvent(sal_Unicode* pText, sal_Size nLength)
int
SalI18N_InputContext::UpdateSpotLocation()
{
- if (maContext == 0 || maClientData.pFrame == NULL)
+ if (maContext == nullptr || maClientData.pFrame == nullptr)
return -1;
SalExtTextInputPosEvent aPosEvent;
@@ -581,7 +581,7 @@ void
SalI18N_InputContext::SetICFocus( SalFrame* pFocusFrame )
{
I18NStatus::get().setParent( pFocusFrame );
- if ( mbUseable && (maContext != NULL) )
+ if ( mbUseable && (maContext != nullptr) )
{
maClientData.pFrame = pFocusFrame;
@@ -610,13 +610,13 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame )
{
I18NStatus& rStatus( I18NStatus::get() );
if( rStatus.getParent() == pFrame )
- rStatus.setParent( NULL );
+ rStatus.setParent( nullptr );
- if ( mbUseable && (maContext != NULL) )
+ if ( mbUseable && (maContext != nullptr) )
{
// cancel an eventual event posted to begin preedit again
vcl_sal::getSalDisplay(GetGenericData())->CancelInternalEvent( maClientData.pFrame, &maClientData.aInputEv, SALEVENT_EXTTEXTINPUT );
- maClientData.pFrame = NULL;
+ maClientData.pFrame = nullptr;
XUnsetICFocus( maContext );
}
}
@@ -626,7 +626,7 @@ SalI18N_InputContext::UnsetICFocus( SalFrame* pFrame )
void
SalI18N_InputContext::EndExtTextInput( EndExtTextInputFlags /*nFlags*/ )
{
- if ( mbUseable && (maContext != NULL) && maClientData.pFrame )
+ if ( mbUseable && (maContext != nullptr) && maClientData.pFrame )
{
vcl::DeletionListener aDel( maClientData.pFrame );
// delete preedit in sal (commit an empty string)
diff --git a/vcl/unx/generic/app/i18n_im.cxx b/vcl/unx/generic/app/i18n_im.cxx
index d9dfc831e6bb..c4a9b7f3ede8 100644
--- a/vcl/unx/generic/app/i18n_im.cxx
+++ b/vcl/unx/generic/app/i18n_im.cxx
@@ -66,7 +66,7 @@ void
XKeyEventOp::init()
{
type = 0; /* serial = 0; */
- send_event = 0; display = 0;
+ send_event = 0; display = nullptr;
window = 0; root = 0;
subwindow = 0; /* time = 0; */
/* x = 0; y = 0; */
@@ -135,7 +135,7 @@ SetSystemLocale( const char* p_inlocale )
{
char *p_outlocale;
- if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == NULL )
+ if ( (p_outlocale = setlocale(LC_ALL, p_inlocale)) == nullptr )
{
fprintf( stderr, "I18N: Operating system doesn't support locale \"%s\"\n",
p_inlocale );
@@ -159,7 +159,7 @@ SetSystemEnvironment( const OUString& rLocale )
static Bool
IsPosixLocale( const char* p_locale )
{
- if ( p_locale == NULL )
+ if ( p_locale == nullptr )
return False;
if ( (p_locale[ 0 ] == 'C') && (p_locale[ 1 ] == '\0') )
return True;
@@ -174,7 +174,7 @@ IsPosixLocale( const char* p_locale )
static Bool
IsXWindowCompatibleLocale( const char* p_locale )
{
- if ( p_locale == NULL )
+ if ( p_locale == nullptr )
return False;
if ( !XSupportsLocale() )
@@ -222,7 +222,7 @@ SalI18N_InputMethod::SetLocale( const char* pLocale )
}
// must not fail if mbUseable since XSupportsLocale() asserts success
- if ( mbUseable && XSetLocaleModifiers("") == NULL )
+ if ( mbUseable && XSetLocaleModifiers("") == nullptr )
{
fprintf (stderr, "I18N: Can't set X modifiers for locale \"%s\"\n",
locale);
@@ -251,16 +251,16 @@ SalI18N_InputMethod::SalI18N_InputMethod( )
maDestroyCallback.callback = nullptr;
maDestroyCallback.client_data = nullptr;
const char *pUseInputMethod = getenv( "SAL_USEINPUTMETHOD" );
- if ( pUseInputMethod != NULL )
+ if ( pUseInputMethod != nullptr )
mbUseable = pUseInputMethod[0] != '\0' ;
}
SalI18N_InputMethod::~SalI18N_InputMethod()
{
vcl::I18NStatus::free();
- if ( mpStyles != NULL )
+ if ( mpStyles != nullptr )
XFree( mpStyles );
- if ( maMethod != NULL )
+ if ( maMethod != nullptr )
XCloseIM ( maMethod );
}
@@ -336,20 +336,20 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
{
if ( mbUseable )
{
- maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
+ maMethod = XOpenIM(pDisplay, nullptr, nullptr, nullptr);
- if ((maMethod == nullptr) && (getenv("XMODIFIERS") != NULL))
+ if ((maMethod == nullptr) && (getenv("XMODIFIERS") != nullptr))
{
OUString envVar("XMODIFIERS");
osl_clearEnvironment(envVar.pData);
XSetLocaleModifiers("");
- maMethod = XOpenIM(pDisplay, NULL, NULL, NULL);
+ maMethod = XOpenIM(pDisplay, nullptr, nullptr, nullptr);
}
if ( maMethod != nullptr )
{
if ( XGetIMValues(maMethod, XNQueryInputStyle, &mpStyles, NULL)
- != NULL)
+ != nullptr)
mbUseable = False;
#if OSL_DEBUG_LEVEL > 1
fprintf(stderr, "Creating Mono-Lingual InputMethod\n" );
@@ -369,7 +369,7 @@ SalI18N_InputMethod::CreateMethod ( Display *pDisplay )
maDestroyCallback.callback = static_cast<XIMProc>(IM_IMDestroyCallback);
maDestroyCallback.client_data = reinterpret_cast<XPointer>(this);
- if (mbUseable && maMethod != NULL)
+ if (mbUseable && maMethod != nullptr)
XSetIMValues(maMethod, XNDestroyCallback, &maDestroyCallback, NULL);
return mbUseable;
@@ -415,7 +415,7 @@ void
SalI18N_InputMethod::HandleDestroyIM()
{
mbUseable = False;
- maMethod = NULL;
+ maMethod = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/generic/app/i18n_keysym.cxx b/vcl/unx/generic/app/i18n_keysym.cxx
index 123f0ec74bef..880f46ef8d4b 100644
--- a/vcl/unx/generic/app/i18n_keysym.cxx
+++ b/vcl/unx/generic/app/i18n_keysym.cxx
@@ -339,13 +339,13 @@ KeysymToUnicode (KeySym nKeySym)
if (n_byte2 != 0)
return 0;
- keymap_t const* p_map = NULL;
+ keymap_t const* p_map = nullptr;
if (n_byte3 < INITIAL_KEYMAPS)
p_map = p_keymap[n_byte3];
else if (n_byte3 == 255)
p_map = &keymap255;
- if ((p_map != NULL) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) )
+ if ((p_map != nullptr) && (n_byte4 >= p_map->first) && (n_byte4 <= p_map->last) )
return p_map->map[n_byte4 - p_map->first];
}
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index 82fc6774cf6a..207a4b4a6406 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -62,7 +62,7 @@ public:
}
StatusWindow::StatusWindow( WinBits nWinBits ) :
- WorkWindow( NULL, nWinBits )
+ WorkWindow( nullptr, nWinBits )
{
}
@@ -112,11 +112,11 @@ public:
XIMStatusWindow::XIMStatusWindow( bool bOn ) :
StatusWindow( WB_BORDER | WB_SYSTEMFLOATWIN | WB_TOOLTIPWIN ),
m_aStatusText(VclPtr<FixedText>::Create(this, 0)),
- m_pLastParent( NULL ),
+ m_pLastParent( nullptr ),
m_bAnchoredAtRight( false ),
m_bDelayedShow( false ),
m_eDelayedReason( I18NStatus::contextmap ),
- m_nDelayedEvent( 0 ),
+ m_nDelayedEvent( nullptr ),
m_bOn( bOn )
{
layout();
@@ -260,7 +260,7 @@ void XIMStatusWindow::setPosition( SalFrame* pParent )
IMPL_LINK_NOARG_TYPED(XIMStatusWindow, DelayedShowHdl, void*, void)
{
- m_nDelayedEvent = 0;
+ m_nDelayedEvent = nullptr;
const SystemEnvData* pData = GetSystemData();
SalFrame* pStatusFrame = static_cast<SalFrame*>(pData->pSalFrame);
if( m_bDelayedShow )
@@ -286,7 +286,7 @@ void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
m_bDelayedShow = bShow;
m_eDelayedReason = eReason;
if( ! m_nDelayedEvent )
- m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ), NULL, true );
+ m_nDelayedEvent = Application::PostUserEvent( LINK( this, XIMStatusWindow, DelayedShowHdl ), nullptr, true );
}
void XIMStatusWindow::setText( const OUString& rText )
@@ -455,7 +455,7 @@ void IIIMPStatusWindow::GetFocus()
XSync( static_cast<Display*>(pParentEnvData->pDisplay), False );
GetGenericData()->ErrorTrapPop();
}
- m_pResetFocus = NULL;
+ m_pResetFocus = nullptr;
}
}
@@ -493,7 +493,7 @@ IMPL_LINK_TYPED( IIIMPStatusWindow, SelectHdl, MenuButton*, pBtn, void )
* I18NStatus
*/
-I18NStatus* I18NStatus::pInstance = NULL;
+I18NStatus* I18NStatus::pInstance = nullptr;
I18NStatus& I18NStatus::get()
{
@@ -504,18 +504,18 @@ I18NStatus& I18NStatus::get()
bool I18NStatus::exists()
{
- return pInstance != NULL;
+ return pInstance != nullptr;
}
void I18NStatus::free()
{
if( pInstance )
- delete pInstance, pInstance = NULL;
+ delete pInstance, pInstance = nullptr;
}
I18NStatus::I18NStatus() :
- m_pParent( NULL ),
- m_pStatusWindow( NULL )
+ m_pParent( nullptr ),
+ m_pStatusWindow( nullptr )
{
}
@@ -523,7 +523,7 @@ I18NStatus::~I18NStatus()
{
m_pStatusWindow.disposeAndClear();
if( pInstance == this )
- pInstance = NULL;
+ pInstance = nullptr;
}
void I18NStatus::setParent( SalFrame* pParent )
@@ -588,7 +588,7 @@ void I18NStatus::setStatusText( const OUString& rText )
SalFrame* I18NStatus::getStatusFrame() const
{
- SalFrame* pRet = NULL;
+ SalFrame* pRet = nullptr;
if( m_pStatusWindow )
{
const SystemEnvData* pData = m_pStatusWindow->GetSystemData();
diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx
index f9618f4d9826..aebca9f2c58f 100644
--- a/vcl/unx/generic/app/i18n_xkb.cxx
+++ b/vcl/unx/generic/app/i18n_xkb.cxx
@@ -38,11 +38,11 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay )
// setenv SAL_XKEYBOARDGROUP 2 sets the keyboard group index to 2
// keyboard group index must be in [1,4], may be specified in hex or decimal
static char *pUseKeyboardExtension = getenv( "SAL_XKEYBOARDGROUP" );
- if ( pUseKeyboardExtension != NULL )
+ if ( pUseKeyboardExtension != nullptr )
{
mbUseExtension = pUseKeyboardExtension[0] != '\0' ;
if ( mbUseExtension )
- mnDefaultGroup = strtol( pUseKeyboardExtension, NULL, 0 );
+ mnDefaultGroup = strtol( pUseKeyboardExtension, nullptr, 0 );
if ( mnDefaultGroup > XkbMaxKbdGroup )
mnDefaultGroup = 0;
}
diff --git a/vcl/unx/generic/app/randrwrapper.cxx b/vcl/unx/generic/app/randrwrapper.cxx
index 9509c195e71f..3e899e8c05a0 100644
--- a/vcl/unx/generic/app/randrwrapper.cxx
+++ b/vcl/unx/generic/app/randrwrapper.cxx
@@ -190,7 +190,7 @@ public:
}
XRRScreenConfiguration* XRRGetScreenInfo( Display* i_pDisp, Drawable i_aDrawable )
{
- return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : NULL;
+ return m_bValid ? ::XRRGetScreenInfo( i_pDisp, i_aDrawable ) : nullptr;
}
void XRRFreeScreenConfigInfo( XRRScreenConfiguration* i_pConfig )
{
@@ -208,7 +208,7 @@ public:
}
XRRScreenSize* XRRConfigSizes( XRRScreenConfiguration* i_pConfig, int* o_nSizes )
{
- return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : NULL;
+ return m_bValid ? ::XRRConfigSizes( i_pConfig, o_nSizes ) : nullptr;
}
SizeID XRRConfigCurrentConfiguration( XRRScreenConfiguration* i_pConfig, Rotation* o_pRot )
{
@@ -228,7 +228,7 @@ RandRWrapper::RandRWrapper( Display* pDisplay ) :
m_bValid = false;
}
-static RandRWrapper* pWrapper = NULL;
+static RandRWrapper* pWrapper = nullptr;
RandRWrapper& RandRWrapper::get( Display* i_pDisplay )
{
@@ -240,7 +240,7 @@ RandRWrapper& RandRWrapper::get( Display* i_pDisplay )
void RandRWrapper::releaseWrapper()
{
delete pWrapper;
- pWrapper = NULL;
+ pWrapper = nullptr;
}
#endif
@@ -295,8 +295,8 @@ int SalDisplay::processRandREvent( XEvent* pEvent )
{
if( m_aScreens[i].m_bInit )
{
- XRRScreenConfiguration *pConfig = NULL;
- XRRScreenSize *pSizes = NULL;
+ XRRScreenConfiguration *pConfig = nullptr;
+ XRRScreenSize *pSizes = nullptr;
int nSizes = 0;
Rotation nRot = 0;
SizeID nId = 0;
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 93285bdfe680..fc1e72dd4431 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -62,9 +62,9 @@
X11SalData* GetX11SalData()
{
SalData * p1 = ImplGetSVData()->mpSalData;
- OSL_ASSERT(p1 != 0);
+ OSL_ASSERT(p1 != nullptr);
X11SalData * p2 = dynamic_cast< X11SalData * >(p1);
- OSL_ASSERT(p2 != 0);
+ OSL_ASSERT(p2 != nullptr);
return p2;
}
@@ -88,7 +88,7 @@ static int XIOErrorHdl( Display * )
// really bad hack
if( ! SessionManagerClient::checkDocumentsSaved() )
- /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ /* oslSignalAction eToDo = */ osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, nullptr);
}
std::fprintf( stderr, "X IO Error\n" );
@@ -110,7 +110,7 @@ static const struct timeval yield__ = { 0, 10000 };
static const char* XRequest[] = {
// see /usr/lib/X11/XErrorDB, /usr/openwin/lib/XErrorDB ...
- NULL,
+ nullptr,
"X_CreateWindow",
"X_ChangeWindowAttributes",
"X_GetWindowAttributes",
@@ -230,21 +230,21 @@ static const char* XRequest[] = {
"X_GetPointerMapping",
"X_SetModifierMapping",
"X_GetModifierMapping",
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
- NULL,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
+ nullptr,
"X_NoOperation"
};
X11SalData::X11SalData( SalGenericDataType t, SalInstance *pInstance )
: SalGenericData( t, pInstance )
{
- pXLib_ = NULL;
- m_pPlugin = NULL;
+ pXLib_ = nullptr;
+ m_pPlugin = nullptr;
m_aOrigXIOErrorHandler = XSetIOErrorHandler ( XIOErrorHdl );
PushXErrorLevel( !!getenv( "SAL_IGNOREXERRORS" ) );
@@ -261,15 +261,15 @@ void X11SalData::Dispose()
{
deInitNWF();
delete GetDisplay();
- SetSalData( NULL );
+ SetSalData( nullptr );
}
void X11SalData::DeleteDisplay()
{
delete GetDisplay();
- SetDisplay( NULL );
+ SetDisplay( nullptr );
delete pXLib_;
- pXLib_ = NULL;
+ pXLib_ = nullptr;
}
void X11SalData::Init()
@@ -490,7 +490,7 @@ void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent )
PrintXError( pDisplay, pEvent );
- oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, NULL);
+ oslSignalAction eToDo = osl_raiseSignal (OSL_SIGNAL_USER_X11SUBSYSTEMERROR, nullptr);
switch (eToDo)
{
case osl_Signal_ActIgnore :
@@ -572,7 +572,7 @@ bool SalXLib::CheckTimeout( bool bExecuteTimers )
if( m_aTimeout.tv_sec ) // timer is started
{
timeval aTimeOfDay;
- gettimeofday( &aTimeOfDay, 0 );
+ gettimeofday( &aTimeOfDay, nullptr );
if( aTimeOfDay >= m_aTimeout )
{
bRet = true;
@@ -612,7 +612,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
blockIdleTimeout = !bWait;
// check for timeouts here if you want to make screenshots
static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT");
- if (p_prioritize_timer != NULL)
+ if (p_prioritize_timer != nullptr)
CheckTimeout();
const int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
@@ -647,11 +647,11 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
if (bWait)
{
- pTimeout = 0;
+ pTimeout = nullptr;
if (m_aTimeout.tv_sec) // Timer is started.
{
// determine remaining timeout.
- gettimeofday (&Timeout, 0);
+ gettimeofday (&Timeout, nullptr);
Timeout = m_aTimeout - Timeout;
if (yield__ >= Timeout)
{
@@ -665,7 +665,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// release YieldMutex (and re-acquire at block end)
SalYieldMutexReleaser aReleaser;
- nFound = select( nFDs, &ReadFDS, NULL, &ExceptionFDS, pTimeout );
+ nFound = select( nFDs, &ReadFDS, nullptr, &ExceptionFDS, pTimeout );
}
if( nFound < 0 ) // error
{
@@ -679,7 +679,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
// usually handle timeouts here (as in 5.2)
- if (p_prioritize_timer == NULL)
+ if (p_prioritize_timer == nullptr)
CheckTimeout();
// handle wakeup events.
@@ -698,7 +698,7 @@ void SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// recall select if we have acquired fd's, ready for reading,
struct timeval noTimeout = { 0, 0 };
- nFound = select( nFDs_, &ReadFDS, NULL,
+ nFound = select( nFDs_, &ReadFDS, nullptr,
&ExceptionFDS, &noTimeout );
// someone-else has done the job for us
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index 7510addf0681..b86fa3792bf6 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -163,7 +163,7 @@ sal_GetServerVendor( Display *p_display )
const vendor_t p_vendorlist[] = {
{ vendor_sun, "Sun Microsystems, Inc.", 10 },
// always the last entry: vendor_none to indicate eol
- { vendor_none, NULL, 0 },
+ { vendor_none, nullptr, 0 },
};
// handle regular server vendors
@@ -253,10 +253,10 @@ bool SalDisplay::BestVisual( Display *pDisplay,
}
SalDisplay::SalDisplay( Display *display ) :
- pXLib_( NULL ),
- mpInputMethod( NULL ),
- mpKbdExtension( NULL ),
- mpFactory( NULL ),
+ pXLib_( nullptr ),
+ mpInputMethod( nullptr ),
+ mpKbdExtension( nullptr ),
+ mpFactory( nullptr ),
pDisp_( display ),
m_nXDefaultScreen( 0 ),
nMaxRequestSize_( 0 ),
@@ -267,7 +267,7 @@ SalDisplay::SalDisplay( Display *display ) :
nShiftKeySym_( 0 ),
nCtrlKeySym_( 0 ),
nMod1KeySym_( 0 ),
- m_pWMAdaptor( NULL ),
+ m_pWMAdaptor( nullptr ),
m_bXinerama( false ),
m_bUseRandRWrapper( true ),
m_nLastUserEventTime( CurrentTime )
@@ -294,7 +294,7 @@ SalDisplay::~SalDisplay()
#if OSL_DEBUG_LEVEL > 1
fprintf( stderr, "display %p closed\n", pDisp_ );
#endif
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
// don't do this in doDestruct since RandR extension adds hooks into Display
// that is XCloseDisplay still needs the RandR library if it was used
@@ -306,14 +306,14 @@ void SalDisplay::doDestruct()
SalGenericData *pData = GetGenericData();
delete m_pWMAdaptor;
- m_pWMAdaptor = NULL;
+ m_pWMAdaptor = nullptr;
X11SalBitmap::ImplDestroyCache();
X11SalGraphics::releaseGlyphPeer();
if( IsDisplay() )
{
- delete mpInputMethod, mpInputMethod = NULL;
- delete mpKbdExtension, mpKbdExtension = NULL;
+ delete mpInputMethod, mpInputMethod = nullptr;
+ delete mpKbdExtension, mpKbdExtension = nullptr;
for( size_t i = 0; i < m_aScreens.size(); i++ )
{
@@ -346,7 +346,7 @@ void SalDisplay::doDestruct()
}
if( pData->GetDisplay() == static_cast<const SalGenericDisplay *>( this ) )
- pData->SetDisplay( NULL );
+ pData->SetDisplay( nullptr );
}
static int DisplayHasEvent( int fd, SalX11Display *pDisplay )
@@ -412,7 +412,7 @@ SalX11Display::~SalX11Display()
{
doDestruct();
XCloseDisplay( pDisp_ );
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
}
@@ -429,7 +429,7 @@ SalDisplay::initScreen( SalX11Screen nXScreen ) const
nXScreen = m_nXDefaultScreen;
ScreenData* pSD = const_cast<ScreenData *>(&m_aScreens[nXScreen.getXScreen()]);
if( pSD->m_bInit )
- return NULL;
+ return nullptr;
pSD->m_bInit = true;
XVisualInfo aVI;
@@ -571,7 +571,7 @@ void SalDisplay::Init()
* it is what modern desktops use.
*/
const char* pValStr = XGetDefault( pDisp_, "Xft", "dpi" );
- if( pValStr != NULL )
+ if( pValStr != nullptr )
{
const OString aValStr( pValStr );
const long nDPI = (long) aValStr.toDouble();
@@ -1397,13 +1397,13 @@ KeySym SalDisplay::GetKeySym( XKeyEvent *pEvent,
*pStatusReturn = 0;
// first get the printable of the possibly modified KeySym
- if ( (aInputContext == 0)
+ if ( (aInputContext == nullptr)
|| (pEvent->type == KeyRelease)
- || (mpInputMethod != NULL && mpInputMethod->PosixLocale()) )
+ || (mpInputMethod != nullptr && mpInputMethod->PosixLocale()) )
{
// XmbLookupString must not be called for KeyRelease events
// Cannot enter space in c locale problem #89616# #88978# btraq #4478197
- *pLen = XLookupString( pEvent, reinterpret_cast<char*>(pPrintable), 1, &nKeySym, NULL );
+ *pLen = XLookupString( pEvent, reinterpret_cast<char*>(pPrintable), 1, &nKeySym, nullptr );
}
else
{
@@ -1840,14 +1840,14 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture )
if( !pCapture )
{
- m_pCapture = NULL;
+ m_pCapture = nullptr;
if( !pEnv || !*pEnv )
XUngrabPointer( GetDisplay(), CurrentTime );
XFlush( GetDisplay() );
return 0;
}
- m_pCapture = NULL;
+ m_pCapture = nullptr;
// FIXME: get rid of X11SalFrame
const SystemEnvData* pEnvData = pCapture->GetSystemData();
@@ -1957,7 +1957,7 @@ bool SalX11Display::Dispatch( XEvent *pEvent )
{
std::list< SalFrame* >::const_iterator it;
for( it = m_aFrames.begin(); it != m_aFrames.end(); ++it )
- (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, NULL );
+ (*it)->CallCallback( SALEVENT_SETTINGSCHANGED, nullptr );
return false;
}
}
@@ -2021,8 +2021,8 @@ void SalDisplay::DbgPrintDisplayEvent(const char *pComment, XEvent *pEvent) cons
{
static const char* const EventNames[] =
{
- NULL,
- NULL,
+ nullptr,
+ nullptr,
"KeyPress",
"KeyRelease",
"ButtonPress",
@@ -2564,7 +2564,7 @@ SalColormap::SalColormap()
m_nWhitePixel( 1 ),
m_nBlackPixel( 0 ),
m_nUsed( 2 ),
- m_nXScreen( m_pDisplay != NULL ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) )
+ m_nXScreen( m_pDisplay != nullptr ? m_pDisplay->GetDefaultXScreen() : SalX11Screen( 0 ) )
{
m_aPalette = std::vector<SalColor>(m_nUsed);
@@ -2639,7 +2639,7 @@ SalColormap::SalColormap( sal_uInt16 nDepth )
aVI.colormap_size = 0;
aVI.bits_per_rgb = 8;
- aVI.visual->ext_data = NULL;
+ aVI.visual->ext_data = nullptr;
aVI.visual->visualid = aVI.visualid;
aVI.visual->c_class = aVI.c_class;
aVI.visual->red_mask = aVI.red_mask;
@@ -2663,7 +2663,7 @@ SalColormap::~SalColormap()
{
#ifdef DBG_UTIL
m_hColormap = None;
- m_pDisplay = NULL;
+ m_pDisplay = nullptr;
#endif
}
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index ca469dc948b5..057b9894c504 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -176,7 +176,7 @@ SalFrame *X11SalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nSa
SalFrame* X11SalInstance::CreateChildFrame( SystemParentData* pParentData, SalFrameStyleFlags nStyle )
{
- SalFrame* pFrame = new X11SalFrame( NULL, nStyle, pParentData );
+ SalFrame* pFrame = new X11SalFrame( nullptr, nStyle, pParentData );
return pFrame;
}
@@ -192,7 +192,7 @@ void X11SalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
{
typedef void (*PFUNC_ADD_TO_RECENTLY_USED_LIST)(const OUString&, const OUString&, const OUString&);
- PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = 0;
+ PFUNC_ADD_TO_RECENTLY_USED_LIST add_to_recently_used_file_list = nullptr;
osl::Module module;
module.loadRelative( &thisModule, "librecentfile.so" );
@@ -208,7 +208,7 @@ void X11SalInstance::PostPrintersChanged()
const std::list< SalFrame* >& rList = pDisp->getFrames();
for( std::list< SalFrame* >::const_iterator it = rList.begin();
it != rList.end(); ++it )
- pDisp->SendInternalEvent( *it, NULL, SALEVENT_PRINTERCHANGED );
+ pDisp->SendInternalEvent( *it, nullptr, SALEVENT_PRINTERCHANGED );
}
GenPspGraphics *X11SalInstance::CreatePrintGraphics()
diff --git a/vcl/unx/generic/app/saltimer.cxx b/vcl/unx/generic/app/saltimer.cxx
index 1de121f9907f..604f4acf6ee0 100644
--- a/vcl/unx/generic/app/saltimer.cxx
+++ b/vcl/unx/generic/app/saltimer.cxx
@@ -45,7 +45,7 @@ void SalXLib::StopTimer()
void SalXLib::StartTimer( sal_uLong nMS )
{
timeval Timeout (m_aTimeout); // previous timeout.
- gettimeofday (&m_aTimeout, 0);
+ gettimeofday (&m_aTimeout, nullptr);
m_nTimeoutMS = nMS;
m_aTimeout += m_nTimeoutMS;
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index f8d1c3f05118..e179ea94b2a7 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -123,12 +123,12 @@ public:
osl::Mutex m_ICEMutex;
ICEConnectionObserver()
- : m_pFilehandles(NULL)
+ : m_pFilehandles(nullptr)
, m_nConnections(0)
- , m_pConnections(NULL)
- , m_ICEThread(NULL)
- , m_origIOErrorHandler(NULL)
- , m_origErrorHandler(NULL)
+ , m_pConnections(nullptr)
+ , m_ICEThread(nullptr)
+ , m_origIOErrorHandler(nullptr)
+ , m_origErrorHandler(nullptr)
{
m_nWakeupFiles[0] = m_nWakeupFiles[1] = 0;
}
@@ -138,10 +138,10 @@ public:
void terminate(oslThread iceThread);
};
-SalSession * SessionManagerClient::m_pSession = NULL;
+SalSession * SessionManagerClient::m_pSession = nullptr;
std::unique_ptr< ICEConnectionObserver >
SessionManagerClient::m_xICEConnectionObserver;
-SmcConn SessionManagerClient::m_pSmcConnection = NULL;
+SmcConn SessionManagerClient::m_pSmcConnection = nullptr;
OString SessionManagerClient::m_aClientID;
bool SessionManagerClient::m_bDocSaveDone = false; // HACK
@@ -158,10 +158,10 @@ static void IgnoreIceIOErrors(SAL_UNUSED_PARAMETER IceConn) {}
}
-static SmProp* pSmProps = NULL;
-static SmProp** ppSmProps = NULL;
+static SmProp* pSmProps = nullptr;
+static SmProp** ppSmProps = nullptr;
static int nSmProps = 0;
-static unsigned char *pSmRestartHint = NULL;
+static unsigned char *pSmRestartHint = nullptr;
static void BuildSmPropertyList()
{
@@ -333,7 +333,7 @@ void SessionManagerClient::SaveYourselfProc(
}
// Smuggle argument in as void*:
sal_uIntPtr nStateVal = shutdown;
- Application::PostUserEvent( LINK( 0, SessionManagerClient, SaveYourselfHdl ), reinterpret_cast< void * >(nStateVal) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, SaveYourselfHdl ), reinterpret_cast< void * >(nStateVal) );
SAL_INFO("vcl.sm", "waiting for save yourself event to be processed" );
}
@@ -348,7 +348,7 @@ IMPL_STATIC_LINK_NOARG_TYPED( SessionManagerClient, ShutDownHdl, void*, void )
const std::list< SalFrame* >& rFrames = vcl_sal::getSalDisplay(GetGenericData())->getFrames();
SAL_INFO("vcl.sm", (!rFrames.empty() ? "shutdown on first frame" : "shutdown event but no frame"));
if( !rFrames.empty() )
- rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, 0 );
+ rFrames.front()->CallCallback( SALEVENT_SHUTDOWN, nullptr );
}
void SessionManagerClient::DieProc(
@@ -359,7 +359,7 @@ void SessionManagerClient::DieProc(
SAL_INFO("vcl.sm", "Session: die");
if( connection == m_pSmcConnection )
{
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, ShutDownHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, ShutDownHdl ) );
SAL_INFO("vcl.sm", "waiting for shutdown event to be processed" );
}
}
@@ -378,7 +378,7 @@ void SessionManagerClient::ShutdownCanceledProc(
{
SAL_INFO("vcl.sm", "Session: shutdown canceled" );
if( connection == m_pSmcConnection )
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, ShutDownCancelHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, ShutDownCancelHdl ) );
}
void SessionManagerClient::InteractProc(
@@ -387,7 +387,7 @@ void SessionManagerClient::InteractProc(
{
SAL_INFO("vcl.sm", "Session: interaction request completed" );
if( connection == m_pSmcConnection )
- Application::PostUserEvent( LINK( NULL, SessionManagerClient, InteractionHdl ) );
+ Application::PostUserEvent( LINK( nullptr, SessionManagerClient, InteractionHdl ) );
}
void SessionManagerClient::saveDone()
@@ -419,18 +419,18 @@ void SessionManagerClient::open(SalSession * pSession)
static SmcCallbacks aCallbacks; // does this need to be static?
aCallbacks.save_yourself.callback = SaveYourselfProc;
- aCallbacks.save_yourself.client_data = NULL;
+ aCallbacks.save_yourself.client_data = nullptr;
aCallbacks.die.callback = DieProc;
- aCallbacks.die.client_data = NULL;
+ aCallbacks.die.client_data = nullptr;
aCallbacks.save_complete.callback = SaveCompleteProc;
- aCallbacks.save_complete.client_data = NULL;
+ aCallbacks.save_complete.client_data = nullptr;
aCallbacks.shutdown_cancelled.callback = ShutdownCanceledProc;
- aCallbacks.shutdown_cancelled.client_data = NULL;
+ aCallbacks.shutdown_cancelled.client_data = nullptr;
OString aPrevId(getPreviousSessionID());
- char* pClientID = NULL;
+ char* pClientID = nullptr;
char aErrBuf[1024];
- m_pSmcConnection = SmcOpenConnection( NULL,
- NULL,
+ m_pSmcConnection = SmcOpenConnection( nullptr,
+ nullptr,
SmProtoMajor,
SmProtoMinor,
SmcSaveYourselfProcMask |
@@ -438,7 +438,7 @@ void SessionManagerClient::open(SalSession * pSession)
SmcSaveCompleteProcMask |
SmcShutdownCancelledProcMask ,
&aCallbacks,
- aPrevId.isEmpty() ? NULL : const_cast<char*>(aPrevId.getStr()),
+ aPrevId.isEmpty() ? nullptr : const_cast<char*>(aPrevId.getStr()),
&pClientID,
sizeof( aErrBuf ),
aErrBuf );
@@ -448,7 +448,7 @@ void SessionManagerClient::open(SalSession * pSession)
SAL_INFO("vcl.sm", "SmcOpenConnection succeeded, client ID is " << pClientID );
m_aClientID = OString(pClientID);
free( pClientID );
- pClientID = NULL;
+ pClientID = nullptr;
}
SalDisplay* pDisp = vcl_sal::getSalDisplay(GetGenericData());
@@ -484,12 +484,12 @@ void SessionManagerClient::close()
{
osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
SAL_INFO("vcl.sm", "attempting SmcCloseConnection");
- SmcCloseConnection( m_pSmcConnection, 0, NULL );
+ SmcCloseConnection( m_pSmcConnection, 0, nullptr );
SAL_INFO("vcl.sm", "SmcConnection closed");
}
m_xICEConnectionObserver->deactivate();
m_xICEConnectionObserver.reset();
- m_pSmcConnection = NULL;
+ m_pSmcConnection = nullptr;
}
}
@@ -500,7 +500,7 @@ bool SessionManagerClient::queryInteraction()
{
assert(m_xICEConnectionObserver);
osl::MutexGuard g(m_xICEConnectionObserver->m_ICEMutex);
- if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, NULL ) )
+ if( SmcInteractRequest( m_pSmcConnection, SmDialogNormal, InteractProc, nullptr ) )
bRet = true;
}
return bRet;
@@ -570,7 +570,7 @@ void ICEConnectionObserver::deactivate()
IceSetIOErrorHandler( m_origIOErrorHandler );
m_nConnections = 0;
t = m_ICEThread;
- m_ICEThread = NULL;
+ m_ICEThread = nullptr;
}
if (t)
{
@@ -604,7 +604,7 @@ void ICEConnectionWorker(void * data)
oslThread t;
{
osl::MutexGuard g(pThis->m_ICEMutex);
- if (pThis->m_ICEThread == NULL || pThis->m_nConnections == 0)
+ if (pThis->m_ICEThread == nullptr || pThis->m_nConnections == 0)
{
break;
}
@@ -654,7 +654,7 @@ void ICEConnectionWorker(void * data)
Bool bReply;
for( int i = 0; i < pThis->m_nConnections; i++ )
if( pThis->m_pFilehandles[i+1].revents & POLLIN )
- IceProcessMessages( pThis->m_pConnections[i], NULL, &bReply );
+ IceProcessMessages( pThis->m_pConnections[i], nullptr, &bReply );
}
}
}
@@ -734,7 +734,7 @@ void ICEWatchProc(
{
SAL_INFO("vcl.sm", "terminating ICEThread");
oslThread t = pThis->m_ICEThread;
- pThis->m_ICEThread = NULL;
+ pThis->m_ICEThread = nullptr;
// must release the mutex here
pThis->m_ICEMutex.release();
diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx
index 3822d09beaae..2f8d250a2bd3 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -56,7 +56,7 @@ public:
virtual void setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const override;
virtual void maximizeFrame( X11SalFrame* pFrame, bool bHorizontal = true, bool bVertical = true ) const override;
virtual void shade( X11SalFrame* pFrame, bool bToShaded ) const override;
- virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = NULL ) const override;
+ virtual void setFrameTypeAndDecoration( X11SalFrame* pFrame, WMWindowType eType, int nDecorationFlags, X11SalFrame* pTransientFrame = nullptr ) const override;
virtual void enableAlwaysOnTop( X11SalFrame* pFrame, bool bEnable ) const override;
virtual int handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEvent ) const override;
virtual void showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const override;
@@ -176,12 +176,12 @@ static int compareProtocol( const void* pLeft, const void* pRight )
WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
{
- WMAdaptor* pAdaptor = NULL;
+ WMAdaptor* pAdaptor = nullptr;
// try a NetWM
pAdaptor = new NetWMAdaptor( pSalDisplay );
if( ! pAdaptor->isValid() )
- delete pAdaptor, pAdaptor = NULL;
+ delete pAdaptor, pAdaptor = nullptr;
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "WM supports extended WM hints\n" );
@@ -192,7 +192,7 @@ WMAdaptor* WMAdaptor::createWMAdaptor( SalDisplay* pSalDisplay )
{
pAdaptor = new GnomeWMAdaptor( pSalDisplay );
if( ! pAdaptor->isValid() )
- delete pAdaptor, pAdaptor = NULL;
+ delete pAdaptor, pAdaptor = nullptr;
#if OSL_DEBUG_LEVEL > 1
else
fprintf( stderr, "WM supports GNOME WM hints\n" );
@@ -228,7 +228,7 @@ WMAdaptor::WMAdaptor( SalDisplay* pDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
// default desktops
m_nDesktops = 1;
@@ -336,7 +336,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
initAtoms();
@@ -361,7 +361,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// collect supported protocols
if( XGetWindowProperty( m_pDisplay,
@@ -388,7 +388,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
- if( pAtomNames[i] == NULL )
+ if( pAtomNames[i] == nullptr )
continue;
WMAdaptorProtocol aSearch;
@@ -412,12 +412,12 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
}
}
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// get number of desktops
@@ -438,7 +438,7 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
{
m_nDesktops = *reinterpret_cast<long*>(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
// get work areas
if( m_aWMAtoms[ NET_WORKAREA ]
&& XGetWindowProperty( m_pDisplay,
@@ -487,20 +487,20 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree(pProperty);
- pProperty = NULL;
+ pProperty = nullptr;
}
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
@@ -526,7 +526,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
initAtoms();
@@ -552,7 +552,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
{
aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
::Window aCheckWindow = None;
GetGenericData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
@@ -576,7 +576,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
if( aCheckWindow == aWMChild )
{
m_bValid = true;
@@ -597,7 +597,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
if( m_bValid
@@ -619,7 +619,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// collect supported protocols
if( XGetWindowProperty( m_pDisplay,
@@ -646,7 +646,7 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
for( unsigned long i = 0; i < nItems; i++ )
{
// #i80971# protect against invalid atoms
- if( pAtomNames[i] == NULL )
+ if( pAtomNames[i] == nullptr )
continue;
WMAdaptorProtocol aSearch;
@@ -676,12 +676,12 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
}
}
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// get number of desktops
@@ -702,18 +702,18 @@ GnomeWMAdaptor::GnomeWMAdaptor( SalDisplay* pSalDisplay ) :
{
m_nDesktops = *reinterpret_cast<long*>(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
@@ -733,7 +733,7 @@ bool WMAdaptor::getNetWmName()
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
bool bNetWM = false;
if( m_aWMAtoms[ NET_SUPPORTING_WM_CHECK ] && m_aWMAtoms[ NET_WM_NAME ] )
@@ -757,7 +757,7 @@ bool WMAdaptor::getNetWmName()
{
aWMChild = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
::Window aCheckWindow = None;
GetGenericData()->ErrorTrapPush();
if( XGetWindowProperty( m_pDisplay,
@@ -780,7 +780,7 @@ bool WMAdaptor::getNetWmName()
GetGenericData()->ErrorTrapPush();
aCheckWindow = *reinterpret_cast< ::Window* >(pProperty);
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
if( aCheckWindow == aWMChild )
{
bNetWM = true;
@@ -806,12 +806,12 @@ bool WMAdaptor::getNetWmName()
m_aWMName = OUString( reinterpret_cast<char*>(pProperty), nItems, RTL_TEXTENCODING_ISO_8859_1 );
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
// if this is metacity, check for version to enable a legacy workaround
@@ -842,7 +842,7 @@ bool WMAdaptor::getNetWmName()
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
if( nVersionMajor < 2 || (nVersionMajor == 2 && nVersionMinor < 12) )
@@ -855,7 +855,7 @@ bool WMAdaptor::getNetWmName()
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
GetGenericData()->ErrorTrapPush();
}
@@ -866,7 +866,7 @@ bool WMAdaptor::getNetWmName()
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return bNetWM;
@@ -977,7 +977,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
osl_getThreadTextEncoding()));
OString aWMLocale;
- rtl_Locale* pLocale = NULL;
+ rtl_Locale* pLocale = nullptr;
osl_getProcessLocale( &pLocale );
if( pLocale )
{
@@ -993,7 +993,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
static bool bTrustXmb = true;
char* pT = const_cast<char*>(aTitle.getStr());
- XTextProperty aProp = { NULL, None, 0, 0 };
+ XTextProperty aProp = { nullptr, None, 0, 0 };
if( bTrustXmb )
{
XmbTextListToTextProperty( m_pDisplay,
@@ -1032,7 +1032,7 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const OUString& rWMName ) const
PropModeReplace,
reinterpret_cast<unsigned char const *>(aWMLocale.getStr()),
aWMLocale.getLength() );
- if (aProp.value != NULL)
+ if (aProp.value != nullptr)
XFree( aProp.value );
}
@@ -1797,7 +1797,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
Atom nType, *pStates;
int nFormat;
unsigned long nItems, nBytesLeft;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
long nOffset = 0;
do
{
@@ -1827,7 +1827,7 @@ int NetWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* pEv
}
}
XFree( pData );
- pData = NULL;
+ pData = nullptr;
nOffset += nItems * nFormat / 32;
}
else
@@ -1874,7 +1874,7 @@ int GnomeWMAdaptor::handlePropertyNotify( X11SalFrame* pFrame, XPropertyEvent* p
int nFormat = 0;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pData = 0;
+ unsigned char* pData = nullptr;
XGetWindowProperty( m_pDisplay,
pEvent->window,
m_aWMAtoms[ WIN_STATE ],
@@ -2090,7 +2090,7 @@ void NetWMAdaptor::showFullScreen( X11SalFrame* pFrame, bool bFullScreen ) const
pFrame->maGeometry.nWidth = aSize.Width();
pFrame->maGeometry.nHeight = aSize.Height();
}
- pFrame->CallCallback( SALEVENT_MOVERESIZE, NULL );
+ pFrame->CallCallback( SALEVENT_MOVERESIZE, nullptr );
}
}
else WMAdaptor::showFullScreen( pFrame, bFullScreen );
@@ -2109,7 +2109,7 @@ int WMAdaptor::getCurrentWorkArea() const
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
if( XGetWindowProperty( m_pDisplay,
m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ),
m_aWMAtoms[ NET_CURRENT_DESKTOP ],
@@ -2130,7 +2130,7 @@ int WMAdaptor::getCurrentWorkArea() const
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nCurrent;
@@ -2148,7 +2148,7 @@ int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
if( XGetWindowProperty( m_pDisplay,
aWindow,
m_aWMAtoms[ NET_WM_DESKTOP ],
@@ -2169,7 +2169,7 @@ int WMAdaptor::getWindowWorkArea( ::Window aWindow ) const
else if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nCurrent;
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
index f769bf075438..3c8f8bfdb218 100644
--- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx
+++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx
@@ -40,7 +40,7 @@ static bool is_gnome_desktop( Display* pDisplay )
// warning: these checks are coincidental, GNOME does not
// explicitly advertise itself
- if ( NULL != getenv( "GNOME_DESKTOP_SESSION_ID" ) )
+ if ( nullptr != getenv( "GNOME_DESKTOP_SESSION_ID" ) )
ret = true;
if( ! ret )
@@ -71,7 +71,7 @@ static bool is_gnome_desktop( Display* pDisplay )
if( nUTFAtom && nNetWMNameAtom )
{
// another, more expensive check: search for a gnome-panel
- ::Window aRoot, aParent, *pChildren = NULL;
+ ::Window aRoot, aParent, *pChildren = nullptr;
unsigned int nChildren = 0;
XQueryTree( pDisplay, DefaultRootWindow( pDisplay ),
&aRoot, &aParent, &pChildren, &nChildren );
@@ -82,7 +82,7 @@ static bool is_gnome_desktop( Display* pDisplay )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pProp = NULL;
+ unsigned char* pProp = nullptr;
XGetWindowProperty( pDisplay,
pChildren[i],
nNetWMNameAtom,
@@ -152,7 +152,7 @@ static int TDEVersion( Display* pDisplay )
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
XGetWindowProperty( pDisplay,
DefaultRootWindow( pDisplay ),
nTDEVersion,
@@ -171,7 +171,7 @@ static int TDEVersion( Display* pDisplay )
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nRet;
@@ -193,7 +193,7 @@ static int KDEVersion( Display* pDisplay )
int nFormat = 8;
unsigned long nItems = 0;
unsigned long nBytesLeft = 0;
- unsigned char* pProperty = NULL;
+ unsigned char* pProperty = nullptr;
XGetWindowProperty( pDisplay,
DefaultRootWindow( pDisplay ),
nKDEVersion,
@@ -212,7 +212,7 @@ static int KDEVersion( Display* pDisplay )
if( pProperty )
{
XFree( pProperty );
- pProperty = NULL;
+ pProperty = nullptr;
}
}
return nRet;
@@ -220,7 +220,7 @@ static int KDEVersion( Display* pDisplay )
static bool is_tde_desktop( Display* pDisplay )
{
- if ( NULL != getenv( "TDE_FULL_SESSION" ) )
+ if ( nullptr != getenv( "TDE_FULL_SESSION" ) )
{
return true; // TDE
}
@@ -381,7 +381,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment()
XInitThreads();
Display* pDisplay = XOpenDisplay( pDisplayStr );
- if( pDisplay == NULL )
+ if( pDisplay == nullptr )
return DESKTOP_NONE;
XErrorHandler pOldHdl = XSetErrorHandler( autodect_error_handler );
diff --git a/vcl/unx/generic/dtrans/X11_droptarget.cxx b/vcl/unx/generic/dtrans/X11_droptarget.cxx
index 98fcb7e9dcef..23e590a73f67 100644
--- a/vcl/unx/generic/dtrans/X11_droptarget.cxx
+++ b/vcl/unx/generic/dtrans/X11_droptarget.cxx
@@ -36,7 +36,7 @@ DropTarget::DropTarget() :
m_bActive( false ),
m_nDefaultActions( 0 ),
m_aTargetWindow( None ),
- m_pSelectionManager( NULL )
+ m_pSelectionManager( nullptr )
{
}
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index c42ca79ff33e..c3b6d3ad72b7 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -209,9 +209,9 @@ std::unordered_map< OUString, SelectionManager*, OUStringHash >& SelectionManage
SelectionManager::SelectionManager() :
m_nIncrementalThreshold( 15*1024 ),
- m_pDisplay( NULL ),
- m_aThread( NULL ),
- m_aDragExecuteThread( NULL ),
+ m_pDisplay( nullptr ),
+ m_aThread( nullptr ),
+ m_aDragExecuteThread( nullptr ),
m_aWindow( None ),
m_nSelectionTimeout( 0 ),
m_nSelectionTimestamp( CurrentTime ),
@@ -354,7 +354,7 @@ void SelectionManager::initialize( const Sequence< Any >& arguments ) throw (::c
OString aDisplayName( OUStringToOString( aUDisplay, RTL_TEXTENCODING_ISO_8859_1 ) );
- m_pDisplay = XOpenDisplay( aDisplayName.isEmpty() ? NULL : aDisplayName.getStr());
+ m_pDisplay = XOpenDisplay( aDisplayName.isEmpty() ? nullptr : aDisplayName.getStr());
if( m_pDisplay )
{
@@ -485,7 +485,7 @@ SelectionManager::~SelectionManager()
{
osl_terminateThread( m_aDragExecuteThread );
osl_joinWithThread( m_aDragExecuteThread );
- m_aDragExecuteThread = NULL;
+ m_aDragExecuteThread = nullptr;
// thread handle is freed in dragDoDispatch()
}
@@ -524,7 +524,7 @@ SelectionAdaptor* SelectionManager::getAdaptor( Atom selection )
{
std::unordered_map< Atom, Selection* >::iterator it =
m_aSelections.find( selection );
- return it != m_aSelections.end() ? it->second->m_pAdaptor : NULL;
+ return it != m_aSelections.end() ? it->second->m_pAdaptor : nullptr;
}
OUString SelectionManager::convertFromCompound( const char* pText, int nLen )
@@ -534,7 +534,7 @@ OUString SelectionManager::convertFromCompound( const char* pText, int nLen )
if( nLen < 0 )
nLen = strlen( pText );
- char** pTextList = NULL;
+ char** pTextList = nullptr;
int nTexts = 0;
XTextProperty aProp;
@@ -560,7 +560,7 @@ OString SelectionManager::convertToCompound( const OUString& rText )
{
osl::MutexGuard aGuard( m_aMutex );
XTextProperty aProp;
- aProp.value = NULL;
+ aProp.value = nullptr;
aProp.encoding = XA_STRING;
aProp.format = 8;
aProp.nitems = 0;
@@ -679,7 +679,7 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName )
OUString aDisplayName( rDisplayName );
if( aDisplayName.isEmpty() )
aDisplayName = OStringToOUString( getenv( "DISPLAY" ), RTL_TEXTENCODING_ISO_8859_1 );
- SelectionManager* pInstance = NULL;
+ SelectionManager* pInstance = nullptr;
std::unordered_map< OUString, SelectionManager*, OUStringHash >::iterator it = getInstances().find( aDisplayName );
if( it != getInstances().end() )
@@ -696,7 +696,7 @@ const OUString& SelectionManager::getString( Atom aAtom )
if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
{
static OUString aEmpty;
- char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : NULL;
+ char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : nullptr;
if( ! pAtom )
return aEmpty;
OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) );
@@ -742,7 +742,7 @@ bool SelectionManager::requestOwnership( Atom selection )
Selection* pSel = m_aSelections[ selection ];
pSel->m_bOwner = bSuccess;
delete pSel->m_pPixmap;
- pSel->m_pPixmap = NULL;
+ pSel->m_pPixmap = nullptr;
pSel->m_nOrigTimestamp = m_nSelectionTimestamp;
}
#if OSL_DEBUG_LEVEL > 1
@@ -904,7 +904,7 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
// do a reschedule
struct timeval tv_last, tv_current;
- gettimeofday( &tv_last, NULL );
+ gettimeofday( &tv_last, nullptr );
tv_current = tv_last;
XEvent aEvent;
@@ -966,7 +966,7 @@ bool SelectionManager::getPasteData( Atom selection, Atom type, Sequence< sal_In
aGuard.reset();
}
}
- gettimeofday( &tv_current, NULL );
+ gettimeofday( &tv_current, nullptr );
if( bAdjustTime )
tv_last = tv_current;
} while( ! it->second->m_aDataArrived.check() && (tv_current.tv_sec - tv_last.tv_sec) < getSelectionTimeout() );
@@ -1114,14 +1114,14 @@ bool SelectionManager::getPasteData( Atom selection, const OUString& rType, Sequ
int format = 0;
unsigned long nItems = 0;
unsigned long nBytes = 0;
- unsigned char* pReturn = NULL;
+ unsigned char* pReturn = nullptr;
XGetWindowProperty( m_pDisplay, m_aWindow, XA_PIXMAP, 0, 1, True, XA_PIXMAP, &type, &format, &nItems, &nBytes, &pReturn );
if( pReturn )
{
if( type == XA_PIXMAP )
aPixmap = *reinterpret_cast<Pixmap*>(pReturn);
XFree( pReturn );
- pReturn = NULL;
+ pReturn = nullptr;
if( pReturnedTypes[2] == XA_COLORMAP && pReturnedTypes[3] == XA_COLORMAP )
{
XGetWindowProperty( m_pDisplay, m_aWindow, XA_COLORMAP, 0, 1, True, XA_COLORMAP, &type, &format, &nItems, &nBytes, &pReturn );
@@ -1210,7 +1210,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
it = m_aSelections.find( selection );
if( it != m_aSelections.end() &&
it->second->m_aTypes.getLength() &&
- std::abs( it->second->m_nLastTimestamp - time( NULL ) ) < 2
+ std::abs( it->second->m_nLastTimestamp - time( nullptr ) ) < 2
)
{
rTypes = it->second->m_aTypes;
@@ -1240,7 +1240,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
Atom nType;
int nFormat;
unsigned long nItems, nBytes;
- unsigned char* pBytes = NULL;
+ unsigned char* pBytes = nullptr;
XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0],
m_nXdndTypeList, 0, atomcount, False,
@@ -1255,7 +1255,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
aAtoms.realloc( sizeof( Atom )*atomcount+nBytes );
memcpy( aAtoms.getArray(), pBytes, sizeof( Atom )*atomcount );
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
XGetWindowProperty( m_pDisplay, m_aDropEnterEvent.data.l[0],
m_nXdndTypeList, atomcount, nBytes/sizeof(Atom),
False, XA_ATOM,
@@ -1374,7 +1374,7 @@ bool SelectionManager::getPasteDataTypes( Atom selection, Sequence< DataFlavor >
{
it->second->m_aTypes = rTypes;
it->second->m_aNativeTypes = aNativeTypes;
- it->second->m_nLastTimestamp = time( NULL );
+ it->second->m_nLastTimestamp = time( nullptr );
it->second->m_bHaveUTF16 = bHaveUTF16;
it->second->m_aUTF8Type = aUTF8Type;
it->second->m_bHaveCompound = bHaveCompound;
@@ -1406,7 +1406,7 @@ PixmapHolder* SelectionManager::getPixmapHolder( Atom selection )
{
std::unordered_map< Atom, Selection* >::const_iterator it = m_aSelections.find( selection );
if( it == m_aSelections.end() )
- return NULL;
+ return nullptr;
if( ! it->second->m_pPixmap )
it->second->m_pPixmap = new PixmapHolder( m_pDisplay );
return it->second->m_pPixmap;
@@ -1530,7 +1530,7 @@ bool SelectionManager::sendData( SelectionAdaptor* pAdaptor,
rInc.m_aProperty = property;
rInc.m_aTarget = target;
rInc.m_nFormat = nFormat;
- rInc.m_nTransferStartTime = time( NULL );
+ rInc.m_nTransferStartTime = time( nullptr );
// use incr protocol, signal start to requestor
long nMinSize = m_nIncrementalThreshold;
@@ -1633,7 +1633,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get number of atoms
XGetWindowProperty( m_pDisplay,
@@ -1650,7 +1650,7 @@ bool SelectionManager::handleSelectionRequest( XSelectionRequestEvent& rRequest
if( pData ) // ?? should not happen
{
XFree( pData );
- pData = NULL;
+ pData = nullptr;
}
XGetWindowProperty( m_pDisplay,
rRequest.requestor,
@@ -1798,7 +1798,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get type and length
XGetWindowProperty( m_pDisplay,
@@ -1819,7 +1819,7 @@ bool SelectionManager::handleReceivePropertyNotify( XPropertyEvent& rNotify )
if( pData )
{
XFree( pData );
- pData = NULL;
+ pData = nullptr;
}
if( nType == m_nINCRAtom )
@@ -1905,7 +1905,7 @@ bool SelectionManager::handleSendPropertyNotify( XPropertyEvent& rNotify )
if( it != m_aIncrementals.end() )
{
bHandled = true;
- int nCurrentTime = time( NULL );
+ int nCurrentTime = time( nullptr );
std::unordered_map< Atom, IncrementalTransfer >::iterator inc_it;
// throw out aborted transfers
std::list< Atom > aTimeouts;
@@ -2019,7 +2019,7 @@ bool SelectionManager::handleSelectionNotify( XSelectionEvent& rNotify )
Atom nType = None;
int nFormat = 0;
unsigned long nItems = 0, nBytes = 0;
- unsigned char* pData = NULL;
+ unsigned char* pData = nullptr;
// get type and length
XGetWindowProperty( m_pDisplay,
@@ -2725,7 +2725,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
dtde.SourceActions = m_nSourceActions;
dtde.Transferable = m_xDragSourceTransferable;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
m_bDropWaitingForCompletion = true;
aGuard.clear();
it->second->drop( dtde );
@@ -2750,7 +2750,7 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
aEvent.xclient.data.l[4] = 0;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
bCancel = false;
}
@@ -2789,11 +2789,11 @@ bool SelectionManager::handleDragEvent( XEvent& rMessage )
XSendEvent( m_pDisplay, m_aDropWindow, False, ButtonReleaseMask, &aEvent );
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
XSendEvent( m_pDisplay, m_aDropProxy, False, NoEventMask, &aEvent );
m_bWaitingForPrimaryConversion = true;
m_bDropSent = true;
- m_nDropTimeout = time( NULL );
+ m_nDropTimeout = time( nullptr );
// HACK :-)
aGuard.clear();
static_cast< X11Clipboard* >( pAdaptor )->setContents( m_xDragSourceTransferable, css::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboardOwner >() );
@@ -2887,12 +2887,12 @@ sal_Int32 SelectionManager::getDefaultCursor( sal_Int8 dragAction ) throw(std::e
int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
{
- Atom* pProperties = NULL;
+ Atom* pProperties = nullptr;
int nProperties = 0;
Atom nType;
int nFormat;
unsigned long nItems, nBytes;
- unsigned char* pBytes = NULL;
+ unsigned char* pBytes = nullptr;
int nVersion = -1;
rProxy = None;
@@ -2915,7 +2915,7 @@ int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
if( nType == XA_WINDOW )
rProxy = *reinterpret_cast< ::Window* >(pBytes);
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
if( rProxy != None )
{
// now check proxy whether it points to itself
@@ -2926,7 +2926,7 @@ int SelectionManager::getXdndVersion( ::Window aWindow, ::Window& rProxy )
if( nType == XA_WINDOW && *reinterpret_cast< ::Window* >(pBytes) != rProxy )
rProxy = None;
XFree( pBytes );
- pBytes = NULL;
+ pBytes = nullptr;
}
else
rProxy = None;
@@ -3145,7 +3145,7 @@ void SelectionManager::startDrag(
return;
}
- SalFrame* pCaptureFrame = NULL;
+ SalFrame* pCaptureFrame = nullptr;
{
osl::ClearableMutexGuard aGuard(m_aMutex);
@@ -3229,7 +3229,7 @@ void SelectionManager::startDrag(
pCaptureFrame = vcl_sal::getSalDisplay(GetGenericData())->GetCaptureFrame();
if( pCaptureFrame )
{
- vcl_sal::getSalDisplay(GetGenericData())->CaptureMouse( NULL );
+ vcl_sal::getSalDisplay(GetGenericData())->CaptureMouse( nullptr );
nPointerGrabSuccess =
XGrabPointer( m_pDisplay, it->second.m_aRootWindow, True,
DRAG_EVENT_MASK,
@@ -3387,7 +3387,7 @@ void SelectionManager::dragDoDispatch()
aTVal.Seconds = 0;
aTVal.Nanosec = 200000000;
oslThread aThread = m_aDragExecuteThread;
- while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(NULL)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) )
+ while( m_xDragSourceListener.is() && ( ! m_bDropSent || time(nullptr)-m_nDropTimeout < 5 ) && osl_scheduleThread( aThread ) )
{
// let the thread in the run method do the dispatching
// just look occasionally here whether drop timed out or is completed
@@ -3435,7 +3435,7 @@ void SelectionManager::dragDoDispatch()
XUngrabKeyboard( m_pDisplay, CurrentTime );
XFlush( m_pDisplay );
- m_aDragExecuteThread = NULL;
+ m_aDragExecuteThread = nullptr;
m_aDragRunning.reset();
aGuard.clear();
@@ -3653,7 +3653,7 @@ void SelectionManager::run( void* pThis )
SelectionManager* This = static_cast<SelectionManager*>(pThis);
timeval aLast;
- gettimeofday( &aLast, 0 );
+ gettimeofday( &aLast, nullptr );
css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
This->m_xDesktop.set( Desktop::create(xContext) );
@@ -3668,7 +3668,7 @@ void SelectionManager::run( void* pThis )
This->dispatchEvent( timeout );
timeval aNow;
- gettimeofday( &aNow, 0 );
+ gettimeofday( &aNow, nullptr );
if( (aNow.tv_sec - aLast.tv_sec) > 0 )
{
@@ -3757,7 +3757,7 @@ void SelectionManager::shutdown() throw()
}
osl_joinWithThread( m_aThread );
osl_destroyThread( m_aThread );
- m_aThread = NULL;
+ m_aThread = nullptr;
aGuard.reset();
}
m_xDesktop.clear();
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 6e43e9a6dea4..39034a18728f 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -208,7 +208,7 @@ namespace x11 {
Time m_nOrigTimestamp;
Selection() : m_eState( Inactive ),
- m_pAdaptor( NULL ),
+ m_pAdaptor( nullptr ),
m_aAtom( None ),
m_aRequestedType( None ),
m_nLastTimestamp( 0 ),
@@ -217,7 +217,7 @@ namespace x11 {
m_bHaveCompound( false ),
m_bOwner( false ),
m_aLastOwner( None ),
- m_pPixmap( NULL ),
+ m_pPixmap( nullptr ),
m_nOrigTimestamp( CurrentTime )
{}
};
@@ -228,7 +228,7 @@ namespace x11 {
DropTarget* m_pTarget;
::Window m_aRootWindow;
- DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {}
+ DropTargetEntry() : m_pTarget( nullptr ), m_aRootWindow( None ) {}
explicit DropTargetEntry( DropTarget* pTarget ) :
m_pTarget( pTarget ),
m_aRootWindow( None )
diff --git a/vcl/unx/generic/dtrans/bmp.cxx b/vcl/unx/generic/dtrans/bmp.cxx
index b84681e8a1b3..e156f590b575 100644
--- a/vcl/unx/generic/dtrans/bmp.cxx
+++ b/vcl/unx/generic/dtrans/bmp.cxx
@@ -110,7 +110,7 @@ static sal_uInt8* X11_getPaletteBmpFromImage(
rOutSize = 0;
- sal_uInt8* pBuffer = 0;
+ sal_uInt8* pBuffer = nullptr;
sal_uInt32 nHeaderSize, nScanlineSize;
sal_uInt16 nBitCount;
// determine header and scanline size
@@ -242,11 +242,11 @@ static sal_uInt8* X11_getTCBmpFromImage(
// get masks from visual info (guesswork)
XVisualInfo aVInfo;
if( ! XMatchVisualInfo( pDisplay, nScreenNo, pImage->depth, TrueColor, &aVInfo ) )
- return NULL;
+ return nullptr;
rOutSize = 0;
- sal_uInt8* pBuffer = 0;
+ sal_uInt8* pBuffer = nullptr;
sal_uInt32 nHeaderSize = 60;
sal_uInt32 nScanlineSize = pImage->width*3;
@@ -329,7 +329,7 @@ sal_uInt8* x11::X11_getBmpFromPixmap(
break;
}
if( nScreenNo < 0 )
- return NULL;
+ return nullptr;
if( aColormap == None )
aColormap = DefaultColormap( pDisplay, nScreenNo );
@@ -337,7 +337,7 @@ sal_uInt8* x11::X11_getBmpFromPixmap(
// get the image
XImage* pImage = XGetImage( pDisplay, aDrawable, 0, 0, w, h, AllPlanes, ZPixmap );
if( ! pImage )
- return NULL;
+ return nullptr;
sal_uInt8* pBmp = d <= 8 ?
X11_getPaletteBmpFromImage( pDisplay, pImage, aColormap, rOutSize ) :
@@ -666,7 +666,7 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
aImage.height = (int)nHeight;
aImage.xoffset = 0;
aImage.format = ZPixmap;
- aImage.data = NULL;
+ aImage.data = nullptr;
aImage.byte_order = ImageByteOrder( m_pDisplay );
aImage.bitmap_unit = BitmapUnit( m_pDisplay );
aImage.bitmap_bit_order = BitmapBitOrder( m_pDisplay );
@@ -680,7 +680,7 @@ Pixmap PixmapHolder::setBitmapData( const sal_uInt8* pData )
aImage.bits_per_pixel = m_aInfo.depth;
else
aImage.bits_per_pixel = 8*((m_aInfo.depth+7)/8);
- aImage.obdata = NULL;
+ aImage.obdata = nullptr;
XInitImage( &aImage );
aImage.data = static_cast<char*>(rtl_allocateMemory( nHeight*aImage.bytes_per_line ));
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 0bc8004c58b8..71cba584eb22 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -59,13 +59,13 @@ namespace cairo
#include <cairo-xlib-xrender.h>
X11SysData::X11SysData() :
- pDisplay(NULL),
+ pDisplay(nullptr),
hDrawable(0),
- pVisual(NULL),
+ pVisual(nullptr),
nScreen(0),
nDepth(-1),
aColormap(-1),
- pRenderFormat(NULL)
+ pRenderFormat(nullptr)
{}
X11SysData::X11SysData( const SystemGraphicsData& pSysDat ) :
@@ -85,7 +85,7 @@ namespace cairo
nScreen(pSysDat.nScreen),
nDepth(pSysDat.nDepth),
aColormap(pSysDat.aColormap),
- pRenderFormat(NULL)
+ pRenderFormat(nullptr)
{}
X11Pixmap::~X11Pixmap()
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 10f4f57043ff..8f08e466caa2 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -46,7 +46,7 @@ CairoTextRender::CairoTextRender()
: mnTextColor(MAKE_SALCOLOR(0x00, 0x00, 0x00)) //black
{
for( int i = 0; i < MAX_FALLBACK; ++i )
- mpServerFont[i] = NULL;
+ mpServerFont[i] = nullptr;
#if ENABLE_GRAPHITE
// check if graphite fonts have been disabled
@@ -60,11 +60,11 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
// release all no longer needed font resources
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
{
- if( mpServerFont[i] != NULL )
+ if( mpServerFont[i] != nullptr )
{
// old server side font is no longer referenced
GlyphCache::GetInstance().UncacheFont( *mpServerFont[i] );
- mpServerFont[i] = NULL;
+ mpServerFont[i] = nullptr;
}
}
@@ -78,7 +78,7 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
// handle the request for a non-native X11-font => use the GlyphCache
ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry );
- if( pServerFont != NULL )
+ if( pServerFont != nullptr )
{
// ignore fonts with e.g. corrupted font files
if( !pServerFont->TestFont() )
@@ -152,7 +152,7 @@ void* CairoFontsCache::FindCachedFont(const CairoFontsCache::CacheId &rId)
for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI)
if (aI->second == rId)
return aI->first;
- return NULL;
+ return nullptr;
}
namespace
@@ -258,7 +258,7 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
if (!font_face)
{
const FontConfigFontOptions *pOptions = rFont.GetFontOptions().get();
- void *pPattern = pOptions ? pOptions->GetPattern(aFace, aId.mbEmbolden) : NULL;
+ void *pPattern = pOptions ? pOptions->GetPattern(aFace, aId.mbEmbolden) : nullptr;
if (pPattern)
font_face = cairo_ft_font_face_create_for_pattern(static_cast<FcPattern*>(pPattern));
if (!font_face)
@@ -348,7 +348,7 @@ void CairoTextRender::DrawServerFontLayout( const ServerFontLayout& rLayout )
const FontCharMapPtr CairoTextRender::GetFontCharMap() const
{
if( !mpServerFont[0] )
- return NULL;
+ return nullptr;
const FontCharMapPtr pFCMap = mpServerFont[0]->GetFontCharMap();
return pFCMap;
@@ -457,7 +457,7 @@ CairoTextRender::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel
if( nFallbackLevel >= MAX_FALLBACK )
return;
- if( mpServerFont[nFallbackLevel] != NULL )
+ if( mpServerFont[nFallbackLevel] != nullptr )
{
long rDummyFactor;
mpServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor );
@@ -514,7 +514,7 @@ bool CairoTextRender::GetGlyphOutline( sal_GlyphId aGlyphId,
SalLayout* CairoTextRender::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLevel )
{
- SalLayout* pLayout = NULL;
+ SalLayout* pLayout = nullptr;
if( mpServerFont[ nFallbackLevel ]
&& !(rArgs.mnFlags & SalLayoutFlags::DisableGlyphProcessing) )
@@ -541,7 +541,7 @@ SystemFontData CairoTextRender::GetSysFontData( int nFallbackLevel ) const
if (nFallbackLevel >= MAX_FALLBACK) nFallbackLevel = MAX_FALLBACK - 1;
if (nFallbackLevel < 0 ) nFallbackLevel = 0;
- if (mpServerFont[nFallbackLevel] != NULL)
+ if (mpServerFont[nFallbackLevel] != nullptr)
{
ServerFont* rFont = mpServerFont[nFallbackLevel];
aSysFontData.nFontId = rFont->GetFtFace();
diff --git a/vcl/unx/generic/gdi/gcach_xpeer.cxx b/vcl/unx/generic/gdi/gcach_xpeer.cxx
index 26bd47ffb366..486f3c169abe 100644
--- a/vcl/unx/generic/gdi/gcach_xpeer.cxx
+++ b/vcl/unx/generic/gdi/gcach_xpeer.cxx
@@ -79,8 +79,8 @@ namespace
{
delete m_pX11GlyphCache;
delete m_pX11GlyphPeer;
- m_pX11GlyphCache = NULL;
- m_pX11GlyphPeer = NULL;
+ m_pX11GlyphCache = nullptr;
+ m_pX11GlyphPeer = nullptr;
}
X11GlyphCache& getGlyphCache()
{
diff --git a/vcl/unx/generic/gdi/gdiimpl.cxx b/vcl/unx/generic/gdi/gdiimpl.cxx
index e85b096560cc..3e333bd27e3e 100644
--- a/vcl/unx/generic/gdi/gdiimpl.cxx
+++ b/vcl/unx/generic/gdi/gdiimpl.cxx
@@ -124,7 +124,7 @@ namespace
X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent):
mrParent(rParent),
mnBrushColor( MAKE_SALCOLOR( 0xFF, 0xFF, 0XFF ) ),
- mpBrushGC(NULL),
+ mpBrushGC(nullptr),
mnBrushPixel(0),
mbPenGC(false),
mbBrushGC(false),
@@ -136,16 +136,16 @@ X11SalGraphicsImpl::X11SalGraphicsImpl(X11SalGraphics& rParent):
mbTrackingGC(false),
mbDitherBrush(false),
mbXORMode(false),
- mpPenGC(NULL),
+ mpPenGC(nullptr),
mnPenColor( MAKE_SALCOLOR( 0x00, 0x00, 0x00 ) ),
mnPenPixel(0),
- mpMonoGC(NULL),
- mpCopyGC(NULL),
- mpMaskGC(NULL),
- mpInvertGC(NULL),
- mpInvert50GC(NULL),
- mpStippleGC(NULL),
- mpTrackingGC(NULL)
+ mpMonoGC(nullptr),
+ mpCopyGC(nullptr),
+ mpMaskGC(nullptr),
+ mpInvertGC(nullptr),
+ mpInvert50GC(nullptr),
+ mpStippleGC(nullptr),
+ mpTrackingGC(nullptr)
{
}
@@ -163,7 +163,7 @@ bool X11SalGraphicsImpl::FillPixmapFromScreen( X11Pixmap* pPixmap, int nX, int n
{
//TODO lfrb: don't hardcode the depth
Display* pDpy = mrParent.GetXDisplay();
- GC aTmpGC = XCreateGC( pDpy, pPixmap->GetPixmap(), 0, NULL );
+ GC aTmpGC = XCreateGC( pDpy, pPixmap->GetPixmap(), 0, nullptr );
if( !aTmpGC )
{
@@ -191,7 +191,7 @@ bool X11SalGraphicsImpl::RenderPixmapToScreen( X11Pixmap* pPixmap, X11Pixmap* /*
GC aFontGC = mrParent.GetFontGC();
// The GC can't be null, otherwise we'd have no clip region
- if( aFontGC == NULL )
+ if( aFontGC == nullptr )
{
SAL_WARN( "vcl", "no valid GC to render pixmap" );
return false;
@@ -234,7 +234,7 @@ XID X11SalGraphicsImpl::GetXRenderPicture()
if( !pXRenderFormat )
return 0;
// get the matching xrender target for drawable
- mrParent.m_aXRenderPicture = rRenderPeer.CreatePicture( mrParent.hDrawable_, pXRenderFormat, 0, NULL );
+ mrParent.m_aXRenderPicture = rRenderPeer.CreatePicture( mrParent.hDrawable_, pXRenderFormat, 0, nullptr );
}
{
@@ -623,7 +623,7 @@ void X11SalGraphicsImpl::copyArea ( long nDestX, long nDestY,
sal_uInt16 )
{
SalTwoRect aPosAry(nSrcX, nSrcY, nSrcWidth, nSrcHeight, nDestX, nDestY, nSrcWidth, nSrcHeight);
- copyBits(aPosAry, 0);
+ copyBits(aPosAry, nullptr);
}
void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry, const SalBitmap& rSalBitmap )
@@ -660,7 +660,7 @@ void X11SalGraphicsImpl::drawBitmap( const SalTwoRect& rPosAry,
// decide if alpha masking or transparency masking is needed
BitmapBuffer* pAlphaBuffer = const_cast<SalBitmap&>(rMaskBitmap).AcquireBuffer( BITMAP_READ_ACCESS );
- if( pAlphaBuffer != NULL )
+ if( pAlphaBuffer != nullptr )
{
int nMaskFormat = pAlphaBuffer->mnFormat;
const_cast<SalBitmap&>(rMaskBitmap).ReleaseBuffer( pAlphaBuffer, BITMAP_READ_ACCESS );
@@ -829,7 +829,7 @@ bool X11SalGraphicsImpl::drawAlphaBitmap( const SalTwoRect& rTR,
XRenderPictFormat* pSrcVisFmt = rPeer.FindVisualFormat( pSrcXVisual );
if( !pSrcVisFmt )
return false;
- Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, NULL );
+ Picture aSrcPic = rPeer.CreatePicture( aSrcPM, pSrcVisFmt, 0, nullptr );
if( !aSrcPic )
return false;
@@ -1003,7 +1003,7 @@ void X11SalGraphicsImpl::ResetClipRegion()
mbTrackingGC = false;
XDestroyRegion( mrParent.mpClipRegion );
- mrParent.mpClipRegion = NULL;
+ mrParent.mpClipRegion = nullptr;
}
}
@@ -1069,7 +1069,7 @@ bool X11SalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip )
if( XEmptyRegion( mrParent.mpClipRegion ) )
{
XDestroyRegion( mrParent.mpClipRegion );
- mrParent.mpClipRegion= NULL;
+ mrParent.mpClipRegion= nullptr;
}
return true;
}
@@ -1335,7 +1335,7 @@ void X11SalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly,
if( mnBrushColor != SALCOLOR_NONE )
{
sal_uInt32 i, n;
- Region pXRegA = NULL;
+ Region pXRegA = nullptr;
for( i = 0; i < nPoly; i++ ) {
n = pPoints[i];
@@ -1695,7 +1695,7 @@ SalColor X11SalGraphicsImpl::getPixel( long nX, long nY )
SalBitmap *X11SalGraphicsImpl::getBitmap( long nX, long nY, long nDX, long nDY )
{
if( mrParent.bPrinter_ && !mrParent.bVirDev_ )
- return NULL;
+ return nullptr;
bool bFakeWindowBG = false;
diff --git a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
index dbb6ecfbc065..885145c7366b 100644
--- a/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/openglx11cairotextrender.cxx
@@ -25,7 +25,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext()
// static size_t id = 0;
// OString aFileName = OString("/tmp/libo_logs/text_rendering") + OString::number(id++) + OString(".svg");
// cairo_surface_t* surface = cairo_svg_surface_create(aFileName.getStr(), GetWidth(), GetHeight());
- cairo_surface_t* surface = NULL;
+ cairo_surface_t* surface = nullptr;
OpenGLSalGraphicsImpl *pImpl = dynamic_cast< OpenGLSalGraphicsImpl* >(mrParent.GetImpl());
if( pImpl )
{
@@ -38,7 +38,7 @@ cairo_t* OpenGLX11CairoTextRender::getCairoContext()
surface = cairo_image_surface_create( CAIRO_FORMAT_ARGB32, aClipRect.GetWidth(), aClipRect.GetHeight() );
}
if (!surface)
- return NULL;
+ return nullptr;
cairo_t *cr = cairo_create(surface);
cairo_surface_destroy(surface);
return cr;
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 8487b5e98d38..ebe6a89a25b1 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -61,12 +61,12 @@ SalBitmap* X11SalInstance::CreateSalBitmap()
return new X11SalBitmap();
}
-ImplSalBitmapCache* X11SalBitmap::mpCache = NULL;
+ImplSalBitmapCache* X11SalBitmap::mpCache = nullptr;
sal_uLong X11SalBitmap::mnCacheInstCount = 0;
X11SalBitmap::X11SalBitmap()
- : mpDIB( NULL )
- , mpDDB( NULL )
+ : mpDIB( nullptr )
+ , mpDDB( nullptr )
, mbGrey( false )
{
}
@@ -87,13 +87,13 @@ void X11SalBitmap::ImplDestroyCache()
DBG_ASSERT( mnCacheInstCount, "X11SalBitmap::ImplDestroyCache(): underflow" );
if( mnCacheInstCount && !--mnCacheInstCount )
- delete mpCache, mpCache = NULL;
+ delete mpCache, mpCache = nullptr;
}
void X11SalBitmap::ImplRemovedFromCache()
{
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
}
#if defined HAVE_VALGRIND_HEADERS
@@ -128,7 +128,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
, "Unsupported BitCount!"
);
- BitmapBuffer* pDIB = NULL;
+ BitmapBuffer* pDIB = nullptr;
if( rSize.Width() && rSize.Height() )
{
@@ -138,7 +138,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
}
catch (const std::bad_alloc&)
{
- pDIB = NULL;
+ pDIB = nullptr;
}
if( pDIB )
@@ -209,12 +209,12 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
catch (const std::bad_alloc&)
{
delete pDIB;
- pDIB = NULL;
+ pDIB = nullptr;
}
}
}
else
- pDIB = NULL;
+ pDIB = nullptr;
return pDIB;
}
@@ -229,7 +229,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
long nHeight,
bool bGrey
) {
- BitmapBuffer* pDIB = NULL;
+ BitmapBuffer* pDIB = nullptr;
if( aDrawable && nWidth && nHeight && nDrawableDepth )
{
@@ -249,7 +249,7 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
{
const SalTwoRect aTwoRect = { 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight };
BitmapBuffer aSrcBuf;
- const BitmapPalette* pDstPal = NULL;
+ const BitmapPalette* pDstPal = nullptr;
aSrcBuf.mnFormat = BMP_FORMAT_TOP_DOWN;
aSrcBuf.mnWidth = nWidth;
@@ -395,7 +395,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
const SalTwoRect& rTwoRect
) const
{
- XImage* pImage = NULL;
+ XImage* pImage = nullptr;
if( !mpDIB && mpDDB )
{
@@ -419,7 +419,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
nDepth = 1;
pImage = XCreateImage( pXDisp, pSalDisp->GetVisual( nScreen ).GetVisual(),
- nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, NULL,
+ nDepth, ( 1 == nDepth ) ? XYBitmap :ZPixmap, 0, nullptr,
nWidth, nHeight, 32, 0 );
if( pImage )
@@ -557,7 +557,7 @@ XImage* X11SalBitmap::ImplCreateXImage(
else
{
XDestroyImage( pImage );
- pImage = NULL;
+ pImage = nullptr;
}
// destroy buffer; doesn't destroy allocated data in buffer
@@ -582,7 +582,7 @@ bool X11SalBitmap::ImplCreateFromDrawable(
if( aDrawable && nWidth && nHeight && nDrawableDepth )
mpDDB = new ImplSalDDB( aDrawable, nScreen, nDrawableDepth, nX, nY, nWidth, nHeight );
- return( mpDDB != NULL );
+ return( mpDDB != nullptr );
}
ImplSalDDB* X11SalBitmap::ImplGetDDB(
@@ -608,7 +608,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
mbGrey );
}
- delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = NULL;
+ delete mpDDB, const_cast<X11SalBitmap*>(this)->mpDDB = nullptr;
}
if( mpCache )
@@ -643,7 +643,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
// than image bitmap (broken)
if( aTwoRect.mnSrcX >= aSize.Width() ||
aTwoRect.mnSrcY >= aSize.Height() )
- return NULL; // this would be a really mad case
+ return nullptr; // this would be a really mad case
if( aTwoRect.mnSrcWidth+aTwoRect.mnSrcX > aSize.Width() )
{
@@ -671,7 +671,7 @@ ImplSalDDB* X11SalBitmap::ImplGetDDB(
if( pImage )
{
const_cast<X11SalBitmap*>(this)->mpDDB = new ImplSalDDB( pImage, aDrawable, nXScreen, aTwoRect );
- delete[] pImage->data, pImage->data = NULL;
+ delete[] pImage->data, pImage->data = nullptr;
XDestroyImage( pImage );
if( mpCache )
@@ -700,7 +700,7 @@ bool X11SalBitmap::Create( const Size& rSize, sal_uInt16 nBitCount, const Bitmap
Destroy();
mpDIB = ImplCreateDIB( rSize, nBitCount, rPal );
- return( mpDIB != NULL );
+ return( mpDIB != nullptr );
}
bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
@@ -725,7 +725,7 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
catch (const std::bad_alloc&)
{
delete mpDIB;
- mpDIB = NULL;
+ mpDIB = nullptr;
}
if( mpDIB )
@@ -738,8 +738,8 @@ bool X11SalBitmap::Create( const SalBitmap& rSSalBmp )
0, 0, rSalBmp.mpDDB->ImplGetWidth(), rSalBmp.mpDDB->ImplGetHeight() );
return( ( !rSalBmp.mpDIB && !rSalBmp.mpDDB ) ||
- ( rSalBmp.mpDIB && ( mpDIB != NULL ) ) ||
- ( rSalBmp.mpDDB && ( mpDDB != NULL ) ) );
+ ( rSalBmp.mpDIB && ( mpDIB != nullptr ) ) ||
+ ( rSalBmp.mpDDB && ( mpDDB != nullptr ) ) );
}
bool X11SalBitmap::Create( const SalBitmap&, SalGraphics* )
@@ -796,11 +796,11 @@ void X11SalBitmap::Destroy()
if( mpDIB )
{
delete[] mpDIB->mpBits;
- delete mpDIB, mpDIB = NULL;
+ delete mpDIB, mpDIB = nullptr;
}
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
if( mpCache )
mpCache->ImplRemove( this );
@@ -855,7 +855,7 @@ void X11SalBitmap::ReleaseBuffer( BitmapBuffer*, BitmapAccessMode nMode )
if( nMode == BITMAP_WRITE_ACCESS )
{
if( mpDDB )
- delete mpDDB, mpDDB = NULL;
+ delete mpDDB, mpDDB = nullptr;
if( mpCache )
mpCache->ImplRemove( this );
@@ -1066,7 +1066,7 @@ ImplSalBitmapCache::~ImplSalBitmapCache()
void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags )
{
- ImplBmpObj* pObj = NULL;
+ ImplBmpObj* pObj = nullptr;
bool bFound = false;
for(
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 699dab03a5b5..a6fba00c0143 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -68,17 +68,17 @@
#include <vcl/opengl/OpenGLHelper.hxx>
X11SalGraphics::X11SalGraphics():
- m_pFrame(NULL),
- m_pVDev(NULL),
- m_pColormap(NULL),
- m_pDeleteColormap(NULL),
+ m_pFrame(nullptr),
+ m_pVDev(nullptr),
+ m_pColormap(nullptr),
+ m_pDeleteColormap(nullptr),
hDrawable_(None),
m_nXScreen( 0 ),
- m_pXRenderFormat(NULL),
+ m_pXRenderFormat(nullptr),
m_aXRenderPicture(0),
- pPaintRegion_(NULL),
- mpClipRegion(NULL),
- pFontGC_(NULL),
+ pPaintRegion_(nullptr),
+ mpClipRegion(nullptr),
+ pFontGC_(nullptr),
nTextPixel_(0),
hBrush_(None),
bWindow_(false),
@@ -118,7 +118,7 @@ void X11SalGraphics::freeResources()
if( hBrush_ ) XFreePixmap( pDisplay, hBrush_ ), hBrush_ = None;
if( pFontGC_ ) XFreeGC( pDisplay, pFontGC_ ), pFontGC_ = None;
if( m_pDeleteColormap )
- delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = NULL;
+ delete m_pDeleteColormap, m_pColormap = m_pDeleteColormap = nullptr;
if( m_aXRenderPicture )
XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture ), m_aXRenderPicture = 0;
@@ -146,7 +146,7 @@ void X11SalGraphics::SetDrawable( Drawable aDrawable, SalX11Screen nXScreen )
}
hDrawable_ = aDrawable;
- SetXRenderFormat( NULL );
+ SetXRenderFormat( nullptr );
if( m_aXRenderPicture )
{
XRenderPeer::GetInstance().FreePicture( m_aXRenderPicture );
@@ -163,7 +163,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget,
m_nXScreen = nXScreen;
m_pFrame = pFrame;
- m_pVDev = NULL;
+ m_pVDev = nullptr;
bWindow_ = true;
bVirDev_ = false;
@@ -272,7 +272,7 @@ bool X11SalGraphics::GetDitherPixmap( SalColor nSalColor )
8, 8 ); // width & height
// destroy image-frame but not palette-data
- pImage->data = NULL;
+ pImage->data = nullptr;
XDestroyImage( pImage );
return true;
@@ -442,7 +442,7 @@ bool X11SalGraphics::drawEPS( long nX, long nY, long nWidth,
XRenderPictFormat* X11SalGraphics::GetXRenderFormat() const
{
- if( m_pXRenderFormat == NULL )
+ if( m_pXRenderFormat == nullptr )
m_pXRenderFormat = XRenderPeer::GetInstance().FindVisualFormat( GetVisual().visual );
return m_pXRenderFormat;
}
diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx
index f4bce82a0509..8aa87bfc8d46 100644
--- a/vcl/unx/generic/gdi/salvd.cxx
+++ b/vcl/unx/generic/gdi/salvd.cxx
@@ -78,7 +78,7 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
delete pOrigDeleteColormap;
m_pVDev = pDevice;
- m_pFrame = NULL;
+ m_pFrame = nullptr;
bWindow_ = pDisplay->IsDisplay();
bVirDev_ = true;
@@ -95,7 +95,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
m_nXScreen(0),
bGraphics_(false)
{
- SalColormap* pColormap = NULL;
+ SalColormap* pColormap = nullptr;
bool bDeleteColormap = false;
if( !nBitCount && pGraphics )
@@ -140,7 +140,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
bExternPixmap_ = false;
}
- XRenderPictFormat* pXRenderFormat = pData ? static_cast<XRenderPictFormat*>(pData->pXRenderFormat) : NULL;
+ XRenderPictFormat* pXRenderFormat = pData ? static_cast<XRenderPictFormat*>(pData->pXRenderFormat) : nullptr;
if( pXRenderFormat )
{
pGraphics_->SetXRenderFormat( pXRenderFormat );
@@ -163,7 +163,7 @@ X11SalVirtualDevice::X11SalVirtualDevice(SalGraphics* pGraphics, long &nDX, long
X11SalVirtualDevice::~X11SalVirtualDevice()
{
delete pGraphics_;
- pGraphics_ = NULL;
+ pGraphics_ = nullptr;
if( GetDrawable() && !bExternPixmap_ )
XFreePixmap( GetXDisplay(), GetDrawable() );
@@ -172,7 +172,7 @@ X11SalVirtualDevice::~X11SalVirtualDevice()
SalGraphics* X11SalVirtualDevice::AcquireGraphics()
{
if( bGraphics_ )
- return NULL;
+ return nullptr;
if( pGraphics_ )
bGraphics_ = true;
diff --git a/vcl/unx/generic/gdi/x11cairotextrender.cxx b/vcl/unx/generic/gdi/x11cairotextrender.cxx
index b6187c88fa56..8734526193fd 100644
--- a/vcl/unx/generic/gdi/x11cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/x11cairotextrender.cxx
@@ -59,7 +59,7 @@ cairo_t* X11CairoTextRender::getCairoContext()
Display* pDisplay = mrParent.GetXDisplay();
- cairo_surface_t* surface = NULL;
+ cairo_surface_t* surface = nullptr;
if (pVisualFormat)
{
surface = cairo_xlib_surface_create_with_xrender_format (
@@ -74,7 +74,7 @@ cairo_t* X11CairoTextRender::getCairoContext()
}
if (!surface)
- return NULL;
+ return nullptr;
cairo_t *cr = cairo_create(surface);
cairo_surface_destroy(surface);
diff --git a/vcl/unx/generic/gdi/x11windowprovider.cxx b/vcl/unx/generic/gdi/x11windowprovider.cxx
index ec1cb09a074b..4f507c3911e0 100644
--- a/vcl/unx/generic/gdi/x11windowprovider.cxx
+++ b/vcl/unx/generic/gdi/x11windowprovider.cxx
@@ -26,7 +26,7 @@ Display *OpenX11Display(OString& rDisplay)
* o default display
*/
- Display *pDisp = NULL;
+ Display *pDisp = nullptr;
// is there a -display command line parameter?
@@ -41,7 +41,7 @@ Display *OpenX11Display(OString& rDisplay)
rDisplay = OUStringToOString(
aParam, osl_getThreadTextEncoding());
- if ((pDisp = XOpenDisplay(rDisplay.getStr()))!=NULL)
+ if ((pDisp = XOpenDisplay(rDisplay.getStr()))!=nullptr)
{
/*
* if a -display switch was used, we need
@@ -60,7 +60,7 @@ Display *OpenX11Display(OString& rDisplay)
{
// Open $DISPLAY or default...
char *pDisplay = getenv("DISPLAY");
- if (pDisplay != NULL)
+ if (pDisplay != nullptr)
rDisplay = OString(pDisplay);
pDisp = XOpenDisplay(pDisplay);
}
diff --git a/vcl/unx/generic/gdi/xrender_peer.cxx b/vcl/unx/generic/gdi/xrender_peer.cxx
index 808fe14871d9..b29bc6697d7c 100644
--- a/vcl/unx/generic/gdi/xrender_peer.cxx
+++ b/vcl/unx/generic/gdi/xrender_peer.cxx
@@ -26,7 +26,7 @@
XRenderPeer::XRenderPeer()
: mpDisplay( vcl_sal::getSalDisplay(GetGenericData())->GetDisplay() )
- , mpStandardFormatA8( NULL )
+ , mpStandardFormatA8( nullptr )
{
InitRenderLib();
}
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 337e4d494688..c51d1ecb515b 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -60,14 +60,14 @@ bool IsHeadlessModeRequested()
}
-static oslModule pCloseModule = NULL;
+static oslModule pCloseModule = nullptr;
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
{
if (rModuleBase == "svp")
return svp_create_SalInstance();
- SalInstance* pInst = NULL;
+ SalInstance* pInst = nullptr;
OUString aModule(
#ifdef SAL_DLLPREFIX
SAL_DLLPREFIX
@@ -101,7 +101,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
*/
if( rModuleBase == "gtk" || rModuleBase == "gtk3" || rModuleBase == "tde" || rModuleBase == "kde" || rModuleBase == "kde4" )
{
- pCloseModule = NULL;
+ pCloseModule = nullptr;
}
#endif
GetSalData()->m_pPlugin = aMod;
@@ -171,7 +171,7 @@ static SalInstance* autodetect_plugin()
#if ENABLE_KDE4
"kde4",
#endif
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pKDEFallbackList[] =
@@ -179,17 +179,17 @@ static SalInstance* autodetect_plugin()
#if ENABLE_KDE4
"kde4",
#endif
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pStandardFallbackList[] =
{
- "gtk3", "gtk", "gen", 0
+ "gtk3", "gtk", "gen", nullptr
};
static const char* const pHeadlessFallbackList[] =
{
- "svp", 0
+ "svp", nullptr
};
DesktopType desktop = get_desktop_environment();
@@ -210,8 +210,8 @@ static SalInstance* autodetect_plugin()
else if( desktop == DESKTOP_KDE4 || desktop == DESKTOP_KDE5 )
pList = pKDEFallbackList;
- SalInstance* pInst = NULL;
- while( pList[nListEntry] && pInst == NULL )
+ SalInstance* pInst = nullptr;
+ while( pList[nListEntry] && pInst == nullptr )
{
OUString aTry( OUString::createFromAscii( pList[nListEntry] ) );
pInst = tryInstance( aTry );
@@ -226,7 +226,7 @@ static SalInstance* autodetect_plugin()
SalInstance *CreateSalInstance()
{
- SalInstance *pInst = NULL;
+ SalInstance *pInst = nullptr;
OUString aUsePlugin;
if( IsHeadlessModeRequested() )
@@ -312,9 +312,9 @@ const OUString& SalGetDesktopEnvironment()
}
SalData::SalData() :
- m_pInstance(NULL),
- m_pPlugin(NULL),
- m_pPIManager(NULL)
+ m_pInstance(nullptr),
+ m_pPlugin(nullptr),
+ m_pPIManager(nullptr)
{
}
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 5d171d8bb64d..5c47442d8789 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -147,7 +147,7 @@ OString CUPSManager::threadedCupsGetPPD( const char* pPrinter )
static const char* setPasswordCallback( const char* pIn )
{
- const char* pRet = NULL;
+ const char* pRet = nullptr;
PrinterInfoManager& rMgr = PrinterInfoManager::get();
if( rMgr.getType() == PrinterInfoManager::CUPS ) // sanity check
@@ -161,7 +161,7 @@ static const char* setPasswordCallback( const char* pIn )
CUPSManager* CUPSManager::tryLoadCUPS()
{
- CUPSManager* pManager = NULL;
+ CUPSManager* pManager = nullptr;
static const char* pEnv = getenv("SAL_DISABLE_CUPS");
if (!pEnv || !*pEnv)
@@ -181,7 +181,7 @@ static void run_dest_thread_stub( void* pThis )
CUPSManager::CUPSManager() :
PrinterInfoManager( CUPS ),
m_nDests( 0 ),
- m_pDests( NULL ),
+ m_pDests( nullptr ),
m_bNewDests( false ),
m_bPPDThreadRunning( false ),
batchMode( false )
@@ -211,14 +211,14 @@ void CUPSManager::runDestThread( void* pThis )
void CUPSManager::runDests()
{
SAL_INFO("vcl.unx.print", "starting cupsGetDests");
- cups_dest_t* pDests = NULL;
+ cups_dest_t* pDests = nullptr;
// n#722902 - do a fast-failing check for cups working *at all* first
http_t* p_http;
if( (p_http=httpConnectEncrypt(
cupsServer(),
ippPort(),
- cupsEncryption())) != NULL )
+ cupsEncryption())) != nullptr )
{
// neat, cups is up, clean up the canary
httpClose(p_http);
@@ -251,7 +251,7 @@ void CUPSManager::initialize()
{
osl_joinWithThread( m_aDestThread );
osl_destroyThread( m_aDestThread );
- m_aDestThread = NULL;
+ m_aDestThread = nullptr;
}
m_bNewDests = false;
@@ -288,7 +288,7 @@ void CUPSManager::initialize()
int nPrinter = m_nDests;
// reset global default PPD options; these are queried on demand from CUPS
- m_aGlobalDefaults.m_pParser = NULL;
+ m_aGlobalDefaults.m_pParser = nullptr;
m_aGlobalDefaults.m_aContext = PPDContext();
// add CUPS printers, should there be a printer
@@ -333,8 +333,8 @@ void CUPSManager::initialize()
// would mean we'd have to download PPDs for each and
// every printer - which would be really bad runtime
// behaviour
- aPrinter.m_aInfo.m_pParser = NULL;
- aPrinter.m_aInfo.m_aContext.setParser( NULL );
+ aPrinter.m_aInfo.m_pParser = nullptr;
+ aPrinter.m_aInfo.m_aContext.setParser( nullptr );
std::unordered_map< OUString, PPDContext, OUStringHash >::const_iterator c_it = m_aDefaultContexts.find( aPrinterName );
if( c_it != m_aDefaultContexts.end() )
{
@@ -415,7 +415,7 @@ static void updatePrinterContextInfo( ppd_group_t* pPPDGroup, PPDContext& rConte
const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
{
- const PPDParser* pNewParser = NULL;
+ const PPDParser* pNewParser = nullptr;
OUString aPrinter;
if( rPrinter.startsWith("CUPS:") )
@@ -519,13 +519,13 @@ void CUPSManager::setupJobContextData( JobData& rData )
return;
}
- if( p_it->second.m_aInfo.m_pParser == NULL )
+ if( p_it->second.m_aInfo.m_pParser == nullptr )
{
// in turn calls createCUPSParser
// which updates the printer info
p_it->second.m_aInfo.m_pParser = PPDParser::getParser( p_it->second.m_aInfo.m_aDriverName );
}
- if( p_it->second.m_aInfo.m_aContext.getParser() == NULL )
+ if( p_it->second.m_aInfo.m_aContext.getParser() == nullptr )
{
OUString aPrinter;
if( p_it->second.m_aInfo.m_aDriverName.startsWith("CUPS:") )
@@ -553,7 +553,7 @@ FILE* CUPSManager::startSpool( const OUString& rPrintername, bool bQuickCommand
}
OUString aTmpURL, aTmpFile;
- osl_createTempFile( NULL, NULL, &aTmpURL.pData );
+ osl_createTempFile( nullptr, nullptr, &aTmpURL.pData );
osl_getSystemPathFromFileURL( aTmpURL.pData, &aTmpFile.pData );
OString aSysFile = OUStringToOString( aTmpFile, osl_getThreadTextEncoding() );
FILE* fp = fopen( aSysFile.getStr(), "w" );
@@ -572,7 +572,7 @@ struct less_ppd_key : public ::std::binary_function<double, double, bool>
void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner, int& rNumOptions, void** rOptions )
{
rNumOptions = 0;
- *rOptions = NULL;
+ *rOptions = nullptr;
// emit features ordered to OrderDependency
// ignore features that are set to default
@@ -711,7 +711,7 @@ bool CUPSManager::printJobs( const PendingJob& job, const std::vector< OString >
// setup cups options
int nNumOptions = 0;
- cups_option_t* pOptions = NULL;
+ cups_option_t* pOptions = nullptr;
getOptionsFromDocumentSetup( job.jobData, job.banner, nNumOptions, reinterpret_cast<void**>(&pOptions) );
OString sJobName(OUStringToOString(job.jobTitle, aEnc));
@@ -776,7 +776,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
SAL_INFO("vcl.unx.print", "syncing cups discovery thread");
osl_joinWithThread( m_aDestThread );
osl_destroyThread( m_aDestThread );
- m_aDestThread = NULL;
+ m_aDestThread = nullptr;
SAL_INFO("vcl.unx.print", "done: syncing cups discovery thread");
}
else
@@ -793,7 +793,7 @@ bool CUPSManager::checkPrintersChanged( bool bWait )
if( m_nDests && m_pDests )
cupsFreeDests( m_nDests, static_cast<cups_dest_t*>(m_pDests) );
m_nDests = 0;
- m_pDests = NULL;
+ m_pDests = nullptr;
runDests();
}
}
@@ -881,7 +881,7 @@ bool CUPSManager::writePrinterConfig()
// create new option list
int nNewOptions = 0;
- cups_option_t* pNewOptions = NULL;
+ cups_option_t* pNewOptions = nullptr;
int nValues = rInfo.m_aContext.countValuesModified();
for( int i = 0; i < nValues; i++ )
{
@@ -981,7 +981,7 @@ namespace
const char* CUPSManager::authenticateUser( const char* /*pIn*/ )
{
- const char* pRet = NULL;
+ const char* pRet = nullptr;
osl::MutexGuard aGuard( m_aCUPSMutex );
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 840ef7b1b516..9169b01f175c 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -83,7 +83,7 @@ void JobData::setCollate( bool bCollate )
const PPDKey* pKey = pParser->getKey( OUString( "Collate" ) );
if( pKey )
{
- const PPDValue* pVal = NULL;
+ const PPDValue* pVal = nullptr;
if( bCollate )
pVal = pKey->getValue( OUString( "True" ) );
else
@@ -105,7 +105,7 @@ bool JobData::setPaper( int i_nWidth, int i_nHeight )
OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) );
const PPDKey* pKey = m_pParser->getKey( OUString( "PageSize" ) );
- const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : NULL;
+ const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue );
}
@@ -118,7 +118,7 @@ bool JobData::setPaperBin( int i_nPaperBin )
if( m_pParser )
{
const PPDKey* pKey = m_pParser->getKey( OUString( "InputSlot" ) );
- const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : NULL;
+ const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : nullptr;
bSuccess = pKey && pValue && m_aContext.setValue( pKey, pValue );
}
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 9ed3e7dd30d5..77bc1648ca37 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -244,7 +244,7 @@ namespace psp
std::list< PPDParser* > aAllParsers;
std::unordered_map< OUString, OUString, OUStringHash >* pAllPPDFiles;
PPDCache()
- : pAllPPDFiles(NULL)
+ : pAllPPDFiles(nullptr)
{}
~PPDCache()
{
@@ -254,7 +254,7 @@ namespace psp
aAllParsers.pop_front();
}
delete pAllPPDFiles;
- pAllPPDFiles = NULL;
+ pAllPPDFiles = nullptr;
}
};
}
@@ -289,8 +289,8 @@ public:
};
PPDDecompressStream::PPDDecompressStream( const OUString& i_rFile ) :
- mpFileStream( NULL ),
- mpMemStream( NULL )
+ mpFileStream( nullptr ),
+ mpMemStream( nullptr )
{
Open( i_rFile );
}
@@ -330,13 +330,13 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
if( nComp < 0 )
{
// decompression failed, must be an uncompressed stream after all
- delete mpMemStream, mpMemStream = NULL;
+ delete mpMemStream, mpMemStream = nullptr;
mpFileStream->Seek( 0 );
}
else
{
// compression successful, can get rid of file stream
- delete mpFileStream, mpFileStream = NULL;
+ delete mpFileStream, mpFileStream = nullptr;
mpMemStream->Seek( 0 );
}
}
@@ -344,8 +344,8 @@ void PPDDecompressStream::Open( const OUString& i_rFile )
void PPDDecompressStream::Close()
{
- delete mpMemStream, mpMemStream = NULL;
- delete mpFileStream, mpFileStream = NULL;
+ delete mpMemStream, mpMemStream = nullptr;
+ delete mpFileStream, mpFileStream = nullptr;
}
bool PPDDecompressStream::IsOpen() const
@@ -509,7 +509,7 @@ OUString PPDParser::getPPDFile( const OUString& rFile )
if( it == rPPDCache.pAllPPDFiles->end() && bRetry )
{
// a new file ? rehash
- delete rPPDCache.pAllPPDFiles; rPPDCache.pAllPPDFiles = NULL;
+ delete rPPDCache.pAllPPDFiles; rPPDCache.pAllPPDFiles = nullptr;
bRetry = false;
// note this is optimized for office start where
// no new files occur and initPPDFiles is called only once
@@ -553,7 +553,7 @@ const PPDParser* PPDParser::getParser( const OUString& rFile )
{
SAL_INFO("vcl.unx.print", "Could not get printer PPD file \""
<< rFile << "\" !");
- return NULL;
+ return nullptr;
}
PPDCache &rPPDCache = thePPDCache::get();
@@ -561,7 +561,7 @@ const PPDParser* PPDParser::getParser( const OUString& rFile )
if( (*it)->m_aFile == aFile )
return *it;
- PPDParser* pNewParser = NULL;
+ PPDParser* pNewParser = nullptr;
if( !aFile.startsWith( "CUPS:" ) )
pNewParser = new PPDParser( aFile );
else
@@ -589,17 +589,17 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_aFile( rFile ),
m_bType42Capable( false ),
m_aFileEncoding( RTL_TEXTENCODING_MS_1252 ),
- m_pDefaultImageableArea( NULL ),
- m_pImageableAreas( NULL ),
- m_pDefaultPaperDimension( NULL ),
- m_pPaperDimensions( NULL ),
- m_pDefaultInputSlot( NULL ),
- m_pInputSlots( NULL ),
- m_pDefaultResolution( NULL ),
- m_pResolutions( NULL ),
- m_pDefaultDuplexType( NULL ),
- m_pDuplexTypes( NULL ),
- m_pFontList( NULL ),
+ m_pDefaultImageableArea( nullptr ),
+ m_pImageableAreas( nullptr ),
+ m_pDefaultPaperDimension( nullptr ),
+ m_pPaperDimensions( nullptr ),
+ m_pDefaultInputSlot( nullptr ),
+ m_pInputSlots( nullptr ),
+ m_pDefaultResolution( nullptr ),
+ m_pResolutions( nullptr ),
+ m_pDefaultDuplexType( nullptr ),
+ m_pDuplexTypes( nullptr ),
+ m_pFontList( nullptr ),
m_pTranslator( new PPDTranslator() )
{
// read in the file
@@ -713,12 +713,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
if( m_pImageableAreas )
m_pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
- if (m_pImageableAreas == 0) {
+ if (m_pImageableAreas == nullptr) {
OSL_TRACE(
"Warning: no ImageableArea in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultImageableArea == 0) {
+ if (m_pDefaultImageableArea == nullptr) {
OSL_TRACE(
"Warning: no DefaultImageableArea in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -727,12 +727,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pPaperDimensions = getKey( OUString( "PaperDimension" ) );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
- if (m_pPaperDimensions == 0) {
+ if (m_pPaperDimensions == nullptr) {
OSL_TRACE(
"Warning: no PaperDimensions in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultPaperDimension == 0) {
+ if (m_pDefaultPaperDimension == nullptr) {
OSL_TRACE(
"Warning: no DefaultPaperDimensions in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -741,12 +741,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pResolutions = getKey( OUString( "Resolution" ) );
if( m_pResolutions )
m_pDefaultResolution = m_pResolutions->getDefaultValue();
- if (m_pResolutions == 0) {
+ if (m_pResolutions == nullptr) {
OSL_TRACE(
"Warning: no Resolution in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultResolution == 0) {
+ if (m_pDefaultResolution == nullptr) {
OSL_TRACE(
"Warning: no DefaultResolution in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -755,12 +755,12 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pInputSlots = getKey( OUString( "InputSlot" ) );
if( m_pInputSlots )
m_pDefaultInputSlot = m_pInputSlots->getDefaultValue();
- if (m_pInputSlots == 0) {
+ if (m_pInputSlots == nullptr) {
OSL_TRACE(
"Warning: no InputSlot in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
}
- if (m_pDefaultInputSlot == 0) {
+ if (m_pDefaultInputSlot == nullptr) {
OSL_TRACE(
"Warning: no DefaultInputSlot in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -771,7 +771,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
m_pDefaultDuplexType = m_pDuplexTypes->getDefaultValue();
m_pFontList = getKey( OUString( "Font" ) );
- if (m_pFontList == 0) {
+ if (m_pFontList == nullptr) {
OSL_TRACE(
"Warning: no Font in %s\n",
OUStringToOString(m_aFile, RTL_TEXTENCODING_UTF8).getStr());
@@ -806,13 +806,13 @@ void PPDParser::insertKey( const OUString& rKey, PPDKey* pKey )
const PPDKey* PPDParser::getKey( int n ) const
{
- return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : NULL;
+ return ((unsigned int)n < m_aOrderedKeys.size() && n >= 0) ? m_aOrderedKeys[n] : nullptr;
}
const PPDKey* PPDParser::getKey( const OUString& rKey ) const
{
PPDParser::hash_type::const_iterator it = m_aKeys.find( rKey );
- return it != m_aKeys.end() ? it->second : NULL;
+ return it != m_aKeys.end() ? it->second : nullptr;
}
bool PPDParser::hasKey( const PPDKey* pKey ) const
@@ -1115,7 +1115,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
continue;
}
- PPDKey* pKey = NULL;
+ PPDKey* pKey = nullptr;
keyit = m_aKeys.find( aUniKey );
if( keyit == m_aKeys.end() )
{
@@ -1166,7 +1166,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
{
PPDKey* pKey = keyit->second;
const PPDValue* pDefValue = pKey->getValue( aOption );
- if( pKey->m_pDefaultValue == NULL )
+ if( pKey->m_pDefaultValue == nullptr )
pKey->m_pDefaultValue = pDefValue;
}
else
@@ -1498,7 +1498,7 @@ OUString PPDParser::translateOption( const OUString& i_rKey,
PPDKey::PPDKey( const OUString& rKey ) :
m_aKey( rKey ),
- m_pDefaultValue( NULL ),
+ m_pDefaultValue( nullptr ),
m_bQueryValue( false ),
m_bUIOption( false ),
m_eUIType( PickOne ),
@@ -1513,13 +1513,13 @@ PPDKey::~PPDKey()
const PPDValue* PPDKey::getValue( int n ) const
{
- return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : NULL;
+ return ((unsigned int)n < m_aOrderedValues.size() && n >= 0) ? m_aOrderedValues[n] : nullptr;
}
const PPDValue* PPDKey::getValue( const OUString& rOption ) const
{
PPDKey::hash_type::const_iterator it = m_aValues.find( rOption );
- return it != m_aValues.end() ? &it->second : NULL;
+ return it != m_aValues.end() ? &it->second : nullptr;
}
const PPDValue* PPDKey::getValueCaseInsensitive( const OUString& rOption ) const
@@ -1555,7 +1555,7 @@ void PPDKey::eraseValue( const OUString& rOption )
PPDValue* PPDKey::insertValue(const OUString& rOption, PPDValueType eType, bool bCustomOption)
{
if( m_aValues.find( rOption ) != m_aValues.end() )
- return NULL;
+ return nullptr;
PPDValue aValue;
aValue.m_aOption = rOption;
@@ -1592,7 +1592,7 @@ const PPDKey* PPDContext::getModifiedKey( int n ) const
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end() && n--; ++it )
;
- return it != m_aCurrentValues.end() ? it->first : NULL;
+ return it != m_aCurrentValues.end() ? it->first : nullptr;
}
void PPDContext::setParser( const PPDParser* pParser )
@@ -1607,7 +1607,7 @@ void PPDContext::setParser( const PPDParser* pParser )
const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
{
if( ! m_pParser )
- return NULL;
+ return nullptr;
hash_type::const_iterator it;
it = m_aCurrentValues.find( pKey );
@@ -1615,7 +1615,7 @@ const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
return it->second;
if( ! m_pParser->hasKey( pKey ) )
- return NULL;
+ return nullptr;
const PPDValue* pValue = pKey->getDefaultValue();
if( ! pValue )
@@ -1627,12 +1627,12 @@ const PPDValue* PPDContext::getValue( const PPDKey* pKey ) const
const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue, bool bDontCareForConstraints )
{
if( ! m_pParser || ! pKey )
- return NULL;
+ return nullptr;
// pValue can be NULL - it means ignore this option
if( ! m_pParser->hasKey( pKey ) )
- return NULL;
+ return nullptr;
// check constraints
if( pValue )
@@ -1667,7 +1667,7 @@ const PPDValue* PPDContext::setValue( const PPDKey* pKey, const PPDValue* pValue
}
}
else
- m_aCurrentValues[ pKey ] = NULL;
+ m_aCurrentValues[ pKey ] = nullptr;
return pValue;
}
@@ -1800,7 +1800,7 @@ char* PPDContext::getStreamableBuffer( sal_uLong& rBytes ) const
{
rBytes = 0;
if( m_aCurrentValues.empty() )
- return NULL;
+ return nullptr;
hash_type::const_iterator it;
for( it = m_aCurrentValues.begin(); it != m_aCurrentValues.end(); ++it )
{
@@ -1857,7 +1857,7 @@ void PPDContext::rebuildFromStreamBuffer( char* pBuffer, sal_uLong nBytes )
const PPDKey* pKey = m_pParser->getKey( OStringToOUString( aLine.copy( 0, nPos ), RTL_TEXTENCODING_MS_1252 ) );
if( pKey )
{
- const PPDValue* pValue = NULL;
+ const PPDValue* pValue = nullptr;
OUString aOption(OStringToOUString(aLine.copy(nPos+1), RTL_TEXTENCODING_MS_1252));
if (aOption != "*nil")
pValue = pKey->getValue( aOption );
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index e4ddbc8d3ba6..3bb9475e32be 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -101,11 +101,11 @@ void PrinterInfoManager::release()
{
SalData* pSalData = GetSalData();
delete pSalData->m_pPIManager;
- pSalData->m_pPIManager = NULL;
+ pSalData->m_pPIManager = nullptr;
}
PrinterInfoManager::PrinterInfoManager( Type eType ) :
- m_pQueueInfo( NULL ),
+ m_pQueueInfo( nullptr ),
m_eType( eType ),
m_bUseIncludeFeature( false ),
m_bUseJobPatch( true ),
@@ -206,7 +206,7 @@ void PrinterInfoManager::initialize()
}
std::list< OUString > aDirList;
- psp::getPrinterPathList( aDirList, NULL );
+ psp::getPrinterPathList( aDirList, nullptr );
std::list< OUString >::const_iterator print_dir_it;
for( print_dir_it = aDirList.begin(); print_dir_it != aDirList.end(); ++print_dir_it )
{
@@ -265,7 +265,7 @@ void PrinterInfoManager::initialize()
{
m_aGlobalDefaults.m_aContext.
setValue( pKey,
- aValue.equals("*nil") ? NULL : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
+ aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
@@ -353,7 +353,7 @@ void PrinterInfoManager::initialize()
{
const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified );
const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey );
- const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL;
+ const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : nullptr;
if( pDefKey && pPrinterKey )
// at least the options exist in both PPDs
{
@@ -365,7 +365,7 @@ void PrinterInfoManager::initialize()
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
}
else
- aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
+ aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, nullptr );
}
}
@@ -449,7 +449,7 @@ void PrinterInfoManager::initialize()
{
aPrinter.m_aInfo.m_aContext.
setValue( pKey,
- aValue.equals("*nil") ? NULL : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
+ aValue.equals("*nil") ? nullptr : pKey->getValue(OStringToOUString(aValue, RTL_TEXTENCODING_ISO_8859_1)),
true );
}
}
@@ -499,7 +499,7 @@ void PrinterInfoManager::initialize()
const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( OUString( "PageSize" ) );
const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( OUString( "PageSize" ) );
const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey );
- const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : NULL;
+ const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : nullptr;
if( pMergeKey && pMergeValue )
aMergeInfo.m_aContext.setValue( pMergeKey, pMergeValue );
}
@@ -716,7 +716,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
{
bool bSuccess = false;
- const PPDParser* pParser = NULL;
+ const PPDParser* pParser = nullptr;
if( m_aPrinters.find( rPrinterName ) == m_aPrinters.end() && ( pParser = PPDParser::getParser( rDriverName ) ) )
{
Printer aPrinter;
@@ -732,7 +732,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
{
const PPDKey* pDefKey = m_aGlobalDefaults.m_aContext.getModifiedKey( nPPDValueModified );
const PPDValue* pDefValue = m_aGlobalDefaults.m_aContext.getValue( pDefKey );
- const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : NULL;
+ const PPDKey* pPrinterKey = pDefKey ? aPrinter.m_aInfo.m_pParser->getKey( pDefKey->getKey() ) : nullptr;
if( pDefKey && pPrinterKey )
// at least the options exist in both PPDs
{
@@ -744,7 +744,7 @@ bool PrinterInfoManager::addPrinter( const OUString& rPrinterName, const OUStrin
aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, pPrinterValue );
}
else
- aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, NULL );
+ aPrinter.m_aInfo.m_aContext.setValue( pPrinterKey, nullptr );
}
}
@@ -840,7 +840,7 @@ const std::list< PrinterInfoManager::SystemPrintQueue >& PrinterInfoManager::get
{
m_aSystemPrintCommand = m_pQueueInfo->getCommand();
m_pQueueInfo->getSystemQueues( m_aSystemPrintQueues );
- delete m_pQueueInfo, m_pQueueInfo = NULL;
+ delete m_pQueueInfo, m_pQueueInfo = nullptr;
}
return m_aSystemPrintQueues;
@@ -912,7 +912,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
}
// paper not set, fill in default value
- const PPDValue* pPaperVal = NULL;
+ const PPDValue* pPaperVal = nullptr;
int nValues = pPageSizeKey->countValues();
for( int i = 0; i < nValues && ! pPaperVal; i++ )
{
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 0b55e286acb5..781721b511fa 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -459,7 +459,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
if( ! mpParent )
{
// find the last document window (if any)
- const X11SalFrame* pFrame = NULL;
+ const X11SalFrame* pFrame = nullptr;
const std::list< SalFrame* >& rFrames = GetDisplay()->getFrames();
std::list< SalFrame* >::const_iterator it = rFrames.begin();
while( it != rFrames.end() )
@@ -600,7 +600,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
nAttrMask,
&Attributes );
// FIXME: see above: fake shell window for now to own window
- if( pParentData == NULL )
+ if( pParentData == nullptr )
{
mhShellWindow = mhWindow;
}
@@ -725,7 +725,7 @@ void X11SalFrame::Init( SalFrameStyleFlags nSalFrameStyle, SalX11Screen nXScreen
setFrameTypeAndDecoration( this,
eType,
nDecoFlags,
- hPresentationWindow ? NULL : mpParent );
+ hPresentationWindow ? nullptr : mpParent );
if( (nStyle_ & (SalFrameStyleFlags::DEFAULT |
SalFrameStyleFlags::OWNERDRAWDECORATION|
@@ -771,8 +771,8 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
mhBackgroundPixmap = None;
m_bSetFocusOnMap = false;
- pGraphics_ = NULL;
- pFreeGraphics_ = NULL;
+ pGraphics_ = nullptr;
+ pFreeGraphics_ = nullptr;
hCursor_ = None;
nCaptured_ = 0;
@@ -801,7 +801,7 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
m_bXEmbed = false;
- mpInputContext = NULL;
+ mpInputContext = nullptr;
mbInputFocus = False;
maAlwaysOnTopRaiseTimer.SetTimeoutHdl( LINK( this, X11SalFrame, HandleAlwaysOnTopRaise ) );
@@ -816,7 +816,7 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, SalFrameStyleFlags nSalFrameStyle,
mnIconID = 1; // ICON_LO_DEFAULT
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = 0;
m_nMaxClipRect = 0;
@@ -833,7 +833,7 @@ X11SalFrame::~X11SalFrame()
if( m_pClipRectangles )
{
delete [] m_pClipRectangles;
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = m_nMaxClipRect = 0;
}
@@ -930,26 +930,26 @@ const SystemEnvData* X11SalFrame::GetSystemData() const
pFrame->maSystemChildData.pDisplay = GetXDisplay();
pFrame->maSystemChildData.aWindow = pFrame->GetWindow();
pFrame->maSystemChildData.pSalFrame = pFrame;
- pFrame->maSystemChildData.pWidget = NULL;
+ pFrame->maSystemChildData.pWidget = nullptr;
pFrame->maSystemChildData.pVisual = GetDisplay()->GetVisual( m_nXScreen ).GetVisual();
pFrame->maSystemChildData.nScreen = m_nXScreen.getXScreen();
pFrame->maSystemChildData.nDepth = GetDisplay()->GetVisual( m_nXScreen ).GetDepth();
pFrame->maSystemChildData.aColormap = GetDisplay()->GetColormap( m_nXScreen ).GetXColormap();
- pFrame->maSystemChildData.pAppContext = NULL;
+ pFrame->maSystemChildData.pAppContext = nullptr;
pFrame->maSystemChildData.aShellWindow = pFrame->GetShellWindow();
- pFrame->maSystemChildData.pShellWidget = NULL;
+ pFrame->maSystemChildData.pShellWidget = nullptr;
return &maSystemChildData;
}
SalGraphics *X11SalFrame::AcquireGraphics()
{
if( pGraphics_ )
- return NULL;
+ return nullptr;
if( pFreeGraphics_ )
{
pGraphics_ = pFreeGraphics_;
- pFreeGraphics_ = NULL;
+ pFreeGraphics_ = nullptr;
}
else
{
@@ -968,7 +968,7 @@ void X11SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
return;
pFreeGraphics_ = pGraphics_;
- pGraphics_ = NULL;
+ pGraphics_ = nullptr;
}
void X11SalFrame::updateGraphics( bool bClear )
@@ -990,7 +990,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon )
mnIconID = nIcon;
- XIconSize *pIconSize = NULL;
+ XIconSize *pIconSize = nullptr;
int nSizes = 0;
int iconSize = 32;
if ( XGetIconSizes( GetXDisplay(), GetDisplay()->GetRootWindow( m_nXScreen ), &pIconSize, &nSizes ) )
@@ -1281,7 +1281,7 @@ void X11SalFrame::Show( bool bVisible, bool bNoActivate )
);
}
}
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
/*
* sometimes a message box/dialogue is brought up when a frame is not mapped
@@ -1618,7 +1618,7 @@ void X11SalFrame::SetAlwaysOnTop( bool bOnTop )
void X11SalFrame::SetWindowState( const SalFrameState *pState )
{
- if (pState == NULL)
+ if (pState == nullptr)
return;
// Request for position or size change
@@ -1870,7 +1870,7 @@ void X11SalFrame::SetSize( const Size &rSize )
maGeometry.nHeight = rSize.Height();
// allow the external status window to reposition
- if (mbInputFocus && mpInputContext != NULL)
+ if (mbInputFocus && mpInputContext != nullptr)
mpInputContext->SetICFocus ( this );
}
}
@@ -1978,14 +1978,14 @@ void X11SalFrame::SetPosSize( const Rectangle &rPosSize )
updateScreenNumber();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
// allow the external status window to reposition
- if (mbInputFocus && mpInputContext != NULL)
+ if (mbInputFocus && mpInputContext != nullptr)
mpInputContext->SetICFocus ( this );
}
@@ -2293,7 +2293,7 @@ void X11SalFrame::Flush()
void X11SalFrame::SetInputContext( SalInputContext* pContext )
{
- if (pContext == NULL)
+ if (pContext == nullptr)
return;
// 1. We should create an input context for this frame
@@ -2309,7 +2309,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
// 2. We should use on-the-spot inputstyle
// only when InputContextFlags::ExtTExt is set.
- if (mpInputContext == NULL)
+ if (mpInputContext == nullptr)
{
vcl::I18NStatus& rStatus( vcl::I18NStatus::get() );
rStatus.setParent( this );
@@ -2328,7 +2328,7 @@ void X11SalFrame::SetInputContext( SalInputContext* pContext )
void X11SalFrame::EndExtTextInput( EndExtTextInputFlags nFlags )
{
- if (mpInputContext != NULL)
+ if (mpInputContext != nullptr)
mpInputContext->EndExtTextInput( nFlags );
}
@@ -2361,7 +2361,7 @@ void X11SalFrame::UpdateSettings( AllSettings& rSettings )
void X11SalFrame::CaptureMouse( bool bCapture )
{
- nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : NULL );
+ nCaptured_ = pDisplay_->CaptureMouse( bCapture ? this : nullptr );
}
void X11SalFrame::SetParent( SalFrame* pNewParent )
@@ -2437,7 +2437,7 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
if ( aParentData.aWindow != None )
Init( nStyle_ | SalFrameStyleFlags::PLUG, nXScreen, &aParentData );
else
- Init( nStyle_ & ~SalFrameStyleFlags::PLUG, nXScreen, NULL, true );
+ Init( nStyle_ & ~SalFrameStyleFlags::PLUG, nXScreen, nullptr, true );
// update graphics if necessary
updateGraphics(false);
@@ -2448,7 +2448,7 @@ void X11SalFrame::createNewWindow( ::Window aNewParent, SalX11Screen nXScreen )
if( mpParent )
{
if( mpParent->m_nXScreen != m_nXScreen )
- SetParent( NULL );
+ SetParent( nullptr );
else
pDisplay_->getWMAdaptor()->changeReferenceFrame( this, mpParent );
}
@@ -2936,7 +2936,7 @@ bool X11SalFrame::endUnicodeSequence()
bool bWasInput = !rSeq.isEmpty();
rSeq.clear();
if( bWasInput && ! aDeleteWatch.isDeleted() )
- CallCallback(SALEVENT_ENDEXTTEXTINPUT, NULL);
+ CallCallback(SALEVENT_ENDEXTTEXTINPUT, nullptr);
return bWasInput;
}
@@ -3008,7 +3008,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
unsigned char *pPrintable = static_cast<unsigned char*>(alloca( nLen ));
// singlebyte code composed by input method, the new default
- if (mpInputContext != NULL && mpInputContext->UseContext())
+ if (mpInputContext != nullptr && mpInputContext->UseContext())
{
// returns a keysym as well as the pPrintable (in system encoding)
// printable may be empty.
@@ -3229,7 +3229,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
nSize = 0;
}
- if ( mpInputContext != NULL
+ if ( mpInputContext != nullptr
&& mpInputContext->UseContext()
&& KeyRelease != pEvent->type
&& ( (nSize > 1)
@@ -3271,7 +3271,7 @@ long X11SalFrame::HandleKeyEvent( XKeyEvent *pEvent )
if (! aDeleteWatch.isDeleted())
{
- if (mpInputContext != NULL && mpInputContext->UseContext())
+ if (mpInputContext != nullptr && mpInputContext->UseContext())
mpInputContext->UpdateSpotLocation();
}
@@ -3295,7 +3295,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
* status window does not follow the application frame
*/
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
{
if( FocusIn == pEvent->type )
mpInputContext->SetICFocus( this );
@@ -3323,8 +3323,8 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
mbInputFocus = True;
ImplSVData* pSVData = ImplGetSVData();
- long nRet = CallCallback( SALEVENT_GETFOCUS, 0 );
- if ((mpParent != NULL && nStyle_ == SalFrameStyleFlags::NONE)
+ long nRet = CallCallback( SALEVENT_GETFOCUS, nullptr );
+ if ((mpParent != nullptr && nStyle_ == SalFrameStyleFlags::NONE)
&& pSVData->maWinData.mpFirstFloat )
{
FloatWinPopupFlags nMode = pSVData->maWinData.mpFirstFloat->GetPopupModeFlags();
@@ -3338,7 +3338,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent )
mbInputFocus = False;
mbSendExtKeyModChange = false;
mnExtKeyMod = 0;
- return CallCallback( SALEVENT_LOSEFOCUS, 0 );
+ return CallCallback( SALEVENT_LOSEFOCUS, nullptr );
}
}
@@ -3435,7 +3435,7 @@ void X11SalFrame::RestackChildren()
if( ! GetDisplay()->getWMAdaptor()->isTransientBehaviourAsExpected()
&& !maChildren.empty() )
{
- ::Window aRoot, aParent, *pChildren = NULL;
+ ::Window aRoot, aParent, *pChildren = nullptr;
unsigned int nChildren;
if( XQueryTree( GetXDisplay(),
GetDisplay()->GetRootWindow( m_nXScreen ),
@@ -3517,7 +3517,7 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
{
maGeometry.nX = pEvent->x;
maGeometry.nY = pEvent->y;
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
}
return 1;
}
@@ -3552,11 +3552,11 @@ long X11SalFrame::HandleSizeEvent( XConfigureEvent *pEvent )
RestackChildren();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else if( bMoved && bSized )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
return 1;
}
@@ -3588,7 +3588,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
hWM_Parent = GetShellWindow();
do
{
- Children = NULL;
+ Children = nullptr;
XQueryTree( pDisplay,
hWM_Parent,
&hRoot,
@@ -3744,7 +3744,7 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent )
}
}
if( bResized )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
GetGenericData()->ErrorTrapPop();
@@ -3756,7 +3756,7 @@ long X11SalFrame::HandleStateEvent( XPropertyEvent *pEvent )
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
- unsigned char *prop = NULL;
+ unsigned char *prop = nullptr;
if( 0 != XGetWindowProperty( GetXDisplay(),
GetShellWindow(),
@@ -3922,9 +3922,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
bMapped_ = true;
bViewable_ = true;
nRet = 1;
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
mpInputContext->Map( this );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
bool bSetFocus = m_bSetFocusOnMap;
/* another workaround for sawfish: if a transient window for the same parent is shown
@@ -3981,9 +3981,9 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
bMapped_ = false;
bViewable_ = false;
nRet = 1;
- if ( mpInputContext != NULL )
+ if ( mpInputContext != nullptr )
mpInputContext->Unmap( this );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
}
break;
@@ -4062,7 +4062,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent )
void X11SalFrame::ResetClipRegion()
{
delete [] m_pClipRectangles;
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nCurClipRect = m_nMaxClipRect = 0;
const int dest_kind = ShapeBounding;
@@ -4099,7 +4099,7 @@ void X11SalFrame::BeginSetClipRegion( sal_uLong nRects )
if( nRects )
m_pClipRectangles = new XRectangle[nRects];
else
- m_pClipRectangles = NULL;
+ m_pClipRectangles = nullptr;
m_nMaxClipRect = static_cast<int>(nRects);
m_nCurClipRect = 0;
}
diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx
index e538ae423e99..3622aae2f144 100644
--- a/vcl/unx/generic/window/salobj.cxx
+++ b/vcl/unx/generic/window/salobj.cxx
@@ -55,7 +55,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
&event_base, &error_base ) )
{
delete pObject;
- return NULL;
+ return nullptr;
}
pObject->mpParent = pParent;
@@ -141,7 +141,7 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
{
pObject->maSecondary = None;
delete pObject;
- return NULL;
+ return nullptr;
}
XReparentWindow( pDisp, pObject->maSecondary, pObject->maPrimary, 0, 0 );
}
@@ -154,18 +154,18 @@ X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* p
pObjData->pDisplay = pDisp;
pObjData->aWindow = pObject->maSecondary;
- pObjData->pWidget = NULL;
+ pObjData->pWidget = nullptr;
pObjData->pVisual = pVisual;
pObjData->nDepth = nDepth;
pObjData->aColormap = aVisID == pSalDisp->GetVisual( nXScreen ).GetVisualId() ?
pSalDisp->GetColormap( nXScreen ).GetXColormap() : None;
- pObjData->pAppContext = NULL;
+ pObjData->pAppContext = nullptr;
XSync(pDisp, False);
if( GetGenericData()->ErrorTrapPop( false ) )
{
delete pObject;
- return NULL;
+ return nullptr;
}
return pObject;
@@ -181,7 +181,7 @@ void X11SalInstance::DestroyObject( SalObject* pObject )
SalClipRegion::SalClipRegion()
{
- ClipRectangleList = NULL;
+ ClipRectangleList = nullptr;
numClipRectangles = 0;
maxClipRectangles = 0;
nClipRegionType = SAL_OBJECT_CLIP_INCLUDERECTS;
@@ -222,7 +222,7 @@ SalClipRegion::UnionClipRegion( long nX, long nY, long nWidth, long nHeight )
// SalObject Implementation
X11SalObject::X11SalObject()
- : mpParent(NULL)
+ : mpParent(nullptr)
, maPrimary(0)
, maSecondary(0)
, maColormap(0)
@@ -231,14 +231,14 @@ X11SalObject::X11SalObject()
maSystemChildData.nSize = sizeof( SystemEnvData );
maSystemChildData.pDisplay = vcl_sal::getSalDisplay(GetGenericData())->GetDisplay();
maSystemChildData.aWindow = None;
- maSystemChildData.pSalFrame = 0;
- maSystemChildData.pWidget = 0;
- maSystemChildData.pVisual = 0;
+ maSystemChildData.pSalFrame = nullptr;
+ maSystemChildData.pWidget = nullptr;
+ maSystemChildData.pVisual = nullptr;
maSystemChildData.nDepth = 0;
maSystemChildData.aColormap = 0;
- maSystemChildData.pAppContext = NULL;
+ maSystemChildData.pAppContext = nullptr;
maSystemChildData.aShellWindow = 0;
- maSystemChildData.pShellWidget = NULL;
+ maSystemChildData.pShellWidget = nullptr;
std::list< SalObject* >& rObjects = vcl_sal::getSalDisplay(GetGenericData())->getSalObjects();
rObjects.push_back( this );
@@ -484,13 +484,13 @@ bool X11SalObject::Dispatch( XEvent* pEvent )
pObject->mbVisible = true;
return true;
case ButtonPress:
- pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_TOTOP, nullptr );
return true;
case FocusIn:
- pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_GETFOCUS, nullptr );
return true;
case FocusOut:
- pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, NULL );
+ pObject->CallCallback( SALOBJ_EVENT_LOSEFOCUS, nullptr );
return true;
default: break;
}
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 2d515f363631..206737062a6a 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -78,11 +78,11 @@ void dbusInhibit( bool bInhibit,
}
gboolean res;
- GError *error = NULL;
- DBusGProxy *proxy = NULL;
+ GError *error = nullptr;
+ DBusGProxy *proxy = nullptr;
DBusGConnection *session_connection = dbus_g_bus_get( DBUS_BUS_SESSION, &error );
- if (error != NULL) {
+ if (error != nullptr) {
SAL_WARN( "vcl.screensaverinhibitor", "failed to connect to dbus session bus: " << error->message );
g_error_free( error );
return;
@@ -92,7 +92,7 @@ void dbusInhibit( bool bInhibit,
service,
path,
interface );
- if (proxy == NULL) {
+ if (proxy == nullptr) {
SAL_INFO( "vcl.screensaverinhibitor", "could not get dbus proxy: " << service );
return;
}
@@ -122,7 +122,7 @@ void dbusInhibit( bool bInhibit,
}
}
- if (error != NULL)
+ if (error != nullptr)
{
SAL_INFO( "vcl.screensaverinhibitor", "Error: " << error->message );
g_error_free( error );
diff --git a/vcl/unx/gtk/a11y/atkaction.cxx b/vcl/unx/gtk/a11y/atkaction.cxx
index 7bdf93206c63..c9e3ec776f6a 100644
--- a/vcl/unx/gtk/a11y/atkaction.cxx
+++ b/vcl/unx/gtk/a11y/atkaction.cxx
@@ -260,7 +260,7 @@ action_wrapper_set_description (AtkAction *, gint, const gchar *)
void
actionIfaceInit (AtkActionIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->do_action = action_wrapper_do_action;
iface->get_n_actions = action_wrapper_get_n_actions;
diff --git a/vcl/unx/gtk/a11y/atkcomponent.cxx b/vcl/unx/gtk/a11y/atkcomponent.cxx
index 2afdca099d19..cbc4b8e38b27 100644
--- a/vcl/unx/gtk/a11y/atkcomponent.cxx
+++ b/vcl/unx/gtk/a11y/atkcomponent.cxx
@@ -126,7 +126,7 @@ component_wrapper_ref_accessible_at_point (AtkComponent *component,
g_warning( "Exception in getAccessibleAtPoint()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -289,14 +289,14 @@ component_wrapper_add_focus_handler (AtkComponent *component,
match_type = (GSignalMatchType) (G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC);
signal_id = g_signal_lookup( "focus-event", ATK_TYPE_OBJECT );
- ret = g_signal_handler_find( component, match_type, signal_id, 0, NULL,
- static_cast<gpointer>(&handler), NULL);
+ ret = g_signal_handler_find( component, match_type, signal_id, 0, nullptr,
+ static_cast<gpointer>(&handler), nullptr);
if (!ret)
{
return g_signal_connect_closure_by_id (component,
signal_id, 0,
g_cclosure_new (
- G_CALLBACK (handler), NULL,
+ G_CALLBACK (handler), nullptr,
nullptr),
FALSE);
}
@@ -322,7 +322,7 @@ component_wrapper_remove_focus_handler (AtkComponent *component,
void
componentIfaceInit (AtkComponentIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->add_focus_handler = component_wrapper_add_focus_handler;
iface->contains = component_wrapper_contains;
diff --git a/vcl/unx/gtk/a11y/atkeditabletext.cxx b/vcl/unx/gtk/a11y/atkeditabletext.cxx
index cc058b5b1019..f601f137dd04 100644
--- a/vcl/unx/gtk/a11y/atkeditabletext.cxx
+++ b/vcl/unx/gtk/a11y/atkeditabletext.cxx
@@ -179,7 +179,7 @@ editable_text_wrapper_copy_text( AtkEditableText *text,
void
editableTextIfaceInit (AtkEditableTextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->set_text_contents = editable_text_wrapper_set_text_contents;
iface->insert_text = editable_text_wrapper_insert_text;
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index 7512815b9859..a8428fb4ec86 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -62,11 +62,11 @@ atk_noop_object_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(atk_noop_object_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
sizeof (AtkObjectWrapper),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (ATK_TYPE_OBJECT, "OOoAtkNoOpObj", &typeInfo, (GTypeFlags)0) ;
@@ -79,8 +79,8 @@ atk_noop_object_wrapper_new()
{
AtkObject *accessible;
- accessible = static_cast<AtkObject *>(g_object_new (atk_noop_object_wrapper_get_type(), NULL));
- g_return_val_if_fail (accessible != NULL, NULL);
+ accessible = static_cast<AtkObject *>(g_object_new (atk_noop_object_wrapper_get_type(), nullptr));
+ g_return_val_if_fail (accessible != nullptr, NULL);
accessible->role = ATK_ROLE_INVALID;
accessible->layer = ATK_LAYER_INVALID;
@@ -122,7 +122,7 @@ wrapper_factory_create_accessible( GObject *obj )
#endif
GtkSalFrame* pFrame = GtkSalFrame::getFromWindow(GTK_WINDOW(pTopLevel));
- g_return_val_if_fail( pFrame != NULL, NULL );
+ g_return_val_if_fail( pFrame != nullptr, NULL );
vcl::Window* pFrameWindow = pFrame->GetWindow();
if( pFrameWindow )
@@ -150,7 +150,7 @@ wrapper_factory_create_accessible( GObject *obj )
}
}
- return NULL;
+ return nullptr;
}
AtkObject* ooo_fixed_get_accessible(GtkWidget *obj)
@@ -174,8 +174,8 @@ wrapper_factory_get_type()
static const GTypeInfo tinfo =
{
sizeof (AtkObjectFactoryClass),
- NULL, NULL, reinterpret_cast<GClassInitFunc>(wrapper_factory_class_init),
- NULL, NULL, sizeof (AtkObjectFactory), 0, NULL, NULL
+ nullptr, nullptr, reinterpret_cast<GClassInitFunc>(wrapper_factory_class_init),
+ nullptr, nullptr, sizeof (AtkObjectFactory), 0, nullptr, nullptr
};
t = g_type_register_static (
diff --git a/vcl/unx/gtk/a11y/atkhypertext.cxx b/vcl/unx/gtk/a11y/atkhypertext.cxx
index aebb11a19f68..25f41163cdc9 100644
--- a/vcl/unx/gtk/a11y/atkhypertext.cxx
+++ b/vcl/unx/gtk/a11y/atkhypertext.cxx
@@ -38,7 +38,7 @@ static uno::Reference< accessibility::XAccessibleHyperlink >
return pLink->xLink;
}
-static GObjectClass *hyper_parent_class = NULL;
+static GObjectClass *hyper_parent_class = nullptr;
extern "C" {
@@ -62,7 +62,7 @@ hyper_link_get_uri( AtkHyperlink *pLink,
catch(const uno::Exception&) {
g_warning( "Exception in hyper_link_get_uri" );
}
- return NULL;
+ return nullptr;
}
static AtkObject *
@@ -77,7 +77,7 @@ hyper_link_get_object( AtkHyperlink *pLink,
catch(const uno::Exception&) {
g_warning( "Exception in hyper_link_get_object" );
}
- return NULL;
+ return nullptr;
}
static gint
hyper_link_get_end_index( AtkHyperlink *pLink )
@@ -160,21 +160,21 @@ hyper_link_get_type()
if (!type) {
static const GTypeInfo tinfo = {
sizeof (AtkHyperlinkClass),
- NULL, /* base init */
- NULL, /* base finalize */
+ nullptr, /* base init */
+ nullptr, /* base finalize */
reinterpret_cast<GClassInitFunc>(hyper_link_class_init),
- NULL, /* class finalize */
- NULL, /* class data */
+ nullptr, /* class finalize */
+ nullptr, /* class data */
sizeof (HyperLink), /* instance size */
0, /* nb preallocs */
- NULL, /* instance init */
- NULL /* value table */
+ nullptr, /* instance init */
+ nullptr /* value table */
};
static const GInterfaceInfo atk_action_info = {
reinterpret_cast<GInterfaceInitFunc>(actionIfaceInit),
nullptr,
- NULL
+ nullptr
};
type = g_type_register_static (ATK_TYPE_HYPERLINK,
@@ -215,11 +215,11 @@ hypertext_get_link( AtkHypertext *hypertext,
= getHypertext( hypertext );
if( pHypertext.is() )
{
- HyperLink *pLink = static_cast<HyperLink *>(g_object_new( hyper_link_get_type(), NULL ));
+ HyperLink *pLink = static_cast<HyperLink *>(g_object_new( hyper_link_get_type(), nullptr ));
pLink->xLink = pHypertext->getHyperLink( link_index );
if( !pLink->xLink.is() ) {
g_object_unref( G_OBJECT( pLink ) );
- pLink = NULL;
+ pLink = nullptr;
}
return ATK_HYPERLINK( pLink );
}
@@ -228,7 +228,7 @@ hypertext_get_link( AtkHypertext *hypertext,
g_warning( "Exception in getHyperLink()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -269,7 +269,7 @@ hypertext_get_link_index( AtkHypertext *hypertext,
void
hypertextIfaceInit (AtkHypertextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_link = hypertext_get_link;
iface->get_n_links = hypertext_get_n_links;
diff --git a/vcl/unx/gtk/a11y/atkimage.cxx b/vcl/unx/gtk/a11y/atkimage.cxx
index c6f6e75f1ece..c1652a4ee582 100644
--- a/vcl/unx/gtk/a11y/atkimage.cxx
+++ b/vcl/unx/gtk/a11y/atkimage.cxx
@@ -67,7 +67,7 @@ image_get_image_description( AtkImage *image )
g_warning( "Exception in getAccessibleImageDescription()" );
}
- return NULL;
+ return nullptr;
}
static void
@@ -120,7 +120,7 @@ image_set_image_description( AtkImage *, const gchar * )
void
imageIfaceInit (AtkImageIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->set_image_description = image_set_image_description;
iface->get_image_description = image_get_image_description;
diff --git a/vcl/unx/gtk/a11y/atklistener.cxx b/vcl/unx/gtk/a11y/atklistener.cxx
index 753a7c2be3f9..f9c25fdd6fae 100644
--- a/vcl/unx/gtk/a11y/atklistener.cxx
+++ b/vcl/unx/gtk/a11y/atklistener.cxx
@@ -77,7 +77,7 @@ extern "C" {
if( atk_get_focus_object() == atk_obj )
{
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- atk_focus_tracker_notify( NULL );
+ atk_focus_tracker_notify( nullptr );
SAL_WNODEPRECATED_DECLARATIONS_POP
}
g_object_unref( G_OBJECT( atk_obj ) );
@@ -101,7 +101,7 @@ void AtkListener::disposing( const lang::EventObject& ) throw (uno::RuntimeExcep
// Release the wrapper object so that it can vanish ..
g_object_unref( mpWrapper );
- mpWrapper = NULL;
+ mpWrapper = nullptr;
}
}
@@ -111,7 +111,7 @@ static AtkObject *getObjFromAny( const uno::Any &rAny )
{
uno::Reference< accessibility::XAccessible > xAccessible;
rAny >>= xAccessible;
- return xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
+ return xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : nullptr;
}
/*****************************************************************************/
@@ -154,7 +154,7 @@ void AtkListener::handleChildAdded(
const uno::Reference< accessibility::XAccessibleContext >& rxParent,
const uno::Reference< accessibility::XAccessible>& rxAccessible)
{
- AtkObject * pChild = rxAccessible.is() ? atk_object_wrapper_ref( rxAccessible ) : NULL;
+ AtkObject * pChild = rxAccessible.is() ? atk_object_wrapper_ref( rxAccessible ) : nullptr;
if( pChild )
{
@@ -490,7 +490,7 @@ void AtkListener::notifyEvent( const accessibility::AccessibleEventObject& aEven
const char *col;
} aSignalNames[] =
{
- { NULL, NULL }, // dummy
+ { nullptr, nullptr }, // dummy
{ "row_inserted", "column_inserted" }, // INSERT = 1
{ "row_deleted", "column_deleted" } // DELETE = 2
};
diff --git a/vcl/unx/gtk/a11y/atkregistry.cxx b/vcl/unx/gtk/a11y/atkregistry.cxx
index 5fdae5cbd2fb..ff96378c41dc 100644
--- a/vcl/unx/gtk/a11y/atkregistry.cxx
+++ b/vcl/unx/gtk/a11y/atkregistry.cxx
@@ -22,7 +22,7 @@
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::uno;
-static GHashTable *uno_to_gobject = NULL;
+static GHashTable *uno_to_gobject = nullptr;
/*****************************************************************************/
@@ -38,7 +38,7 @@ ooo_wrapper_registry_get(const Reference< XAccessible >& rxAccessible)
return ATK_OBJECT( cached );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -47,7 +47,7 @@ void
ooo_wrapper_registry_add(const Reference< XAccessible >& rxAccessible, AtkObject *obj)
{
if( !uno_to_gobject )
- uno_to_gobject = g_hash_table_new (NULL, NULL);
+ uno_to_gobject = g_hash_table_new (nullptr, nullptr);
g_hash_table_insert( uno_to_gobject, static_cast<gpointer>(rxAccessible.get()), obj );
}
diff --git a/vcl/unx/gtk/a11y/atkselection.cxx b/vcl/unx/gtk/a11y/atkselection.cxx
index 3c75865c6689..eb3b2fcef167 100644
--- a/vcl/unx/gtk/a11y/atkselection.cxx
+++ b/vcl/unx/gtk/a11y/atkselection.cxx
@@ -95,7 +95,7 @@ selection_ref_selection( AtkSelection *selection,
g_warning( "Exception in getSelectedAccessibleChild()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -175,7 +175,7 @@ selection_select_all_selection( AtkSelection *selection)
void
selectionIfaceInit( AtkSelectionIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->add_selection = selection_add_selection;
iface->clear_selection = selection_clear_selection;
diff --git a/vcl/unx/gtk/a11y/atktable.cxx b/vcl/unx/gtk/a11y/atktable.cxx
index f4e975264652..a3423f6084d4 100644
--- a/vcl/unx/gtk/a11y/atktable.cxx
+++ b/vcl/unx/gtk/a11y/atktable.cxx
@@ -29,7 +29,7 @@ atk_object_wrapper_conditional_ref( const uno::Reference< accessibility::XAccess
if( rxAccessible.is() )
return atk_object_wrapper_ref( rxAccessible );
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -84,7 +84,7 @@ table_wrapper_ref_at (AtkTable *table,
g_warning( "Exception in getAccessibleCellAt()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -237,7 +237,7 @@ table_wrapper_get_caption( AtkTable *table )
g_warning( "Exception in getAccessibleCaption()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -256,7 +256,7 @@ table_wrapper_get_row_description( AtkTable *table,
g_warning( "Exception in getAccessibleRowDescription()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -275,7 +275,7 @@ table_wrapper_get_column_description( AtkTable *table,
g_warning( "Exception in getAccessibleColumnDescription()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -298,7 +298,7 @@ table_wrapper_get_row_header( AtkTable *table,
g_warning( "Exception in getAccessibleRowHeaders()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -321,7 +321,7 @@ table_wrapper_get_column_header( AtkTable *table,
g_warning( "Exception in getAccessibleColumnHeaders()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -341,7 +341,7 @@ table_wrapper_get_summary( AtkTable *table )
g_warning( "Exception in getAccessibleSummary()" );
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -366,7 +366,7 @@ static gint
table_wrapper_get_selected_columns( AtkTable *table,
gint **pSelected )
{
- *pSelected = NULL;
+ *pSelected = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTable> pTable
= getTable( table );
@@ -386,7 +386,7 @@ static gint
table_wrapper_get_selected_rows( AtkTable *table,
gint **pSelected )
{
- *pSelected = NULL;
+ *pSelected = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTable> pTable
= getTable( table );
@@ -543,7 +543,7 @@ table_wrapper_set_summary( AtkTable *, AtkObject * )
void
tableIfaceInit (AtkTableIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->ref_at = table_wrapper_ref_at;
iface->get_n_rows = table_wrapper_get_n_rows;
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 7ae5ff4b3ffc..28f2306fadf6 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -121,7 +121,7 @@ adjust_boundaries( css::uno::Reference<css::accessibility::XAccessibleText> cons
break;
default:
- return NULL;
+ return nullptr;
}
}
@@ -216,7 +216,7 @@ text_wrapper_get_text (AtkText *text,
gint start_offset,
gint end_offset)
{
- gchar * ret = NULL;
+ gchar * ret = nullptr;
g_return_val_if_fail( (end_offset == -1) || (end_offset >= start_offset), NULL );
@@ -225,7 +225,7 @@ text_wrapper_get_text (AtkText *text,
* fool libatk-bridge.so here ..
*/
void * pData = g_object_get_data( G_OBJECT(text), "ooo::text_changed::delete" );
- if( pData != NULL )
+ if( pData != nullptr )
{
accessibility::TextSegment * pTextSegment =
static_cast <accessibility::TextSegment *> (pData);
@@ -281,7 +281,7 @@ text_wrapper_get_text_after_offset (AtkText *text,
g_warning( "Exception in get_text_after_offset()" );
}
- return NULL;
+ return nullptr;
}
static gchar *
@@ -324,7 +324,7 @@ text_wrapper_get_text_at_offset (AtkText *text,
g_warning( "Exception in get_text_at_offset()" );
}
- return NULL;
+ return nullptr;
}
static gunichar
@@ -366,7 +366,7 @@ text_wrapper_get_text_before_offset (AtkText *text,
g_warning( "Exception in text_before_offset()" );
}
- return NULL;
+ return nullptr;
}
static gint
@@ -487,7 +487,7 @@ text_wrapper_get_run_attributes( AtkText *text,
gint *start_offset,
gint *end_offset)
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try {
bool bOffsetsAreValid = false;
@@ -559,7 +559,7 @@ text_wrapper_get_run_attributes( AtkText *text,
if( pSet )
{
atk_attribute_set_free( pSet );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -571,7 +571,7 @@ text_wrapper_get_run_attributes( AtkText *text,
static AtkAttributeSet *
text_wrapper_get_default_attributes( AtkText *text )
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try {
css::uno::Reference<css::accessibility::XAccessibleTextAttributes>
@@ -591,7 +591,7 @@ text_wrapper_get_default_attributes( AtkText *text )
if( pSet )
{
atk_attribute_set_free( pSet );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -732,7 +732,7 @@ text_wrapper_get_selection (AtkText *text,
g_warning( "Exception in getSelectionEnd(), getSelectionStart() or getSelectedText()" );
}
- return NULL;
+ return nullptr;
}
static gboolean
@@ -801,7 +801,7 @@ text_wrapper_set_selection (AtkText *text,
void
textIfaceInit (AtkTextIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_text = text_wrapper_get_text;
iface->get_character_at_offset = text_wrapper_get_character_at_offset;
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index cff769c25941..37df30f099e2 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -154,7 +154,7 @@ get_value( const uno::Sequence< beans::PropertyValue >& rAttributeList,
if( nIndex != -1 )
return func(rAttributeList[nIndex].Value);
- return NULL;
+ return nullptr;
}
#define get_bool_value( list, index ) get_value( list, index, Bool2String )
@@ -278,7 +278,7 @@ get_color_value(const uno::Sequence< beans::PropertyValue >& rAttributeList,
return g_strdup_printf( "%u,%u,%u", red, green, blue );
}
- return NULL;
+ return nullptr;
}
static bool
@@ -299,7 +299,7 @@ String2Color( uno::Any& rAny, const gchar * value )
static gchar*
FontSlant2Style(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<awt::FontSlant>() )
{
@@ -330,7 +330,7 @@ FontSlant2Style(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -380,7 +380,7 @@ String2Weight( uno::Any& rAny, const gchar * value )
static gchar*
Adjust2Justification(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<short>() )
{
@@ -408,7 +408,7 @@ Adjust2Justification(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -437,7 +437,7 @@ const gchar * font_strikethrough[] = {
"none", // FontStrikeout::NONE
"single", // FontStrikeout::SINGLE
"double", // FontStrikeout::DOUBLE
- NULL, // FontStrikeout::DONTKNOW
+ nullptr, // FontStrikeout::DONTKNOW
"bold", // FontStrikeout::BOLD
"with /", // FontStrikeout::SLASH
"with X" // FontStrikeout::X
@@ -453,7 +453,7 @@ Strikeout2String(const uno::Any& rAny)
if( n >= 0 && n < n_strikeout_constants )
return g_strdup( font_strikethrough[n] );
- return NULL;
+ return nullptr;
}
static bool
@@ -461,7 +461,7 @@ String2Strikeout( uno::Any& rAny, const gchar * value )
{
for( sal_Int16 n=0; n < n_strikeout_constants; ++n )
{
- if( ( NULL != font_strikethrough[n] ) &&
+ if( ( nullptr != font_strikethrough[n] ) &&
0 == strncmp( value, font_strikethrough[n], strlen( font_strikethrough[n] ) ) )
{
rAny = uno::makeAny( n );
@@ -477,7 +477,7 @@ String2Strikeout( uno::Any& rAny, const gchar * value )
static gchar*
Underline2String(const uno::Any& rAny)
{
- const gchar * value = NULL;
+ const gchar * value = nullptr;
switch( rAny.get<sal_Int16>() )
{
@@ -500,7 +500,7 @@ Underline2String(const uno::Any& rAny)
if( value )
return g_strdup( value );
- return NULL;
+ return nullptr;
}
static bool
@@ -531,7 +531,7 @@ GetString(const uno::Any& rAny)
if( !aFontName.isEmpty() )
return g_strdup( aFontName.getStr() );
- return NULL;
+ return nullptr;
}
static bool
@@ -713,14 +713,14 @@ String2Locale( uno::Any& rAny, const gchar * value )
bool ret = false;
gchar ** str_array = g_strsplit_set( value, "-.@", -1 );
- if( str_array[0] != NULL )
+ if( str_array[0] != nullptr )
{
ret = true;
lang::Locale aLocale;
aLocale.Language = OUString::createFromAscii(str_array[0]);
- if( str_array[1] != NULL )
+ if( str_array[1] != nullptr )
{
gchar * country = g_ascii_strup(str_array[1], -1);
aLocale.Country = OUString::createFromAscii(country);
@@ -757,7 +757,7 @@ get_font_effect(const uno::Sequence< beans::PropertyValue >& rAttributeList,
return g_strdup(relief[n]);
}
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -779,12 +779,12 @@ get_text_decoration(const uno::Sequence< beans::PropertyValue >& rAttributeList,
sal_Int32 nBlinkIndex, sal_Int32 nUnderlineIndex,
sal_Int16 nStrikeoutIndex)
{
- gchar * value_list[4] = { NULL, NULL, NULL, NULL };
+ gchar * value_list[4] = { nullptr, nullptr, nullptr, nullptr };
gint count = 0;
// no property value found
if( ( nBlinkIndex == -1 ) && (nUnderlineIndex == -1 ) && (nStrikeoutIndex == -1))
- return NULL;
+ return nullptr;
if( nBlinkIndex != -1 )
{
@@ -848,7 +848,7 @@ WritingMode2Direction( const uno::Any& rAny )
if( 0 <= n && n <= text::WritingMode2::PAGE )
return g_strdup(directions[n]);
- return NULL;
+ return nullptr;
}
// @see http://www.w3.org/TR/2001/WD-css3-text-20010517/#PrimaryTextAdvanceDirection
@@ -862,7 +862,7 @@ WritingMode2String( const uno::Any& rAny )
if( 0 <= n && n <= text::WritingMode2::PAGE )
return g_strdup(writing_modes[n]);
- return NULL;
+ return nullptr;
}
/*****************************************************************************/
@@ -874,7 +874,7 @@ static gchar *
Escapement2VerticalAlign( const uno::Any& rAny )
{
sal_Int16 n = rAny.get<sal_Int16>();
- gchar * ret = NULL;
+ gchar * ret = nullptr;
// Values are in %, 101% means "automatic"
if( n == 0 )
@@ -896,7 +896,7 @@ static gchar *
LineSpacing2LineHeight( const uno::Any& rAny )
{
style::LineSpacing ls;
- gchar * ret = NULL;
+ gchar * ret = nullptr;
if( rAny >>= ls )
{
@@ -916,7 +916,7 @@ static gchar *
TabStopList2String( const uno::Any& rAny, bool default_tabs )
{
uno::Sequence< style::TabStop > theTabStops;
- gchar * ret = NULL;
+ gchar * ret = nullptr;
if( rAny >>= theTabStops)
{
@@ -1066,7 +1066,7 @@ attribute_set_new_from_property_values(
bool run_attributes_only,
AtkText *text)
{
- AtkAttributeSet* attribute_set = NULL;
+ AtkAttributeSet* attribute_set = nullptr;
sal_Int32 aIndexList[TEXT_ATTRIBUTE_LAST] = { -1 };
@@ -1077,10 +1077,10 @@ attribute_set_new_from_property_values(
find_exported_attributes(aIndexList, rAttributeList);
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_BG_COLOR,
- get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_BACKGROUND_COLOR, run_attributes_only ? NULL : text ) );
+ get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_BACKGROUND_COLOR, run_attributes_only ? nullptr : text ) );
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_FG_COLOR,
- get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_FOREGROUND_COLOR, run_attributes_only ? NULL : text) );
+ get_color_value(rAttributeList, aIndexList, TEXT_ATTRIBUTE_FOREGROUND_COLOR, run_attributes_only ? nullptr : text) );
attribute_set = attribute_set_prepend(attribute_set, ATK_TEXT_ATTR_INVISIBLE,
get_bool_value(rAttributeList, aIndexList[TEXT_ATTRIBUTE_HIDDEN]));
@@ -1214,7 +1214,7 @@ AtkAttributeSet*
attribute_set_new_from_extended_attributes(
const css::uno::Reference< css::accessibility::XAccessibleExtendedAttributes >& rExtendedAttributes )
{
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
// extended attributes is a string of colon-separated pairs of property and value,
// with pairs separated by semicolons. Example: "heading-level:2;weight:bold;"
@@ -1348,7 +1348,7 @@ attribute_set_map_to_property_values(
uno::Sequence< beans::PropertyValue > aAttributeList (g_TextAttrMapSize);
sal_Int32 nIndex = 0;
- for( GSList * item = attribute_set; item != NULL; item = g_slist_next( item ) )
+ for( GSList * item = attribute_set; item != nullptr; item = g_slist_next( item ) )
{
AtkAttribute* attribute = reinterpret_cast<AtkAttribute *>(item);
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 5108fe04e250..1cb92cdc094a 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -72,7 +72,7 @@ atk_wrapper_focus_idle_handler (gpointer data)
uno::Reference< accessibility::XAccessible > xAccessible = theNextFocusObject::get();
if( xAccessible.get() == static_cast < accessibility::XAccessible * > (data) )
{
- AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : NULL;
+ AtkObject *atk_obj = xAccessible.is() ? atk_object_wrapper_ref( xAccessible ) : nullptr;
// Gail does not notify focus changes to NULL, so do we ..
if( atk_obj )
{
@@ -654,7 +654,7 @@ void WindowEventHandler(void *, VclSimpleEvent& rEvent)
}
}
-static Link<VclSimpleEvent&,void> g_aEventListenerLink( NULL, WindowEventHandler );
+static Link<VclSimpleEvent&,void> g_aEventListenerLink( nullptr, WindowEventHandler );
/*****************************************************************************/
@@ -732,11 +732,11 @@ ooo_atk_util_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(ooo_atk_util_class_init),
nullptr,
- NULL,
+ nullptr,
static_cast<guint16>(type_query.instance_size),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (parent_type, "OOoUtil", &typeInfo, (GTypeFlags)0) ;
diff --git a/vcl/unx/gtk/a11y/atkvalue.cxx b/vcl/unx/gtk/a11y/atkvalue.cxx
index 1fa6d3bfc099..5e4b943886a3 100644
--- a/vcl/unx/gtk/a11y/atkvalue.cxx
+++ b/vcl/unx/gtk/a11y/atkvalue.cxx
@@ -128,7 +128,7 @@ value_wrapper_set_current_value( AtkValue *value,
void
valueIfaceInit (AtkValueIface *iface)
{
- g_return_if_fail (iface != NULL);
+ g_return_if_fail (iface != nullptr);
iface->get_current_value = value_wrapper_get_current_value;
iface->get_maximum_value = value_wrapper_get_maximum_value;
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index a55312eaf043..cca3aee51f8e 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -33,8 +33,8 @@ using namespace ::com::sun::star::uno;
extern "C" {
-static void (* window_real_initialize) (AtkObject *obj, gpointer data) = NULL;
-static void (* window_real_finalize) (GObject *obj) = NULL;
+static void (* window_real_initialize) (AtkObject *obj, gpointer data) = nullptr;
+static void (* window_real_finalize) (GObject *obj) = nullptr;
static void
init_from_window( AtkObject *accessible, vcl::Window *pWindow )
@@ -126,7 +126,7 @@ ooo_window_wrapper_clear_focus(gpointer)
{
SolarMutexGuard aGuard;
SAL_WNODEPRECATED_DECLARATIONS_PUSH
- atk_focus_tracker_notify( NULL );
+ atk_focus_tracker_notify( nullptr );
SAL_WNODEPRECATED_DECLARATIONS_POP
return FALSE;
}
@@ -136,7 +136,7 @@ ooo_window_wrapper_clear_focus(gpointer)
static gboolean
ooo_window_wrapper_real_focus_gtk (GtkWidget *, GdkEventFocus *)
{
- g_idle_add( ooo_window_wrapper_clear_focus, NULL );
+ g_idle_add( ooo_window_wrapper_clear_focus, nullptr );
return FALSE;
}
@@ -297,11 +297,11 @@ ooo_window_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(ooo_window_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
static_cast<guint16>(type_query.instance_size),
0,
nullptr,
- NULL
+ nullptr
} ;
type = g_type_register_static (parent_type, "OOoWindowAtkObject", &typeInfo, (GTypeFlags)0) ;
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index ef04c5862b0f..38f5435a1c0e 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -69,7 +69,7 @@
using namespace ::com::sun::star;
-static GObjectClass *parent_class = NULL;
+static GObjectClass *parent_class = nullptr;
static AtkRelationType mapRelationType( sal_Int16 nRelation )
{
@@ -395,7 +395,7 @@ static AtkAttributeSet *
wrapper_get_attributes( AtkObject *atk_obj )
{
AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER( atk_obj );
- AtkAttributeSet *pSet = NULL;
+ AtkAttributeSet *pSet = nullptr;
try
{
@@ -440,7 +440,7 @@ wrapper_ref_child( AtkObject *atk_obj,
gint i )
{
AtkObjectWrapper *obj = ATK_OBJECT_WRAPPER (atk_obj);
- AtkObject* child = NULL;
+ AtkObject* child = nullptr;
// see comments above atk_object_wrapper_remove_child
if( -1 < i && obj->index_of_child_about_to_be_removed == i )
@@ -525,7 +525,7 @@ wrapper_ref_relation_set( AtkObject *atk_obj )
}
catch(const uno::Exception &) {
g_object_unref( G_OBJECT( pSet ) );
- pSet = NULL;
+ pSet = nullptr;
}
}
@@ -621,15 +621,15 @@ static void
atk_object_wrapper_init (AtkObjectWrapper *wrapper,
AtkObjectWrapperClass*)
{
- wrapper->mpAction = NULL;
- wrapper->mpComponent = NULL;
- wrapper->mpEditableText = NULL;
- wrapper->mpHypertext = NULL;
- wrapper->mpImage = NULL;
- wrapper->mpSelection = NULL;
- wrapper->mpTable = NULL;
- wrapper->mpText = NULL;
- wrapper->mpValue = NULL;
+ wrapper->mpAction = nullptr;
+ wrapper->mpComponent = nullptr;
+ wrapper->mpEditableText = nullptr;
+ wrapper->mpHypertext = nullptr;
+ wrapper->mpImage = nullptr;
+ wrapper->mpSelection = nullptr;
+ wrapper->mpTable = nullptr;
+ wrapper->mpText = nullptr;
+ wrapper->mpValue = nullptr;
}
} // extern "C"
@@ -648,11 +648,11 @@ atk_object_wrapper_get_type()
nullptr,
reinterpret_cast<GClassInitFunc>(atk_object_wrapper_class_init),
nullptr,
- NULL,
+ nullptr,
sizeof (AtkObjectWrapper),
0,
reinterpret_cast<GInstanceInitFunc>(atk_object_wrapper_init),
- NULL
+ nullptr
} ;
type = g_type_register_static (ATK_TYPE_OBJECT,
"OOoAtkObj",
@@ -664,14 +664,14 @@ atk_object_wrapper_get_type()
static bool
isOfType( uno::XInterface *pInterface, const uno::Type & rType )
{
- g_return_val_if_fail( pInterface != NULL, false );
+ g_return_val_if_fail( pInterface != nullptr, false );
bool bIs = false;
try {
uno::Any aRet = pInterface->queryInterface( rType );
bIs = ( ( typelib_TypeClass_INTERFACE == aRet.pType->eTypeClass ) &&
- ( aRet.pReserved != NULL ) );
+ ( aRet.pReserved != nullptr ) );
} catch( const uno::Exception &) { }
return bIs;
@@ -759,9 +759,9 @@ ensureTypeFor( uno::XInterface *pAccessible )
{
GTypeInfo aTypeInfo = {
sizeof( AtkObjectWrapperClass ),
- NULL, NULL, NULL, NULL, NULL,
+ nullptr, nullptr, nullptr, nullptr, nullptr,
sizeof( AtkObjectWrapper ),
- 0, NULL, NULL
+ 0, nullptr, nullptr
} ;
nType = g_type_register_static( ATK_TYPE_OBJECT_WRAPPER,
aTypeName.getStr(), &aTypeInfo,
@@ -770,7 +770,7 @@ ensureTypeFor( uno::XInterface *pAccessible )
for( int j = 0; j < aTypeTableSize; j++ )
if( bTypes[j] )
{
- GInterfaceInfo aIfaceInfo = { NULL, NULL, NULL };
+ GInterfaceInfo aIfaceInfo = { nullptr, nullptr, nullptr };
aIfaceInfo.interface_init = aTypeTable[j].aInit;
g_type_add_interface_static (nType, aTypeTable[j].aGetGIfaceType(),
&aIfaceInfo);
@@ -782,7 +782,7 @@ ensureTypeFor( uno::XInterface *pAccessible )
AtkObject *
atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAccessible, bool create )
{
- g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
AtkObject *obj = ooo_wrapper_registry_get(rxAccessible);
if( obj )
@@ -794,30 +794,30 @@ atk_object_wrapper_ref( const uno::Reference< accessibility::XAccessible > &rxAc
if( create )
return atk_object_wrapper_new( rxAccessible );
- return NULL;
+ return nullptr;
}
AtkObject *
atk_object_wrapper_new( const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
AtkObject* parent )
{
- g_return_val_if_fail( rxAccessible.get() != NULL, NULL );
+ g_return_val_if_fail( rxAccessible.get() != nullptr, NULL );
- AtkObjectWrapper *pWrap = NULL;
+ AtkObjectWrapper *pWrap = nullptr;
try {
uno::Reference< accessibility::XAccessibleContext > xContext(rxAccessible->getAccessibleContext());
- g_return_val_if_fail( xContext.get() != NULL, NULL );
+ g_return_val_if_fail( xContext.get() != nullptr, NULL );
GType nType = ensureTypeFor( xContext.get() );
- gpointer obj = g_object_new( nType, NULL);
+ gpointer obj = g_object_new( nType, nullptr);
pWrap = ATK_OBJECT_WRAPPER( obj );
pWrap->mpAccessible = rxAccessible;
pWrap->index_of_child_about_to_be_removed = -1;
- pWrap->child_about_to_be_removed = NULL;
+ pWrap->child_about_to_be_removed = nullptr;
pWrap->mpContext = xContext;
@@ -860,7 +860,7 @@ atk_object_wrapper_new( const ::com::sun::star::uno::Reference< ::com::sun::star
if( pWrap )
g_object_unref( pWrap );
- return NULL;
+ return nullptr;
}
}
@@ -888,7 +888,7 @@ void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child
g_signal_emit_by_name( ATK_OBJECT( wrapper ), "children_changed::remove", index, child, NULL );
wrapper->index_of_child_about_to_be_removed = -1;
- wrapper->child_about_to_be_removed = NULL;
+ wrapper->child_about_to_be_removed = nullptr;
}
/*****************************************************************************/
diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx
index 5662625a3493..939071316692 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -82,7 +82,7 @@ AtkObject * atk_object_wrapper_ref(
AtkObject * atk_object_wrapper_new(
const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& rxAccessible,
- AtkObject* parent = NULL );
+ AtkObject* parent = nullptr );
void atk_object_wrapper_add_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
void atk_object_wrapper_remove_child(AtkObjectWrapper* wrapper, AtkObject *child, gint index);
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 94d069dba884..5fd4c0ecb5b3 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -80,14 +80,14 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
m_bStartupCompleted( false )
{
for(GdkCursor* & rpCsr : m_aCursors)
- rpCsr = NULL;
+ rpCsr = nullptr;
#if !GTK_CHECK_VERSION(3,0,0)
m_bUseRandRWrapper = false; // use gdk signal instead
Init ();
#endif
// FIXME: unify this with SalInst's filter too ?
- gdk_window_add_filter( NULL, call_filterGdkEvent, this );
+ gdk_window_add_filter( nullptr, call_filterGdkEvent, this );
if ( getenv( "SAL_IGNOREXERRORS" ) )
GetGenericData()->ErrorTrapPush(); // and leak the trap
@@ -114,14 +114,14 @@ GtkSalDisplay::GtkSalDisplay( GdkDisplay* pDisplay ) :
GtkSalDisplay::~GtkSalDisplay()
{
- gdk_window_remove_filter( NULL, call_filterGdkEvent, this );
+ gdk_window_remove_filter( nullptr, call_filterGdkEvent, this );
if( !m_bStartupCompleted )
gdk_notify_startup_complete();
#if !GTK_CHECK_VERSION(3,0,0)
doDestruct();
- pDisp_ = NULL;
+ pDisp_ = nullptr;
#endif
for(GdkCursor* & rpCsr : m_aCursors)
@@ -169,7 +169,7 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
! m_aFrames.empty()
)
{
- SendInternalEvent( m_aFrames.front(), NULL, SALEVENT_SETTINGSCHANGED );
+ SendInternalEvent( m_aFrames.front(), nullptr, SALEVENT_SETTINGSCHANGED );
}
// let's see if one of our frames wants to swallow these events
// get the frame
@@ -220,7 +220,7 @@ GtkSalDisplay::initScreen( SalX11Screen nXScreen ) const
// choose visual for screen
ScreenData *pSD;
if (!(pSD = SalDisplay::initScreen( nXScreen )))
- return NULL;
+ return nullptr;
// now set a gdk default colormap matching the chosen visual to the screen
GdkScreen* pScreen = gdk_display_get_screen( m_pGdkDisplay, nXScreen.getXScreen() );
@@ -363,7 +363,7 @@ GdkCursor *GtkSalDisplay::getCursor( PointerStyle ePointerStyle )
{
if ( !m_aCursors[ ePointerStyle ] )
{
- GdkCursor *pCursor = NULL;
+ GdkCursor *pCursor = nullptr;
switch( ePointerStyle )
{
@@ -499,7 +499,7 @@ int GtkSalDisplay::CaptureMouse( SalFrame* pSFrame )
{
if( m_pCapture )
static_cast<GtkSalFrame*>(m_pCapture)->grabPointer( FALSE );
- m_pCapture = NULL;
+ m_pCapture = nullptr;
return 0;
}
@@ -527,13 +527,13 @@ GtkData::GtkData( SalInstance *pInstance )
#endif
, blockIdleTimeout( false )
{
- m_pUserEvent = NULL;
+ m_pUserEvent = nullptr;
m_aDispatchMutex = osl_createMutex();
m_aDispatchCondition = osl_createCondition();
}
#if defined(GDK_WINDOWING_X11)
-XIOErrorHandler aOrigXIOErrorHandler = NULL;
+XIOErrorHandler aOrigXIOErrorHandler = nullptr;
extern "C" {
@@ -562,7 +562,7 @@ GtkData::~GtkData()
{
g_source_destroy (m_pUserEvent);
g_source_unref (m_pUserEvent);
- m_pUserEvent = NULL;
+ m_pUserEvent = nullptr;
}
osl_destroyCondition( m_aDispatchCondition );
osl_releaseMutex( m_aDispatchMutex );
@@ -605,7 +605,7 @@ void GtkData::Yield( bool bWait, bool bHandleAllCurrentEvents )
gboolean wasOneEvent = TRUE;
while( nMaxEvents-- && wasOneEvent )
{
- wasOneEvent = g_main_context_iteration( NULL, bWait && !bWasEvent );
+ wasOneEvent = g_main_context_iteration( nullptr, bWait && !bWasEvent );
if( wasOneEvent )
bWasEvent = true;
}
@@ -650,7 +650,7 @@ void GtkData::Init()
* o default display
*/
- GdkDisplay *pGdkDisp = NULL;
+ GdkDisplay *pGdkDisp = nullptr;
// is there a -display command line parameter?
rtl_TextEncoding aEnc = osl_getThreadTextEncoding();
@@ -881,7 +881,7 @@ extern "C" {
sal_gtk_timeout_prepare,
sal_gtk_timeout_check,
sal_gtk_timeout_dispatch,
- NULL, NULL, NULL
+ nullptr, nullptr, nullptr
};
}
@@ -898,7 +898,7 @@ create_sal_gtk_timeout( GtkSalTimer *pTimer )
g_source_set_can_recurse( pSource, TRUE );
g_source_set_callback( pSource,
/* unused dummy */ g_idle_remove_by_data,
- NULL, NULL );
+ nullptr, nullptr );
g_source_attach( pSource, g_main_context_default() );
sal_gtk_timeout_defer( pTSource );
@@ -907,7 +907,7 @@ create_sal_gtk_timeout( GtkSalTimer *pTimer )
}
GtkSalTimer::GtkSalTimer()
- : m_pTimeout(NULL)
+ : m_pTimeout(nullptr)
, m_nTimeoutMS(0)
{
}
@@ -943,7 +943,7 @@ void GtkSalTimer::Stop()
{
g_source_destroy( &m_pTimeout->aParent );
g_source_unref( &m_pTimeout->aParent );
- m_pTimeout = NULL;
+ m_pTimeout = nullptr;
}
}
@@ -964,7 +964,7 @@ gboolean GtkData::userEventFn( gpointer data )
if( pThis->m_pUserEvent )
{
g_source_unref (pThis->m_pUserEvent);
- pThis->m_pUserEvent = NULL;
+ pThis->m_pUserEvent = nullptr;
}
bContinue = FALSE;
}
@@ -991,14 +991,14 @@ extern "C" {
void GtkData::PostUserEvent()
{
if (m_pUserEvent)
- g_main_context_wakeup (NULL); // really needed ?
+ g_main_context_wakeup (nullptr); // really needed ?
else // nothing pending anyway
{
m_pUserEvent = g_idle_source_new();
g_source_set_priority (m_pUserEvent, G_PRIORITY_HIGH);
g_source_set_can_recurse (m_pUserEvent, TRUE);
g_source_set_callback (m_pUserEvent, call_userEventFn,
- static_cast<gpointer>(this), NULL);
+ static_cast<gpointer>(this), nullptr);
g_source_attach (m_pUserEvent, g_main_context_default ());
}
}
@@ -1013,7 +1013,7 @@ void GtkSalDisplay::deregisterFrame( SalFrame* pFrame )
if( m_pCapture == pFrame )
{
static_cast<GtkSalFrame*>(m_pCapture)->grabPointer( FALSE );
- m_pCapture = NULL;
+ m_pCapture = nullptr;
}
SalGenericDisplay::deregisterFrame( pFrame );
}
diff --git a/vcl/unx/gtk/app/gtkinst.cxx b/vcl/unx/gtk/app/gtkinst.cxx
index 6243c92833fc..eeb75de2c902 100644
--- a/vcl/unx/gtk/app/gtkinst.cxx
+++ b/vcl/unx/gtk/app/gtkinst.cxx
@@ -68,7 +68,7 @@ extern "C"
( gtk_major_version == 2 && gtk_minor_version < 4 ) )
{
g_warning("require a newer gtk than %d.%d for gdk_threads_set_lock_functions", (int) gtk_major_version, gtk_minor_version);
- return NULL;
+ return nullptr;
}
/* #i92121# workaround deadlocks in the X11 implementation
@@ -85,14 +85,14 @@ extern "C"
if (gtk_minor_version < 14)
{
g_warning("require a newer gtk than 3.%d for theme expectations", gtk_minor_version);
- return NULL;
+ return nullptr;
}
const gchar* pVersion = gtk_check_version( 3, 2, 0 );
if( pVersion )
{
SAL_WARN("vcl.gtk", "gtk version conflict: " << pVersion);
- return NULL;
+ return nullptr;
}
#endif
@@ -100,7 +100,7 @@ extern "C"
// init gdk thread protection
if ( !g_thread_supported() )
- g_thread_init( NULL );
+ g_thread_init( nullptr );
gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
SAL_INFO("vcl.gtk", "Hooked gdk threads locks");
@@ -245,7 +245,7 @@ void GtkInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUStri
//Convert back to system locale encoding
OString sSystemUrl = OUStringToOString(sDecodedUri, aSystemEnc);
//Encode to an escaped ASCII-encoded URI
- gchar *g_uri = g_filename_to_uri(sSystemUrl.getStr(), NULL, NULL);
+ gchar *g_uri = g_filename_to_uri(sSystemUrl.getStr(), nullptr, nullptr);
sGtkURL = OString(g_uri);
g_free(g_uri);
}
@@ -372,9 +372,9 @@ void GtkInstance::DestroyMenuItem( SalMenuItem* pItem )
#else // not ENABLE_GMENU_INTEGRATION
-SalMenu* GtkInstance::CreateMenu( bool, Menu* ) { return NULL; }
+SalMenu* GtkInstance::CreateMenu( bool, Menu* ) { return nullptr; }
void GtkInstance::DestroyMenu( SalMenu* ) {}
-SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return NULL; }
+SalMenuItem* GtkInstance::CreateMenuItem( const SalItemParams* ) { return nullptr; }
void GtkInstance::DestroyMenuItem( SalMenuItem* ) {}
#endif
@@ -431,7 +431,7 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
bool bRet = false;
std::stack<GdkEvent*> aEvents;
- GdkEvent *pEvent = NULL;
+ GdkEvent *pEvent = nullptr;
while ((pEvent = gdk_event_get()))
{
aEvents.push(pEvent);
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index b43ac634b376..8d79c98cbe70 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -25,7 +25,7 @@
GtkSalSystem *GtkSalSystem::GetSingleton()
{
- static GtkSalSystem *pSingleton = NULL;
+ static GtkSalSystem *pSingleton = nullptr;
if (!pSingleton)
pSingleton = new GtkSalSystem();
return pSingleton;
@@ -130,7 +130,7 @@ GtkSalSystem::getXScreenFromDisplayScreen(unsigned int nScreen)
GdkScreen *
GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
{
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
for (ScreenMonitors_t::const_iterator aIt(maScreenMonitors.begin()), aEnd(maScreenMonitors.end()); aIt != aEnd; ++aIt)
{
pScreen = aIt->first;
@@ -145,7 +145,7 @@ GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
// handle invalid monitor indexes as non-existent screens
if (nMonitor < 0 || (pScreen && nMonitor >= gdk_screen_get_n_monitors (pScreen)))
- pScreen = NULL;
+ pScreen = nullptr;
return pScreen;
}
@@ -205,14 +205,14 @@ static int _fallback_get_primary_monitor (GdkScreen *pScreen)
static int _get_primary_monitor (GdkScreen *pScreen)
{
- static int (*get_fn) (GdkScreen *) = NULL;
+ static int (*get_fn) (GdkScreen *) = nullptr;
#if GTK_CHECK_VERSION(3,0,0)
get_fn = gdk_screen_get_primary_monitor;
#endif
// Perhaps we have a newer gtk+ with this symbol:
if (!get_fn)
{
- get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(NULL,
+ get_fn = reinterpret_cast<int(*)(GdkScreen*)>(osl_getAsciiFunctionSymbol(nullptr,
"gdk_screen_get_primary_monitor"));
}
if (!get_fn)
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 9fce8872780a..79b9b58859a2 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -79,15 +79,15 @@ void SalGtkFilePicker::InitialMapping()
SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext >& xContext ) :
SalGtkPicker( xContext ),
SalGtkFilePicker_Base( m_rbHelperMtx ),
- m_pFilterList( NULL ),
- m_pVBox ( NULL ),
+ m_pFilterList( nullptr ),
+ m_pVBox ( nullptr ),
mnHID_FolderChange( 0 ),
mnHID_SelectionChange( 0 ),
bVersionWidthUnset( false ),
mbPreviewState( false ),
mHID_Preview( 0 ),
- m_pPreview( NULL ),
- m_pPseudoFilter( NULL ),
+ m_pPreview( nullptr ),
+ m_pPseudoFilter( nullptr ),
m_PreviewImageWidth( 256 ),
m_PreviewImageHeight( 256 )
{
@@ -95,22 +95,22 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
for( i = 0; i < TOGGLE_LAST; i++ )
{
- m_pToggles[i] = NULL;
+ m_pToggles[i] = nullptr;
mbToggleVisibility[i] = false;
}
for( i = 0; i < BUTTON_LAST; i++ )
{
- m_pButtons[i] = NULL;
+ m_pButtons[i] = nullptr;
mbButtonVisibility[i] = false;
}
for( i = 0; i < LIST_LAST; i++ )
{
- m_pHBoxs[i] = NULL;
- m_pAligns[i] = NULL;
- m_pLists[i] = NULL;
- m_pListLabels[i] = NULL;
+ m_pHBoxs[i] = nullptr;
+ m_pAligns[i] = nullptr;
+ m_pLists[i] = nullptr;
+ m_pListLabels[i] = nullptr;
mbListVisibility[i] = false;
}
@@ -118,7 +118,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
m_pDialog = gtk_file_chooser_dialog_new(
OUStringToOString( aFilePickerTitle, RTL_TEXTENCODING_UTF8 ).getStr(),
- NULL,
+ nullptr,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@@ -219,7 +219,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_box_pack_end( GTK_BOX( m_pVBox ), m_pFilterExpander, false, true, 0 );
- GtkWidget *scrolled_window = gtk_scrolled_window_new (NULL, NULL);
+ GtkWidget *scrolled_window = gtk_scrolled_window_new (nullptr, nullptr);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window),
@@ -266,11 +266,11 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext
gtk_widget_show( m_pVBox );
- PangoLayout *layout = gtk_widget_create_pango_layout (m_pFilterView, NULL);
+ PangoLayout *layout = gtk_widget_create_pango_layout (m_pFilterView, nullptr);
guint ypad;
PangoRectangle row_height;
pango_layout_set_markup (layout, "All Files", -1);
- pango_layout_get_pixel_extents (layout, NULL, &row_height);
+ pango_layout_get_pixel_extents (layout, nullptr, &row_height);
g_object_unref (layout);
g_object_get (cell, "ypad", &ypad, nullptr);
@@ -538,7 +538,7 @@ void SAL_CALL SalGtkFilePicker::appendFilter( const OUString& aTitle, const OUSt
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
if( FilterNameExists( aTitle ) )
throw IllegalArgumentException();
@@ -555,7 +555,7 @@ void SAL_CALL SalGtkFilePicker::setCurrentFilter( const OUString& aTitle )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "Setting current filter to %s\n",
OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -617,7 +617,7 @@ OUString SAL_CALL SalGtkFilePicker::getCurrentFilter() throw( uno::RuntimeExcept
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "GetCURRENTfilter" );
@@ -636,7 +636,7 @@ void SAL_CALL SalGtkFilePicker::appendFilterGroup( const OUString& /*sGroupTitle
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->appendFilterGroup( sGroupTitle, aFilters );
// check the names
@@ -665,7 +665,7 @@ void SAL_CALL SalGtkFilePicker::setMultiSelectionMode( sal_Bool bMode ) throw( u
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gtk_file_chooser_set_select_multiple( GTK_FILE_CHOOSER(m_pDialog), bMode );
}
@@ -675,7 +675,7 @@ void SAL_CALL SalGtkFilePicker::setDefaultName( const OUString& aName )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aStr = OUStringToOString( aName, RTL_TEXTENCODING_UTF8 );
GtkFileChooserAction eAction = gtk_file_chooser_get_action( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -737,7 +737,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GSList* pPathList = gtk_file_chooser_get_uris( GTK_FILE_CHOOSER(m_pDialog) );
@@ -768,7 +768,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
GtkTreeModel *model;
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
- gchar *title = NULL;
+ gchar *title = nullptr;
gtk_tree_model_get (model, &iter, 2, &title, -1);
if (title)
sFilterName = OUString( title, strlen( title ), RTL_TEXTENCODING_UTF8 );
@@ -817,7 +817,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
GtkFileFilter *filter = gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_pDialog));
if (m_pPseudoFilter != filter)
{
- const gchar* filtername = filter ? gtk_file_filter_get_name(filter) : NULL;
+ const gchar* filtername = filter ? gtk_file_filter_get_name(filter) : nullptr;
if (filtername)
sFilterName = OUString(filtername, strlen( filtername ), RTL_TEXTENCODING_UTF8);
else
@@ -898,7 +898,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
SolarMutexGuard g;
OSL_TRACE( "1: HERE WE ARE");
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
sal_Int16 retVal = 0;
@@ -941,7 +941,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
if( aPathSeq.getLength() == 1 )
{
OString sFileName = unicodetouri( aPathSeq[0] );
- gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), NULL, NULL );
+ gchar *gFileName = g_filename_from_uri ( sFileName.getStr(), nullptr, nullptr );
if( g_file_test( gFileName, G_FILE_TEST_IS_REGULAR ) )
{
INetURLObject aFileObj( OStringToOUString(sFileName, RTL_TEXTENCODING_UTF8) );
@@ -970,7 +970,7 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException, std
baseName
);
- GtkWidget *dlg = gtk_message_dialog_new( NULL,
+ GtkWidget *dlg = gtk_message_dialog_new( nullptr,
GTK_DIALOG_MODAL,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
@@ -1063,7 +1063,7 @@ GtkWidget *SalGtkFilePicker::getWidget( sal_Int16 nControlId, GType *pType )
{
OSL_TRACE("control id is %d", nControlId);
GType tType = GTK_TYPE_TOGGLE_BUTTON; //prevent waring by initializing
- GtkWidget *pWidget = 0;
+ GtkWidget *pWidget = nullptr;
#define MAP_TOGGLE( elem ) \
case ExtendedFilePickerElementIds::CHECKBOX_##elem: \
@@ -1167,7 +1167,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
GtkTreeIter aIter;
GtkListStore *pStore = GTK_LIST_STORE(
gtk_combo_box_get_model(GTK_COMBO_BOX(pWidget)));
- if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pStore), &aIter, NULL, nPos))
+ if(gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(pStore), &aIter, nullptr, nPos))
gtk_list_store_remove(pStore, &aIter);
}
break;
@@ -1194,7 +1194,7 @@ void SalGtkFilePicker::HandleSetListValue(GtkComboBox *pWidget, sal_Int16 nContr
//I think its best to make it insensitive unless there is the chance to
//actually select something from the list.
gint nItems = gtk_tree_model_iter_n_children(
- gtk_combo_box_get_model(pWidget), NULL);
+ gtk_combo_box_get_model(pWidget), nullptr);
gtk_widget_set_sensitive(GTK_WIDGET(pWidget), nItems > 1);
}
@@ -1212,7 +1212,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC
if (gtk_tree_model_get_iter_first(pTree, &iter))
{
sal_Int32 nSize = gtk_tree_model_iter_n_children(
- pTree, NULL);
+ pTree, nullptr);
aItemList.realloc(nSize);
for (sal_Int32 i=0; i < nSize; ++i)
@@ -1260,7 +1260,7 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nContr
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OSL_TRACE( "SETTING VALUE %d", nControlAction );
GType tType;
@@ -1288,7 +1288,7 @@ uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nC
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
uno::Any aRetval;
@@ -1313,7 +1313,7 @@ throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GtkWidget *pWidget;
@@ -1339,7 +1339,7 @@ void SAL_CALL SalGtkFilePicker::setLabel( sal_Int16 nControlId, const OUString&
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GType tType;
GtkWidget *pWidget;
@@ -1376,7 +1376,7 @@ OUString SAL_CALL SalGtkFilePicker::getLabel( sal_Int16 nControlId )
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
GType tType;
OString aTxt;
@@ -1398,7 +1398,7 @@ uno::Sequence<sal_Int16> SAL_CALL SalGtkFilePicker::getSupportedImageFormats() t
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->getSupportedImageFormats();
return uno::Sequence<sal_Int16>();
@@ -1408,7 +1408,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getTargetColorDepth() throw( uno::RuntimeEx
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->getTargetColorDepth();
return 0;
@@ -1418,7 +1418,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableWidth() throw( uno::RuntimeExce
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return m_PreviewImageWidth;
}
@@ -1427,7 +1427,7 @@ sal_Int32 SAL_CALL SalGtkFilePicker::getAvailableHeight() throw( uno::RuntimeExc
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return m_PreviewImageHeight;
}
@@ -1437,7 +1437,7 @@ void SAL_CALL SalGtkFilePicker::setImage( sal_Int16 /*aImageFormat*/, const uno:
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->setImage( aImageFormat, aImage );
}
@@ -1517,9 +1517,9 @@ void SalGtkFilePicker::update_preview_cb( GtkFileChooser *file_chooser, SalGtkFi
pixbuf = gdk_pixbuf_new_from_file_at_size(
filename,
pobjFP->m_PreviewImageWidth,
- pobjFP->m_PreviewImageHeight, NULL );
+ pobjFP->m_PreviewImageHeight, nullptr );
- have_preview = ( pixbuf != NULL );
+ have_preview = ( pixbuf != nullptr );
gtk_image_set_from_pixbuf( GTK_IMAGE( preview ), pixbuf );
if( pixbuf )
@@ -1537,7 +1537,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::setShowState( sal_Bool bShowState ) throw( u
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO return m_pImpl->setShowState( bShowState );
if( bool(bShowState) != mbPreviewState )
@@ -1571,7 +1571,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::getShowState() throw( uno::RuntimeException,
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
return mbPreviewState;
}
@@ -1745,7 +1745,7 @@ void SAL_CALL SalGtkFilePicker::cancel() throw( uno::RuntimeException, std::exce
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->cancel();
}
@@ -1784,8 +1784,8 @@ case_insensitive_filter (const GtkFileFilterInfo *filter_info, gpointer data)
gboolean bRetval = false;
const char *pFilter = static_cast<const char *>(data);
- g_return_val_if_fail( data != NULL, false );
- g_return_val_if_fail( filter_info != NULL, false );
+ g_return_val_if_fail( data != nullptr, false );
+ g_return_val_if_fail( filter_info != nullptr, false );
if( !filter_info->uri )
return false;
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
index 25b39e09f079..c825439f1b55 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx
@@ -236,7 +236,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base
sal_Int32 m_PreviewImageWidth;
sal_Int32 m_PreviewImageHeight;
- GtkWidget *getWidget( sal_Int16 nControlId, GType *pType = NULL);
+ GtkWidget *getWidget( sal_Int16 nControlId, GType *pType = nullptr);
void SetCurFilter( const OUString& rFilter );
void SetFilters();
diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
index 78682cb738aa..49ab71d25388 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx
@@ -53,7 +53,7 @@ SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentCon
{
m_pDialog = gtk_file_chooser_dialog_new(
OUStringToOString( getResString( FOLDERPICKER_TITLE ), RTL_TEXTENCODING_UTF8 ).getStr(),
- NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ nullptr, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, nullptr );
gtk_dialog_set_default_response( GTK_DIALOG (m_pDialog), GTK_RESPONSE_ACCEPT );
@@ -68,7 +68,7 @@ void SAL_CALL SalGtkFolderPicker::setDisplayDirectory( const OUString& aDirector
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aTxt = unicodetouri( aDirectory );
if( aTxt.isEmpty() ){
@@ -88,7 +88,7 @@ OUString SAL_CALL SalGtkFolderPicker::getDisplayDirectory() throw( uno::RuntimeE
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pCurrentFolder =
gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -102,7 +102,7 @@ OUString SAL_CALL SalGtkFolderPicker::getDirectory() throw( uno::RuntimeExceptio
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pSelectedFolder =
gtk_file_chooser_get_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -123,7 +123,7 @@ void SAL_CALL SalGtkFolderPicker::setTitle( const OUString& aTitle ) throw( uno:
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aWindowTitle = OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 );
@@ -135,7 +135,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException, s
SolarMutexGuard g;
OSL_TRACE( "1: HERE WE ARE");
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
sal_Int16 retVal = 0;
@@ -173,7 +173,7 @@ void SAL_CALL SalGtkFolderPicker::cancel() throw( uno::RuntimeException, std::ex
{
SolarMutexGuard g;
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
// TODO m_pImpl->cancel();
}
diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
index a071bdaee5a6..701cd627c364 100644
--- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx
@@ -56,7 +56,7 @@ OUString SalGtkPicker::uritounicode(const gchar* pIn)
{
// all the URLs are handled by office in UTF-8
// so the Gnome FP related URLs should be converted accordingly
- gchar *pEncodedFileName = g_filename_from_uri(pIn, NULL, NULL);
+ gchar *pEncodedFileName = g_filename_from_uri(pIn, nullptr, nullptr);
if ( pEncodedFileName )
{
OUString sEncoded(pEncodedFileName, strlen(pEncodedFileName),
@@ -107,7 +107,7 @@ extern "C"
GtkWindow* RunDialog::GetTransientFor()
{
- GtkWindow *pParent = NULL;
+ GtkWindow *pParent = nullptr;
vcl::Window * pWindow = ::Application::GetActiveTopWindow();
if( pWindow )
@@ -151,7 +151,7 @@ void SAL_CALL RunDialog::windowOpened(const css::lang::EventObject& e)
}
}
- g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, NULL);
+ g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, nullptr);
}
void SAL_CALL RunDialog::queryTermination( const ::com::sun::star::lang::EventObject& )
@@ -164,7 +164,7 @@ void SAL_CALL RunDialog::notifyTermination( const ::com::sun::star::lang::EventO
{
SolarMutexGuard g;
- g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, NULL);
+ g_timeout_add_full(G_PRIORITY_HIGH_IDLE, 0, reinterpret_cast<GSourceFunc>(canceldialog), this, nullptr);
}
void RunDialog::cancel()
@@ -190,7 +190,7 @@ gint RunDialog::run()
}
SalGtkPicker::SalGtkPicker( const uno::Reference<uno::XComponentContext>& xContext )
- : m_pDialog( 0 ), m_xContext( xContext )
+ : m_pDialog( nullptr ), m_xContext( xContext )
{
}
@@ -207,7 +207,7 @@ SalGtkPicker::~SalGtkPicker()
void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const OUString& aDirectory )
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aTxt = unicodetouri(aDirectory);
if( aTxt.isEmpty() ){
@@ -225,7 +225,7 @@ void SAL_CALL SalGtkPicker::implsetDisplayDirectory( const OUString& aDirectory
OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
gchar* pCurrentFolder =
gtk_file_chooser_get_current_folder_uri( GTK_FILE_CHOOSER( m_pDialog ) );
@@ -237,7 +237,7 @@ OUString SAL_CALL SalGtkPicker::implgetDisplayDirectory() throw( uno::RuntimeExc
void SAL_CALL SalGtkPicker::implsetTitle( const OUString& aTitle ) throw( uno::RuntimeException )
{
- OSL_ASSERT( m_pDialog != NULL );
+ OSL_ASSERT( m_pDialog != nullptr );
OString aWindowTitle = OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 );
diff --git a/vcl/unx/gtk/gdi/gtkprintwrapper.cxx b/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
index 5e610fe1f2e1..e552042478ef 100644
--- a/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
+++ b/vcl/unx/gtk/gdi/gtkprintwrapper.cxx
@@ -21,25 +21,25 @@ namespace unx
#if !GTK_CHECK_VERSION(3,0,0)
GtkPrintWrapper::GtkPrintWrapper()
- : m_page_setup_new(0)
- , m_print_job_new(0)
- , m_print_job_send(0)
- , m_print_job_set_source_file(0)
- , m_print_settings_get(0)
- , m_print_settings_get_collate(0)
- , m_print_settings_set_collate(0)
- , m_print_settings_get_n_copies(0)
- , m_print_settings_set_n_copies(0)
- , m_print_settings_get_page_ranges(0)
- , m_print_settings_set_print_pages(0)
- , m_print_unix_dialog_new(0)
- , m_print_unix_dialog_add_custom_tab(0)
- , m_print_unix_dialog_get_selected_printer(0)
- , m_print_unix_dialog_set_manual_capabilities(0)
- , m_print_unix_dialog_get_settings(0)
- , m_print_unix_dialog_set_settings(0)
- , m_print_unix_dialog_set_support_selection(0)
- , m_print_unix_dialog_set_has_selection(0)
+ : m_page_setup_new(nullptr)
+ , m_print_job_new(nullptr)
+ , m_print_job_send(nullptr)
+ , m_print_job_set_source_file(nullptr)
+ , m_print_settings_get(nullptr)
+ , m_print_settings_get_collate(nullptr)
+ , m_print_settings_set_collate(nullptr)
+ , m_print_settings_get_n_copies(nullptr)
+ , m_print_settings_set_n_copies(nullptr)
+ , m_print_settings_get_page_ranges(nullptr)
+ , m_print_settings_set_print_pages(nullptr)
+ , m_print_unix_dialog_new(nullptr)
+ , m_print_unix_dialog_add_custom_tab(nullptr)
+ , m_print_unix_dialog_get_selected_printer(nullptr)
+ , m_print_unix_dialog_set_manual_capabilities(nullptr)
+ , m_print_unix_dialog_get_settings(nullptr)
+ , m_print_unix_dialog_set_settings(nullptr)
+ , m_print_unix_dialog_set_support_selection(nullptr)
+ , m_print_unix_dialog_set_has_selection(nullptr)
{
impl_load();
}
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index ff520abbdd36..f0bfa7088686 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -133,44 +133,44 @@ struct NWFWidgetData
NWPixmapCache* gCacheTabPages;
NWFWidgetData() :
- gCacheWindow( NULL ),
- gDumbContainer( NULL ),
- gBtnWidget( NULL ),
- gRadioWidget( NULL ),
- gRadioWidgetSibling( NULL ),
- gCheckWidget( NULL ),
- gScrollHorizWidget( NULL ),
- gScrollVertWidget( NULL ),
- gArrowWidget( NULL ),
- gDropdownWidget( NULL ),
- gEditBoxWidget( NULL ),
- gSpinButtonWidget( NULL ),
- gNotebookWidget( NULL ),
- gOptionMenuWidget( NULL ),
- gComboWidget( NULL ),
- gScrolledWindowWidget( NULL ),
- gToolbarWidget( NULL ),
- gToolbarButtonWidget( NULL ),
- gHandleBoxWidget( NULL ),
- gMenubarWidget( NULL ),
- gMenuItemMenubarWidget( NULL ),
- gMenuWidget( NULL ),
- gMenuItemMenuWidget( NULL ),
- gMenuItemCheckMenuWidget( NULL ),
- gMenuItemRadioMenuWidget( NULL ),
- gMenuItemSeparatorMenuWidget( NULL ),
- gImageMenuItem( NULL ),
- gTooltipPopup( NULL ),
- gProgressBar( NULL ),
- gTreeView( NULL ),
- gHScale( NULL ),
- gVScale( NULL ),
- gSeparator( NULL ),
- gDialog( NULL ),
- gFrame( NULL ),
- gNWPixmapCacheList( NULL ),
- gCacheTabItems( NULL ),
- gCacheTabPages( NULL )
+ gCacheWindow( nullptr ),
+ gDumbContainer( nullptr ),
+ gBtnWidget( nullptr ),
+ gRadioWidget( nullptr ),
+ gRadioWidgetSibling( nullptr ),
+ gCheckWidget( nullptr ),
+ gScrollHorizWidget( nullptr ),
+ gScrollVertWidget( nullptr ),
+ gArrowWidget( nullptr ),
+ gDropdownWidget( nullptr ),
+ gEditBoxWidget( nullptr ),
+ gSpinButtonWidget( nullptr ),
+ gNotebookWidget( nullptr ),
+ gOptionMenuWidget( nullptr ),
+ gComboWidget( nullptr ),
+ gScrolledWindowWidget( nullptr ),
+ gToolbarWidget( nullptr ),
+ gToolbarButtonWidget( nullptr ),
+ gHandleBoxWidget( nullptr ),
+ gMenubarWidget( nullptr ),
+ gMenuItemMenubarWidget( nullptr ),
+ gMenuWidget( nullptr ),
+ gMenuItemMenuWidget( nullptr ),
+ gMenuItemCheckMenuWidget( nullptr ),
+ gMenuItemRadioMenuWidget( nullptr ),
+ gMenuItemSeparatorMenuWidget( nullptr ),
+ gImageMenuItem( nullptr ),
+ gTooltipPopup( nullptr ),
+ gProgressBar( nullptr ),
+ gTreeView( nullptr ),
+ gHScale( nullptr ),
+ gVScale( nullptr ),
+ gSeparator( nullptr ),
+ gDialog( nullptr ),
+ gFrame( nullptr ),
+ gNWPixmapCacheList( nullptr ),
+ gCacheTabItems( nullptr ),
+ gCacheTabPages( nullptr )
{}
};
@@ -296,7 +296,7 @@ protected:
GdkX11Pixmap::GdkX11Pixmap( int nWidth, int nHeight, int nDepth )
: X11Pixmap( nWidth, nHeight )
{
- mpGdkPixmap = gdk_pixmap_new( NULL, nWidth, nHeight, nDepth );
+ mpGdkPixmap = gdk_pixmap_new( nullptr, nWidth, nHeight, nDepth );
mnDepth = gdk_drawable_get_depth( GDK_DRAWABLE( mpGdkPixmap ) );
GdkScreen *pScreen = gdk_drawable_get_screen( GDK_DRAWABLE( mpGdkPixmap ) );
@@ -352,9 +352,9 @@ public:
GdkX11Pixmap* m_pixmap;
GdkX11Pixmap* m_mask;
- NWPixmapCacheData() : m_nType(0), m_nState(ControlState::NONE), m_pixmap(0), m_mask(0) {}
+ NWPixmapCacheData() : m_nType(0), m_nState(ControlState::NONE), m_pixmap(nullptr), m_mask(nullptr) {}
~NWPixmapCacheData()
- { SetPixmap( NULL, NULL ); };
+ { SetPixmap( nullptr, nullptr ); };
void SetPixmap( GdkX11Pixmap* pPixmap, GdkX11Pixmap* pMask );
};
@@ -404,7 +404,7 @@ NWPixmapCache::NWPixmapCache( SalX11Screen nScreen )
m_idx = 0;
m_size = 0;
m_screen = nScreen.getXScreen();
- pData = NULL;
+ pData = nullptr;
if( gWidgetData[m_screen].gNWPixmapCacheList )
gWidgetData[m_screen].gNWPixmapCacheList->AddCache(this);
}
@@ -419,7 +419,7 @@ void NWPixmapCache::ThemeChanged()
// throw away cached pixmaps
int i;
for(i=0; i<m_size; i++)
- pData[i].SetPixmap( NULL, NULL );
+ pData[i].SetPixmap( nullptr, nullptr );
}
bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkX11Pixmap** pPixmap, GdkX11Pixmap** pMask )
@@ -432,7 +432,7 @@ bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectang
pData[i].m_nState == aState &&
pData[i].m_pixmapRect.GetWidth() == r_pixmapRect.GetWidth() &&
pData[i].m_pixmapRect.GetHeight() == r_pixmapRect.GetHeight() &&
- pData[i].m_pixmap != NULL )
+ pData[i].m_pixmap != nullptr )
{
*pPixmap = pData[i].m_pixmap;
*pMask = pData[i].m_mask;
@@ -595,11 +595,11 @@ void GtkData::deInitNWF()
if( gWidgetData[i].gDialog )
gtk_widget_destroy( gWidgetData[i].gDialog );
delete gWidgetData[i].gCacheTabPages;
- gWidgetData[i].gCacheTabPages = NULL;
+ gWidgetData[i].gCacheTabPages = nullptr;
delete gWidgetData[i].gCacheTabItems;
- gWidgetData[i].gCacheTabItems = NULL;
+ gWidgetData[i].gCacheTabItems = nullptr;
delete gWidgetData[i].gNWPixmapCacheList;
- gWidgetData[i].gNWPixmapCacheList = NULL;
+ gWidgetData[i].gNWPixmapCacheList = nullptr;
}
}
@@ -968,7 +968,7 @@ bool GtkSalGraphics::drawNativeControl(ControlType nType, ControlPart nPart,
for( int i = 0; i < nPasses; ++i )
{
assert(gdkDrawable[i] && "rhbz#1050162");
- if( gdkDrawable[i] == 0 )
+ if( gdkDrawable[i] == nullptr )
return false;
returnVal = DoDrawNativeControl(gdkDrawable[i], nType, nPart, aCtrlRect, aClip,
@@ -1411,7 +1411,7 @@ bool GtkSalGraphics::getNativeControlRegion( ControlType nType,
{ \
_nPasses = 1; \
pixmap = NWGetPixmapFromScreen( aRect, BG_FILL ); \
- mask = NULL; \
+ mask = nullptr; \
} \
if( !pixmap || ( bNeedTwoPasses && !mask ) ) \
return false; \
@@ -1504,9 +1504,9 @@ bool GtkSalGraphics::NWPaintGTKFixedLine(
const OUString& )
{
if(nPart == PART_SEPARATOR_HORZ)
- gtk_paint_hline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"hseparator",rControlRectangle.Left(),rControlRectangle.Right(),rControlRectangle.Top());
+ gtk_paint_hline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,nullptr,m_pWindow,"hseparator",rControlRectangle.Left(),rControlRectangle.Right(),rControlRectangle.Top());
else
- gtk_paint_vline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,NULL,m_pWindow,"vseparator",rControlRectangle.Top(),rControlRectangle.Bottom(),rControlRectangle.Left());
+ gtk_paint_vline(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,nullptr,m_pWindow,"vseparator",rControlRectangle.Top(),rControlRectangle.Bottom(),rControlRectangle.Left());
return true;
}
@@ -1955,13 +1955,13 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
{
assert(aValue.getType() == CTRL_SCROLLBAR);
const ScrollbarValue& rScrollbarVal = static_cast<const ScrollbarValue&>(aValue);
- GdkX11Pixmap* pixmap = NULL;
+ GdkX11Pixmap* pixmap = nullptr;
Rectangle pixmapRect, scrollbarRect;
GtkStateType stateType;
GtkShadowType shadowType;
GtkScrollbar * scrollbarWidget;
GtkStyle * style;
- GtkAdjustment* scrollbarValues = NULL;
+ GtkAdjustment* scrollbarValues = nullptr;
GtkOrientation scrollbarOrientation;
Rectangle thumbRect = rScrollbarVal.maThumbRect;
Rectangle button11BoundRect = rScrollbarVal.maButton1Rect; // backward
@@ -1972,7 +1972,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
GtkArrowType button2Type; // forward
gchar * scrollbarTagH = const_cast<gchar *>("hscrollbar");
gchar * scrollbarTagV = const_cast<gchar *>("vscrollbar");
- gchar * scrollbarTag = NULL;
+ gchar * scrollbarTag = nullptr;
Rectangle arrowRect;
gint slider_width = 0;
gint stepper_size = 0;
@@ -2111,7 +2111,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 );
scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) );
- if ( scrollbarValues == NULL )
+ if ( scrollbarValues == nullptr )
scrollbarValues = GTK_ADJUSTMENT( gtk_adjustment_new(0, 0, 0, 0, 0, 0) );
if ( nPart == PART_DRAW_BACKGROUND_HORZ )
{
@@ -2140,7 +2140,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
h = pixmapRect.GetHeight();
GdkDrawable* const &gdkDrawable = pixmap->GetGdkDrawable();
- GdkRectangle* gdkRect = NULL;
+ GdkRectangle* gdkRect = nullptr;
NWConvertVCLStateToGTKState( nState, &stateType, &shadowType );
NWSetWidgetState( GTK_WIDGET(scrollbarWidget), nState, stateType );
@@ -2260,7 +2260,7 @@ bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart,
arrowRect.GetWidth(), arrowRect.GetHeight() );
}
- bool bRet = NWRenderPixmapToScreen( pixmap, NULL, pixmapRect );
+ bool bRet = NWRenderPixmapToScreen( pixmap, nullptr, pixmapRect );
delete pixmap;
return bRet;
@@ -2491,7 +2491,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
Rectangle pixmapRect;
GtkStateType stateType;
GtkShadowType shadowType;
- const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : NULL;
+ const SpinbuttonValue * pSpinVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&aValue) : nullptr;
Rectangle upBtnRect;
ControlPart upBtnPart = PART_BUTTON_UP;
ControlState upBtnState = ControlState::ENABLED;
@@ -2531,7 +2531,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
BEGIN_PIXMAP_RENDER( pixmapRect, gdkPixmap )
{
// First render background
- gtk_paint_flat_box(m_pWindow->style,gdkPixmap,GTK_STATE_NORMAL,GTK_SHADOW_NONE,NULL,m_pWindow,"base",
+ gtk_paint_flat_box(m_pWindow->style,gdkPixmap,GTK_STATE_NORMAL,GTK_SHADOW_NONE,nullptr,m_pWindow,"base",
-pixmapRect.Left(),
-pixmapRect.Top(),
pixmapRect.Right(),
@@ -2551,7 +2551,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
aEditBoxRect.setX( 0 );
aEditBoxRect.setY( 0 );
- NWPaintOneEditBox( m_nXScreen, gdkPixmap, NULL, nType, nPart, aEditBoxRect, nState, aValue, rCaption );
+ NWPaintOneEditBox( m_nXScreen, gdkPixmap, nullptr, nType, nPart, aEditBoxRect, nState, aValue, rCaption );
}
NWSetWidgetState( gWidgetData[m_nXScreen].gSpinButtonWidget, nState, stateType );
@@ -2562,7 +2562,7 @@ bool GtkSalGraphics::NWPaintGTKSpinBox(ControlType nType, ControlPart nPart,
Rectangle shadowRect( upBtnRect );
shadowRect.Union( downBtnRect );
- gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, NULL,
+ gtk_paint_box( gWidgetData[m_nXScreen].gSpinButtonWidget->style, gdkPixmap, GTK_STATE_NORMAL, shadowType, nullptr,
gWidgetData[m_nXScreen].gSpinButtonWidget, "spinbutton",
(shadowRect.Left() - pixmapRect.Left()), (shadowRect.Top() - pixmapRect.Top()),
shadowRect.GetWidth(), shadowRect.GetHeight() );
@@ -2645,7 +2645,7 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
buttonRect = NWGetSpinButtonRect( nScreen, nType, nPart, aAreaRect, nState, aValue, rCaption );
NWSetWidgetState( gWidgetData[nScreen].gSpinButtonWidget, nState, stateType );
- gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ gtk_paint_box( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, shadowType, nullptr, gWidgetData[nScreen].gSpinButtonWidget,
(nPart == PART_BUTTON_UP) ? "spinbutton_up" : "spinbutton_down",
(buttonRect.Left() - aAreaRect.Left()), (buttonRect.Top() - aAreaRect.Top()),
buttonRect.GetWidth(), buttonRect.GetHeight() );
@@ -2659,7 +2659,7 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen,
else
arrowRect.setY( buttonRect.Top() + (buttonRect.GetHeight() - arrowRect.GetHeight()) / 2 - 1);
- gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[nScreen].gSpinButtonWidget,
+ gtk_paint_arrow( gWidgetData[nScreen].gSpinButtonWidget->style, pixmap, stateType, GTK_SHADOW_OUT, nullptr, gWidgetData[nScreen].gSpinButtonWidget,
"spinbutton", (nPart == PART_BUTTON_UP) ? GTK_ARROW_UP : GTK_ARROW_DOWN, true,
(arrowRect.Left() - aAreaRect.Left()), (arrowRect.Top() - aAreaRect.Top()),
arrowRect.GetWidth(), arrowRect.GetHeight() );
@@ -2902,7 +2902,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
break;
case CTRL_TAB_PANE:
- gtk_paint_box_gap( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
+ gtk_paint_box_gap( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, GTK_STATE_NORMAL, GTK_SHADOW_OUT, nullptr, gWidgetData[m_nXScreen].gNotebookWidget,
"notebook", 0, 0, pixmapRect.GetWidth(), pixmapRect.GetHeight(), GTK_POS_TOP, 0, 0 );
break;
@@ -2912,7 +2912,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
// First draw the background
gtk_paint_flat_box(gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, m_pWindow, "base",
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE, nullptr, m_pWindow, "base",
-rControlRectangle.Left(),
-rControlRectangle.Top(),
pixmapRect.GetWidth()+rControlRectangle.Left(),
@@ -2922,7 +2922,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if( nState & ControlState::ROLLOVER )
g_object_set_data(G_OBJECT(gdkPixmap),tabPrelitDataName,reinterpret_cast<gpointer>(TRUE));
- gtk_paint_extension( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, stateType, GTK_SHADOW_OUT, NULL, gWidgetData[m_nXScreen].gNotebookWidget,
+ gtk_paint_extension( gWidgetData[m_nXScreen].gNotebookWidget->style, gdkPixmap, stateType, GTK_SHADOW_OUT, nullptr, gWidgetData[m_nXScreen].gNotebookWidget,
"tab", (tabRect.Left() - pixmapRect.Left()), (tabRect.Top() - pixmapRect.Top()),
tabRect.GetWidth(), tabRect.GetHeight(), GTK_POS_BOTTOM );
@@ -2930,7 +2930,7 @@ bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if ( nState & ControlState::SELECTED )
{
- gtk_paint_flat_box( m_pWindow->style, gdkPixmap, stateType, GTK_SHADOW_NONE, NULL, m_pWindow,
+ gtk_paint_flat_box( m_pWindow->style, gdkPixmap, stateType, GTK_SHADOW_NONE, nullptr, m_pWindow,
"base", 0, (pixmapRect.GetHeight() - 1), pixmapRect.GetWidth(), 1 );
}
break;
@@ -3536,7 +3536,7 @@ bool GtkSalGraphics::NWPaintGTKListNode(
gtk_paint_expander( gWidgetData[m_nXScreen].gTreeView->style,
pixDrawable,
stateType,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gTreeView,
"treeview",
w/2, h/2,
@@ -3568,7 +3568,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
{
// paint background
gtk_paint_flat_box(gWidgetData[m_nXScreen].gProgressBar->style, pixDrawable,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, m_pWindow, "base",
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE, nullptr, m_pWindow, "base",
-rControlRectangle.Left(),-rControlRectangle.Top(),
rControlRectangle.Left()+w,rControlRectangle.Top()+h);
@@ -3576,7 +3576,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
pixDrawable,
GTK_STATE_NORMAL,
GTK_SHADOW_NONE,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"trough",
0, 0, w, h );
@@ -3588,7 +3588,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
gtk_paint_box( gWidgetData[m_nXScreen].gProgressBar->style,
pixDrawable,
GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"bar",
w-nProgressWidth, 0, nProgressWidth, h
@@ -3599,7 +3599,7 @@ bool GtkSalGraphics::NWPaintGTKProgress(
gtk_paint_box( gWidgetData[m_nXScreen].gProgressBar->style,
pixDrawable,
GTK_STATE_PRELIGHT, GTK_SHADOW_OUT,
- NULL,
+ nullptr,
gWidgetData[m_nXScreen].gProgressBar,
"bar",
0, 0, nProgressWidth, h
@@ -3652,7 +3652,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_IN,
- NULL,
+ nullptr,
pWidget,
"trough",
0, (h-slider_width-2*trough_border)/2, w, slider_width + 2*trough_border);
@@ -3661,7 +3661,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_OUT,
- NULL,
+ nullptr,
pWidget,
pDetail,
x, (h-slider_width)/2,
@@ -3674,7 +3674,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_IN,
- NULL,
+ nullptr,
pWidget,
"trough",
(w-slider_width-2*trough_border)/2, 0, slider_width + 2*trough_border, h);
@@ -3683,7 +3683,7 @@ bool GtkSalGraphics::NWPaintGTKSlider(
pixDrawable,
eState,
GTK_SHADOW_OUT,
- NULL,
+ nullptr,
pWidget,
pDetail,
(w-slider_width)/2, y,
@@ -3710,8 +3710,8 @@ static Rectangle NWGetListBoxButtonRect( SalX11Screen nScreen,
const OUString& )
{
Rectangle aPartRect;
- GtkRequisition *pIndicatorSize = NULL;
- GtkBorder *pIndicatorSpacing = NULL;
+ GtkRequisition *pIndicatorSize = nullptr;
+ GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
gint right = 5; // GTK+ default
gint nButtonAreaWidth = 0;
@@ -3773,8 +3773,8 @@ static Rectangle NWGetListBoxIndicatorRect( SalX11Screen nScreen,
const OUString& )
{
Rectangle aIndicatorRect;
- GtkRequisition *pIndicatorSize = NULL;
- GtkBorder *pIndicatorSpacing = NULL;
+ GtkRequisition *pIndicatorSize = nullptr;
+ GtkBorder *pIndicatorSpacing = nullptr;
gint width = 13; // GTK+ default
gint height = 13; // GTK+ default
gint right = 5; // GTK+ default
@@ -3894,7 +3894,7 @@ void printStyleColors( GtkStyle* pStyle )
void GtkSalGraphics::signalSettingsNotify( GObject *pSettings, GParamSpec *pSpec, gpointer )
{
- g_return_if_fail( pSpec != NULL );
+ g_return_if_fail( pSpec != nullptr );
if( !strcmp( pSpec->name, "gtk-fontconfig-timestamp" ) )
GtkSalGraphics::refreshFontconfig( GTK_SETTINGS( pSettings ) );
@@ -3931,7 +3931,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
GUINT_TO_POINTER( 1 ) );
g_signal_connect_data( G_OBJECT( pSettings ), "notify",
G_CALLBACK( signalSettingsNotify ),
- NULL, NULL, G_CONNECT_AFTER );
+ nullptr, nullptr, G_CONNECT_AFTER );
}
refreshFontconfig( pSettings );
@@ -4008,13 +4008,13 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetHighlightTextColor( aHighlightTextColor );
// hyperlink colors
- GdkColor *link_color = NULL;
+ GdkColor *link_color = nullptr;
gtk_widget_style_get (m_pWindow, "link-color", &link_color, NULL);
if (link_color)
{
aStyleSet.SetLinkColor(getColor(*link_color));
gdk_color_free (link_color);
- link_color = NULL;
+ link_color = nullptr;
}
gtk_widget_style_get (m_pWindow, "visited-link-color", &link_color, NULL);
if (link_color)
@@ -4237,7 +4237,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMinThumbSize( min_slider_length - magic );
// preferred icon style
- gchar* pIconThemeName = NULL;
+ gchar* pIconThemeName = nullptr;
g_object_get( pSettings, "gtk-icon-theme-name", &pIconThemeName, nullptr );
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
@@ -4387,7 +4387,7 @@ static void NWEnsureGTKRadio( SalX11Screen nScreen )
{
if ( !gWidgetData[nScreen].gRadioWidget || !gWidgetData[nScreen].gRadioWidgetSibling )
{
- gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( NULL );
+ gWidgetData[nScreen].gRadioWidget = gtk_radio_button_new( nullptr );
gWidgetData[nScreen].gRadioWidgetSibling = gtk_radio_button_new_from_widget( GTK_RADIO_BUTTON(gWidgetData[nScreen].gRadioWidget) );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidget, nScreen );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gRadioWidgetSibling, nScreen );
@@ -4407,13 +4407,13 @@ static void NWEnsureGTKScrollbars( SalX11Screen nScreen )
{
if ( !gWidgetData[nScreen].gScrollHorizWidget )
{
- gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( NULL );
+ gWidgetData[nScreen].gScrollHorizWidget = gtk_hscrollbar_new( nullptr );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollHorizWidget, nScreen );
}
if ( !gWidgetData[nScreen].gScrollVertWidget )
{
- gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( NULL );
+ gWidgetData[nScreen].gScrollVertWidget = gtk_vscrollbar_new( nullptr );
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gScrollVertWidget, nScreen );
}
}
@@ -4558,7 +4558,7 @@ static void NWEnsureGTKMenu( SalX11Screen nScreen )
gWidgetData[nScreen].gMenuWidget = gtk_menu_new();
gWidgetData[nScreen].gMenuItemMenuWidget = gtk_menu_item_new_with_label( "b" );
gWidgetData[nScreen].gMenuItemCheckMenuWidget = gtk_check_menu_item_new_with_label( "b" );
- gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( NULL, "b" );
+ gWidgetData[nScreen].gMenuItemRadioMenuWidget = gtk_radio_menu_item_new_with_label( nullptr, "b" );
gWidgetData[nScreen].gMenuItemSeparatorMenuWidget = gtk_separator_menu_item_new();
gWidgetData[nScreen].gImageMenuItem = gtk_image_menu_item_new();
@@ -4631,7 +4631,7 @@ static void NWEnsureGTKFrame( SalX11Screen nScreen )
{
if( !gWidgetData[nScreen].gFrame )
{
- gWidgetData[nScreen].gFrame = gtk_frame_new(NULL);
+ gWidgetData[nScreen].gFrame = gtk_frame_new(nullptr);
NWAddWidgetToCacheWindow( gWidgetData[nScreen].gFrame, nScreen );
}
}
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 3615f8c0c4d2..767949468563 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -125,8 +125,8 @@ struct GtkSalPrinter_Impl
};
GtkSalPrinter_Impl::GtkSalPrinter_Impl()
- : m_pPrinter(0)
- , m_pSettings(0)
+ : m_pPrinter(nullptr)
+ , m_pSettings(nullptr)
{
}
@@ -135,12 +135,12 @@ GtkSalPrinter_Impl::~GtkSalPrinter_Impl()
if (m_pPrinter)
{
g_object_unref(G_OBJECT(m_pPrinter));
- m_pPrinter = NULL;
+ m_pPrinter = nullptr;
}
if (m_pSettings)
{
g_object_unref(G_OBJECT(m_pSettings));
- m_pSettings = NULL;
+ m_pSettings = nullptr;
}
}
@@ -290,10 +290,10 @@ GtkSalPrinter::EndJob()
OUStringToOString(m_xImpl->m_sJobName, RTL_TEXTENCODING_UTF8).getStr(),
m_xImpl->m_pPrinter, m_xImpl->m_pSettings, pPageSetup);
- GError* error = NULL;
+ GError* error = nullptr;
bRet = xWrapper->print_job_set_source_file(pJob, m_xImpl->m_sSpoolFile.getStr(), &error);
if (bRet)
- xWrapper->print_job_send(pJob, NULL, NULL, NULL);
+ xWrapper->print_job_send(pJob, nullptr, nullptr, nullptr);
else
{
//To-Do, do something with this
@@ -330,7 +330,7 @@ lcl_makeFrame(
const uno::Sequence<OUString> &i_rHelpTexts,
sal_Int32* const io_pCurHelpText)
{
- GtkWidget* const pLabel = gtk_label_new(NULL);
+ GtkWidget* const pLabel = gtk_label_new(nullptr);
lcl_setHelpText(pLabel, i_rHelpTexts, !io_pCurHelpText ? 0 : (*io_pCurHelpText)++);
gtk_misc_set_alignment(GTK_MISC(pLabel), 0.0, 0.5);
@@ -404,7 +404,7 @@ void
GtkPrintDialog::impl_initDialog()
{
//To-Do, like fpicker, set UI language
- m_pDialog = m_xWrapper->print_unix_dialog_new(NULL, NULL);
+ m_pDialog = m_xWrapper->print_unix_dialog_new(nullptr, nullptr);
vcl::Window* const pTopWindow(Application::GetActiveTopWindow());
if (pTopWindow)
@@ -437,10 +437,10 @@ GtkPrintDialog::impl_initCustomTab()
const uno::Sequence<beans::PropertyValue>& rOptions(m_rController.getUIOptions());
DependencyMap_t aPropertyToDependencyRowMap;
CustomTabs_t aCustomTabs;
- GtkWidget* pCurParent = NULL;
- GtkWidget* pCurTabPage = NULL;
- GtkWidget* pCurSubGroup = NULL;
- GtkWidget* pStandardPrintRangeContainer = NULL;
+ GtkWidget* pCurParent = nullptr;
+ GtkWidget* pCurTabPage = nullptr;
+ GtkWidget* pCurSubGroup = nullptr;
+ GtkWidget* pStandardPrintRangeContainer = nullptr;
bool bIgnoreSubgroup = false;
for (int i = 0; i != rOptions.getLength(); i++)
{
@@ -459,7 +459,7 @@ GtkPrintDialog::impl_initCustomTab()
sal_Int32 nDependsOnValue = 0;
bool bUseDependencyRow = false;
bool bIgnore = false;
- GtkWidget* pGroup = NULL;
+ GtkWidget* pGroup = nullptr;
bool bGtkInternal = false;
//Fix fdo#69381
@@ -508,7 +508,7 @@ GtkPrintDialog::impl_initCustomTab()
const int nLen = aHelpIds.getLength();
aHelpTexts.realloc(nLen);
for (int j = 0; j != nLen; ++j)
- aHelpTexts[j] = pHelp->GetHelpText(aHelpIds[j], 0);
+ aHelpTexts[j] = pHelp->GetHelpText(aHelpIds[j], nullptr);
}
else // fallback
aHelpTexts = aHelpIds;
@@ -553,7 +553,7 @@ GtkPrintDialog::impl_initCustomTab()
pCurParent = gtk_vbox_new(FALSE, 12);
gtk_container_set_border_width(GTK_CONTAINER(pCurParent), 0);
- pCurSubGroup = lcl_makeFrame(pCurParent, aText, aHelpTexts, NULL);
+ pCurSubGroup = lcl_makeFrame(pCurParent, aText, aHelpTexts, nullptr);
gtk_box_pack_start(GTK_BOX(pCurTabPage), pCurSubGroup, FALSE, FALSE, 0);
}
// special case: we need to map these to controls of the gtk print dialog
@@ -577,8 +577,8 @@ GtkPrintDialog::impl_initCustomTab()
// 2. it may cause warning because the widget may not
// have been placed in m_aControlToPropertyMap yet
- GtkWidget* pWidget = NULL;
- beans::PropertyValue* pVal = NULL;
+ GtkWidget* pWidget = nullptr;
+ beans::PropertyValue* pVal = nullptr;
if (aCtrlType == "Bool" && pCurParent)
{
pWidget = gtk_check_button_new_with_mnemonic(
@@ -592,7 +592,7 @@ GtkPrintDialog::impl_initCustomTab()
pVal->Value >>= bVal;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pWidget), bVal);
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
g_signal_connect(pWidget, "toggled", G_CALLBACK(GtkPrintDialog::UIOption_CheckHdl), this);
}
else if (aCtrlType == "Radio" && pCurParent)
@@ -611,7 +611,7 @@ GtkPrintDialog::impl_initCustomTab()
for (sal_Int32 m = 0; m != aChoices.getLength(); m++)
{
pWidget = gtk_radio_button_new_with_mnemonic_from_widget(
- GTK_RADIO_BUTTON(m == 0 ? NULL : pWidget),
+ GTK_RADIO_BUTTON(m == 0 ? nullptr : pWidget),
OUStringToOString(aChoices[m].replace('~', '_'), RTL_TEXTENCODING_UTF8).getStr());
lcl_setHelpText(pWidget, aHelpTexts, nCurHelpText++);
m_aControlToPropertyMap[pWidget] = aPropertyName;
@@ -622,7 +622,7 @@ GtkPrintDialog::impl_initCustomTab()
aPropertyToDependencyRowMap[aPropertyName + OUString::number(m)] = pRow;
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(pWidget), m == nSelectVal);
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
g_signal_connect(pWidget, "toggled",
G_CALLBACK(GtkPrintDialog::UIOption_RadioHdl), this);
}
@@ -683,7 +683,7 @@ GtkPrintDialog::impl_initCustomTab()
m_aControlToPropertyMap[pWidget] = aPropertyName;
gtk_widget_set_sensitive(pWidget,
- m_rController.isUIOptionEnabled(aPropertyName) && pVal != NULL);
+ m_rController.isUIOptionEnabled(aPropertyName) && pVal != nullptr);
if (!aText.isEmpty())
{
@@ -701,7 +701,7 @@ GtkPrintDialog::impl_initCustomTab()
else
SAL_INFO("vcl.gtk", "unhandled option type: " << aCtrlType);
- GtkWidget* pRow = NULL;
+ GtkWidget* pRow = nullptr;
if (pWidget)
{
if (bUseDependencyRow && !aDependsOnName.isEmpty())
@@ -710,7 +710,7 @@ GtkPrintDialog::impl_initCustomTab()
if (!pRow)
{
gtk_widget_destroy(pWidget);
- pWidget = NULL;
+ pWidget = nullptr;
}
}
}
@@ -804,7 +804,7 @@ GtkPrintDialog::impl_checkOptionalControlDependencies()
beans::PropertyValue*
GtkPrintDialog::impl_queryPropertyValue(GtkWidget* const i_pWidget) const
{
- beans::PropertyValue* pVal(0);
+ beans::PropertyValue* pVal(nullptr);
std::map<GtkWidget*, OUString>::const_iterator aIt(m_aControlToPropertyMap.find(i_pWidget));
if (aIt != m_aControlToPropertyMap.end())
{
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 23307fd2a8df..838538801ca7 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -51,7 +51,7 @@ G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT);
GLOAction*
g_lo_action_new()
{
- return G_LO_ACTION (g_object_new (G_TYPE_LO_ACTION, NULL));
+ return G_LO_ACTION (g_object_new (G_TYPE_LO_ACTION, nullptr));
}
static void
@@ -60,10 +60,10 @@ g_lo_action_init (GLOAction *action)
action->item_id = -1;
action->submenu = FALSE;
action->enabled = TRUE;
- action->parameter_type = NULL;
- action->state_type = NULL;
- action->state_hint = NULL;
- action->state = NULL;
+ action->parameter_type = nullptr;
+ action->state_type = nullptr;
+ action->state_hint = nullptr;
+ action->state = nullptr;
}
static void
@@ -131,10 +131,10 @@ g_lo_action_group_list_actions (GActionGroup *group)
keys = g_new (gchar *, n + 1);
g_hash_table_iter_init (&iter, loGroup->priv->table);
- while (g_hash_table_iter_next (&iter, &key, NULL))
+ while (g_hash_table_iter_next (&iter, &key, nullptr))
keys[i++] = g_strdup (static_cast<gchar*>(key));
g_assert_cmpint (i, ==, n);
- keys[n] = NULL;
+ keys[n] = nullptr;
return keys;
}
@@ -154,7 +154,7 @@ g_lo_action_group_query_action (GActionGroup *group,
action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
- if (action == NULL)
+ if (action == nullptr)
return FALSE;
if (enabled)
@@ -173,10 +173,10 @@ g_lo_action_group_query_action (GActionGroup *group,
*state_type = action->state_type;
if (state_hint)
- *state_hint = (action->state_hint) ? g_variant_ref (action->state_hint) : NULL;
+ *state_hint = (action->state_hint) ? g_variant_ref (action->state_hint) : nullptr;
if (state)
- *state = (action->state) ? g_variant_ref (action->state) : NULL;
+ *state = (action->state) ? g_variant_ref (action->state) : nullptr;
return TRUE;
}
@@ -190,13 +190,13 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group,
GtkSalFrame* pFrame = group->priv->frame;
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for frame " << pFrame);
- if (pFrame == NULL)
+ if (pFrame == nullptr)
return;
GtkSalMenu* pSalMenu = static_cast<GtkSalMenu*> (pFrame->GetMenu());
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for menu " << pSalMenu);
- if (pSalMenu != NULL) {
+ if (pSalMenu != nullptr) {
gboolean bState = g_variant_get_boolean (state);
SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " to " << bState);
@@ -213,16 +213,16 @@ g_lo_action_group_change_state (GActionGroup *group,
GVariant *value)
{
SAL_INFO("vcl.unity", "g_lo_action_group_change_state on " << group );
- g_return_if_fail (value != NULL);
+ g_return_if_fail (value != nullptr);
g_variant_ref_sink (value);
- if (action_name != NULL)
+ if (action_name != nullptr)
{
GLOActionGroup* lo_group = G_LO_ACTION_GROUP (group);
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
- if (action != NULL)
+ if (action != nullptr)
{
if (action->submenu)
g_lo_action_group_perform_submenu_action (lo_group, action_name, value);
@@ -231,7 +231,7 @@ g_lo_action_group_change_state (GActionGroup *group,
gboolean is_new = FALSE;
/* If action already exists but has no state, it should be removed and added again. */
- if (action->state_type == NULL)
+ if (action->state_type == nullptr)
{
g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
action->state_type = g_variant_type_copy (g_variant_get_type(value));
@@ -266,15 +266,15 @@ g_lo_action_group_activate (GActionGroup *group,
GtkSalFrame *pFrame = lo_group->priv->frame;
SAL_INFO("vcl.unity", "g_lo_action_group_activate on group " << group << " for frame " << pFrame << " with parameter " << parameter);
- if ( parameter != NULL )
+ if ( parameter != nullptr )
g_action_group_change_action_state( group, action_name, parameter );
- if ( pFrame != NULL )
+ if ( pFrame != nullptr )
{
GtkSalMenu* pSalMenu = static_cast< GtkSalMenu* >( pFrame->GetMenu() );
SAL_INFO("vcl.unity", "g_lo_action_group_activate for menu " << pSalMenu);
- if ( pSalMenu != NULL )
+ if ( pSalMenu != nullptr )
{
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (lo_group->priv->table, action_name));
SAL_INFO("vcl.unity", "g_lo_action_group_activate dispatching action " << action << " named " << action_name << " on menu " << pSalMenu);
@@ -289,7 +289,7 @@ g_lo_action_group_insert (GLOActionGroup *group,
gint item_id,
gboolean submenu)
{
- g_lo_action_group_insert_stateful (group, action_name, item_id, submenu, NULL, NULL, NULL, NULL);
+ g_lo_action_group_insert_stateful (group, action_name, item_id, submenu, nullptr, nullptr, nullptr, nullptr);
}
void
@@ -306,9 +306,9 @@ g_lo_action_group_insert_stateful (GLOActionGroup *group,
GLOAction* old_action = G_LO_ACTION (g_hash_table_lookup (group->priv->table, action_name));
- if (old_action == NULL || old_action->item_id != item_id)
+ if (old_action == nullptr || old_action->item_id != item_id)
{
- if (old_action != NULL)
+ if (old_action != nullptr)
g_lo_action_group_remove (group, action_name);
// g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
@@ -354,7 +354,7 @@ g_lo_action_group_init (GLOActionGroup *group)
GLOActionGroupPrivate);
group->priv->table = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, g_object_unref);
- group->priv->frame = NULL;
+ group->priv->frame = nullptr;
}
static void
@@ -379,7 +379,7 @@ g_lo_action_group_iface_init (GActionGroupInterface *iface)
GLOActionGroup *
g_lo_action_group_new (gpointer frame)
{
- GLOActionGroup* group = G_LO_ACTION_GROUP (g_object_new (G_TYPE_LO_ACTION_GROUP, NULL));
+ GLOActionGroup* group = G_LO_ACTION_GROUP (g_object_new (G_TYPE_LO_ACTION_GROUP, nullptr));
group->priv->frame = static_cast< GtkSalFrame* > (frame);
return group;
@@ -392,11 +392,11 @@ g_lo_action_group_set_action_enabled (GLOActionGroup *group,
{
SAL_INFO("vcl.unity", "g_lo_action_group_set_action_enabled on " << group);
g_return_if_fail (G_IS_LO_ACTION_GROUP (group));
- g_return_if_fail (action_name != NULL);
+ g_return_if_fail (action_name != nullptr);
GLOAction* action = G_LO_ACTION (g_hash_table_lookup (group->priv->table, action_name));
- if (action == NULL)
+ if (action == nullptr)
return;
action->enabled = enabled;
@@ -411,7 +411,7 @@ g_lo_action_group_remove (GLOActionGroup *group,
SAL_INFO("vcl.unity", "g_lo_action_group_remove on " << group);
g_return_if_fail (G_IS_LO_ACTION_GROUP (group));
- if (action_name != NULL)
+ if (action_name != nullptr)
{
g_action_group_action_removed (G_ACTION_GROUP (group), action_name);
g_hash_table_remove (group->priv->table, action_name);
@@ -426,7 +426,7 @@ g_lo_action_group_clear (GLOActionGroup *group)
GList* keys = g_hash_table_get_keys (group->priv->table);
- for (GList* element = g_list_first (keys); element != NULL; element = g_list_next (element))
+ for (GList* element = g_list_first (keys); element != nullptr; element = g_list_next (element))
{
g_lo_action_group_remove (group, static_cast<gchar*>(element->data));
}
diff --git a/vcl/unx/gtk/window/glomenu.cxx b/vcl/unx/gtk/window/glomenu.cxx
index b6d86c23346d..6aa19e6b74a9 100644
--- a/vcl/unx/gtk/window/glomenu.cxx
+++ b/vcl/unx/gtk/window/glomenu.cxx
@@ -95,9 +95,9 @@ g_lo_menu_is_mutable (GMenuModel*)
static gint
g_lo_menu_get_n_items (GMenuModel *model)
{
- g_return_val_if_fail (model != NULL, 0);
+ g_return_val_if_fail (model != nullptr, 0);
GLOMenu *menu = G_LO_MENU (model);
- g_return_val_if_fail (menu->items != NULL, 0);
+ g_return_val_if_fail (menu->items != nullptr, 0);
return menu->items->len;
}
@@ -110,7 +110,7 @@ g_lo_menu_get_n_items_from_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_val_if_fail (model != NULL, 0);
+ g_return_val_if_fail (model != nullptr, 0);
gint length = model->items->len;
@@ -142,7 +142,7 @@ g_lo_menu_insert (GLOMenu *menu,
gint position,
const gchar *label)
{
- g_lo_menu_insert_section (menu, position, label, NULL);
+ g_lo_menu_insert_section (menu, position, label, nullptr);
}
void
@@ -156,7 +156,7 @@ g_lo_menu_insert_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_insert (model, position, label);
@@ -166,7 +166,7 @@ g_lo_menu_insert_in_section (GLOMenu *menu,
GLOMenu *
g_lo_menu_new()
{
- return G_LO_MENU( g_object_new (G_TYPE_LO_MENU, NULL) );
+ return G_LO_MENU( g_object_new (G_TYPE_LO_MENU, nullptr) );
}
void
@@ -176,7 +176,7 @@ g_lo_menu_set_attribute_value (GLOMenu *menu,
GVariant *value)
{
g_return_if_fail (G_IS_LO_MENU (menu));
- g_return_if_fail (attribute != NULL);
+ g_return_if_fail (attribute != nullptr);
g_return_if_fail (valid_attribute_name (attribute));
if (position >= (gint) menu->items->len)
@@ -184,7 +184,7 @@ g_lo_menu_set_attribute_value (GLOMenu *menu,
struct item menu_item = g_array_index (menu->items, struct item, position);
- if (value != NULL)
+ if (value != nullptr)
g_hash_table_insert (menu_item.attributes, g_strdup (attribute), g_variant_ref_sink (value));
else
g_hash_table_remove (menu_item.attributes, attribute);
@@ -199,7 +199,7 @@ g_lo_menu_get_attribute_value_from_item_in_section (GLOMenu *menu,
{
GMenuModel *model = G_MENU_MODEL (g_lo_menu_get_section (menu, section));
- g_return_val_if_fail (model != NULL, NULL);
+ g_return_val_if_fail (model != nullptr, NULL);
GVariant *value = g_menu_model_get_item_attribute_value (model,
position,
@@ -220,10 +220,10 @@ g_lo_menu_set_label (GLOMenu *menu,
GVariant *value;
- if (label != NULL)
+ if (label != nullptr)
value = g_variant_new_string (label);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_LABEL, value);
}
@@ -238,7 +238,7 @@ g_lo_menu_set_label_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_set_label (model, position, label);
@@ -261,11 +261,11 @@ g_lo_menu_get_label_from_item_in_section (GLOMenu *menu,
G_MENU_ATTRIBUTE_LABEL,
G_VARIANT_TYPE_STRING);
- gchar *label = NULL;
+ gchar *label = nullptr;
if (label_value)
{
- label = g_variant_dup_string (label_value, NULL);
+ label = g_variant_dup_string (label_value, nullptr);
g_variant_unref (label_value);
}
@@ -282,14 +282,14 @@ g_lo_menu_set_action_and_target_value (GLOMenu *menu,
GVariant *action_value;
- if (action != NULL)
+ if (action != nullptr)
{
action_value = g_variant_new_string (action);
}
else
{
- action_value = NULL;
- target_value = NULL;
+ action_value = nullptr;
+ target_value = nullptr;
}
g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_ACTION, action_value);
@@ -309,7 +309,7 @@ g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_set_action_and_target_value (model, position, command, target_value);
@@ -326,14 +326,14 @@ g_lo_menu_set_accelerator_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (accelerator != NULL)
+ if (accelerator != nullptr)
value = g_variant_new_string (accelerator);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (model, position, G_LO_MENU_ATTRIBUTE_ACCELERATOR, value);
@@ -356,11 +356,11 @@ g_lo_menu_get_accelerator_from_item_in_section (GLOMenu *menu,
G_LO_MENU_ATTRIBUTE_ACCELERATOR,
G_VARIANT_TYPE_STRING);
- gchar *accel = NULL;
+ gchar *accel = nullptr;
- if (accel_value != NULL)
+ if (accel_value != nullptr)
{
- accel = g_variant_dup_string (accel_value, NULL);
+ accel = g_variant_dup_string (accel_value, nullptr);
g_variant_unref (accel_value);
}
@@ -377,14 +377,14 @@ g_lo_menu_set_command_to_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (command != NULL)
+ if (command != nullptr)
value = g_variant_new_string (command);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (model, position, G_LO_MENU_ATTRIBUTE_COMMAND, value);
@@ -407,11 +407,11 @@ g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
G_LO_MENU_ATTRIBUTE_COMMAND,
G_VARIANT_TYPE_STRING);
- gchar *command = NULL;
+ gchar *command = nullptr;
- if (command_value != NULL)
+ if (command_value != nullptr)
{
- command = g_variant_dup_string (command_value, NULL);
+ command = g_variant_dup_string (command_value, nullptr);
g_variant_unref (command_value);
}
@@ -425,7 +425,7 @@ g_lo_menu_set_link (GLOMenu *menu,
GMenuModel *model)
{
g_return_if_fail (G_IS_LO_MENU (menu));
- g_return_if_fail (link != NULL);
+ g_return_if_fail (link != nullptr);
g_return_if_fail (valid_attribute_name (link));
if (position < 0 || position >= (gint) menu->items->len)
@@ -433,7 +433,7 @@ g_lo_menu_set_link (GLOMenu *menu,
struct item menu_item = g_array_index (menu->items, struct item, position);
- if (model != NULL)
+ if (model != nullptr)
g_hash_table_insert (menu_item.links, g_strdup (link), g_object_ref (model));
else
g_hash_table_remove (menu_item.links, link);
@@ -494,7 +494,7 @@ g_lo_menu_new_submenu_in_item_in_section (GLOMenu *menu,
GLOMenu* model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
if (0 <= position && position < (gint) model->items->len) {
GMenuModel* submenu = G_MENU_MODEL (g_lo_menu_new());
@@ -519,9 +519,9 @@ g_lo_menu_get_submenu_from_item_in_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_val_if_fail (model != NULL, NULL);
+ g_return_val_if_fail (model != nullptr, NULL);
- GLOMenu *submenu = NULL;
+ GLOMenu *submenu = nullptr;
if (0 <= position && position < (gint) model->items->len)
submenu = G_LO_MENU (G_MENU_MODEL_CLASS (g_lo_menu_parent_class)
@@ -543,14 +543,14 @@ g_lo_menu_set_submenu_action_to_item_in_section (GLOMenu *menu,
GMenuModel *model = G_MENU_MODEL (g_lo_menu_get_section (menu, section));
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
GVariant *value;
- if (action != NULL)
+ if (action != nullptr)
value = g_variant_new_string (action);
else
- value = NULL;
+ value = nullptr;
g_lo_menu_set_attribute_value (G_LO_MENU (model), position, G_LO_MENU_ATTRIBUTE_SUBMENU_ACTION, value);
@@ -563,9 +563,9 @@ g_lo_menu_set_submenu_action_to_item_in_section (GLOMenu *menu,
static void
g_lo_menu_clear_item (struct item *menu_item)
{
- if (menu_item->attributes != NULL)
+ if (menu_item->attributes != nullptr)
g_hash_table_unref (menu_item->attributes);
- if (menu_item->links != NULL)
+ if (menu_item->links != nullptr)
g_hash_table_unref (menu_item->links);
}
@@ -591,7 +591,7 @@ g_lo_menu_remove_from_section (GLOMenu *menu,
GLOMenu *model = g_lo_menu_get_section (menu, section);
- g_return_if_fail (model != NULL);
+ g_return_if_fail (model != nullptr);
g_lo_menu_remove (model, position);
diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx
index 463c3c1ff486..1d510a45c610 100644
--- a/vcl/unx/gtk/window/gtkobject.cxx
+++ b/vcl/unx/gtk/window/gtkobject.cxx
@@ -30,8 +30,8 @@
#include <unx/gtk/gtkgdi.hxx>
GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
- : m_pSocket( NULL ),
- m_pRegion( NULL )
+ : m_pSocket( nullptr ),
+ m_pRegion( nullptr )
{
if( pParent )
{
@@ -65,10 +65,10 @@ GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow )
m_aSystemData.aShellWindow = pParent->GetSystemData()->aWindow;
++nWindow;
#endif
- m_aSystemData.pSalFrame = NULL;
+ m_aSystemData.pSalFrame = nullptr;
m_aSystemData.pWidget = m_pSocket;
m_aSystemData.nScreen = pParent->getXScreenNumber().getXScreen();
- m_aSystemData.pAppContext = NULL;
+ m_aSystemData.pAppContext = nullptr;
m_aSystemData.pShellWidget = GTK_WIDGET(pParent->getWindow());
g_signal_connect( G_OBJECT(m_pSocket), "button-press-event", G_CALLBACK(signalButton), this );
@@ -109,7 +109,7 @@ GtkSalObject::~GtkSalObject()
void GtkSalObject::ResetClipRegion()
{
if( m_pSocket )
- gdk_window_shape_combine_region( widget_get_window(m_pSocket), NULL, 0, 0 );
+ gdk_window_shape_combine_region( widget_get_window(m_pSocket), nullptr, 0, 0 );
}
sal_uInt16 GtkSalObject::GetClipRegionType()
@@ -184,7 +184,7 @@ gboolean GtkSalObject::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointe
if( pEvent->type == GDK_BUTTON_PRESS )
{
- pThis->CallCallback( SALOBJ_EVENT_TOTOP, NULL );
+ pThis->CallCallback( SALOBJ_EVENT_TOTOP, nullptr );
}
return FALSE;
@@ -194,7 +194,7 @@ gboolean GtkSalObject::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer
{
GtkSalObject* pThis = static_cast<GtkSalObject*>(object);
- pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, NULL );
+ pThis->CallCallback( pEvent->in ? SALOBJ_EVENT_GETFOCUS : SALOBJ_EVENT_LOSEFOCUS, nullptr );
return FALSE;
}
@@ -204,7 +204,7 @@ void GtkSalObject::signalDestroy( GtkWidget* pObj, gpointer object )
GtkSalObject* pThis = static_cast<GtkSalObject*>(object);
if( pObj == pThis->m_pSocket )
{
- pThis->m_pSocket = NULL;
+ pThis->m_pSocket = nullptr;
}
}
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 8fe61521902a..fbd7cc70117e 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -106,7 +106,7 @@ using namespace com::sun::star;
int GtkSalFrame::m_nFloats = 0;
#if defined ENABLE_GMENU_INTEGRATION
-static GDBusConnection* pSessionBus = NULL;
+static GDBusConnection* pSessionBus = nullptr;
#endif
static sal_uInt16 GetKeyModCode( guint state )
@@ -331,7 +331,7 @@ static guint GetKeyValFor(GdkKeymap* pKeyMap, guint16 hardware_keycode, guint8 g
{
guint updated_keyval = 0;
gdk_keymap_translate_keyboard_state(pKeyMap, hardware_keycode,
- (GdkModifierType)0, group, &updated_keyval, NULL, NULL, NULL);
+ (GdkModifierType)0, group, &updated_keyval, nullptr, nullptr, nullptr);
return updated_keyval;
}
@@ -505,7 +505,7 @@ GtkSalFrame::GtkSalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle )
m_bDefaultSize = ( (nStyle & SalFrameStyleFlags::SIZEABLE) && ! pParent );
m_bWindowIsGtkPlug = false;
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
- m_pLastSyncedDbusMenu = NULL;
+ m_pLastSyncedDbusMenu = nullptr;
#endif
Init( pParent, nStyle );
}
@@ -519,7 +519,7 @@ GtkSalFrame::GtkSalFrame( SystemParentData* pSysData )
m_bDefaultPos = true;
m_bDefaultSize = true;
#if defined(ENABLE_DBUS) && defined(ENABLE_GIO)
- m_pLastSyncedDbusMenu = NULL;
+ m_pLastSyncedDbusMenu = nullptr;
#endif
Init( pSysData );
}
@@ -534,7 +534,7 @@ gdk_x11_window_set_utf8_property (GdkWindow *window,
#if !GTK_CHECK_VERSION(3,0,0)
GdkDisplay* display = gdk_window_get_display (window);
- if (value != NULL)
+ if (value != nullptr)
{
XChangeProperty (GDK_DISPLAY_XDISPLAY (display),
GDK_WINDOW_XID (window),
@@ -601,7 +601,7 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
if (!xDispatchProvider.is())
return;
- gchar *strval = NULL;
+ gchar *strval = nullptr;
g_object_get(action, "name", &strval, NULL);
if (!strval)
return;
@@ -642,11 +642,11 @@ static void activate_uno(GSimpleAction *action, GVariant*, gpointer)
}
static const GActionEntry app_entries[] = {
- { "OptionsTreeDialog", activate_uno, NULL, NULL, NULL, {0} },
- { "About", activate_uno, NULL, NULL, NULL, {0} },
- { "HelpIndex", activate_uno, NULL, NULL, NULL, {0} },
- { "Quit", activate_uno, NULL, NULL, NULL, {0} },
- { "New", activate_uno, NULL, NULL, NULL, {0} }
+ { "OptionsTreeDialog", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "About", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "HelpIndex", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "Quit", activate_uno, nullptr, nullptr, nullptr, {0} },
+ { "New", activate_uno, nullptr, nullptr, nullptr, {0} }
};
gboolean ensure_dbus_setup( gpointer data )
@@ -654,11 +654,11 @@ gboolean ensure_dbus_setup( gpointer data )
GtkSalFrame* pSalFrame = static_cast< GtkSalFrame* >( data );
GdkWindow* gdkWindow = widget_get_window( pSalFrame->getWindow() );
- if ( gdkWindow != NULL && g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) == NULL )
+ if ( gdkWindow != nullptr && g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) == nullptr )
{
// Get a DBus session connection.
if(!pSessionBus)
- pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+ pSessionBus = g_bus_get_sync (G_BUS_TYPE_SESSION, nullptr, nullptr);
if( !pSessionBus )
{
return FALSE;
@@ -685,10 +685,10 @@ gboolean ensure_dbus_setup( gpointer data )
// Publish the menu model and the action group.
SAL_INFO("vcl.unity", "exporting menu model at " << pMenuModel << " for window " << windowId);
- pSalFrame->m_nMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, aDBusMenubarPath, pMenuModel, NULL);
+ pSalFrame->m_nMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, aDBusMenubarPath, pMenuModel, nullptr);
SAL_INFO("vcl.unity", "exporting action group at " << pActionGroup << " for window " << windowId);
- pSalFrame->m_nActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, aDBusWindowPath, pActionGroup, NULL);
- pSalFrame->m_nHudAwarenessId = hud_awareness_register( pSessionBus, aDBusMenubarPath, hud_activated, pSalFrame, NULL, NULL );
+ pSalFrame->m_nActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, aDBusWindowPath, pActionGroup, nullptr);
+ pSalFrame->m_nHudAwarenessId = hud_awareness_register( pSessionBus, aDBusMenubarPath, hud_activated, pSalFrame, nullptr, nullptr );
// fdo#70885 we don't want app menu under Unity
bool bDesktopIsUnity = (SalGetDesktopEnvironment() == "UNITY");
@@ -712,7 +712,7 @@ gboolean ensure_dbus_setup( gpointer data )
g_menu_append_item( firstsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(firstsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(firstsubmenu));
g_object_unref(firstsubmenu);
GMenu *secondsubmenu = g_menu_new ();
@@ -724,7 +724,7 @@ gboolean ensure_dbus_setup( gpointer data )
g_menu_append_item( secondsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(secondsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(secondsubmenu));
g_object_unref(secondsubmenu);
GMenu *thirdsubmenu = g_menu_new ();
@@ -749,20 +749,20 @@ gboolean ensure_dbus_setup( gpointer data )
item = g_menu_item_new(sQuit.getStr(), "app.Quit");
g_menu_append_item( thirdsubmenu, item );
g_object_unref(item);
- g_menu_append_section( menu, NULL, G_MENU_MODEL(thirdsubmenu));
+ g_menu_append_section( menu, nullptr, G_MENU_MODEL(thirdsubmenu));
g_object_unref(thirdsubmenu);
GSimpleActionGroup *group = g_simple_action_group_new ();
#if GLIB_CHECK_VERSION(2,38,0) // g_simple_action_group_add_entries is deprecated since 2.38
- g_action_map_add_action_entries (G_ACTION_MAP (group), app_entries, G_N_ELEMENTS (app_entries), NULL);
+ g_action_map_add_action_entries (G_ACTION_MAP (group), app_entries, G_N_ELEMENTS (app_entries), nullptr);
#else
g_simple_action_group_add_entries (group, app_entries, G_N_ELEMENTS (app_entries), NULL);
#endif
GActionGroup* pAppActionGroup = G_ACTION_GROUP(group);
- pSalFrame->m_nAppActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, "/org/libreoffice", pAppActionGroup, NULL);
+ pSalFrame->m_nAppActionGroupExportId = g_dbus_connection_export_action_group( pSessionBus, "/org/libreoffice", pAppActionGroup, nullptr);
g_object_unref(pAppActionGroup);
- pSalFrame->m_nAppMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, "/org/libreoffice/menus/appmenu", G_MENU_MODEL (menu), NULL);
+ pSalFrame->m_nAppMenuExportId = g_dbus_connection_export_menu_model (pSessionBus, "/org/libreoffice/menus/appmenu", G_MENU_MODEL (menu), nullptr);
g_object_unref(menu);
}
@@ -784,7 +784,7 @@ void on_registrar_available( GDBusConnection * /*connection*/,
SalMenu* pSalMenu = pSalFrame->GetMenu();
- if ( pSalMenu != NULL )
+ if ( pSalMenu != nullptr )
{
GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu);
pGtkSalMenu->Display( true );
@@ -819,11 +819,11 @@ void GtkSalFrame::EnsureAppMenuWatch()
if ( !m_nWatcherId )
{
// Get a DBus session connection.
- if ( pSessionBus == NULL )
+ if ( pSessionBus == nullptr )
{
- pSessionBus = g_bus_get_sync( G_BUS_TYPE_SESSION, NULL, NULL );
+ pSessionBus = g_bus_get_sync( G_BUS_TYPE_SESSION, nullptr, nullptr );
- if ( pSessionBus == NULL )
+ if ( pSessionBus == nullptr )
return;
}
@@ -834,7 +834,7 @@ void GtkSalFrame::EnsureAppMenuWatch()
on_registrar_available,
on_registrar_unavailable,
static_cast<GtkSalFrame*>(this),
- NULL );
+ nullptr );
}
//ensure_dbus_setup( this );
@@ -851,7 +851,7 @@ void GtkSalFrame::InvalidateGraphics()
continue;
#if !GTK_CHECK_VERSION(3,0,0)
m_aGraphics[i].pGraphics->SetDrawable( None, m_nXScreen );
- m_aGraphics[i].pGraphics->SetWindow(NULL);
+ m_aGraphics[i].pGraphics->SetWindow(nullptr);
#endif
m_aGraphics[i].bInUse = false;
}
@@ -902,7 +902,7 @@ GtkSalFrame::~GtkSalFrame()
#endif
if( m_pWindow )
{
- g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", NULL );
+ g_object_set_data( G_OBJECT( m_pWindow ), "SalFrame", nullptr );
#if defined ENABLE_GMENU_INTEGRATION
if ( pSessionBus )
@@ -1007,11 +1007,11 @@ ooo_fixed_get_type()
nullptr, /* class init */
#endif
nullptr, /* class finalize */
- NULL, /* class data */
+ nullptr, /* class data */
sizeof (GtkFixed), /* instance size */
0, /* nb preallocs */
nullptr, /* instance init */
- NULL /* value table */
+ nullptr /* value table */
};
type = g_type_register_static( GTK_TYPE_FIXED, "OOoFixed",
@@ -1049,13 +1049,13 @@ void GtkSalFrame::InitCommon()
// add the fixed container child,
// fixed is needed since we have to position plugin windows
- m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), NULL ));
+ m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), nullptr ));
gtk_container_add( GTK_CONTAINER(m_pEventBox), GTK_WIDGET(m_pFixedContainer) );
#else
- m_pEventBox = 0;
+ m_pEventBox = nullptr;
// add the fixed container child,
// fixed is needed since we have to position plugin windows
- m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), NULL ));
+ m_pFixedContainer = GTK_FIXED(g_object_new( ooo_fixed_get_type(), nullptr ));
gtk_container_add( GTK_CONTAINER(m_pWindow), GTK_WIDGET(m_pFixedContainer) );
#endif
@@ -1108,20 +1108,20 @@ void GtkSalFrame::InitCommon()
g_signal_connect( G_OBJECT(m_pWindow), "destroy", G_CALLBACK(signalDestroy), this );
// init members
- m_pCurrentCursor = NULL;
+ m_pCurrentCursor = nullptr;
m_nKeyModifiers = 0;
m_bFullscreen = false;
m_bSpanMonitorsWhenFullscreen = false;
m_nState = GDK_WINDOW_STATE_WITHDRAWN;
m_nVisibility = GDK_VISIBILITY_FULLY_OBSCURED;
m_bSendModChangeOnRelease = false;
- m_pIMHandler = NULL;
+ m_pIMHandler = nullptr;
m_hBackgroundPixmap = None;
m_nExtStyle = 0;
- m_pRegion = NULL;
+ m_pRegion = nullptr;
m_ePointerStyle = static_cast<PointerStyle>(0xffff);
m_bSetFocusOnMap = false;
- m_pSalMenu = NULL;
+ m_pSalMenu = nullptr;
m_nWatcherId = 0;
m_nMenuExportId = 0;
m_nAppMenuExportId = 0;
@@ -1164,7 +1164,7 @@ void GtkSalFrame::InitCommon()
m_aSystemData.pSalFrame = this;
m_aSystemData.pWidget = m_pWindow;
m_aSystemData.nScreen = m_nXScreen.getXScreen();
- m_aSystemData.pAppContext = NULL;
+ m_aSystemData.pAppContext = nullptr;
m_aSystemData.pShellWidget = m_aSystemData.pWidget;
// fake an initial geometry, gets updated via configure event or SetPosSize
@@ -1224,11 +1224,11 @@ void GtkSalFrame::InitCommon()
#if !GTK_CHECK_VERSION(3,0,0)
extern "C" {
typedef void(*setAcceptFn)( GtkWindow*, gboolean );
- static setAcceptFn p_gtk_window_set_accept_focus = NULL;
+ static setAcceptFn p_gtk_window_set_accept_focus = nullptr;
static bool bGetAcceptFocusFn = true;
typedef void(*setUserTimeFn)( GdkWindow*, guint32 );
- static setUserTimeFn p_gdk_x11_window_set_user_time = NULL;
+ static setUserTimeFn p_gdk_x11_window_set_user_time = nullptr;
static bool bGetSetUserTimeFn = true;
}
#endif
@@ -1266,7 +1266,7 @@ static void lcl_set_accept_focus( GtkWindow* pWindow, gboolean bAccept, bool bBe
* want to handle it ourselves (as to sometimes not get
* the focus)
*/
- Atom* pProtocols = NULL;
+ Atom* pProtocols = nullptr;
int nProtocols = 0;
XGetWMProtocols( pDisplay,
aWindow,
@@ -1346,9 +1346,9 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
}
m_pParent = static_cast<GtkSalFrame*>(pParent);
- m_pForeignParent = NULL;
+ m_pForeignParent = nullptr;
m_aForeignParentWindow = None;
- m_pForeignTopLevel = NULL;
+ m_pForeignTopLevel = nullptr;
m_aForeignTopLevelWindow = None;
m_nStyle = nStyle;
@@ -1395,7 +1395,7 @@ void GtkSalFrame::Init( SalFrame* pParent, SalFrameStyleFlags nStyle )
if( bDecoHandling )
{
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
- if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != 0 )
+ if( (nStyle & SalFrameStyleFlags::DIALOG) && m_pParent != nullptr )
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
if( (nStyle & SalFrameStyleFlags::INTRO) )
{
@@ -1472,7 +1472,7 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
bool bBreak = false;
do
{
- pChildren = NULL;
+ pChildren = nullptr;
nChildren = 0;
aParent = aRoot = None;
XQueryTree( getDisplay()->GetDisplay(), aWindow,
@@ -1500,9 +1500,9 @@ GdkNativeWindow GtkSalFrame::findTopLevelSystemWindow( GdkNativeWindow aWindow )
void GtkSalFrame::Init( SystemParentData* pSysData )
{
- m_pParent = NULL;
+ m_pParent = nullptr;
m_aForeignParentWindow = (GdkNativeWindow)pSysData->aWindow;
- m_pForeignParent = NULL;
+ m_pForeignParent = nullptr;
m_aForeignTopLevelWindow = findTopLevelSystemWindow( (GdkNativeWindow)pSysData->aWindow );
m_pForeignTopLevel = gdk_window_foreign_new_for_display( getGdkDisplay(), m_aForeignTopLevelWindow );
gdk_window_set_events( m_pForeignTopLevel, GDK_STRUCTURE_MASK );
@@ -1617,7 +1617,7 @@ SalGraphics* GtkSalFrame::AcquireGraphics()
}
}
- return NULL;
+ return nullptr;
}
void GtkSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
@@ -1700,7 +1700,7 @@ void GtkSalFrame::Center()
}
else
{
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
gint px, py;
GdkModifierType nMask;
gdk_display_get_pointer( getGdkDisplay(), &pScreen, &px, &py, &nMask );
@@ -1865,7 +1865,7 @@ void GtkSalFrame::Show( bool bVisible, bool bNoActivate )
// the display connection used for clipboard and our connection
Flush();
}
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
TriggerPaintEvent();
}
}
@@ -1918,7 +1918,7 @@ void GtkSalFrame::setMinMaxSize()
if( aHints )
{
gtk_window_set_geometry_hints( GTK_WINDOW(m_pWindow),
- NULL,
+ nullptr,
&aGeo,
GdkWindowHints( aHints ) );
}
@@ -2043,11 +2043,11 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
AllocateFrame();
if( bSized && ! bMoved )
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
else if( bMoved && ! bSized )
- CallCallback( SALEVENT_MOVE, NULL );
+ CallCallback( SALEVENT_MOVE, nullptr );
else if( bMoved && bSized )
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
if (bSized)
TriggerPaintEvent();
@@ -2117,7 +2117,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
m_nState = GdkWindowState( m_nState | GDK_WINDOW_STATE_MAXIMIZED );
m_aRestorePosSize = Rectangle( Point( pState->mnX, pState->mnY ),
Size( pState->mnWidth, pState->mnHeight ) );
- CallCallback( SALEVENT_RESIZE, NULL );
+ CallCallback( SALEVENT_RESIZE, nullptr );
}
else if( pState->mnMask & (WINDOWSTATE_MASK_X | WINDOWSTATE_MASK_Y |
WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT ) )
@@ -2214,7 +2214,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
if (maGeometry.nDisplayScreenNumber == nNewScreen && eType == SET_RETAIN_SIZE)
return;
- GdkScreen *pScreen = NULL;
+ GdkScreen *pScreen = nullptr;
GdkRectangle aNewMonitor;
bool bSpanAllScreens = nNewScreen == (unsigned int)-1;
@@ -2336,14 +2336,14 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
// FIXME: we should really let gtk+ handle our widget hierarchy ...
if( m_pParent && gtk_widget_get_screen( m_pParent->m_pWindow ) != pScreen )
- SetParent( NULL );
+ SetParent( nullptr );
std::list< GtkSalFrame* > aChildren = m_aChildren;
for( std::list< GtkSalFrame* >::iterator it = aChildren.begin(); it != aChildren.end(); ++it )
(*it)->SetScreen( nNewScreen, SET_RETAIN_SIZE );
m_bDefaultPos = m_bDefaultSize = false;
updateScreenNumber();
- CallCallback( SALEVENT_MOVERESIZE, NULL );
+ CallCallback( SALEVENT_MOVERESIZE, nullptr );
if( bVisible )
Show( true );
@@ -2411,7 +2411,7 @@ void GtkSalFrame::ShowFullScreen( bool bFullScreen, sal_Int32 nScreen )
else
{
SetScreen( nScreen, SET_UN_FULLSCREEN,
- !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : NULL );
+ !m_aRestorePosSize.IsEmpty() ? &m_aRestorePosSize : nullptr );
m_aRestorePosSize = Rectangle();
}
}
@@ -2536,7 +2536,7 @@ void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents )
if( bUseGdkGrab )
{
gdk_pointer_grab( widget_get_window( m_pWindow ), bOwnerEvents,
- (GdkEventMask) nMask, NULL, m_pCurrentCursor,
+ (GdkEventMask) nMask, nullptr, m_pCurrentCursor,
GDK_CURRENT_TIME );
}
else
@@ -2583,7 +2583,7 @@ void GtkSalFrame::grabKeyboard( bool bGrab )
if (bGrab)
{
gdk_device_grab(pKeyboard, widget_get_window(m_pWindow), GDK_OWNERSHIP_NONE,
- true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), NULL, GDK_CURRENT_TIME);
+ true, (GdkEventMask)(GDK_KEY_PRESS | GDK_KEY_RELEASE), nullptr, GDK_CURRENT_TIME);
}
else
{
@@ -2604,7 +2604,7 @@ void GtkSalFrame::grabKeyboard( bool bGrab )
void GtkSalFrame::CaptureMouse( bool bCapture )
{
- getDisplay()->CaptureMouse( bCapture ? this : NULL );
+ getDisplay()->CaptureMouse( bCapture ? this : nullptr );
}
void GtkSalFrame::SetPointerPos( long nX, long nY )
@@ -2658,7 +2658,7 @@ void GtkSalFrame::Flush()
void GtkSalFrame::KeyCodeToGdkKey(const vcl::KeyCode& rKeyCode,
guint* pGdkKeyCode, GdkModifierType *pGdkModifiers)
{
- if ( pGdkKeyCode == NULL || pGdkModifiers == NULL )
+ if ( pGdkKeyCode == nullptr || pGdkModifiers == nullptr )
return;
// Get GDK key modifiers
@@ -2868,7 +2868,7 @@ void GtkSalFrame::SetParent( SalFrame* pNewParent )
m_pParent->m_aChildren.push_back( this );
if( ! isChild() )
gtk_window_set_transient_for( GTK_WINDOW(m_pWindow),
- (m_pParent && ! m_pParent->isChild(true,false)) ? GTK_WINDOW(m_pParent->m_pWindow) : NULL
+ (m_pParent && ! m_pParent->isChild(true,false)) ? GTK_WINDOW(m_pParent->m_pWindow) : nullptr
);
}
@@ -2917,7 +2917,7 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre
if( m_pIMHandler )
{
delete m_pIMHandler;
- m_pIMHandler = NULL;
+ m_pIMHandler = nullptr;
}
if( m_pRegion )
{
@@ -2948,7 +2948,7 @@ void GtkSalFrame::createNewWindow( ::Window aNewParent, bool bXEmbed, SalX11Scre
else
{
m_nStyle &= ~SalFrameStyleFlags::PLUG;
- Init( (m_pParent && m_pParent->m_nXScreen == m_nXScreen) ? m_pParent : NULL, m_nStyle );
+ Init( (m_pParent && m_pParent->m_nXScreen == m_nXScreen) ? m_pParent : nullptr, m_nStyle );
}
// update graphics
@@ -2992,7 +2992,7 @@ bool GtkSalFrame::SetPluginParent( SystemParentData* pSysParent )
void GtkSalFrame::ResetClipRegion()
{
if( m_pWindow )
- gdk_window_shape_combine_region( widget_get_window( m_pWindow ), NULL, 0, 0 );
+ gdk_window_shape_combine_region( widget_get_window( m_pWindow ), nullptr, 0, 0 );
}
void GtkSalFrame::BeginSetClipRegion( sal_uLong )
@@ -3060,7 +3060,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
maGeometry.nWidth = pEvent->xconfigure.width;
maGeometry.nHeight = pEvent->xconfigure.height;
setMinMaxSize();
- getDisplay()->SendInternalEvent( this, NULL, SALEVENT_RESIZE );
+ getDisplay()->SendInternalEvent( this, nullptr, SALEVENT_RESIZE );
}
}
else if( m_pForeignTopLevel && pEvent->xconfigure.window == m_aForeignTopLevelWindow )
@@ -3079,7 +3079,7 @@ bool GtkSalFrame::Dispatch( const XEvent* pEvent )
{
maGeometry.nX = x;
maGeometry.nY = y;
- getDisplay()->SendInternalEvent( this, NULL, SALEVENT_MOVE );
+ getDisplay()->SendInternalEvent( this, nullptr, SALEVENT_MOVE );
}
}
}
@@ -3146,7 +3146,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
{
// close popups if user clicks outside our application
gint x, y;
- bClosePopups = (gdk_display_get_window_at_pointer( GtkSalFrame::getGdkDisplay(), &x, &y ) == NULL);
+ bClosePopups = (gdk_display_get_window_at_pointer( GtkSalFrame::getGdkDisplay(), &x, &y ) == nullptr);
}
/* #i30306# release implicit pointer grab if no popups are open; else
* Drag cannot grab the pointer and will fail.
@@ -3191,7 +3191,7 @@ gboolean GtkSalFrame::signalButton( GtkWidget*, GdkEventButton* pEvent, gpointer
{
pThis->maGeometry.nX = frame_x;
pThis->maGeometry.nY = frame_y;
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
}
}
}
@@ -3307,7 +3307,7 @@ gboolean GtkSalFrame::signalMotion( GtkWidget*, GdkEventMotion* pEvent, gpointer
{
pThis->maGeometry.nX = frame_x;
pThis->maGeometry.nY = frame_y;
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
}
if( ! aDel.isDeleted() )
@@ -3467,7 +3467,7 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
// in the meantime do not propagate focus get/lose if floats are open
if( m_nFloats == 0 )
- pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, NULL );
+ pThis->CallCallback( pEvent->in ? SALEVENT_GETFOCUS : SALEVENT_LOSEFOCUS, nullptr );
return false;
}
@@ -3539,7 +3539,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
//FIXME: no set input focus ...
#endif
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
pThis->TriggerPaintEvent();
return false;
@@ -3549,7 +3549,7 @@ gboolean GtkSalFrame::signalUnmap( GtkWidget*, GdkEvent*, gpointer frame )
{
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
return false;
}
@@ -3630,11 +3630,11 @@ gboolean GtkSalFrame::signalConfigure( GtkWidget*, GdkEventConfigure* pEvent, gp
pThis->AllocateFrame();
if( bMoved && bSized )
- pThis->CallCallback( SALEVENT_MOVERESIZE, NULL );
+ pThis->CallCallback( SALEVENT_MOVERESIZE, nullptr );
else if( bMoved )
- pThis->CallCallback( SALEVENT_MOVE, NULL );
+ pThis->CallCallback( SALEVENT_MOVE, nullptr );
else if( bSized )
- pThis->CallCallback( SALEVENT_RESIZE, NULL );
+ pThis->CallCallback( SALEVENT_RESIZE, nullptr );
if (bSized)
pThis->TriggerPaintEvent();
@@ -3769,7 +3769,7 @@ gboolean GtkSalFrame::signalDelete( GtkWidget*, GdkEvent*, gpointer frame )
pThis->GetWindow()->Enable();
#endif
- pThis->CallCallback( SALEVENT_CLOSE, NULL );
+ pThis->CallCallback( SALEVENT_CLOSE, nullptr );
return true;
}
@@ -3782,13 +3782,13 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram
// do not post these as the whole application tends to
// redraw itself to adjust to the new style
// where there IS no new style resulting in tremendous unnecessary flickering
- if( pPrevious != NULL )
+ if( pPrevious != nullptr )
{
// signalStyleSet does NOT usually have the gdk lock
// so post user event to safely dispatch the SALEVENT_SETTINGSCHANGED
// note: settings changed for multiple frames is avoided in winproc.cxx ImplHandleSettings
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_SETTINGSCHANGED );
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_FONTCHANGED );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_SETTINGSCHANGED );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_FONTCHANGED );
}
#if !GTK_CHECK_VERSION(3,0,0)
@@ -3820,7 +3820,7 @@ gboolean GtkSalFrame::signalWindowState( GtkWidget*, GdkEvent* pEvent, gpointer
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
if( (pThis->m_nState & GDK_WINDOW_STATE_ICONIFIED) != (pEvent->window_state.new_window_state & GDK_WINDOW_STATE_ICONIFIED ) )
{
- GtkSalFrame::getDisplay()->SendInternalEvent( pThis, NULL, SALEVENT_RESIZE );
+ GtkSalFrame::getDisplay()->SendInternalEvent( pThis, nullptr, SALEVENT_RESIZE );
pThis->TriggerPaintEvent();
}
@@ -3857,9 +3857,9 @@ void GtkSalFrame::signalDestroy( GtkWidget* pObj, gpointer frame )
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
if( pObj == pThis->m_pWindow )
{
- pThis->m_pFixedContainer = NULL;
- pThis->m_pEventBox = NULL;
- pThis->m_pWindow = NULL;
+ pThis->m_pFixedContainer = nullptr;
+ pThis->m_pEventBox = nullptr;
+ pThis->m_pWindow = nullptr;
pThis->InvalidateGraphics();
}
}
@@ -3869,11 +3869,11 @@ void GtkSalFrame::signalDestroy( GtkWidget* pObj, gpointer frame )
GtkSalFrame::IMHandler::IMHandler( GtkSalFrame* pFrame )
: m_pFrame(pFrame),
m_nPrevKeyPresses( 0 ),
- m_pIMContext( NULL ),
+ m_pIMContext( nullptr ),
m_bFocused( true ),
m_bPreeditJustChanged( false )
{
- m_aInputEvent.mpTextAttr = NULL;
+ m_aInputEvent.mpTextAttr = nullptr;
createIMContext();
}
@@ -3916,18 +3916,18 @@ void GtkSalFrame::IMHandler::deleteIMContext()
{
// first give IC a chance to deinitialize
GetGenericData()->ErrorTrapPush();
- gtk_im_context_set_client_window( m_pIMContext, NULL );
+ gtk_im_context_set_client_window( m_pIMContext, nullptr );
GetGenericData()->ErrorTrapPop();
// destroy old IC
g_object_unref( m_pIMContext );
- m_pIMContext = NULL;
+ m_pIMContext = nullptr;
}
}
void GtkSalFrame::IMHandler::doCallEndExtTextInput()
{
- m_aInputEvent.mpTextAttr = NULL;
- m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ m_aInputEvent.mpTextAttr = nullptr;
+ m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
void GtkSalFrame::IMHandler::updateIMSpotLocation()
@@ -3950,14 +3950,14 @@ void GtkSalFrame::IMHandler::sendEmptyCommit()
SalExtTextInputEvent aEmptyEv;
aEmptyEv.mnTime = 0;
- aEmptyEv.mpTextAttr = 0;
+ aEmptyEv.mpTextAttr = nullptr;
aEmptyEv.maText.clear();
aEmptyEv.mnCursorPos = 0;
aEmptyEv.mnCursorFlags = 0;
aEmptyEv.mbOnlyCursor = False;
m_pFrame->CallCallback( SALEVENT_EXTTEXTINPUT, static_cast<void*>(&aEmptyEv) );
if( ! aDel.isDeleted() )
- m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, NULL );
+ m_pFrame->CallCallback( SALEVENT_ENDEXTTEXTINPUT, nullptr );
}
void GtkSalFrame::IMHandler::endExtTextInput( EndExtTextInputFlags /*nFlags*/ )
@@ -4133,11 +4133,11 @@ void GtkSalFrame::IMHandler::signalIMCommit( GtkIMContext* pContext, gchar* pTex
vcl::DeletionListener aDel( pThis->m_pFrame );
{
const bool bWasPreedit =
- (pThis->m_aInputEvent.mpTextAttr != 0) ||
+ (pThis->m_aInputEvent.mpTextAttr != nullptr) ||
pThis->m_bPreeditJustChanged;
pThis->m_aInputEvent.mnTime = 0;
- pThis->m_aInputEvent.mpTextAttr = 0;
+ pThis->m_aInputEvent.mpTextAttr = nullptr;
pThis->m_aInputEvent.maText = OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 );
pThis->m_aInputEvent.mnCursorPos = pThis->m_aInputEvent.maText.getLength();
pThis->m_aInputEvent.mnCursorFlags = 0;
@@ -4201,8 +4201,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
{
GtkSalFrame::IMHandler* pThis = static_cast<GtkSalFrame::IMHandler*>(im_handler);
- char* pText = NULL;
- PangoAttrList* pAttrs = NULL;
+ char* pText = nullptr;
+ PangoAttrList* pAttrs = nullptr;
gint nCursorPos = 0;
gtk_im_context_get_preedit_string( pThis->m_pIMContext,
@@ -4224,7 +4224,7 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_bPreeditJustChanged = true;
- bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != NULL;
+ bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != nullptr;
pThis->m_aInputEvent.mnTime = 0;
pThis->m_aInputEvent.maText = pText ? OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString();
pThis->m_aInputEvent.mnCursorPos = nCursorPos;
@@ -4236,8 +4236,8 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
{
- GSList *attr_list = NULL;
- GSList *tmp_list = NULL;
+ GSList *attr_list = nullptr;
+ GSList *tmp_list = nullptr;
gint start, end;
guint sal_attr = 0;
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index d34a98e7bce9..a0cc9779da8a 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -39,7 +39,7 @@ static bool bMenuVisibility = false;
*/
static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCommand, GActionGroup* pActionGroup )
{
- gchar* aCommand = NULL;
+ gchar* aCommand = nullptr;
sal_uInt16 nId = pSalMenuItem->mnId;
Menu* pMenu = pSalMenuItem->mpVCLMenu;
@@ -50,7 +50,7 @@ static gchar* GetCommandForItem( GtkSalMenuItem* pSalMenuItem, gchar* aCurrentCo
else
{
if ( !pMenu )
- return NULL;
+ return nullptr;
OUString aMenuCommand = pMenu->GetItemCommand( nId );
gchar* aCommandStr = g_strdup( OUStringToOString( aMenuCommand, RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -103,7 +103,7 @@ void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, un
{
gchar* aCommand = g_lo_menu_get_command_from_item_in_section( pMenu, nSection, --nSectionItems );
- if ( aCommand != NULL && pOldCommandList != NULL )
+ if ( aCommand != nullptr && pOldCommandList != nullptr )
*pOldCommandList = g_list_append( *pOldCommandList, g_strdup( aCommand ) );
g_free( aCommand );
@@ -114,7 +114,7 @@ void RemoveSpareItemsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, un
void RemoveSpareSectionsFromNativeMenu( GLOMenu* pMenu, GList** pOldCommandList, unsigned nLastSection )
{
- if ( pMenu == NULL || pOldCommandList == NULL )
+ if ( pMenu == nullptr || pOldCommandList == nullptr )
return;
sal_Int32 n = g_menu_model_get_n_items( G_MENU_MODEL( pMenu ) ) - 1;
@@ -133,14 +133,14 @@ gint CompareStr( gpointer str1, gpointer str2 )
void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList, GList* pNewCommandList )
{
- if ( pActionGroup == NULL || pOldCommandList == NULL )
+ if ( pActionGroup == nullptr || pOldCommandList == nullptr )
{
g_list_free_full( pOldCommandList, g_free );
g_list_free_full( pNewCommandList, g_free );
return;
}
- while ( pNewCommandList != NULL )
+ while ( pNewCommandList != nullptr )
{
GList* pNewCommand = g_list_first( pNewCommandList );
pNewCommandList = g_list_remove_link( pNewCommandList, pNewCommand );
@@ -149,7 +149,7 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList,
GList* pOldCommand = g_list_find_custom( pOldCommandList, aCommand, reinterpret_cast<GCompareFunc>(CompareStr) );
- if ( pOldCommand != NULL )
+ if ( pOldCommand != nullptr )
{
pOldCommandList = g_list_remove_link( pOldCommandList, pOldCommand );
g_list_free_full( pOldCommand, g_free );
@@ -158,7 +158,7 @@ void RemoveUnusedCommands( GLOActionGroup* pActionGroup, GList* pOldCommandList,
g_list_free_full( pNewCommand, g_free );
}
- while ( pOldCommandList != NULL )
+ while ( pOldCommandList != nullptr )
{
GList* pCommand = g_list_first( pOldCommandList );
pOldCommandList = g_list_remove_link( pOldCommandList, pCommand );
@@ -183,13 +183,13 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
GLOMenu* pLOMenu = G_LO_MENU( mpMenuModel );
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup );
SAL_INFO("vcl.unity", "Syncing vcl menu " << pVCLMenu << " to menu model " << pLOMenu << " and action group " << pActionGroup);
- GList *pOldCommandList = NULL;
- GList *pNewCommandList = NULL;
+ GList *pOldCommandList = nullptr;
+ GList *pNewCommandList = nullptr;
sal_uInt16 nLOMenuSize = g_menu_model_get_n_items( G_MENU_MODEL( pLOMenu ) );
if ( nLOMenuSize == 0 )
- g_lo_menu_new_section( pLOMenu, 0, NULL );
+ g_lo_menu_new_section( pLOMenu, 0, nullptr );
sal_Int32 nSection = 0;
sal_Int32 nItemPos = 0;
@@ -214,7 +214,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
if ( nLOMenuSize <= nSection )
{
- g_lo_menu_new_section( pLOMenu, nSection, NULL );
+ g_lo_menu_new_section( pLOMenu, nSection, nullptr );
nLOMenuSize++;
}
@@ -234,7 +234,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
// Store current item command in command list.
gchar *aCurrentCommand = g_lo_menu_get_command_from_item_in_section( pLOMenu, nSection, nItemPos );
- if ( aCurrentCommand != NULL )
+ if ( aCurrentCommand != nullptr )
pOldCommandList = g_list_append( pOldCommandList, aCurrentCommand );
// Get the new command for the item.
@@ -244,7 +244,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
NativeSetItemText( nSection, nItemPos, aText );
NativeSetAccelerator( nSection, nItemPos, nAccelKey, nAccelKey.GetName( GetFrame()->GetWindow() ) );
- if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpSubMenu == NULL )
+ if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpSubMenu == nullptr )
{
NativeSetItemCommand( nSection, nItemPos, nId, aNativeCommand, itemBits, bChecked, FALSE );
NativeCheckItem( nSection, nItemPos, itemBits, bChecked );
@@ -262,7 +262,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
GLOMenu* pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos );
- if ( pSubMenuModel == NULL )
+ if ( pSubMenuModel == nullptr )
{
g_lo_menu_new_submenu_in_item_in_section( pLOMenu, nSection, nItemPos );
pSubMenuModel = g_lo_menu_get_submenu_from_item_in_section( pLOMenu, nSection, nItemPos );
@@ -311,11 +311,11 @@ void GtkSalMenu::UpdateFull()
GtkSalMenu::GtkSalMenu( bool bMenuBar ) :
mbMenuBar( bMenuBar ),
- mpVCLMenu( NULL ),
- mpParentSalMenu( NULL ),
- mpFrame( NULL ),
- mpMenuModel( NULL ),
- mpActionGroup( NULL )
+ mpVCLMenu( nullptr ),
+ mpParentSalMenu( nullptr ),
+ mpFrame( nullptr ),
+ mpMenuModel( nullptr ),
+ mpActionGroup( nullptr )
{
}
@@ -365,7 +365,7 @@ void GtkSalMenu::SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsig
GtkSalMenuItem *pItem = static_cast< GtkSalMenuItem* >( pSalMenuItem );
GtkSalMenu *pGtkSubMenu = static_cast< GtkSalMenu* >( pSubMenu );
- if ( pGtkSubMenu == NULL )
+ if ( pGtkSubMenu == nullptr )
return;
pGtkSubMenu->mpParentSalMenu = this;
@@ -399,16 +399,16 @@ static gboolean RefreshMenusUnity(gpointer)
static void RefreshMenusUnity(void*, LinkParamNone*)
{
if(!bInvalidMenus) {
- g_timeout_add(10, &RefreshMenusUnity, NULL);
+ g_timeout_add(10, &RefreshMenusUnity, nullptr);
bInvalidMenus = true;
}
}
static Link<LinkParamNone*,void>* getRefreshLinkInstance()
{
- static Link<LinkParamNone*,void>* pLink = NULL;
+ static Link<LinkParamNone*,void>* pLink = nullptr;
if(!pLink) {
- pLink = new Link<LinkParamNone*,void>(NULL, &RefreshMenusUnity);
+ pLink = new Link<LinkParamNone*,void>(nullptr, &RefreshMenusUnity);
}
return pLink;
}
@@ -457,7 +457,7 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
if (bMenuVisibility)
UpdateFull();
- g_lo_menu_insert_section( pMenuModel, 0, NULL, mpMenuModel );
+ g_lo_menu_insert_section( pMenuModel, 0, nullptr, mpMenuModel );
}
const GtkSalFrame* GtkSalMenu::GetFrame() const
@@ -466,21 +466,21 @@ const GtkSalFrame* GtkSalMenu::GetFrame() const
const GtkSalMenu* pMenu = this;
while( pMenu && ! pMenu->mpFrame )
pMenu = pMenu->mpParentSalMenu;
- return pMenu ? pMenu->mpFrame : NULL;
+ return pMenu ? pMenu->mpFrame : nullptr;
}
void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItemBits bits, gboolean bCheck )
{
SolarMutexGuard aGuard;
- if ( mpActionGroup == NULL )
+ if ( mpActionGroup == nullptr )
return;
gchar* aCommand = g_lo_menu_get_command_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aCommand != NULL || g_strcmp0( aCommand, "" ) != 0 )
+ if ( aCommand != nullptr || g_strcmp0( aCommand, "" ) != 0 )
{
- GVariant *pCheckValue = NULL;
+ GVariant *pCheckValue = nullptr;
GVariant *pCurrentState = g_action_group_get_action_state( mpActionGroup, aCommand );
if ( bits & MenuItemBits::RADIOCHECK )
@@ -488,13 +488,13 @@ void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItem
else
{
// By default, all checked items are checkmark buttons.
- if (bCheck || pCurrentState != NULL)
+ if (bCheck || pCurrentState != nullptr)
pCheckValue = g_variant_new_boolean( bCheck );
}
- if ( pCheckValue != NULL )
+ if ( pCheckValue != nullptr )
{
- if ( pCurrentState == NULL || g_variant_equal( pCurrentState, pCheckValue ) == FALSE )
+ if ( pCurrentState == nullptr || g_variant_equal( pCurrentState, pCheckValue ) == FALSE )
{
g_action_group_change_action_state( mpActionGroup, aCommand, pCheckValue );
}
@@ -504,7 +504,7 @@ void GtkSalMenu::NativeCheckItem( unsigned nSection, unsigned nItemPos, MenuItem
}
}
- if ( pCurrentState != NULL )
+ if ( pCurrentState != nullptr )
g_variant_unref( pCurrentState );
}
@@ -533,7 +533,7 @@ void GtkSalMenu::NativeSetItemText( unsigned nSection, unsigned nItemPos, const
// Update item text only when necessary.
gchar* aLabel = g_lo_menu_get_label_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aLabel == NULL || g_strcmp0( aLabel, aConvertedText.getStr() ) != 0 )
+ if ( aLabel == nullptr || g_strcmp0( aLabel, aConvertedText.getStr() ) != 0 )
g_lo_menu_set_label_to_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos, aConvertedText.getStr() );
if ( aLabel )
@@ -555,7 +555,7 @@ void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, con
gchar* aCurrentAccel = g_lo_menu_get_accelerator_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
- if ( aCurrentAccel == NULL && g_strcmp0( aCurrentAccel, aAccelerator ) != 0 )
+ if ( aCurrentAccel == nullptr && g_strcmp0( aCurrentAccel, aAccelerator ) != 0 )
g_lo_menu_set_accelerator_to_item_in_section ( G_LO_MENU( mpMenuModel ), nSection, nItemPos, aAccelerator );
g_free( aAccelerator );
@@ -573,7 +573,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
SolarMutexGuard aGuard;
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( mpActionGroup );
- GVariant *pTarget = NULL;
+ GVariant *pTarget = nullptr;
if ( g_action_group_has_action( mpActionGroup, aCommand ) == FALSE ) {
if ( ( nBits & MenuItemBits::CHECKABLE ) || bIsSubmenu )
@@ -582,7 +582,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GVariantType* pStateType = g_variant_type_new( reinterpret_cast<gchar const *>(G_VARIANT_TYPE_BOOLEAN) );
GVariant* pState = g_variant_new_boolean( bChecked );
- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, NULL, pStateType, NULL, pState );
+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, bIsSubmenu, nullptr, pStateType, nullptr, pState );
}
else if ( nBits & MenuItemBits::RADIOCHECK )
{
@@ -592,7 +592,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GVariant* pState = g_variant_new_string( "" );
pTarget = g_variant_new_string( aCommand );
- g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, NULL, pState );
+ g_lo_action_group_insert_stateful( pActionGroup, aCommand, nId, FALSE, pParameterType, pStateType, nullptr, pState );
}
else
{
@@ -606,7 +606,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
// Menu item is not updated unless it's necessary.
gchar* aCurrentCommand = g_lo_menu_get_command_from_item_in_section( pMenu, nSection, nItemPos );
- if ( aCurrentCommand == NULL || g_strcmp0( aCurrentCommand, aCommand ) != 0 )
+ if ( aCurrentCommand == nullptr || g_strcmp0( aCurrentCommand, aCommand ) != 0 )
{
g_lo_menu_set_command_to_item_in_section( pMenu, nSection, nItemPos, aCommand );
@@ -627,7 +627,7 @@ void GtkSalMenu::NativeSetItemCommand( unsigned nSection,
GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSubmenu )
{
SolarMutexGuard aGuard;
- GtkSalMenu* pMenu = NULL;
+ GtkSalMenu* pMenu = nullptr;
for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
@@ -646,10 +646,10 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
}
else
{
- if ( pSalItem->mpSubMenu != NULL )
+ if ( pSalItem->mpSubMenu != nullptr )
pMenu = pSalItem->mpSubMenu->GetMenuForItemCommand( aCommand, bGetSubmenu );
- if ( pMenu != NULL )
+ if ( pMenu != nullptr )
break;
}
}
@@ -665,7 +665,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
return;
GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast<gchar*>(aCommand), FALSE );
- Menu* pSubMenu = ( pSalSubMenu != NULL ) ? pSalSubMenu->GetMenu() : NULL;
+ Menu* pSubMenu = ( pSalSubMenu != nullptr ) ? pSalSubMenu->GetMenu() : nullptr;
MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
pMenuBar->HandleMenuCommandEvent( pSubMenu, itemId );
@@ -677,7 +677,7 @@ void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar)
for ( size_t nPos = 0; nPos < maItems.size(); nPos++ )
{
GtkSalMenuItem *pSalItem = maItems[ nPos ];
- if ( pSalItem->mpSubMenu != NULL )
+ if ( pSalItem->mpSubMenu != nullptr )
{
pSalItem->mpSubMenu->ActivateAllSubmenus(pMenuBar);
pSalItem->mpSubMenu->Update();
@@ -699,7 +699,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( const_cast<gchar*>(aMenuCommand), TRUE );
- if ( pSalSubMenu != NULL ) {
+ if ( pSalSubMenu != nullptr ) {
MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
pMenuBar->HandleMenuDeActivateEvent( pSalSubMenu->mpVCLMenu );
}
@@ -707,7 +707,7 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
void GtkSalMenu::Display( bool bVisible )
{
- if ( !mbMenuBar || mpVCLMenu == NULL )
+ if ( !mbMenuBar || mpVCLMenu == nullptr )
return;
bMenuVisibility = bVisible;
@@ -769,8 +769,8 @@ GtkSalMenuItem::GtkSalMenuItem( const SalItemParams* pItemData ) :
mnType( pItemData->eType ),
mbVisible( true ),
mpVCLMenu( pItemData->pMenu ),
- mpParentMenu( NULL ),
- mpSubMenu( NULL )
+ mpParentMenu( nullptr ),
+ mpSubMenu( nullptr )
{
}
diff --git a/vcl/unx/gtk/window/hudawareness.cxx b/vcl/unx/gtk/window/hudawareness.cxx
index 760103314d7c..0cfcd8635736 100644
--- a/vcl/unx/gtk/window/hudawareness.cxx
+++ b/vcl/unx/gtk/window/hudawareness.cxx
@@ -44,7 +44,7 @@ hud_awareness_method_call (GDBusConnection * /* connection */,
(* handle->callback) (active, handle->user_data);
}
- g_dbus_method_invocation_return_value (invocation, NULL);
+ g_dbus_method_invocation_return_value (invocation, nullptr);
}
guint
@@ -64,9 +64,9 @@ hud_awareness_register (GDBusConnection *connection,
memset (static_cast<void *>(&vtable), 0, sizeof (vtable));
vtable.method_call = hud_awareness_method_call;
- if G_UNLIKELY (iface == NULL)
+ if G_UNLIKELY (iface == nullptr)
{
- GError *local_error = NULL;
+ GError *local_error = nullptr;
info = g_dbus_node_info_new_for_xml ("<node>"
"<interface name='com.canonical.hud.Awareness'>"
@@ -79,7 +79,7 @@ hud_awareness_register (GDBusConnection *connection,
&local_error);
g_assert_no_error (local_error);
iface = g_dbus_node_info_lookup_interface (info, "com.canonical.hud.Awareness");
- g_assert (iface != NULL);
+ g_assert (iface != nullptr);
}
handle = static_cast<HudAwarenessHandle*>(g_malloc (sizeof (HudAwarenessHandle)));
diff --git a/vcl/unx/gtk3/app/gtk3gtkinst.cxx b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
index 38e28ccdeb20..0b3d40517c14 100644
--- a/vcl/unx/gtk3/app/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/app/gtk3gtkinst.cxx
@@ -510,7 +510,7 @@ VclGtkClipboard::VclGtkClipboard(GdkAtom nSelection)
GtkClipboard* clipboard = gtk_clipboard_get(m_nSelection);
m_nOwnerChangedSignalId = g_signal_connect(clipboard, "owner-change",
G_CALLBACK(handle_owner_change), this);
- m_pOwner = CLIPBOARD_OWNER(g_object_new(CLIPBOARD_OWNER_OBJECT, NULL));
+ m_pOwner = CLIPBOARD_OWNER(g_object_new(CLIPBOARD_OWNER_OBJECT, nullptr));
m_pOwner->m_pThis = this;
}
diff --git a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
index b9a2751fc4aa..ec5e641f150e 100644
--- a/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
+++ b/vcl/unx/gtk3/gdi/cairo_gtk3_cairo.cxx
@@ -33,8 +33,8 @@ namespace cairo
* Set the mpSurface as pSurface
**/
Gtk3Surface::Gtk3Surface(const CairoSurfaceSharedPtr& pSurface)
- : mpGraphics(NULL)
- , cr(NULL)
+ : mpGraphics(nullptr)
+ , cr(nullptr)
, mpSurface(pSurface)
{}
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 1cf9c2eb2d4a..a1927e4e47f8 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -22,31 +22,31 @@
#include <boost/optional.hpp>
-GtkStyleContext* GtkSalGraphics::mpButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpEntryStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpTextViewStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpVScrollbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpHScrollbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolbarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpToolbarSeperatorStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpCheckButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpMenuStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpCheckMenuItemStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpSpinStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpComboboxStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpComboboxButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpListboxStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpListboxButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpNoteBookStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFrameInStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFixedHoriLineStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpFixedVertLineStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpTreeHeaderButtonStyle = NULL;
-GtkStyleContext* GtkSalGraphics::mpProgressBarStyle = NULL;
+GtkStyleContext* GtkSalGraphics::mpButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpEntryStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpTextViewStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpVScrollbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpHScrollbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolbarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpToolbarSeperatorStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpCheckButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuBarStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuBarItemStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpMenuStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpCheckMenuItemStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpSpinStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpComboboxStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpComboboxButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpListboxStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpListboxButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpNoteBookStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFrameInStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFrameOutStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFixedHoriLineStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpFixedVertLineStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpTreeHeaderButtonStyle = nullptr;
+GtkStyleContext* GtkSalGraphics::mpProgressBarStyle = nullptr;
bool GtkSalGraphics::style_loaded = false;
/************************************************************************
@@ -177,7 +177,7 @@ Rectangle GtkSalGraphics::NWGetSpinButtonRect( ControlPart nPart, Rectangle aAre
Rectangle GtkSalGraphics::NWGetScrollButtonRect( ControlPart nPart, Rectangle aAreaRect )
{
- GtkStyleContext* pScrollbarStyle = NULL;
+ GtkStyleContext* pScrollbarStyle = nullptr;
if ((nPart == PART_BUTTON_LEFT) || (nPart == PART_BUTTON_RIGHT))
pScrollbarStyle = mpHScrollbarStyle;
else // (nPart == PART_BUTTON_UP) || (nPart == PART_BUTTON_DOWN)
@@ -282,8 +282,8 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context,
gdouble arrow1Angle; // backward
gdouble arrow2Angle; // forward
Rectangle arrowRect;
- const gchar* button1StyleClass = NULL;
- const gchar* button2StyleClass = NULL;
+ const gchar* button1StyleClass = nullptr;
+ const gchar* button2StyleClass = nullptr;
gint slider_width = 0;
gint stepper_size = 0;
gint stepper_spacing = 0;
@@ -602,8 +602,8 @@ void GtkSalGraphics::PaintOneSpinButton( GtkStyleContext *context,
GdkPixbuf *pixbuf = gtk_icon_info_load_symbolic_for_context
(info,
context,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
iconWidth = gdk_pixbuf_get_width(pixbuf);
iconHeight = gdk_pixbuf_get_height(pixbuf);
Rectangle arrowRect;
@@ -626,7 +626,7 @@ void GtkSalGraphics::PaintSpinButton(GtkStyleContext *context,
const ImplControlValue& rValue )
{
Rectangle areaRect;
- const SpinbuttonValue *pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : NULL;
+ const SpinbuttonValue *pSpinVal = (rValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue *>(&rValue) : nullptr;
ControlPart upBtnPart = PART_BUTTON_UP;
ControlState upBtnState = ControlState::NONE;
ControlPart downBtnPart = PART_BUTTON_DOWN;
@@ -869,9 +869,9 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
GtkStateFlags flags;
GtkShadowType shadow;
gint renderType = nPart == PART_FOCUS ? RENDER_FOCUS : RENDER_BACKGROUND_AND_FRAME;
- GtkStyleContext *context = NULL;
- const gchar *styleClass = NULL;
- GdkPixbuf *pixbuf = NULL;
+ GtkStyleContext *context = nullptr;
+ const gchar *styleClass = nullptr;
+ GdkPixbuf *pixbuf = nullptr;
NWConvertVCLStateToGTKState(nState, &flags, &shadow);
@@ -1059,7 +1059,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
GtkIconTheme *pIconTheme = gtk_icon_theme_get_for_screen(gtk_widget_get_screen(mpWindow));
pixbuf = gtk_icon_theme_load_icon(pIconTheme, icon,
std::max(rControlRegion.GetWidth(), rControlRegion.GetHeight()),
- static_cast<GtkIconLookupFlags>(0), NULL);
+ static_cast<GtkIconLookupFlags>(0), nullptr);
flags = GTK_STATE_FLAG_SELECTED;
renderType = RENDER_ICON;
styleClass = GTK_STYLE_CLASS_ARROW;
@@ -1225,7 +1225,7 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
Rectangle GetWidgetSize(const Rectangle& rControlRegion, GtkWidget* widget)
{
GtkRequisition aReq;
- gtk_widget_get_preferred_size(widget, NULL, &aReq);
+ gtk_widget_get_preferred_size(widget, nullptr, &aReq);
long nHeight = (rControlRegion.GetHeight() > aReq.height) ? rControlRegion.GetHeight() : aReq.height;
return Rectangle(rControlRegion.TopLeft(), Size(rControlRegion.GetWidth(), nHeight));
}
@@ -1593,7 +1593,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMenuHighlightTextColor( aHighlightTextColor );
// hyperlink colors
- GdkColor *link_color = NULL;
+ GdkColor *link_color = nullptr;
gtk_style_context_get_style(pStyle,
"link-color", &link_color,
NULL);
@@ -1602,7 +1602,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
gdk_color_free(link_color);
}
- link_color = NULL;
+ link_color = nullptr;
gtk_style_context_get_style(pStyle,
"visited-link-color", &link_color,
NULL);
@@ -1793,7 +1793,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetMinThumbSize( min_slider_length - magic );
// preferred icon style
- gchar* pIconThemeName = NULL;
+ gchar* pIconThemeName = nullptr;
g_object_get( pSettings, "gtk-icon-theme-name", &pIconThemeName, nullptr );
aStyleSet.SetPreferredIconTheme( OUString::createFromAscii( pIconThemeName ) );
g_free( pIconThemeName );
@@ -2005,7 +2005,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
return;
style_loaded = true;
- gtk_init(NULL, NULL);
+ gtk_init(nullptr, nullptr);
/* Load the GtkStyleContexts, it might be a bit slow, but usually,
* gtk apps create a lot of widgets at startup, so, it shouldn't be
* too slow */
@@ -2030,13 +2030,13 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
mpToolbarSeperatorStyle = gtk_widget_get_style_context(GTK_WIDGET(item));
GtkWidget *pButton = gtk_button_new();
- item = gtk_tool_button_new(pButton, NULL);
+ item = gtk_tool_button_new(pButton, nullptr);
gtk_toolbar_insert(GTK_TOOLBAR(pToolbar), item, -1);
mpToolButtonStyle = gtk_widget_get_style_context(GTK_WIDGET(pButton));
- getStyleContext(&mpVScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, NULL));
+ getStyleContext(&mpVScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_VERTICAL, nullptr));
gtk_style_context_add_class(mpVScrollbarStyle, GTK_STYLE_CLASS_SCROLLBAR);
- getStyleContext(&mpHScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, NULL));
+ getStyleContext(&mpHScrollbarStyle, gtk_scrollbar_new(GTK_ORIENTATION_HORIZONTAL, nullptr));
gtk_style_context_add_class(mpHScrollbarStyle, GTK_STYLE_CLASS_SCROLLBAR);
getStyleContext(&mpCheckButtonStyle, gtk_check_button_new());
@@ -2059,7 +2059,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
mpCheckMenuItemStyle = gtk_widget_get_style_context(gCheckMenuItemWidget);
/* Spinbutton */
- gSpinBox = gtk_spin_button_new(NULL, 0, 0);
+ gSpinBox = gtk_spin_button_new(nullptr, 0, 0);
getStyleContext(&mpSpinStyle, gSpinBox);
/* NoteBook */
@@ -2071,7 +2071,7 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Get ComboBox Entry and Button */
gtk_container_forall(GTK_CONTAINER(gComboBox),
get_combo_box_entry_inner_widgets,
- NULL);
+ nullptr);
mpComboboxButtonStyle = gtk_widget_get_style_context(gComboBoxButtonWidget);
/* Listbox */
@@ -2081,14 +2081,14 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
/* Get ComboBox Button */
gtk_container_forall(GTK_CONTAINER(gListBox),
get_combo_box_inner_button,
- NULL);
+ nullptr);
mpListboxButtonStyle = gtk_widget_get_style_context(gListBoxButtonWidget);
/* Frames */
- gFrameIn = gtk_frame_new(NULL);
+ gFrameIn = gtk_frame_new(nullptr);
gtk_frame_set_shadow_type(GTK_FRAME(gFrameIn), GTK_SHADOW_IN);
- gFrameOut = gtk_frame_new(NULL);
+ gFrameOut = gtk_frame_new(nullptr);
gtk_frame_set_shadow_type(GTK_FRAME(gFrameOut), GTK_SHADOW_OUT);
getStyleContext(&mpFrameInStyle, gFrameIn);
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 048018927c40..5576c097c70c 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -116,7 +116,7 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<uno::XComponentContext>& )
_extraControls = new QWidget();
_layout = new QGridLayout(_extraControls);
- _dialog = new KFileDialog(KUrl("~"), QString(""), 0, _extraControls);
+ _dialog = new KFileDialog(KUrl("~"), QString(""), nullptr, _extraControls);
#if ALLOW_REMOTE_URLS
if( KFileWidget* fileWidget = dynamic_cast< KFileWidget* >( _dialog->fileWidget()))
{
@@ -545,7 +545,7 @@ QString KDE4FilePicker::getResString( sal_Int16 aRedId )
void KDE4FilePicker::addCustomControl(sal_Int16 controlId)
{
- QWidget* widget = 0;
+ QWidget* widget = nullptr;
sal_Int32 resId = -1;
switch (controlId)
diff --git a/vcl/unx/kde4/KDESalDisplay.cxx b/vcl/unx/kde4/KDESalDisplay.cxx
index 06e7b6d06c76..105393fd9b54 100644
--- a/vcl/unx/kde4/KDESalDisplay.cxx
+++ b/vcl/unx/kde4/KDESalDisplay.cxx
@@ -25,12 +25,12 @@
#include <assert.h>
#include <unx/saldata.hxx>
-SalKDEDisplay* SalKDEDisplay::selfptr = NULL;
+SalKDEDisplay* SalKDEDisplay::selfptr = nullptr;
SalKDEDisplay::SalKDEDisplay( Display* pDisp )
: SalX11Display( pDisp )
{
- assert( selfptr == NULL );
+ assert( selfptr == nullptr );
selfptr = this;
xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False );
}
@@ -41,9 +41,9 @@ SalKDEDisplay::~SalKDEDisplay()
static_cast<KDEXLib*>(GetXLib())->doStartup();
// clean up own members
doDestruct();
- selfptr = NULL;
+ selfptr = nullptr;
// prevent SalDisplay from closing KApplication's display
- pDisp_ = NULL;
+ pDisp_ = nullptr;
}
void SalKDEDisplay::Yield()
@@ -79,7 +79,7 @@ bool SalKDEDisplay::checkDirectInputEvent( XEvent* ev )
if( ev->xany.type == KeyPress || ev->xany.type == KeyRelease
|| ( ev->xany.type == ClientMessage && ev->xclient.message_type == xim_protocol ))
{
- if( QApplication::activeWindow() == NULL )
+ if( QApplication::activeWindow() == nullptr )
{
Dispatch(ev);
return true;
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index cae5f1561f87..b75409af1b44 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -383,7 +383,7 @@ SalGraphics* KDESalFrame::AcquireGraphics()
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index 927c0df9cb79..b8c98c306490 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -235,7 +235,7 @@ bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part,
}
m_image->fill(KApplication::palette().color(QPalette::Window).rgb());
- QRegion* clipRegion = NULL;
+ QRegion* clipRegion = nullptr;
if (type == CTRL_PUSHBUTTON)
{
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index fd8469a72ba9..6c3023b9ab77 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -50,7 +50,7 @@
KDEXLib::KDEXLib() :
SalXLib(), m_bStartupDone(false),
- m_pFreeCmdLineArgs(0), m_pAppCmdLineArgs(0), m_nFakeCmdLineArgs( 0 ),
+ m_pFreeCmdLineArgs(nullptr), m_pAppCmdLineArgs(nullptr), m_nFakeCmdLineArgs( 0 ),
m_frameWidth( -1 ), m_isGlibEventLoopType(false),
m_allowKdeDialogs(false), blockIdleTimeout(false)
{
@@ -168,14 +168,14 @@ void KDEXLib::Init()
// (QApplication::disableSessionManagement(false) wouldn't quite do,
// since that still actually connects to the session manager, it just
// won't save the application data on session shutdown).
- char* session_manager = NULL;
- if( getenv( "SESSION_MANAGER" ) != NULL )
+ char* session_manager = nullptr;
+ if( getenv( "SESSION_MANAGER" ) != nullptr )
{
session_manager = strdup( getenv( "SESSION_MANAGER" ));
unsetenv( "SESSION_MANAGER" );
}
m_pApplication.reset( new VCLKDEApplication() );
- if( session_manager != NULL )
+ if( session_manager != nullptr )
{
// coverity[tainted_string] - trusted source for setenv
setenv( "SESSION_MANAGER", session_manager, 1 );
@@ -215,7 +215,7 @@ void KDEXLib::Init()
#if KDE_HAVE_GLIB
#include <glib.h>
-static GPollFunc old_gpoll = NULL;
+static GPollFunc old_gpoll = nullptr;
static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
{
@@ -227,7 +227,7 @@ static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
static bool ( *old_qt_event_filter )( void* );
static bool qt_event_filter( void* m )
{
- if( old_qt_event_filter != NULL && old_qt_event_filter( m ))
+ if( old_qt_event_filter != nullptr && old_qt_event_filter( m ))
return true;
if( SalKDEDisplay::self() && SalKDEDisplay::self()->checkDirectInputEvent( static_cast< XEvent* >( m )))
return true;
@@ -240,8 +240,8 @@ void KDEXLib::setupEventLoop()
#if KDE_HAVE_GLIB
if( m_isGlibEventLoopType )
{
- old_gpoll = g_main_context_get_poll_func( NULL );
- g_main_context_set_poll_func( NULL, gpoll_wrapper );
+ old_gpoll = g_main_context_get_poll_func( nullptr );
+ g_main_context_set_poll_func( nullptr, gpoll_wrapper );
if( m_allowKdeDialogs )
QApplication::clipboard()->setProperty( "useEventLoopWhenWaiting", true );
return;
@@ -434,7 +434,7 @@ int KDEXLib::getFrameWidth()
}
// fill in a default
- QFrame aFrame( NULL );
+ QFrame aFrame( nullptr );
aFrame.setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
aFrame.ensurePolished();
m_frameWidth = aFrame.frameWidth();
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index 131dc9c37267..3b318eb44816 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -68,7 +68,7 @@ extern "C" {
nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
SAL_INFO( "vcl.kde4", "unsuitable qt version " << nMajor << "." << nMinor << "." << nMicro );
#endif
- return NULL;
+ return nullptr;
}
#endif
diff --git a/vcl/workben/fftester.cxx b/vcl/workben/fftester.cxx
index c04d6d187499..c57407d661fd 100644
--- a/vcl/workben/fftester.cxx
+++ b/vcl/workben/fftester.cxx
@@ -111,7 +111,7 @@ try_again:
{
Graphic aGraphic;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) ImportJPEG(aFileStream, aGraphic, NULL, GraphicFilterImportFlags::NONE);
+ ret = (int) ImportJPEG(aFileStream, aGraphic, nullptr, GraphicFilterImportFlags::NONE);
}
else if (strcmp(argv[2], "gif") == 0)
{
@@ -151,7 +151,7 @@ try_again:
}
else if (strcmp(argv[2], "pcd") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -162,11 +162,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "dxf") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -177,11 +177,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "met") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -192,11 +192,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if ((strcmp(argv[2], "pbm") == 0) || strcmp(argv[2], "ppm") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -207,11 +207,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "psd") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -222,11 +222,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "eps") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -237,11 +237,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "pct") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -252,11 +252,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "pcx") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -267,11 +267,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "ras") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -282,11 +282,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "tga") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -297,11 +297,11 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if (strcmp(argv[2], "tif") == 0)
{
- static PFilterCall pfnImport(0);
+ static PFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -312,14 +312,14 @@ try_again:
}
Graphic aTarget;
SvFileStream aFileStream(out, StreamMode::READ);
- ret = (int) (*pfnImport)(aFileStream, aTarget, NULL);
+ ret = (int) (*pfnImport)(aFileStream, aTarget, nullptr);
}
else if ( (strcmp(argv[2], "doc") == 0) ||
(strcmp(argv[2], "ww8") == 0) ||
(strcmp(argv[2], "ww6") == 0) ||
(strcmp(argv[2], "ww2") == 0) )
{
- static WFilterCall pfnImport(0);
+ static WFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -338,7 +338,7 @@ try_again:
else if ( (strcmp(argv[2], "xls") == 0) ||
(strcmp(argv[2], "wb2") == 0) )
{
- static WFilterCall pfnImport(0);
+ static WFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -351,7 +351,7 @@ try_again:
}
else if (strcmp(argv[2], "hwp") == 0)
{
- static HFilterCall pfnImport(0);
+ static HFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -364,7 +364,7 @@ try_again:
}
else if (strcmp(argv[2], "602") == 0)
{
- static HFilterCall pfnImport(0);
+ static HFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -377,7 +377,7 @@ try_again:
}
else if (strcmp(argv[2], "lwp") == 0)
{
- static HFilterCall pfnImport(0);
+ static HFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
@@ -390,7 +390,7 @@ try_again:
}
else if (strcmp(argv[2], "ppt") == 0)
{
- static HFilterCall pfnImport(0);
+ static HFilterCall pfnImport(nullptr);
if (!pfnImport)
{
osl::Module aLibrary;
diff --git a/vcl/workben/icontest.cxx b/vcl/workben/icontest.cxx
index 75910f545cae..f5028b92c4ee 100644
--- a/vcl/workben/icontest.cxx
+++ b/vcl/workben/icontest.cxx
@@ -84,8 +84,8 @@ public:
MyWorkWindow::MyWorkWindow( vcl::Window* pParent, WinBits nWinStyle )
: WorkWindow(pParent, nWinStyle)
- , mpBitmap(NULL)
- , mpFixedBitmap(NULL)
+ , mpBitmap(nullptr)
+ , mpFixedBitmap(nullptr)
{
mnPaintCount = 0;
mnStartTime = getTimeNow();
diff --git a/vcl/workben/mtfdemo.cxx b/vcl/workben/mtfdemo.cxx
index ed66ed864998..3c842f9da649 100644
--- a/vcl/workben/mtfdemo.cxx
+++ b/vcl/workben/mtfdemo.cxx
@@ -41,7 +41,7 @@ class DemoMtfWin : public WorkWindow
public:
explicit DemoMtfWin(const OUString& rFileName)
- : WorkWindow(NULL, WB_APP | WB_STDWORK)
+ : WorkWindow(nullptr, WB_APP | WB_STDWORK)
{
SvFileStream aFileStream(rFileName, StreamMode::READ);
@@ -80,7 +80,7 @@ class DemoMtfApp : public Application
public:
DemoMtfApp()
- : mpWin(NULL)
+ : mpWin(nullptr)
{
}
@@ -147,7 +147,7 @@ protected:
uno::Reference< lang::XComponent >(
comphelper::getProcessComponentContext(),
uno::UNO_QUERY_THROW)-> dispose();
- ::comphelper::setProcessServiceFactory(NULL);
+ ::comphelper::setProcessServiceFactory(nullptr);
}
};
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 0e98530e8d77..76ec17d0f0f8 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1384,7 +1384,7 @@ class DemoWin : public WorkWindow
public:
DemoWin(DemoRenderer &rRenderer, bool bThreads) :
- WorkWindow(NULL, WB_APP | WB_STDWORK),
+ WorkWindow(nullptr, WB_APP | WB_STDWORK),
mrRenderer(rRenderer),
testThreads(bThreads)
{
@@ -1478,7 +1478,7 @@ class DemoWidgets : public WorkWindow
public:
DemoWidgets() :
- WorkWindow(NULL, WB_APP | WB_STDWORK),
+ WorkWindow(nullptr, WB_APP | WB_STDWORK),
mpBox(VclPtrInstance<VclVBox>(this, false, 3)),
mpToolbox(VclPtrInstance<ToolBox>(mpBox.get())),
mpButton(VclPtrInstance<PushButton>(mpBox.get())),
@@ -1609,7 +1609,7 @@ IMPL_LINK_NOARG_TYPED(DemoWidgets, GLTestClick, Button*, void)
class DemoPopup : public FloatingWindow
{
public:
- DemoPopup() : FloatingWindow( NULL, WB_SYSTEMWINDOW|WB_TOOLTIPWIN)
+ DemoPopup() : FloatingWindow( nullptr, WB_SYSTEMWINDOW|WB_TOOLTIPWIN)
{
SetType( WINDOW_HELPTEXTWINDOW );
@@ -1702,7 +1702,7 @@ public:
}
assert (pBuffer->IsFree()); (void)pBuffer;
mpB->makeCurrent();
- assert (mpA->mpCurrentFramebuffer == NULL);
+ assert (mpA->mpCurrentFramebuffer == nullptr);
}
void testVirtualDevice()
@@ -1880,7 +1880,7 @@ protected:
uno::Reference< lang::XComponent >(
comphelper::getProcessComponentContext(),
uno::UNO_QUERY_THROW)-> dispose();
- ::comphelper::setProcessServiceFactory(NULL);
+ ::comphelper::setProcessServiceFactory(nullptr);
}
};