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 ),
mnG